summaryrefslogtreecommitdiffstats
path: root/dozentenmodul
diff options
context:
space:
mode:
authorSimon Rettberg2015-08-27 18:13:33 +0200
committerSimon Rettberg2015-08-27 18:13:33 +0200
commit8076cf5256955b7c50cd42a02ea741cd33df60f7 (patch)
tree01a7f9535ffb9de0e8e35760fd11d80995924013 /dozentenmodul
parent[*] Thrift API changes (diff)
downloadtutor-module-8076cf5256955b7c50cd42a02ea741cd33df60f7.tar.gz
tutor-module-8076cf5256955b7c50cd42a02ea741cd33df60f7.tar.xz
tutor-module-8076cf5256955b7c50cd42a02ea741cd33df60f7.zip
[client] Query server status
Diffstat (limited to 'dozentenmodul')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java
index b6727d2c..166ccdd7 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java
@@ -26,6 +26,8 @@ import javax.swing.JPanel;
import javax.swing.JSeparator;
import org.apache.log4j.Logger;
+import org.apache.thrift.TException;
+import org.openslx.bwlp.thrift.iface.SatelliteStatus;
import org.openslx.bwlp.thrift.iface.WhoamiInfo;
import org.openslx.dozmod.App;
import org.openslx.dozmod.Config;
@@ -382,7 +384,16 @@ public abstract class MainWindow {
if (maxMemory != Long.MAX_VALUE) {
txt += ", limit: " + FormatHelper.bytes(maxMemory, false);
}
- final String labelText = txt + "]";
+ txt += "]";
+ if (Session.getUserId() != null) {
+ try {
+ SatelliteStatus status = ThriftManager.getSatClient().getStatus();
+ txt += " [" + FormatHelper.bytes(status.availableStorageBytes, false) + "]";
+ } catch (TException e) {
+ //
+ }
+ }
+ final String labelText = txt;
Gui.asyncExec(new Runnable() {
@Override
public void run() {