use of com.gitblit.models.ServerStatus in project gitblit by gitblit.
the class StatusPanel method updateTable.
protected void updateTable(boolean pack) {
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() + " (" + Translation.getTimeUtils().timeAgo(status.bootDate) + ")");
url.setText(gitblit.url);
servletContainer.setText(status.servletContainer);
ByteFormat byteFormat = new ByteFormat();
heapMaximum.setText(byteFormat.format(status.heapMaximum));
heapAllocated.setText(byteFormat.format(status.heapAllocated));
heapUsed.setText(byteFormat.format(status.heapAllocated - status.heapFree) + " (" + byteFormat.format(status.heapFree) + " " + Translation.get("gb.free") + ")");
tableModel.setProperties(status.systemProperties);
tableModel.fireTableDataChanged();
}
use of com.gitblit.models.ServerStatus in project gitblit by gitblit.
the class RpcTests method testServerStatus.
@Test
public void testServerStatus() throws Exception {
ServerStatus status = RpcUtils.getStatus(url, account, password.toCharArray());
assertNotNull("No status was retrieved!", status);
}
use of com.gitblit.models.ServerStatus in project gitblit by gitblit.
the class RpcUtils method getStatus.
/**
* Retrieves the server status object.
*
* @param serverUrl
* @param account
* @param password
* @return an ServerStatus object
* @throws IOException
*/
public static ServerStatus getStatus(String serverUrl, String account, char[] password) throws IOException {
String url = asLink(serverUrl, RpcRequest.LIST_STATUS);
ServerStatus status = JsonUtils.retrieveJson(url, ServerStatus.class, account, password);
return status;
}
Aggregations