summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/models/ServerStatus.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2011-10-27 08:16:46 -0400
committerJames Moger <james.moger@gitblit.com>2011-10-27 08:16:46 -0400
commit8e40cd53b6b1579e383bd5e993cb3c35ce4583c4 (patch)
treefaad0da4b9ac976aa2b5c87b9e8bafd54a4fe513 /src/com/gitblit/models/ServerStatus.java
parenta70b43cde76b4baab82b4ce0d9ff82883f80b8df (diff)
downloadgitblit-8e40cd53b6b1579e383bd5e993cb3c35ce4583c4.tar.gz
gitblit-8e40cd53b6b1579e383bd5e993cb3c35ce4583c4.zip
Add version number and date to ServerStatus. Conditionally hide status.
Diffstat (limited to 'src/com/gitblit/models/ServerStatus.java')
-rw-r--r--src/com/gitblit/models/ServerStatus.java26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/com/gitblit/models/ServerStatus.java b/src/com/gitblit/models/ServerStatus.java
index 1c40b5f4..3e7e8d82 100644
--- a/src/com/gitblit/models/ServerStatus.java
+++ b/src/com/gitblit/models/ServerStatus.java
@@ -20,6 +20,8 @@ import java.util.Date;
import java.util.Map;
import java.util.TreeMap;
+import com.gitblit.Constants;
+
/**
* ServerStatus encapsulates runtime status information about the server
* including some information about the system environment.
@@ -32,26 +34,32 @@ public class ServerStatus implements Serializable {
private static final long serialVersionUID = 1L;
public final Date bootDate;
-
+
+ public final String version;
+
+ public final String releaseDate;
+
public final boolean isGO;
-
+
public final Map<String, String> systemProperties;
public final long heapMaximum;
public volatile long heapAllocated;
-
+
public volatile long heapFree;
-
+
public String servletContainer;
public ServerStatus(boolean isGO) {
- bootDate = new Date();
+ this.bootDate = new Date();
+ this.version = Constants.VERSION;
+ this.releaseDate = Constants.VERSION_DATE;
this.isGO = isGO;
-
- heapMaximum = Runtime.getRuntime().maxMemory();
-
- systemProperties = new TreeMap<String, String>();
+
+ this.heapMaximum = Runtime.getRuntime().maxMemory();
+
+ this.systemProperties = new TreeMap<String, String>();
put("file.encoding");
put("java.home");
put("java.io.tmpdir");