accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [21/54] [abbrv] accumulo git commit: ACCUMULO-2181/3005 Porting Monitor
Date Thu, 06 Jul 2017 20:43:15 GMT
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/resources/ZookeeperResource.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/resources/ZookeeperResource.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/resources/ZookeeperResource.java
deleted file mode 100644
index b65d6e9..0000000
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/resources/ZookeeperResource.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.monitor.rest.resources;
-
-import javax.ws.rs.GET;
-
-import org.apache.accumulo.monitor.ZooKeeperStatus;
-import org.apache.accumulo.monitor.ZooKeeperStatus.ZooKeeperState;
-import org.apache.accumulo.monitor.rest.api.ZKInformation;
-import org.apache.accumulo.monitor.rest.api.ZooKeeper;
-
-public class ZookeeperResource extends BasicResource {
-
-  @GET
-  public ZKInformation getZKInformation() {
-
-    ZKInformation zk = new ZKInformation();
-
-    for (ZooKeeperState k : ZooKeeperStatus.getZooKeeperStatus()) {
-      if (k.clients >= 0) {
-        zk.addZK(new ZooKeeper(k.keeper, k.mode, k.clients));
-      }
-    }
-
-    return zk;
-  }
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/BulkImport.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/BulkImport.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/BulkImport.java
deleted file mode 100644
index 7c29bbf..0000000
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/BulkImport.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.monitor.rest.view;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.ws.rs.CookieParam;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-
-import org.apache.accumulo.core.Constants;
-import org.apache.accumulo.monitor.Monitor;
-import org.apache.accumulo.server.monitor.DedupedLogEvent;
-import org.apache.accumulo.server.monitor.LogService;
-import org.apache.log4j.Level;
-import org.glassfish.jersey.server.mvc.Viewable;
-
-@Path("/bulkImports")
-public class BulkImport {
-
-  @GET
-  public Viewable get(@CookieParam("page.refresh.rate ") @DefaultValue("-1") String refreshValue) {
-    int refresh = -1;
-    try {
-      refresh = Integer.parseInt(refreshValue);
-    } catch (NumberFormatException e) {}
-
-    List<DedupedLogEvent> logs = LogService.getInstance().getEvents();
-    boolean logsHaveError = false;
-    for (DedupedLogEvent dedupedLogEvent : logs) {
-      if (dedupedLogEvent.getEvent().getLevel().isGreaterOrEqual(Level.ERROR)) {
-        logsHaveError = true;
-        break;
-      }
-    }
-
-    int numProblems = Monitor.getProblemSummary().entrySet().size();
-
-    Map<String,Object> model = new HashMap<>();
-    model.put("title", "Bulk Imports");
-    model.put("version", Constants.VERSION);
-    model.put("refresh", refresh);
-    model.put("instance_name", Monitor.cachedInstanceName.get());
-    model.put("instance_id", Monitor.getContext().getInstance().getInstanceID());
-    model.put("current_date", new Date().toString().replace(" ", "&nbsp;"));
-    model.put("num_logs", logs.size());
-    model.put("logs_have_error", logsHaveError);
-    model.put("num_problems", numProblems);
-    model.put("is_ssl", false);
-    model.put("redirect", null);
-
-    return new Viewable("bulkImport.ftl", model);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/GarbageCollector.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/GarbageCollector.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/GarbageCollector.java
deleted file mode 100644
index 1678db9..0000000
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/GarbageCollector.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.monitor.rest.view;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.ws.rs.CookieParam;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-
-import org.apache.accumulo.core.Constants;
-import org.apache.accumulo.monitor.Monitor;
-import org.apache.accumulo.server.monitor.DedupedLogEvent;
-import org.apache.accumulo.server.monitor.LogService;
-import org.apache.log4j.Level;
-import org.glassfish.jersey.server.mvc.Viewable;
-
-@Path("/gc")
-public class GarbageCollector {
-
-  @GET
-  public Viewable get(@CookieParam("page.refresh.rate ") @DefaultValue("-1") String refreshValue) {
-    int refresh = -1;
-    try {
-      refresh = Integer.parseInt(refreshValue);
-    } catch (NumberFormatException e) {}
-
-    List<DedupedLogEvent> logs = LogService.getInstance().getEvents();
-    boolean logsHaveError = false;
-    for (DedupedLogEvent dedupedLogEvent : logs) {
-      if (dedupedLogEvent.getEvent().getLevel().isGreaterOrEqual(Level.ERROR)) {
-        logsHaveError = true;
-        break;
-      }
-    }
-
-    int numProblems = Monitor.getProblemSummary().entrySet().size();
-
-    Map<String,Object> model = new HashMap<>();
-    model.put("title", "Garbage Collector Status");
-    model.put("version", Constants.VERSION);
-    model.put("refresh", refresh);
-    model.put("instance_name", Monitor.cachedInstanceName.get());
-    model.put("instance_id", Monitor.getContext().getInstance().getInstanceID());
-    model.put("current_date", new Date().toString().replace(" ", "&nbsp;"));
-    model.put("num_logs", logs.size());
-    model.put("logs_have_error", logsHaveError);
-    model.put("num_problems", numProblems);
-    model.put("is_ssl", false);
-    model.put("redirect", null);
-
-    return new Viewable("gc.ftl", model);
-  }
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Index.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Index.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Index.java
new file mode 100644
index 0000000..3cdf024
--- /dev/null
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Index.java
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.accumulo.monitor.rest.view;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.QueryParam;
+
+import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.core.client.TableNotFoundException;
+import org.apache.accumulo.core.client.impl.Tables;
+import org.apache.accumulo.core.util.AddressUtil;
+import org.apache.accumulo.monitor.Monitor;
+import org.glassfish.jersey.server.mvc.Template;
+
+/**
+ *
+ * Index is responsible of specifying Monitor paths and setting the templates for the HTML code
+ *
+ * @since 2.0.0
+ *
+ */
+@Path("/")
+public class Index {
+
+  private Map<String,Object> getModel() {
+
+    Map<String,Object> model = new HashMap<>();
+    model.put("version", Constants.VERSION);
+    model.put("instance_name", Monitor.cachedInstanceName.get());
+    model.put("instance_id", Monitor.getContext().getInstance().getInstanceID());
+    model.put("is_ssl", false);
+    model.put("redirect", null);
+
+    return model;
+  }
+
+  /**
+   * Returns the overview template
+   *
+   * @return Overview model
+   */
+  @GET
+  @Template(name = "/index.ftl")
+  public Map<String,Object> get() {
+
+    Map<String,Object> model = getModel();
+    model.put("title", "Accumulo Overview");
+    model.put("template", "overview.ftl");
+    model.put("js", "overview.js");
+
+    return model;
+  }
+
+  /**
+   * Returns the master template
+   *
+   * @return Master model
+   */
+  @GET
+  @Path("{parameter: master|monitor}")
+  @Template(name = "/index.ftl")
+  public Map<String,Object> getMaster() {
+
+    List<String> masters = Monitor.getContext().getInstance().getMasterLocations();
+
+    Map<String,Object> model = getModel();
+    model.put("title", "Master Server" + (masters.size() == 0 ? "" : ":" + AddressUtil.parseAddress(masters.get(0), false).getHostText()));
+    model.put("template", "master.ftl");
+    model.put("js", "master.js");
+
+    model.put("tablesTitle", "Table Status");
+    model.put("tablesTemplate", "tables.ftl");
+    model.put("tablesJs", "tables.js");
+    return model;
+  }
+
+  /**
+   * Returns the tservers templates
+   *
+   * @param server
+   *          TServer to show details
+   * @return tserver model
+   */
+  @GET
+  @Path("tservers")
+  @Template(name = "/index.ftl")
+  public Map<String,Object> getTabletServers(@QueryParam("s") String server) {
+
+    Map<String,Object> model = getModel();
+    model.put("title", "Tablet Server Status");
+    if (server != null) {
+      model.put("template", "server.ftl");
+      model.put("js", "server.js");
+      model.put("server", server);
+      return model;
+    }
+    model.put("template", "tservers.ftl");
+    model.put("js", "tservers.js");
+    return model;
+  }
+
+  /**
+   * Returns the scans template
+   *
+   * @return Scans model
+   */
+  @GET
+  @Path("scans")
+  @Template(name = "/index.ftl")
+  public Map<String,Object> getScans() {
+
+    Map<String,Object> model = getModel();
+    model.put("title", "Scans");
+    model.put("template", "scans.ftl");
+    model.put("js", "scans.js");
+
+    return model;
+  }
+
+  /**
+   * Returns the bulk import template
+   *
+   * @return Bulk Import model
+   */
+  @GET
+  @Path("bulkImports")
+  @Template(name = "/index.ftl")
+  public Map<String,Object> getBulkImports() {
+
+    Map<String,Object> model = getModel();
+    model.put("title", "Bulk Imports");
+    model.put("template", "bulkImport.ftl");
+    model.put("js", "bulkImport.js");
+
+    return model;
+  }
+
+  /**
+   * Returns the garbage collector template
+   *
+   * @return GC model
+   */
+  @GET
+  @Path("gc")
+  @Template(name = "/index.ftl")
+  public Map<String,Object> getGC() {
+
+    Map<String,Object> model = getModel();
+    model.put("title", "Garbage Collector Status");
+    model.put("template", "gc.ftl");
+    model.put("js", "gc.js");
+
+    return model;
+  }
+
+  /**
+   * Returns the server activity template
+   *
+   * @param shape
+   *          Shape of visualization
+   * @param size
+   *          Size of visualization
+   * @param motion
+   *          Motion of visualization
+   * @param color
+   *          Color of visualization
+   * @return Server activity model
+   */
+  @GET
+  @Path("vis")
+  @Template(name = "/index.ftl")
+  public Map<String,Object> getServerActivity(@QueryParam("shape") @DefaultValue("circles") String shape, @QueryParam("size") @DefaultValue("40") String size,
+      @QueryParam("motion") @DefaultValue("") String motion, @QueryParam("color") @DefaultValue("allavg") String color) {
+
+    Map<String,Object> model = getModel();
+    model.put("title", "Server Activity");
+    model.put("template", "vis.ftl");
+
+    model.put("shape", shape);
+    model.put("size", size);
+    model.put("motion", motion);
+    model.put("color", color);
+
+    return model;
+  }
+
+  /**
+   * Returns the tables template
+   *
+   * @return Tables model
+   */
+  @GET
+  @Path("tables")
+  @Template(name = "/index.ftl")
+  public Map<String,Object> getTables() throws TableNotFoundException {
+
+    Map<String,Object> model = getModel();
+    model.put("title", "Table Status"); // Need this for the browser tab title
+    model.put("tablesTitle", "Table Status");
+    model.put("template", "tables.ftl");
+    model.put("js", "tables.js");
+
+    return model;
+  }
+
+  /**
+   * Returns participating tservers template
+   *
+   * @param tableID
+   *          Table ID for participating tservers
+   * @return Participating tservers model
+   */
+  @GET
+  @Path("tables/{tableID}")
+  @Template(name = "/index.ftl")
+  public Map<String,Object> getTables(@PathParam("tableID") String tableID) throws TableNotFoundException {
+
+    String table = Tables.getTableName(Monitor.getContext().getInstance(), tableID);
+
+    Map<String,Object> model = getModel();
+    model.put("title", "Table Status");
+
+    model.put("template", "table.ftl");
+    model.put("js", "table.js");
+    model.put("tableID", tableID);
+    model.put("table", table);
+
+    return model;
+  }
+
+  /**
+   * Returns trace summary template
+   *
+   * @param minutes
+   *          Range of minutes
+   * @return Trace summary model
+   */
+  @GET
+  @Path("trace/summary")
+  @Template(name = "/index.ftl")
+  public Map<String,Object> getTracesSummary(@QueryParam("minutes") @DefaultValue("10") String minutes) {
+
+    Map<String,Object> model = getModel();
+    model.put("title", "Traces for the last&nbsp;" + minutes + "&nbsp;minute(s)");
+
+    model.put("template", "summary.ftl");
+    model.put("js", "summary.js");
+    model.put("minutes", minutes);
+
+    return model;
+  }
+
+  /**
+   * Returns traces by type template
+   *
+   * @param type
+   *          Type of trace
+   * @param minutes
+   *          Range of minutes
+   * @return Traces by type model
+   */
+  @GET
+  @Path("trace/listType")
+  @Template(name = "/index.ftl")
+  public Map<String,Object> getTracesForType(@QueryParam("type") String type, @QueryParam("minutes") @DefaultValue("10") String minutes) {
+
+    Map<String,Object> model = getModel();
+    model.put("title", "Traces for " + type + " for the last " + minutes + " minute(s)");
+
+    model.put("template", "listType.ftl");
+    model.put("js", "listType.js");
+    model.put("type", type);
+    model.put("minutes", minutes);
+
+    return model;
+  }
+
+  /**
+   * Returns traces by ID template
+   *
+   * @param id
+   *          ID of the traces
+   * @return Traces by ID model
+   */
+  @GET
+  @Path("trace/show")
+  @Template(name = "/index.ftl")
+  public Map<String,Object> getTraceShow(@QueryParam("id") String id) {
+
+    Map<String,Object> model = getModel();
+    model.put("title", "Trace ID " + id);
+
+    model.put("template", "show.ftl");
+    model.put("js", "show.js");
+    model.put("id", id);
+
+    return model;
+  }
+
+  /**
+   * Returns log report template
+   *
+   * @return Log report model
+   */
+  @GET
+  @Path("log")
+  @Template(name = "/index.ftl")
+  public Map<String,Object> getLogs() {
+
+    Map<String,Object> model = getModel();
+    model.put("title", "Recent Logs");
+
+    model.put("template", "log.ftl");
+    model.put("js", "log.js");
+
+    return model;
+  }
+
+  /**
+   * Returns problem report template
+   *
+   * @param table
+   *          Table ID to display problem details
+   * @return Problem report model
+   */
+  @GET
+  @Path("problems")
+  @Template(name = "/index.ftl")
+  public Map<String,Object> getProblems(@QueryParam("table") String table) {
+
+    Map<String,Object> model = getModel();
+    model.put("title", "Per-Table Problem Report");
+
+    model.put("template", "problems.ftl");
+    model.put("js", "problems.js");
+
+    if (table != null) {
+      model.put("table", table);
+    }
+
+    return model;
+  }
+
+  /**
+   * Returns replication table template
+   *
+   * @return Replication model
+   */
+  @GET
+  @Path("replication")
+  @Template(name = "/index.ftl")
+  public Map<String,Object> getReplication() {
+
+    Map<String,Object> model = getModel();
+    model.put("title", "Replication Overview");
+
+    model.put("template", "replication.ftl");
+    model.put("js", "replication.js");
+
+    return model;
+  }
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Master.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Master.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Master.java
deleted file mode 100644
index 17fe3b0..0000000
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Master.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.monitor.rest.view;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.ws.rs.CookieParam;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-
-import org.apache.accumulo.core.Constants;
-import org.apache.accumulo.core.util.AddressUtil;
-import org.apache.accumulo.monitor.Monitor;
-import org.apache.accumulo.server.monitor.DedupedLogEvent;
-import org.apache.accumulo.server.monitor.LogService;
-import org.apache.log4j.Level;
-import org.glassfish.jersey.server.mvc.Viewable;
-
-@Path("/{parameter: master|monitor}")
-public class Master {
-
-  @GET
-  public Viewable get(@CookieParam("page.refresh.rate ") @DefaultValue("-1") String refreshValue) {
-    int refresh = -1;
-    try {
-      refresh = Integer.parseInt(refreshValue);
-    } catch (NumberFormatException e) {}
-
-    List<DedupedLogEvent> logs = LogService.getInstance().getEvents();
-    boolean logsHaveError = false;
-    for (DedupedLogEvent dedupedLogEvent : logs) {
-      if (dedupedLogEvent.getEvent().getLevel().isGreaterOrEqual(Level.ERROR)) {
-        logsHaveError = true;
-        break;
-      }
-    }
-
-    int numProblems = Monitor.getProblemSummary().entrySet().size();
-
-    List<String> masters = Monitor.getContext().getInstance().getMasterLocations();
-
-    Map<String,Object> model = new HashMap<>();
-    model.put("title", "Master Server" + (masters.size() == 0 ? "" : ":" + AddressUtil.parseAddress(masters.get(0), false).getHostText()));
-    model.put("version", Constants.VERSION);
-    model.put("refresh", refresh);
-    model.put("instance_name", Monitor.cachedInstanceName.get());
-    model.put("instance_id", Monitor.getContext().getInstance().getInstanceID());
-    model.put("current_date", new Date().toString().replace(" ", "&nbsp;"));
-    model.put("num_logs", logs.size());
-    model.put("logs_have_error", logsHaveError);
-    model.put("num_problems", numProblems);
-    model.put("is_ssl", false);
-    model.put("redirect", null);
-
-    return new Viewable("master.ftl", model);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Overview.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Overview.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Overview.java
deleted file mode 100644
index 6cf0ec5..0000000
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Overview.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.monitor.rest.view;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.ws.rs.CookieParam;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-
-import org.apache.accumulo.core.Constants;
-import org.apache.accumulo.monitor.Monitor;
-import org.apache.accumulo.server.monitor.DedupedLogEvent;
-import org.apache.accumulo.server.monitor.LogService;
-import org.apache.log4j.Level;
-import org.glassfish.jersey.server.mvc.Viewable;
-
-@Path("/")
-public class Overview {
-
-  @GET
-  public Viewable get(@CookieParam("page.refresh.rate ") @DefaultValue("-1") String refreshValue) {
-    int refresh = -1;
-    try {
-      refresh = Integer.parseInt(refreshValue);
-    } catch (NumberFormatException e) {}
-
-    List<DedupedLogEvent> logs = LogService.getInstance().getEvents();
-    boolean logsHaveError = false;
-    for (DedupedLogEvent dedupedLogEvent : logs) {
-      if (dedupedLogEvent.getEvent().getLevel().isGreaterOrEqual(Level.ERROR)) {
-        logsHaveError = true;
-        break;
-      }
-    }
-
-    int numProblems = Monitor.getProblemSummary().entrySet().size();
-
-    Map<String,Object> model = new HashMap<>();
-    model.put("title", "Accumulo Overview");
-    model.put("version", Constants.VERSION);
-    model.put("refresh", refresh);
-    model.put("instance_name", Monitor.cachedInstanceName.get());
-    model.put("instance_id", Monitor.getContext().getInstance().getInstanceID());
-    model.put("current_date", new Date().toString().replace(" ", "&nbsp;"));
-    model.put("num_logs", logs.size());
-    model.put("logs_have_error", logsHaveError);
-    model.put("num_problems", numProblems);
-    model.put("is_ssl", false);
-    model.put("redirect", null);
-
-    return new Viewable("index.ftl", model);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Replication.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Replication.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Replication.java
deleted file mode 100644
index 8b19ab9..0000000
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Replication.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.monitor.rest.view;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.ws.rs.CookieParam;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-
-import org.apache.accumulo.core.Constants;
-import org.apache.accumulo.monitor.Monitor;
-import org.apache.accumulo.server.monitor.DedupedLogEvent;
-import org.apache.accumulo.server.monitor.LogService;
-import org.apache.log4j.Level;
-import org.glassfish.jersey.server.mvc.Viewable;
-
-@Path("/replication")
-public class Replication {
-
-  @GET
-  public Viewable getSummary(@CookieParam("page.refresh.rate ") @DefaultValue("-1") String refreshValue) {
-    int refresh = -1;
-    try {
-      refresh = Integer.parseInt(refreshValue);
-    } catch (NumberFormatException e) {}
-
-    List<DedupedLogEvent> logs = LogService.getInstance().getEvents();
-    boolean logsHaveError = false;
-    for (DedupedLogEvent dedupedLogEvent : logs) {
-      if (dedupedLogEvent.getEvent().getLevel().isGreaterOrEqual(Level.ERROR)) {
-        logsHaveError = true;
-        break;
-      }
-    }
-
-    int numProblems = Monitor.getProblemSummary().entrySet().size();
-
-    Map<String,Object> model = new HashMap<>();
-    model.put("title", "Replication Overview");
-    model.put("version", Constants.VERSION);
-    model.put("refresh", refresh);
-    model.put("instance_name", Monitor.cachedInstanceName.get());
-    model.put("instance_id", Monitor.getContext().getInstance().getInstanceID());
-    model.put("current_date", new Date().toString().replace(" ", "&nbsp;"));
-    model.put("num_logs", logs.size());
-    model.put("logs_have_error", logsHaveError);
-    model.put("num_problems", numProblems);
-    model.put("is_ssl", false);
-    model.put("redirect", null);
-
-    return new Viewable("replication.ftl", model);
-  }
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Scans.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Scans.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Scans.java
deleted file mode 100644
index 0e0fb82..0000000
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Scans.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.monitor.rest.view;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.ws.rs.CookieParam;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-
-import org.apache.accumulo.core.Constants;
-import org.apache.accumulo.monitor.Monitor;
-import org.apache.accumulo.server.monitor.DedupedLogEvent;
-import org.apache.accumulo.server.monitor.LogService;
-import org.apache.log4j.Level;
-import org.glassfish.jersey.server.mvc.Viewable;
-
-@Path("/scans")
-public class Scans {
-
-  @GET
-  public Viewable get(@CookieParam("page.refresh.rate ") @DefaultValue("-1") String refreshValue) {
-    int refresh = -1;
-    try {
-      refresh = Integer.parseInt(refreshValue);
-    } catch (NumberFormatException e) {}
-
-    List<DedupedLogEvent> logs = LogService.getInstance().getEvents();
-    boolean logsHaveError = false;
-    for (DedupedLogEvent dedupedLogEvent : logs) {
-      if (dedupedLogEvent.getEvent().getLevel().isGreaterOrEqual(Level.ERROR)) {
-        logsHaveError = true;
-        break;
-      }
-    }
-
-    int numProblems = Monitor.getProblemSummary().entrySet().size();
-
-    Map<String,Object> model = new HashMap<>();
-    model.put("title", "Scans");
-    model.put("version", Constants.VERSION);
-    model.put("refresh", refresh);
-    model.put("instance_name", Monitor.cachedInstanceName.get());
-    model.put("instance_id", Monitor.getContext().getInstance().getInstanceID());
-    model.put("current_date", new Date().toString().replace(" ", "&nbsp;"));
-    model.put("num_logs", logs.size());
-    model.put("logs_have_error", logsHaveError);
-    model.put("num_problems", numProblems);
-    model.put("is_ssl", false);
-    model.put("redirect", null);
-
-    return new Viewable("scans.ftl", model);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/ServerActivity.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/ServerActivity.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/ServerActivity.java
deleted file mode 100644
index a9c5256..0000000
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/ServerActivity.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.monitor.rest.view;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.ws.rs.CookieParam;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.QueryParam;
-
-import org.apache.accumulo.core.Constants;
-import org.apache.accumulo.monitor.Monitor;
-import org.apache.accumulo.server.monitor.DedupedLogEvent;
-import org.apache.accumulo.server.monitor.LogService;
-import org.apache.log4j.Level;
-import org.glassfish.jersey.server.mvc.Viewable;
-
-@Path("/vis")
-public class ServerActivity {
-
-  @GET
-  public Viewable get(@CookieParam("page.refresh.rate ") @DefaultValue("-1") String refreshValue, @QueryParam("shape") @DefaultValue("circles") String shape,
-      @QueryParam("size") @DefaultValue("40") String size, @QueryParam("motion") @DefaultValue("") String motion,
-      @QueryParam("color") @DefaultValue("allavg") String color) {
-    int refresh = -1;
-    try {
-      refresh = Integer.parseInt(refreshValue);
-    } catch (NumberFormatException e) {}
-
-    List<DedupedLogEvent> logs = LogService.getInstance().getEvents();
-    boolean logsHaveError = false;
-    for (DedupedLogEvent dedupedLogEvent : logs) {
-      if (dedupedLogEvent.getEvent().getLevel().isGreaterOrEqual(Level.ERROR)) {
-        logsHaveError = true;
-        break;
-      }
-    }
-
-    int numProblems = Monitor.getProblemSummary().entrySet().size();
-
-    Map<String,Object> model = new HashMap<>();
-    model.put("title", "Server Activity");
-    model.put("version", Constants.VERSION);
-    model.put("refresh", refresh);
-    model.put("instance_name", Monitor.cachedInstanceName.get());
-    model.put("instance_id", Monitor.getContext().getInstance().getInstanceID());
-    model.put("current_date", new Date().toString().replace(" ", "&nbsp;"));
-    model.put("num_logs", logs.size());
-    model.put("logs_have_error", logsHaveError);
-    model.put("num_problems", numProblems);
-    model.put("is_ssl", false);
-    model.put("shape", shape);
-    model.put("size", size);
-    model.put("motion", motion);
-    model.put("color", color);
-    model.put("redirect", null);
-
-    return new Viewable("vis.ftl", model);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/TablesStatus.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/TablesStatus.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/TablesStatus.java
deleted file mode 100644
index 4750c2d..0000000
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/TablesStatus.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.monitor.rest.view;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.ws.rs.CookieParam;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-
-import org.apache.accumulo.core.Constants;
-import org.apache.accumulo.core.client.TableNotFoundException;
-import org.apache.accumulo.core.client.impl.Tables;
-import org.apache.accumulo.monitor.Monitor;
-import org.apache.accumulo.server.monitor.DedupedLogEvent;
-import org.apache.accumulo.server.monitor.LogService;
-import org.apache.log4j.Level;
-import org.glassfish.jersey.server.mvc.Viewable;
-
-@Path("/tables")
-public class TablesStatus {
-
-  @GET
-  public Viewable get(@CookieParam("page.refresh.rate ") @DefaultValue("-1") String refreshValue) {
-    int refresh = -1;
-    try {
-      refresh = Integer.parseInt(refreshValue);
-    } catch (NumberFormatException e) {}
-
-    List<DedupedLogEvent> logs = LogService.getInstance().getEvents();
-    boolean logsHaveError = false;
-    for (DedupedLogEvent dedupedLogEvent : logs) {
-      if (dedupedLogEvent.getEvent().getLevel().isGreaterOrEqual(Level.ERROR)) {
-        logsHaveError = true;
-        break;
-      }
-    }
-
-    int numProblems = Monitor.getProblemSummary().entrySet().size();
-
-    Map<String,Object> model = new HashMap<>();
-    model.put("title", "Table Status");
-    model.put("version", Constants.VERSION);
-    model.put("refresh", refresh);
-    model.put("instance_name", Monitor.cachedInstanceName.get());
-    model.put("instance_id", Monitor.getContext().getInstance().getInstanceID());
-    model.put("current_date", new Date().toString().replace(" ", "&nbsp;"));
-    model.put("num_logs", logs.size());
-    model.put("logs_have_error", logsHaveError);
-    model.put("num_problems", numProblems);
-    model.put("is_ssl", false);
-    model.put("redirect", null);
-
-    return new Viewable("tables.ftl", model);
-  }
-
-  @Path("{tableID}")
-  @GET
-  public Viewable getServer(@PathParam("tableID") String tableID, @CookieParam("page.refresh.rate ") @DefaultValue("-1") String refreshValue)
-      throws TableNotFoundException {
-    int refresh = -1;
-    try {
-      refresh = Integer.parseInt(refreshValue);
-    } catch (NumberFormatException e) {}
-
-    List<DedupedLogEvent> logs = LogService.getInstance().getEvents();
-    boolean logsHaveError = false;
-    for (DedupedLogEvent dedupedLogEvent : logs) {
-      if (dedupedLogEvent.getEvent().getLevel().isGreaterOrEqual(Level.ERROR)) {
-        logsHaveError = true;
-        break;
-      }
-    }
-
-    int numProblems = Monitor.getProblemSummary().entrySet().size();
-
-    String table = Tables.getTableName(Monitor.getContext().getInstance(), tableID);
-
-    Map<String,Object> model = new HashMap<>();
-    model.put("title", "Table Status");
-    model.put("version", Constants.VERSION);
-    model.put("refresh", refresh);
-    model.put("instance_name", Monitor.cachedInstanceName.get());
-    model.put("instance_id", Monitor.getContext().getInstance().getInstanceID());
-    model.put("current_date", new Date().toString().replace(" ", "&nbsp;"));
-    model.put("num_logs", logs.size());
-    model.put("logs_have_error", logsHaveError);
-    model.put("num_problems", numProblems);
-    model.put("is_ssl", false);
-    model.put("tableID", tableID);
-    model.put("table", table);
-    model.put("redirect", null);
-
-    return new Viewable("table.ftl", model);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/TabletServer.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/TabletServer.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/TabletServer.java
deleted file mode 100644
index 73fde82..0000000
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/TabletServer.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.monitor.rest.view;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.ws.rs.CookieParam;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-
-import org.apache.accumulo.core.Constants;
-import org.apache.accumulo.monitor.Monitor;
-import org.apache.accumulo.server.monitor.DedupedLogEvent;
-import org.apache.accumulo.server.monitor.LogService;
-import org.apache.log4j.Level;
-import org.glassfish.jersey.server.mvc.Viewable;
-
-@Path("/tservers")
-public class TabletServer {
-
-  @GET
-  public Viewable get(@CookieParam("page.refresh.rate ") @DefaultValue("-1") String refreshValue) {
-    int refresh = -1;
-    try {
-      refresh = Integer.parseInt(refreshValue);
-    } catch (NumberFormatException e) {}
-
-    List<DedupedLogEvent> logs = LogService.getInstance().getEvents();
-    boolean logsHaveError = false;
-    for (DedupedLogEvent dedupedLogEvent : logs) {
-      if (dedupedLogEvent.getEvent().getLevel().isGreaterOrEqual(Level.ERROR)) {
-        logsHaveError = true;
-        break;
-      }
-    }
-
-    int numProblems = Monitor.getProblemSummary().entrySet().size();
-
-    Map<String,Object> model = new HashMap<>();
-    model.put("title", "Tablet Server Status");
-    model.put("version", Constants.VERSION);
-    model.put("refresh", refresh);
-    model.put("instance_name", Monitor.cachedInstanceName.get());
-    model.put("instance_id", Monitor.getContext().getInstance().getInstanceID());
-    model.put("current_date", new Date().toString().replace(" ", "&nbsp;"));
-    model.put("num_logs", logs.size());
-    model.put("logs_have_error", logsHaveError);
-    model.put("num_problems", numProblems);
-    model.put("is_ssl", false);
-    model.put("redirect", null);
-
-    return new Viewable("tservers.ftl", model);
-  }
-
-  @Path("{server}")
-  @GET
-  public Viewable getServer(@PathParam("server") String server, @CookieParam("page.refresh.rate ") @DefaultValue("-1") String refreshValue) {
-    int refresh = -1;
-    try {
-      refresh = Integer.parseInt(refreshValue);
-    } catch (NumberFormatException e) {}
-
-    List<DedupedLogEvent> logs = LogService.getInstance().getEvents();
-    boolean logsHaveError = false;
-    for (DedupedLogEvent dedupedLogEvent : logs) {
-      if (dedupedLogEvent.getEvent().getLevel().isGreaterOrEqual(Level.ERROR)) {
-        logsHaveError = true;
-        break;
-      }
-    }
-
-    int numProblems = Monitor.getProblemSummary().entrySet().size();
-
-    Map<String,Object> model = new HashMap<>();
-    model.put("title", "Tablet Server Status");
-    model.put("version", Constants.VERSION);
-    model.put("refresh", refresh);
-    model.put("instance_name", Monitor.cachedInstanceName.get());
-    model.put("instance_id", Monitor.getContext().getInstance().getInstanceID());
-    model.put("current_date", new Date().toString().replace(" ", "&nbsp;"));
-    model.put("num_logs", logs.size());
-    model.put("logs_have_error", logsHaveError);
-    model.put("num_problems", numProblems);
-    model.put("is_ssl", false);
-    model.put("server", server);
-    model.put("redirect", null);
-
-    return new Viewable("server.ftl", model);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Trace.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Trace.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Trace.java
deleted file mode 100644
index 6e02b7a..0000000
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/view/Trace.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.monitor.rest.view;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.ws.rs.CookieParam;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.QueryParam;
-
-import org.apache.accumulo.core.Constants;
-import org.apache.accumulo.monitor.Monitor;
-import org.apache.accumulo.server.monitor.DedupedLogEvent;
-import org.apache.accumulo.server.monitor.LogService;
-import org.apache.log4j.Level;
-import org.glassfish.jersey.server.mvc.Viewable;
-
-@Path("/trace")
-public class Trace {
-
-  @Path("/summary")
-  @GET
-  public Viewable getSummary(@QueryParam("minutes") @DefaultValue("10") String minutes,
-      @CookieParam("page.refresh.rate ") @DefaultValue("-1") String refreshValue) {
-    int refresh = -1;
-    try {
-      refresh = Integer.parseInt(refreshValue);
-    } catch (NumberFormatException e) {}
-
-    List<DedupedLogEvent> logs = LogService.getInstance().getEvents();
-    boolean logsHaveError = false;
-    for (DedupedLogEvent dedupedLogEvent : logs) {
-      if (dedupedLogEvent.getEvent().getLevel().isGreaterOrEqual(Level.ERROR)) {
-        logsHaveError = true;
-        break;
-      }
-    }
-
-    int numProblems = Monitor.getProblemSummary().entrySet().size();
-
-    Map<String,Object> model = new HashMap<>();
-    model.put("title", "Traces for the last&nbsp;" + minutes + "&nbsp;minutes");
-    model.put("version", Constants.VERSION);
-    model.put("refresh", refresh);
-    model.put("instance_name", Monitor.cachedInstanceName.get());
-    model.put("instance_id", Monitor.getContext().getInstance().getInstanceID());
-    model.put("current_date", new Date().toString().replace(" ", "&nbsp;"));
-    model.put("num_logs", logs.size());
-    model.put("logs_have_error", logsHaveError);
-    model.put("num_problems", numProblems);
-    model.put("is_ssl", false);
-    model.put("minutes", minutes);
-    model.put("redirect", null);
-
-    return new Viewable("summary.ftl", model);
-  }
-
-  @Path("/listType")
-  @GET
-  public Viewable getType(@QueryParam("type") String type, @QueryParam("minutes") @DefaultValue("10") String minutes,
-      @CookieParam("page.refresh.rate ") @DefaultValue("-1") String refreshValue) {
-    int refresh = -1;
-    try {
-      refresh = Integer.parseInt(refreshValue);
-    } catch (NumberFormatException e) {}
-
-    List<DedupedLogEvent> logs = LogService.getInstance().getEvents();
-    boolean logsHaveError = false;
-    for (DedupedLogEvent dedupedLogEvent : logs) {
-      if (dedupedLogEvent.getEvent().getLevel().isGreaterOrEqual(Level.ERROR)) {
-        logsHaveError = true;
-        break;
-      }
-    }
-
-    int numProblems = Monitor.getProblemSummary().entrySet().size();
-
-    Map<String,Object> model = new HashMap<>();
-    model.put("title", "Traces for " + type + " for the last " + minutes + " minutes");
-    model.put("version", Constants.VERSION);
-    model.put("refresh", refresh);
-    model.put("instance_name", Monitor.cachedInstanceName.get());
-    model.put("instance_id", Monitor.getContext().getInstance().getInstanceID());
-    model.put("current_date", new Date().toString().replace(" ", "&nbsp;"));
-    model.put("num_logs", logs.size());
-    model.put("logs_have_error", logsHaveError);
-    model.put("num_problems", numProblems);
-    model.put("is_ssl", false);
-    model.put("type", type);
-    model.put("minutes", minutes);
-    model.put("redirect", null);
-
-    return new Viewable("listType.ftl", model);
-  }
-
-  @Path("/show")
-  @GET
-  public Viewable getID(@QueryParam("id") String id, @CookieParam("page.refresh.rate ") @DefaultValue("-1") String refreshValue) {
-    int refresh = -1;
-    try {
-      refresh = Integer.parseInt(refreshValue);
-    } catch (NumberFormatException e) {}
-
-    List<DedupedLogEvent> logs = LogService.getInstance().getEvents();
-    boolean logsHaveError = false;
-    for (DedupedLogEvent dedupedLogEvent : logs) {
-      if (dedupedLogEvent.getEvent().getLevel().isGreaterOrEqual(Level.ERROR)) {
-        logsHaveError = true;
-        break;
-      }
-    }
-
-    int numProblems = Monitor.getProblemSummary().entrySet().size();
-
-    Map<String,Object> model = new HashMap<>();
-    model.put("title", "Trace ID " + id);
-    model.put("version", Constants.VERSION);
-    model.put("refresh", refresh);
-    model.put("instance_name", Monitor.cachedInstanceName.get());
-    model.put("instance_id", Monitor.getContext().getInstance().getInstanceID());
-    model.put("current_date", new Date().toString().replace(" ", "&nbsp;"));
-    model.put("num_logs", logs.size());
-    model.put("logs_have_error", logsHaveError);
-    model.put("num_problems", numProblems);
-    model.put("is_ssl", false);
-    model.put("id", id);
-    model.put("redirect", null);
-
-    return new Viewable("show.ftl", model);
-  }
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BasicServlet.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BasicServlet.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BasicServlet.java
index f542a1c..27f479b 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BasicServlet.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BasicServlet.java
@@ -143,13 +143,13 @@ abstract public class BasicServlet extends HttpServlet {
     sb.append("<meta http-equiv='Content-Type' content='").append(DEFAULT_CONTENT_TYPE).append("' />\n");
     sb.append("<meta http-equiv='Content-Script-Type' content='text/javascript' />\n");
     sb.append("<meta http-equiv='Content-Style-Type' content='text/css' />\n");
-    sb.append("<link rel='shortcut icon' type='image/jpg' href='/web/favicon.png' />\n");
-    sb.append("<link rel='stylesheet' type='text/css' href='/web/screen.css' media='screen' />\n");
-    sb.append("<script src='/web/functions.js' type='text/javascript'></script>\n");
+    sb.append("<link rel='shortcut icon' type='image/jpg' href='/resources/favicon.png' />\n");
+    sb.append("<link rel='stylesheet' type='text/css' href='/resources/screen.css' media='screen' />\n");
+    sb.append("<script src='/resources/functions.js' type='text/javascript'></script>\n");
 
-    sb.append("<!--[if lte IE 8]><script language=\"javascript\" type=\"text/javascript\" src=\"/web/flot/excanvas.min.js\"></script><![endif]-->\n");
-    sb.append("<script language=\"javascript\" type=\"text/javascript\" src=\"/web/flot/jquery.js\"></script>\n");
-    sb.append("<script language=\"javascript\" type=\"text/javascript\" src=\"/web/flot/jquery.flot.js\"></script>\n");
+    sb.append("<!--[if lte IE 8]><script language=\"javascript\" type=\"text/javascript\" src=\"/resources/flot/excanvas.min.js\"></script><![endif]-->\n");
+    sb.append("<script language=\"javascript\" type=\"text/javascript\" src=\"/resources/flot/jquery.js\"></script>\n");
+    sb.append("<script language=\"javascript\" type=\"text/javascript\" src=\"/resources/flot/jquery.flot.js\"></script>\n");
 
     sb.append("</head>\n");
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/LogServlet.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/LogServlet.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/LogServlet.java
deleted file mode 100644
index b7cd827..0000000
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/LogServlet.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.monitor.servlets;
-
-import java.text.SimpleDateFormat;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.accumulo.core.conf.AccumuloConfiguration;
-import org.apache.accumulo.core.conf.Property;
-import org.apache.accumulo.monitor.Monitor;
-import org.apache.accumulo.monitor.util.Table;
-import org.apache.accumulo.monitor.util.celltypes.DateTimeType;
-import org.apache.accumulo.monitor.util.celltypes.StringType;
-import org.apache.accumulo.server.monitor.DedupedLogEvent;
-import org.apache.accumulo.server.monitor.LogService;
-import org.apache.log4j.Level;
-import org.apache.log4j.spi.LoggingEvent;
-
-public class LogServlet extends BasicServlet {
-
-  private static final long serialVersionUID = 1L;
-
-  @Override
-  protected String getTitle(HttpServletRequest req) {
-    return "Recent Logs";
-  }
-
-  @Override
-  protected void pageBody(HttpServletRequest req, HttpServletResponse resp, StringBuilder sb) {
-    AccumuloConfiguration conf = Monitor.getContext().getConfiguration();
-    boolean clear = true;
-    final String dateFormatStr = conf.get(Property.MONITOR_LOG_DATE_FORMAT);
-    SimpleDateFormat fmt;
-    try {
-      fmt = new SimpleDateFormat(dateFormatStr);
-    } catch (IllegalArgumentException e) {
-      log.warn("Could not instantiate SimpleDateFormat with format string of '" + dateFormatStr + "', using default format string");
-      fmt = new SimpleDateFormat(Property.MONITOR_LOG_DATE_FORMAT.getDefaultValue());
-    }
-
-    Table logTable = new Table("logTable", "Recent&nbsp;Logs");
-    logTable.addSortableColumn("Time", new DateTimeType(fmt), null);
-    logTable.addSortableColumn("Application");
-    logTable.addSortableColumn("Count");
-    logTable.addSortableColumn("Level", new LogLevelType(), null);
-    logTable.addSortableColumn("Message");
-    for (DedupedLogEvent dev : LogService.getInstance().getEvents()) {
-      clear = false;
-      LoggingEvent ev = dev.getEvent();
-      Object application = ev.getMDC("application");
-      if (application == null)
-        application = "";
-      String msg = ev.getMessage().toString();
-      StringBuilder text = new StringBuilder();
-      for (int i = 0; i < msg.length(); i++) {
-        char c = msg.charAt(i);
-        int type = Character.getType(c);
-        boolean notPrintable = type == Character.UNASSIGNED || type == Character.LINE_SEPARATOR || type == Character.NON_SPACING_MARK
-            || type == Character.PRIVATE_USE;
-        text.append(notPrintable ? '?' : c);
-      }
-      StringBuilder builder = new StringBuilder(text.toString());
-      if (ev.getThrowableStrRep() != null)
-        for (String line : ev.getThrowableStrRep())
-          builder.append("\n\t").append(line);
-      msg = sanitize(builder.toString().trim());
-      msg = "<pre class='logevent'>" + msg + "</pre>";
-      logTable.addRow(ev.getTimeStamp(), application, dev.getCount(), ev.getLevel(), msg);
-    }
-    if (!clear)
-      logTable.setSubCaption("<a href='/op?action=clearLog&redir=" + currentPage(req) + "'>Clear&nbsp;All&nbsp;Events</a>");
-    logTable.generate(req, sb);
-    if (!clear)
-      sb.append("<div class='center'><a href='/op?action=clearLog&redir=").append(currentPage(req)).append("'>Clear&nbsp;All&nbsp;Events</a></div>\n");
-  }
-
-  private static class LogLevelType extends StringType<Level> {
-    private static final long serialVersionUID = 1L;
-
-    @Override
-    public String alignment() {
-      return "center";
-    }
-
-    @Override
-    public String format(Object obj) {
-      if (obj == null)
-        return "-";
-      Level l = (Level) obj;
-      if (l.equals(Level.ERROR) || l.equals(Level.FATAL))
-        return "<div class='error'>" + l.toString() + "</div>";
-      else if (l.equals(Level.WARN))
-        return "<div class='warning'>" + l.toString() + "</div>";
-      else
-        return l.toString();
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/VisServlet.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/VisServlet.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/VisServlet.java
deleted file mode 100644
index 298dcdf..0000000
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/VisServlet.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.monitor.servlets;
-
-import java.io.IOException;
-import java.lang.management.ManagementFactory;
-import java.util.ArrayList;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.accumulo.core.conf.Property;
-import org.apache.accumulo.core.master.thrift.TabletServerStatus;
-import org.apache.accumulo.monitor.Monitor;
-
-public class VisServlet extends BasicServlet {
-  private static final int concurrentScans = Monitor.getContext().getConfiguration().getCount(Property.TSERV_READ_AHEAD_MAXCONCURRENT);
-
-  private static final long serialVersionUID = 1L;
-
-  public enum StatType {
-    osload(ManagementFactory.getOperatingSystemMXBean().getAvailableProcessors(), true, 100, "OS Load"),
-    ingest(1000, true, 1, "Ingest Entries"),
-    query(10000, true, 1, "Scan Entries"),
-    ingestMB(10, true, 10, "Ingest MB"),
-    queryMB(5, true, 10, "Scan MB"),
-    scans(concurrentScans * 2, false, 1, "Running Scans"),
-    scansessions(50, true, 10, "Scan Sessions"),
-    holdtime(60000, false, 1, "Hold Time"),
-    allavg(1, false, 100, "Overall Avg", true),
-    allmax(1, false, 100, "Overall Max", true);
-
-    private int max;
-    private boolean adjustMax;
-    private float significance;
-    private String description;
-    private boolean derived;
-
-    /**
-     * @param max
-     *          initial estimate of largest possible value for this stat
-     * @param adjustMax
-     *          indicates whether max should be adjusted based on observed values
-     * @param significance
-     *          values will be converted by floor(significance*value)/significance
-     * @param description
-     *          as appears in selection box
-     */
-    private StatType(int max, boolean adjustMax, float significance, String description) {
-      this(max, adjustMax, significance, description, false);
-    }
-
-    private StatType(int max, boolean adjustMax, float significance, String description, boolean derived) {
-      this.max = max;
-      this.adjustMax = adjustMax;
-      this.significance = significance;
-      this.description = description;
-      this.derived = derived;
-    }
-
-    public int getMax() {
-      return max;
-    }
-
-    public boolean getAdjustMax() {
-      return adjustMax;
-    }
-
-    public float getSignificance() {
-      return significance;
-    }
-
-    public String getDescription() {
-      return description;
-    }
-
-    public boolean isDerived() {
-      return derived;
-    }
-
-    public static int numDerived() {
-      int count = 0;
-      for (StatType st : StatType.values())
-        if (st.isDerived())
-          count++;
-      return count;
-    }
-  }
-
-  public static class VisualizationConfig {
-    boolean useCircles = true;
-    StatType motion = StatType.allmax;
-    StatType color = StatType.allavg;
-    int spacing = 40;
-    String url;
-  }
-
-  @Override
-  protected String getTitle(HttpServletRequest req) {
-    return "Server Activity";
-  }
-
-  @Override
-  protected void pageBody(HttpServletRequest req, HttpServletResponse response, StringBuilder sb) throws IOException {
-    StringBuffer urlsb = req.getRequestURL();
-    urlsb.setLength(urlsb.lastIndexOf("/") + 1);
-    VisualizationConfig cfg = new VisualizationConfig();
-    cfg.url = urlsb.toString();
-
-    String s = req.getParameter("shape");
-    if (s != null && (s.equals("square") || s.equals("squares"))) {
-      cfg.useCircles = false;
-    }
-
-    s = req.getParameter("motion");
-    if (s != null) {
-      try {
-        cfg.motion = StatType.valueOf(s);
-      } catch (Exception e) {}
-    }
-
-    s = req.getParameter("color");
-    if (s != null) {
-      try {
-        cfg.color = StatType.valueOf(s);
-      } catch (Exception e) {}
-    }
-
-    String size = req.getParameter("size");
-    if (size != null) {
-      if (size.equals("10"))
-        cfg.spacing = 10;
-      else if (size.equals("20"))
-        cfg.spacing = 20;
-      else if (size.equals("80"))
-        cfg.spacing = 80;
-    }
-
-    ArrayList<TabletServerStatus> tservers = new ArrayList<>();
-    if (Monitor.getMmi() != null)
-      tservers.addAll(Monitor.getMmi().tServerInfo);
-
-    if (tservers.size() == 0)
-      return;
-
-    int width = (int) Math.ceil(Math.sqrt(tservers.size())) * cfg.spacing;
-    int height = (int) Math.ceil(tservers.size() / (double) width) * cfg.spacing;
-    doSettings(sb, cfg, width < 640 ? 640 : width, height < 640 ? 640 : height);
-    doScript(sb, cfg, tservers);
-  }
-
-  private void doSettings(StringBuilder sb, VisualizationConfig cfg, int width, int height) {
-    sb.append("<div class='left'>\n");
-    sb.append("<div id='parameters' class='nowrap'>\n");
-    // shape select box
-    sb.append("<span class='viscontrol'>Shape: <select id='shape' onchange='setShape(this)'><option>Circles</option><option")
-        .append(!cfg.useCircles ? " selected='true'" : "").append(">Squares</option></select></span>\n");
-    // size select box
-    sb.append("&nbsp;&nbsp<span class='viscontrol'>Size: <select id='size' onchange='setSize(this)'><option")
-        .append(cfg.spacing == 10 ? " selected='true'" : "").append(">10</option><option").append(cfg.spacing == 20 ? " selected='true'" : "")
-        .append(">20</option><option").append(cfg.spacing == 40 ? " selected='true'" : "").append(">40</option><option")
-        .append(cfg.spacing == 80 ? " selected='true'" : "").append(">80</option></select></span>\n");
-    // motion select box
-    sb.append("&nbsp;&nbsp<span class='viscontrol'>Motion: <select id='motion' onchange='setMotion(this)'>");
-    sb.append("<option selected='true'></option>");
-    addOptions(sb, null);
-    sb.append("</select></span>\n");
-    // color select box
-    sb.append("&nbsp;&nbsp<span class='viscontrol'>Color: <select id='color' onchange='setColor(this)'>");
-    addOptions(sb, cfg.color);
-    sb.append("</select></span>\n");
-    sb.append("&nbsp;&nbsp<span class='viscontrol'>(hover for info, click for details)</span>");
-    sb.append("</div>\n\n");
-    sb.append("<div id='hoverable'>\n");
-    // floating info box
-    sb.append("<div id='vishoverinfo'></div>\n\n");
-    // canvas
-    sb.append("<br><canvas id='visCanvas' width='").append(width).append("' height='").append(height).append("'>Browser does not support canvas.</canvas>\n\n");
-    sb.append("</div>\n");
-    sb.append("</div>\n\n");
-  }
-
-  private void addOptions(StringBuilder sb, StatType selectedStatType) {
-    for (StatType st : StatType.values()) {
-      sb.append("<option").append(st.equals(selectedStatType) ? " selected='true'>" : ">").append(st.getDescription()).append("</option>");
-    }
-  }
-
-  private void doScript(StringBuilder sb, VisualizationConfig cfg, ArrayList<TabletServerStatus> tservers) {
-    // initialization of some javascript variables
-    sb.append("<script type='text/javascript'>\n");
-    sb.append("var numCores = " + ManagementFactory.getOperatingSystemMXBean().getAvailableProcessors() + ";\n");
-    sb.append("var jsonurl = '" + cfg.url + "json';\n");
-    sb.append("var visurl = '" + cfg.url + "vis';\n");
-    sb.append("var serverurl = '" + cfg.url + "tservers?s=';\n\n");
-    sb.append("// observable stats that can be connected to motion or color\n");
-    sb.append("var statNames = {");
-    for (StatType st : StatType.values())
-      sb.append("'").append(st).append("': ").append(st.derived).append(",");
-    sb.setLength(sb.length() - 1);
-    sb.append("};\n");
-    sb.append("var maxStatValues = {");
-    for (StatType st : StatType.values())
-      sb.append("'").append(st).append("': ").append(st.getMax()).append(", ");
-    sb.setLength(sb.length() - 2);
-    sb.append("}; // initial values that are system-dependent may increase based on observed values\n");
-    sb.append("var adjustMax = {");
-    for (StatType st : StatType.values())
-      sb.append("'").append(st).append("': ").append(st.getAdjustMax()).append(", ");
-    sb.setLength(sb.length() - 2);
-    sb.append("}; // whether to allow increases in the max based on observed values\n");
-    sb.append("var significance = {");
-    for (StatType st : StatType.values())
-      sb.append("'").append(st).append("': ").append(st.getSignificance()).append(", ");
-    sb.setLength(sb.length() - 2);
-    sb.append("}; // values will be converted by floor(this*value)/this\n");
-    sb.append("var numNormalStats = ").append(StatType.values().length - StatType.numDerived()).append(";\n");
-    sb.append("</script>\n");
-
-    sb.append("<script src='web/vis.js' type='text/javascript'></script>");
-  }
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/java/org/apache/accumulo/monitor/util/Table.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/Table.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/Table.java
index 79259ac..3af609c 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/Table.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/Table.java
@@ -191,7 +191,8 @@ public class Table {
             sortCol == i ? !sortAscending : i);
         String img = "";
         if (sortCol == i)
-          img = String.format("&nbsp;<img width='10px' height='10px' src='/web/%s.gif' alt='%s' />", sortAscending ? "up" : "down", !sortAscending ? "^" : "v");
+          img = String.format("&nbsp;<img width='10px' height='10px' src='/resources/%s.gif' alt='%s' />", sortAscending ? "up" : "down", !sortAscending ? "^"
+              : "v");
         col.setTitle(String.format("<a href='%s'>%s%s</a>", url, title, img));
       }
       String legend = col.getLegend();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/resources/bulkImport.js
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/resources/bulkImport.js b/server/monitor/src/main/resources/resources/bulkImport.js
new file mode 100644
index 0000000..9e9b2a6
--- /dev/null
+++ b/server/monitor/src/main/resources/resources/bulkImport.js
@@ -0,0 +1,210 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/**
+ * Creates bulk import initial table
+ */
+$(document).ready(function() {
+  createBulkImportHeader();
+  createServerBulkHeader();
+  refreshBulkImport();
+});
+
+/**
+ * Makes the REST calls, generates the tables with the new information
+ */
+function refreshBulkImport() {
+  $.ajaxSetup({
+    async: false
+  });
+  getBulkImports();
+  $.ajaxSetup({
+    async: true
+  });
+  refreshBulkImportTable();
+  refreshServerBulkTable();
+}
+
+/**
+ * Used to redraw the page
+ */
+function refresh() {
+  refreshBulkImport();
+}
+
+/**
+ * Generates the master bulk import status table
+ */
+function refreshBulkImportTable() {
+
+  clearTable('masterBulkImportStatus');
+
+  /*
+   * Get the bulk import value obtained earlier, if it doesn't exists,
+   * create an empty array
+   */
+  var data = sessionStorage.bulkImports === undefined ?
+      [] : JSON.parse(sessionStorage.bulkImports);
+  var items = [];
+
+  /* If the data is empty, create an empty row, otherwise,
+   * create the rows for the table
+   */
+  if (data.length === 0 || data.bulkImport.length === 0) {
+    items.push('<td class="center" colspan="3"><i>Empty</i></td>');
+  } else {
+    $.each(data.bulkImport, function(key, val) {
+      items.push('<td class="firstcell left" data-value="' + val.filename +
+          '">' + val.filename + '</td>');
+
+      items.push('<td class="right" data-value="' + val.age + '">' + val.age +
+          '</td>');
+
+      items.push('<td class="right" data-value="' + val.state + '">' +
+          val.state + '</td>');
+    });
+  }
+
+  $('<tr/>', {
+    html: items.join('')
+  }).appendTo('#masterBulkImportStatus');
+}
+
+/**
+ * Generates the bulk import status table
+ */
+function refreshServerBulkTable() {
+
+  clearTable('bulkImportStatus');
+
+  /* Get the bulk import value obtained earlier, if it doesn't exists,
+   * create an empty array
+   */
+  var data = sessionStorage.bulkImports === undefined ?
+   [] : JSON.parse(sessionStorage.bulkImports);
+  var items = [];
+
+  /* If the data is empty, create an empty row, otherwise
+   * create the rows for the table
+   */
+  if (data.length === 0 || data.tabletServerBulkImport.length === 0) {
+    items.push('<td class="center" colspan="3"><i>Empty</i></td>');
+  } else {
+    $.each(data.tabletServerBulkImport, function(key, val) {
+      items.push('<td class="firstcell left" data-value="' + val.server +
+          '"><a href="/tservers?s=' + val.server + '">' + val.server +
+          '</a></td>');
+
+      items.push('<td class="right" data-value="' + val.importSize + '">' +
+          val.importSize + '</td>');
+
+      items.push('<td class="right" data-value="' + val.oldestAge + '">' +
+          (val.oldestAge > 0 ? val.oldestAge : '&mdash;') + '</td>');
+    });
+  }
+
+  $('<tr/>', {
+    html: items.join('')
+  }).appendTo('#bulkImportStatus');
+}
+
+/**
+ * Sorts the bulkImportStatus table on the selected column
+ *
+ * @param {number} n Column number to sort by
+ */
+function sortTable(n) {
+
+  if (sessionStorage.tableColumnSort !== undefined &&
+      sessionStorage.tableColumnSort == n &&
+      sessionStorage.direction !== undefined) {
+    direction = sessionStorage.direction === 'asc' ? 'desc' : 'asc';
+  } else {
+    direction = sessionStorage.direction === undefined ?
+        'asc' : sessionStorage.direction;
+  }
+  sessionStorage.tableColumnSort = n;
+  sortTables('bulkImportStatus', direction, n);
+}
+
+/**
+ * Create tooltip for table column information
+ */
+$(function() {
+  $(document).tooltip();
+});
+
+/**
+ * Creates the bulk import header
+ */
+function createBulkImportHeader() {
+  var caption = '<span class="table-caption">Bulk&nbsp;Import' +
+      '&nbsp;Status</span><br />';
+
+  $('<caption/>', {
+    html: caption
+  }).appendTo('#masterBulkImportStatus');
+
+  var items = [];
+
+  /*
+   * Adds the columns, add sortTable function on click,
+   * if the column has a description, add title taken from the global.js
+   */
+  items.push('<th class="firstcell" onclick="sortTable(0)" >Directory&nbsp;' +
+      '</th>');
+
+  items.push('<th onclick="sortTable(1)" title="' +
+      descriptions['Import Age'] + '">Age&nbsp;</th>');
+
+  items.push('<th onclick="sortTable(2)" title="' +
+      descriptions['Import State'] + '">State&nbsp;</th>');
+
+  $('<tr/>', {
+    html: items.join('')
+  }).appendTo('#masterBulkImportStatus');
+}
+
+/**
+ * Creates the bulk import header
+ */
+function createServerBulkHeader() {
+  var caption = [];
+
+  caption.push('<span class="table-caption">TabletServer&nbsp;Bulk&nbsp;' +
+      'Import&nbsp;Status</span><br />');
+
+  $('<caption/>', {
+    html: caption.join('')
+  }).appendTo('#bulkImportStatus');
+
+  var items = [];
+
+  /*
+   * Adds the columns, add sortTable function on click,
+   * if the column has a description, add title taken from the global.js
+   */
+  items.push('<th class="firstcell" onclick="sortTable(0)">Server&nbsp;</th>');
+  items.push('<th onclick="sortTable(1)" title="' + descriptions['# Imports'] +
+      '">#&nbsp;</th>');
+  items.push('<th onclick="sortTable(2)" title="' + descriptions['Oldest Age'] +
+      '">Oldest&nbsp;Age&nbsp;</th>');
+
+  $('<tr/>', {
+    html: items.join('')
+  }).appendTo('#bulkImportStatus');
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/resources/down.gif
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/resources/down.gif b/server/monitor/src/main/resources/resources/down.gif
new file mode 100644
index 0000000..087da1d
Binary files /dev/null and b/server/monitor/src/main/resources/resources/down.gif differ

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/resources/favicon.png
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/resources/favicon.png b/server/monitor/src/main/resources/resources/favicon.png
new file mode 100644
index 0000000..a632dab
Binary files /dev/null and b/server/monitor/src/main/resources/resources/favicon.png differ

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/resources/flot/LICENSE.txt
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/resources/flot/LICENSE.txt b/server/monitor/src/main/resources/resources/flot/LICENSE.txt
new file mode 100644
index 0000000..719da06
--- /dev/null
+++ b/server/monitor/src/main/resources/resources/flot/LICENSE.txt
@@ -0,0 +1,22 @@
+Copyright (c) 2007-2014 IOLA and Ole Laursen
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.


Mime
View raw message