SafeHtmlBuilder startServerDesc = new SafeHtmlBuilder();
startServerDesc.appendEscaped("Start a server that can be monitored.").appendHtmlConstant("<p/>");
ContentBox startServer = new ContentBox(
UUID.uuid(), "Start Server",
startServerDesc.toSafeHtml(),
"Domain Overview", NameTokens.Topology
);
// ----
SafeHtmlBuilder createServerDesc = new SafeHtmlBuilder();
createServerDesc.appendEscaped("A server configuration does specify the overall configuration of a server. A server configuration can be started and perform work.").appendHtmlConstant("<p/>");
ContentBox createServer = new ContentBox(
UUID.uuid(), "Create Server",
createServerDesc.toSafeHtml(),
"Server Configurations", NameTokens.ServerPresenter
);
// -----
SafeHtmlBuilder choseHostDesc = new SafeHtmlBuilder();
choseHostDesc.appendEscaped("Only active servers can be monitored. Chose another host with active servers.").appendHtmlConstant("<p/>");
hosts = new ComboPicker();
Widget hWidget = hosts.asWidget();
hWidget.getElement().setAttribute("style", "margin-bottom:10px");
hWidget.getElement().addClassName("table-picker");
VerticalPanel inner = new VerticalPanel();
inner.setStyleName("fill-layout-width");
inner.add(hWidget);
inner.add(new DefaultButton("Proceed", new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
if(hosts.getSelectedValue()!=null && !hosts.getSelectedValue().equals(""))
{
circuit.dispatch(new HostSelection(hosts.getSelectedValue()));
Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
@Override
public void execute() {
placeManager.revealPlace(new PlaceRequest(NameTokens.DomainRuntimePresenter));
}
});
}
}
}));
choseHost = new ContentBox(
UUID.uuid(), "Change Host",
choseHostDesc.toSafeHtml(),
inner
);