Пример #1
0
  private void refreshServerList() {
    if (FilterType.HOST.equals(serverStore.getFilter())) {
      String selectedHost = hostStore.getSelectedHost();

      List<Server> serverModel = Collections.EMPTY_LIST;
      if (selectedHost != null) {
        serverModel = serverStore.getServerForHost(hostStore.getSelectedHost());
      }

      getView().updateServerList(serverModel);
    } else if (FilterType.GROUP.equals(serverStore.getFilter())) {
      List<Server> serverModel = serverStore.getServerForGroup(serverStore.getSelectedGroup());
      getView().updateServerList(serverModel);
    }
  }
Пример #2
0
  public void onLaunchCopyWizard(final Server server) {

    window = new DefaultWindow("Copy Server Configuration");
    window.setWidth(480);
    window.setHeight(380);

    CopyServerWizard wizard = new CopyServerWizard(DomainRuntimePresenter.this);
    Widget widget = wizard.asWidget();

    wizard.setCurrentServerSelection(server);
    wizard.setHosts(hostStore.getHostNames(), hostStore.getSelectedHost());
    window.trapWidget(widget);

    window.setGlassEnabled(true);
    window.center();
  }
Пример #3
0
  // TODO (hpehl) Check performance for big topologies
  public void getDomainPatches(final AsyncCallback<List<Patches>> callback) {
    final List<Patches> patches = new ArrayList<>();
    final List<Function<List<Patches>>> functions = new ArrayList<>();
    for (String host : hostStore.getHostNames()) {
      functions.add(new ReadPatches(host));
    }

    //noinspection unchecked
    new Async<List<Patches>>()
        .parallel(
            patches,
            new Outcome<List<Patches>>() {
              @Override
              public void onFailure(List<Patches> context) {
                callback.onSuccess(context);
              }

              @Override
              public void onSuccess(List<Patches> context) {
                callback.onSuccess(context);
              }
            },
            functions.toArray(new Function[functions.size()]));
  }
Пример #4
0
 public String getSelectedHost() {
   return hostStore.getSelectedHost();
 }
Пример #5
0
 ModelNode baseAddress() {
   return standalone ? baseAddress(STANDALONE_HOST) : baseAddress(hostStore.getSelectedHost());
 }