mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-06 12:23:55 +00:00
Introduced a simple display of build version - eases life when handling multiple servers - build information is generated by build script
This commit is contained in:
1 parent
7dc9bbfabf
commit
b520e9f30c
2 files changed
+46
No files matched your search
+5
@@ -13,6 +13,7 @@ import com.sap.sailing.gwt.ui.actions.AsyncActionsExecutor;
|
||||
import com.sap.sailing.gwt.ui.client.AbstractEntryPoint;
|
||||
import com.sap.sailing.gwt.ui.client.RegattaDisplayer;
|
||||
import com.sap.sailing.gwt.ui.client.RegattaRefresher;
|
||||
import com.sap.sailing.gwt.ui.client.shared.panels.SystemInformationPanel;
|
||||
import com.sap.sailing.gwt.ui.client.shared.panels.UserStatusPanel;
|
||||
import com.sap.sailing.gwt.ui.shared.RegattaDTO;
|
||||
|
||||
@@ -122,6 +123,10 @@ public class AdminConsoleEntryPoint extends AbstractEntryPoint implements Regatt
|
||||
}
|
||||
});
|
||||
fillRegattas();
|
||||
|
||||
SystemInformationPanel sysinfoPanel = new SystemInformationPanel(sailingService, this);
|
||||
sysinfoPanel.ensureDebugId("SystemInformation");
|
||||
rootPanel.add(sysinfoPanel);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.sap.sailing.gwt.ui.client.shared.panels;
|
||||
|
||||
import com.google.gwt.dom.client.Style;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.Label;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.ui.client.ErrorReporter;
|
||||
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
||||
|
||||
public class SystemInformationPanel extends FlowPanel {
|
||||
|
||||
private final Label buildVersionText;
|
||||
|
||||
public SystemInformationPanel(final SailingServiceAsync sailingService, final ErrorReporter errorReporter) {
|
||||
super();
|
||||
|
||||
buildVersionText = new Label("");
|
||||
addFloatingWidget(buildVersionText);
|
||||
|
||||
sailingService.getBuildVersion(new AsyncCallback<String>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(String result) {
|
||||
buildVersionText.setText("Version: " + result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
buildVersionText.setText("Version: " + "Unknown");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void addFloatingWidget(Widget w) {
|
||||
w.getElement().getStyle().setFloat(Style.Float.LEFT);
|
||||
w.getElement().getStyle().setPadding(3, Style.Unit.PX);
|
||||
add(w);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user