| | |
| | | import com.gitblit.Constants.RpcRequest;
|
| | | import com.gitblit.models.ServerStatus;
|
| | | import com.gitblit.utils.ByteFormat;
|
| | | import com.gitblit.utils.TimeUtils;
|
| | |
|
| | | /**
|
| | | * This panel displays the server status.
|
| | |
| | | propertiesTable.setRowHeight(nameRenderer.getFont().getSize() + 8);
|
| | | propertiesTable.getColumn(name).setCellRenderer(nameRenderer);
|
| | |
|
| | | JPanel centerPanel = new JPanel(new BorderLayout());
|
| | | JPanel centerPanel = new JPanel(new BorderLayout(Utils.MARGIN, Utils.MARGIN));
|
| | | centerPanel.add(fieldsPanel, BorderLayout.NORTH);
|
| | | centerPanel.add(new JScrollPane(propertiesTable), BorderLayout.CENTER);
|
| | |
|
| | | JPanel controls = new JPanel();
|
| | | JPanel controls = new JPanel(new FlowLayout(FlowLayout.CENTER, Utils.MARGIN, 0));
|
| | | controls.add(refreshStatus);
|
| | |
|
| | | header = new HeaderPanel(Translation.get("gb.status"), "health_16x16.png");
|
| | | setLayout(new BorderLayout());
|
| | | setLayout(new BorderLayout(Utils.MARGIN, Utils.MARGIN));
|
| | | add(header, BorderLayout.NORTH);
|
| | | add(centerPanel, BorderLayout.CENTER);
|
| | | add(controls, BorderLayout.SOUTH);
|
| | |
| | | ServerStatus status = gitblit.getStatus();
|
| | | header.setText(Translation.get("gb.status"));
|
| | | version.setText(Constants.NAME + (status.isGO ? " GO v" : " WAR v") + status.version);
|
| | | releaseDate.setText(status.releaseDate);
|
| | | bootDate.setText(status.bootDate.toString() + " (" + TimeUtils.timeAgo(status.bootDate)
|
| | | releaseDate.setText(status.releaseDate); |
| | | bootDate.setText(status.bootDate.toString() + " (" + Translation.getTimeUtils().timeAgo(status.bootDate)
|
| | | + ")");
|
| | | url.setText(gitblit.url);
|
| | | servletContainer.setText(status.servletContainer);
|