Exemple #1
0
  private static String generateHTML(
      TileLayerDispatcher tileLayerDispatcher, GridSetBroker gridSetBroker)
      throws GeoWebCacheException {
    String reloadPath = "rest/reload";

    String header =
        "<html>\n"
            + ServletUtils.gwcHtmlHeader("GWC Demos")
            + "<body>\n"
            + ServletUtils.gwcHtmlLogoLink("")
            + "<table>\n"
            + "<table cellspacing=\"10\" border=\"0\">\n"
            + "<tr><td><strong>Layer name:</strong></td>\n"
            + "<td><strong>Enabled:</strong></td>\n"
            + "<td><strong>Grids Sets:</strong></td>\n"
            + "</tr>\n";

    String rows = tableRows(tileLayerDispatcher, gridSetBroker);

    String footer =
        "</table>\n"
            + "<br />"
            + "<strong>These are just quick demos. GeoWebCache also supports:</strong><br />\n"
            + "<ul><li>WMTS, TMS, Virtual Earth and Google Maps</li>\n"
            + "<li>Proxying GetFeatureInfo, GetLegend and other WMS requests</li>\n"
            + "<li>Advanced request and parameter filters</li>\n"
            + "<li>Output format adjustments, such as compression level</li>\n"
            + "<li>Adjustable expiration headers and automatic cache expiration</li>\n"
            + "<li>RESTful interface for seeding and configuration (beta)</li>\n"
            + "</ul>\n"
            + "<br />\n"
            + "<strong>Reload Configuration:</strong><br />\n"
            + "<p>You can reload the configuration by pressing the following button. "
            + "The username / password is configured in WEB-INF/user.properties, or the admin "
            + " user in GeoServer if you are using the plugin.</p>\n"
            + "<form form id=\"kill\" action=\""
            + reloadPath
            + "\" method=\"post\">"
            + "<input type=\"hidden\" name=\"reload_configuration\"  value=\"1\" />"
            + "<span><input style=\"padding: 0; margin-bottom: -12px; border: 1;\"type=\"submit\" value=\"Reload Configuration\"></span>"
            + "</form>"
            + "</body></html>";

    return header + rows + footer;
  }