From 8daefa09d99774639a355c0dfa2b989fa1007f5f Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Thu, 11 Oct 2012 17:11:18 -0400
Subject: [PATCH] Created static repository close functions for unit testing and fixed Windows sharing violations
---
src/com/gitblit/client/StatusPanel.java | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/com/gitblit/client/StatusPanel.java b/src/com/gitblit/client/StatusPanel.java
index 669aa47..7506dfe 100644
--- a/src/com/gitblit/client/StatusPanel.java
+++ b/src/com/gitblit/client/StatusPanel.java
@@ -35,7 +35,6 @@
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.
@@ -106,15 +105,15 @@
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);
@@ -155,8 +154,8 @@
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);
--
Gitblit v1.9.1