public String launchGlobal(
      String title,
      String type,
      Map<String, Object> configuration,
      User creator,
      boolean isExclusive)
      throws ExclusiveInputException {
    Node master = serverNodes.master();
    InputLaunchResponse ilr =
        master.launchInput(title, type, true, configuration, creator, isExclusive);

    if (ilr == null) {
      throw new RuntimeException("Unable to launch global input!");
    }

    for (Node serverNode : serverNodes.all()) {
      if (!serverNode.isMaster()) serverNode.launchExistingInput(ilr.persistId);
    }
    try {
      for (Radio radio : nodeService.radios().values()) {
        radio.launchExistingInput(ilr.persistId);
      }
    } catch (APIException e) {
      log.error("Unable to fetch list of radios: " + e);
    } catch (IOException e) {
      log.error("Unable to fetch list of radios: " + e);
    }

    return ilr.persistId;
  }
  public Map<ClusterEntity, Boolean> terminateGlobal(String inputId) {
    Map<ClusterEntity, Boolean> results = Maps.newHashMap();

    for (Node serverNode : serverNodes.all())
      if (!serverNode.isMaster()) results.put(serverNode, serverNode.terminateInput(inputId));

    try {
      for (Radio radio : nodeService.radios().values())
        results.put(radio, radio.terminateInput(inputId));
    } catch (APIException e) {
      log.error("Unable to fetch list of radios: " + e);
    } catch (IOException e) {
      log.error("Unable to fetch list of radios: " + e);
    }

    Node master = serverNodes.master();
    results.put(master, master.terminateInput(inputId));

    return results;
  }
  public Result index() {
    BreadcrumbList bc = new BreadcrumbList();
    bc.addCrumb("System", routes.SystemController.index(0));
    bc.addCrumb("Logging", routes.LoggingController.index());

    Map<Node, List<InternalLogger>> loggers = Maps.newHashMap();
    Map<Node, Map<String, InternalLoggerSubsystem>> subsystems = Maps.newHashMap();
    for (Node node : serverNodes.all()) {
      loggers.put(node, node.allLoggers());
      subsystems.put(node, node.allLoggerSubsystems());
    }

    return ok(views.html.system.logging.index.render(currentUser(), bc, loggers, subsystems));
  }