Package org.springframework.xd.shell.util

Examples of org.springframework.xd.shell.util.Table.addHeader()


    if (jobExecutionInfoResource.getJobExecution().getJobParameters().isEmpty()) {
      details.append("No Job Parameters are present");
    }
    else {
      final Table jobParameterTable = new Table();
      jobParameterTable.addHeader(1, new TableHeader("Name"))
          .addHeader(2, new TableHeader("Value"))
          .addHeader(3, new TableHeader("Type"))
          .addHeader(4, new TableHeader("Identifying"));

      for (Map.Entry<String, JobParameter> jobParameterEntry : jobExecutionInfoResource.getJobExecution().getJobParameters().getParameters().entrySet()) {
View Full Code Here


    JobInstanceInfoResource jobInstance = jobOperations().displayJobInstance(instanceId);
    StringBuilder result = new StringBuilder("Information about instance ");
    result.append(jobInstance.getInstanceId()).append(" of the job '").append(jobInstance.getJobName()).append(
        "':\n");
    Table table = new Table();
    table.addHeader(1, new TableHeader("Name"))
        .addHeader(2, new TableHeader("Execution Id"))
        .addHeader(3, new TableHeader("Start Time"))
        .addHeader(4, new TableHeader("Step Execution Count"))
        .addHeader(5, new TableHeader("Status"))
        .addHeader(6, new TableHeader("Job Parameters"));
View Full Code Here

  public Table renderByType() {
    Table table = new Table();
    int i = 1;
    Map<String, Integer> currentRowByType = new HashMap<String, Integer>();
    for (String type : typeToColumn.keySet()) {
      table.addHeader(i++, new TableHeader("    " + StringUtils.capitalize(type)));
    }
    for (ModuleDefinitionResource module : modules) {
      TableRow row = rowForType(module.getType(), table, currentRowByType);
      row.addValue(typeToColumn.get(module.getType()), cellValue(module));
    }
View Full Code Here

    return xdShell.getSpringXDOperations().richGaugeOperations();
  }

  private Table displayRichGauge(RichGaugeResource r, NumberFormat pattern) {
    Table t = new Table();
    t.addHeader(1, new TableHeader(String.format("Name"))).addHeader(2, new TableHeader(r.getName()));
    t.newRow().addValue(1, "value").addValue(2, pattern.format(r.getValue()));
    t.newRow().addValue(1, "alpha").addValue(2, pattern.format(r.getAlpha()));
    t.newRow().addValue(1, "average").addValue(2, pattern.format(r.getAverage()));
    t.newRow().addValue(1, "max").addValue(2, pattern.format(r.getMax()));
    t.newRow().addValue(1, "min").addValue(2, pattern.format(r.getMin()));
View Full Code Here

    final Map<String, Double> fieldValueCounts = fvcResource.getFieldValueCounts();
    FieldValueComparator fvc = new FieldValueComparator(fieldValueCounts);
    TreeMap<String, Double> sortedFvc = new TreeMap<String, Double>(fvc);
    sortedFvc.putAll(fieldValueCounts);
    Table t = new Table();
    t.addHeader(1, new TableHeader("FieldValueCounter=" + fvcResource.getName())).addHeader(2, new TableHeader(""))
        .addHeader(3, new TableHeader(""));
    t.newRow().addValue(1, "VALUE").addValue(2, "-").addValue(3, "COUNT");
    int rowSize = 1;
    for (Map.Entry<String, Double> entry : sortedFvc.entrySet()) {
      t.newRow().addValue(1, entry.getKey()).addValue(2, "|").addValue(3, pattern.format(entry.getValue()));
View Full Code Here

  public Table constructFVCDisplay(TreeMap<String, Double> fvcMap) {
    Table t = new Table();
    NumberFormat pattern = new DecimalFormat();
    // TODO: Should actually be fieldName=
    t.addHeader(1, new TableHeader("FieldValueCounter=" + getName())).addHeader(2, new TableHeader("")).addHeader(
        3, new TableHeader(""));
    t.newRow().addValue(1, "VALUE").addValue(2, "-").addValue(3, "COUNT");
    for (Map.Entry<String, Double> entry : fvcMap.descendingMap().entrySet()) {
      t.newRow().addValue(1, entry.getKey()).addValue(2, "|").addValue(3, pattern.format(entry.getValue()));
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.