Examples of HTMLFormatter


Examples of org.apache.cassandra.net.http.HTMLFormatter

        return formatter.toString();
    }

    private String serveRingView()
    {
        HTMLFormatter formatter = new HTMLFormatter();
        String[] sHeaders = {"Range No.", "Range", "N1", "N2", "N3"};
        formatter.startTable();
        formatter.addHeaders(sHeaders);

        Map<Range, List<EndPoint>> oldRangeToEndPointMap = StorageService.instance().getRangeToEndPointMap();
        Set<Range> rangeSet = oldRangeToEndPointMap.keySet();

        int iNodeNumber = 0;
        for ( Range range : rangeSet )
        {
          formatter.startRow();
            ++iNodeNumber;

            // Range No.
            formatter.addCol("" + iNodeNumber);

            // Range
            formatter.addCol("(" + range.left() + ",<br>" + range.right() + "]");

            List<EndPoint> replicas = oldRangeToEndPointMap.get(range);
            for ( EndPoint replica : replicas )
            {
              // N1 N2 N3
              formatter.addCol(replica.toString());
            }

            formatter.endRow();
        }

        formatter.endTable();

        return formatter.toString();
    }
View Full Code Here

Examples of org.apache.cassandra.net.http.HTMLFormatter

    /*
     * Returns the HTML code for a form to query data from the db cluster.
     */
    private String serveQueryForm(String queryResult)
    {
        HTMLFormatter formatter = new HTMLFormatter();
        formatter.appendLine("<BR><fieldset><legend>Query the cluster</legend>");
        formatter.appendLine("<FORM action=\"" + StorageService.getHostUrl() + "/home?" + QUERY + "=T\" method=\"post\">");

        // get the list of column families
        Table table = Table.open("Mailbox");
        Set<String> columnFamilyComboBoxSet = table.getColumnFamilies();

        formatter.append("select from ");
        formatter.addCombobox(columnFamilyComboBoxSet, "columnfamily", 0);
        formatter.append(" : <INPUT name=columnName>");
        formatter.appendLine(" where key = <INPUT name=key>");
        formatter.appendLine("<BR>");
        formatter.appendLine("<INPUT type=\"submit\" value=\"Send\"> <INPUT type=\"reset\">");

        formatter.appendLine("</FORM>");
        formatter.addDivElement(QUERYRESULTSDIV, queryResult);
        formatter.appendLine("</fieldset><BR>");

        return formatter.toString();
    }
View Full Code Here

Examples of org.apache.cassandra.net.http.HTMLFormatter

    /*
     * Returns the HTML code for a form to to run custom code on the cluster.
     */
    private String serveGroovyForm(String scriptResult)
    {
        HTMLFormatter formatter = new HTMLFormatter();
        formatter.appendLine("<BR><fieldset><legend>Run custom code on the cluster</legend>");
        formatter.appendLine("<FORM action=\"" + StorageService.getHostUrl() + "/home?" + SCRIPT + "=T\" method=\"post\">");
        formatter.append(" Callout name : <INPUT name=calloutName>");
        formatter.appendLine("<BR>");
        formatter.append("Groovy code to run on the server:<br>");
        formatter.append("<textarea name=scriptTextArea rows=\"10\" cols=\"100\"></textarea>");
        formatter.appendLine("<BR>");
        formatter.appendLine("<INPUT name=deploy type=\"submit\" value=\"Deploy\"> <INPUT name=execute type=\"submit\" value=\"Execute\"> <INPUT name=reset type=\"reset\">");

        formatter.appendLine("</FORM>");
        formatter.addDivElement(SCRIPTRESULTSDIV, scriptResult);
        formatter.appendLine("</fieldset><BR>");

        return formatter.toString();
    }
View Full Code Here

Examples of org.apache.cassandra.net.http.HTMLFormatter

    /*
     * Returns the HTML code for a form to insert data into the db cluster.
     */
    private String serveInsertForm(String insertResult)
    {
        HTMLFormatter formatter = new HTMLFormatter();
        formatter.appendLine("<BR><fieldset>\n<legend>Insert data into the cluster</legend>\n");
        formatter.appendLine("<FORM action=\"" + StorageService.getHostUrl() + "/home?" + INSERT + "=T\" method=\"post\">");

        // get the list of column families
        Table table = Table.open("Mailbox");
        Set<String> columnFamilyComboBoxSet = table.getColumnFamilies();

        formatter.append("insert into ");
        formatter.addCombobox(columnFamilyComboBoxSet, "columnfamily", 0);
        formatter.append(" : <INPUT name=columnName>");
        formatter.append(" data = <INPUT name=data>");
        formatter.appendLine(" where key = <INPUT name=key>\n");
        formatter.appendLine("<BR>\n");
        formatter.appendLine("<INPUT type=\"submit\" value=\"Send\"> <INPUT type=\"reset\">\n");

        formatter.appendLine("</FORM>\n");
        formatter.addDivElement(INSERTRESULTSDIV, insertResult);
        formatter.appendLine("</fieldset>\n<BR>\n");

        return formatter.toString();
    }
View Full Code Here

Examples of org.eclipse.wst.html.core.internal.format.HTMLFormatter

      } else {
        formatter = new HTMLTextFormatterForPhpCode();
      }
      break;
    default:
      formatter = new HTMLFormatter();
      break;
    }

    // init FormatPreferences
    formatter.setFormatPreferences(formatPreferences);
View Full Code Here

Examples of org.eclipse.wst.html.core.internal.format.HTMLFormatter

      IStructuredFormatter formatter = HTMLFormatterFactoryForPhpCode
          .getInstance().createFormatter(child,
              getFormatPreferences());
      if (formatter != null) {
        if (formatter instanceof HTMLFormatter) {
          HTMLFormatter htmlFormatter = (HTMLFormatter) formatter;
          htmlFormatter.format(child, contraints);
        } else {
          formatter.format(child);
        }
      }
View Full Code Here

Examples of org.jacoco.report.html.HTMLFormatter

  private void createReport(final IBundleCoverage bundleCoverage)
      throws IOException {

    // Create a concrete report visitor based on some supplied
    // configuration. In this case we use the defaults
    final HTMLFormatter htmlFormatter = new HTMLFormatter();
    final IReportVisitor visitor = htmlFormatter
        .createVisitor(new FileMultiReportOutput(reportDirectory));

    // Initialize the report with all of the execution and session
    // information. At this point the report doesn't know about the
    // structure of the report being created
View Full Code Here

Examples of org.jacoco.report.html.HTMLFormatter

          throw new BuildException(
              "Destination directory or file must be supplied for html report");
        }
        output = new FileMultiReportOutput(destdir);
      }
      final HTMLFormatter formatter = new HTMLFormatter();
      formatter.setFooterText(footer);
      formatter.setOutputEncoding(encoding);
      formatter.setLocale(locale);
      return formatter.createVisitor(output);
    }
View Full Code Here

Examples of org.jacoco.report.html.HTMLFormatter

          throw new BuildException(
              "Destination directory or file must be supplied for html report");
        }
        output = new FileMultiReportOutput(destdir);
      }
      final HTMLFormatter formatter = new HTMLFormatter();
      formatter.setReportOutput(output);
      formatter.setFooterText(footer);
      formatter.setOutputEncoding(encoding);
      return formatter;
    }
View Full Code Here

Examples of org.jacoco.report.html.HTMLFormatter

          throw new BuildException(
              "Destination directory or file must be supplied for html report");
        }
        output = new FileMultiReportOutput(destdir);
      }
      final HTMLFormatter formatter = new HTMLFormatter();
      formatter.setReportOutput(output);
      formatter.setFooterText(footer);
      formatter.setOutputEncoding(encoding);
      formatter.setLocale(locale);
      return formatter;
    }
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.