You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2017/07/06 20:43:04 UTC
[10/54] [abbrv] accumulo git commit: ACCUMULO-2181/3005 Porting
Monitor
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/resources/vis.js.old
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/resources/vis.js.old b/server/monitor/src/main/resources/resources/vis.js.old
new file mode 100644
index 0000000..8f2bc20
--- /dev/null
+++ b/server/monitor/src/main/resources/resources/vis.js.old
@@ -0,0 +1,409 @@
+/*
+ * 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.
+ */
+
+// size and spacing variables
+var dotSpacing = 10; // spacing between centers of dots (radius)
+var dotPadding = 0.5; // dot padding
+var minDotRadius = 3; // min dot radius
+var maxDotRadius = dotSpacing - dotPadding;
+
+// arrays of information about each dot
+var stats = {'servers': []};
+var dots = new Array(0); // current sizes and change directions
+var mousedDot = -1; // the dot currently under the mouse
+
+var colorPalette = ['#0000CC', '#0014B8', '#0029A3', '#003D8F', '#00527A', '#006666', '#007A52', '#008F3D', '#00A329', '#00B814', '#00CC00', '#14D100', '#29D600', '#3DDB00', '#52E000', '#66E600', '#7AEB00', '#8FF000', '#A3F500', '#B8FA00', '#CCFF00', '#CCFF00', '#CCF200', '#CCE600', '#CCD900', '#CCCC00', '#CCBF00', '#CCB200', '#CCA600', '#CC9900', '#CC8C00', '#CC8000', '#CC7300', '#CC6600', '#CC5900', '#CC4C00', '#CC4000', '#CC3300', '#CC2600', '#CC1A00', '#CC0D00', '#CC0000'];
+
+var nullColor = '#F5F8FA';
+var deadColor = '#B000CC';
+
+// animation variables
+var drawing = false;
+var canvas = document.getElementById('visCanvas');
+var context = canvas.getContext('2d');
+
+// mouse handling for server information display
+document.getElementById('hoverable').addEventListener('mouseover', showId, false);
+document.getElementById('hoverable').addEventListener('mousemove', showId, false);
+document.getElementById('hoverable').addEventListener('mouseout', hideId, false);
+document.getElementById('vishoverinfo').addEventListener('click', goToServer, false);
+canvas.addEventListener('click', goToServer, false);
+
+// initialize settings based on request parameters
+var main = document.getElementById('main');
+var speedStatType;
+var colorStatType;
+var speedDisabled = true;
+var useCircles = true;
+setShape(document.getElementById('shape'));
+setSize(document.getElementById('size'));
+setMotion(document.getElementById('motion'));
+setColor(document.getElementById('color'));
+
+// xml loading variables
+var xmlReturned = true;
+var xmlhttp=new XMLHttpRequest(); // don't bother allowing for IE 5 or 6 since canvas won't work
+xmlhttp.onreadystatechange=function() {
+ handleNewData();
+}
+self.setInterval("getXML()",5000);
+//self.setInterval("drawDots()",20);
+
+window.requestAnimFrame = (function(callback){
+ return window.requestAnimationFrame ||
+ window.webkitRequestAnimationFrame ||
+ window.mozRequestAnimationFrame ||
+ window.oRequestAnimationFrame ||
+ window.msRequestAnimationFrame ||
+ function(callback){
+ window.setTimeout(callback, 1000 / 60);
+ };
+})();
+
+function handleNewData() {
+ if (xmlhttp.readyState!=4) {
+ return;
+ }
+ if (xmlhttp.status!=200 || xmlhttp.responseText==null) {
+ xmlReturned = true;
+ return;
+ }
+ var newstats = JSON.parse(xmlhttp.responseText);
+ for (var i in newstats.servers) {
+ for (var s in statNames) {
+ if (statNames[s])
+ continue;
+ newstats.servers[i][s] = Math.max(0,Math.floor(significance[s]*newstats.servers[i][s])/significance[s]);
+ if (adjustMax[s])
+ maxStatValues[s] = Math.max(newstats.servers[i][s],maxStatValues[s]);
+ }
+ }
+
+ initDerivedInfo(newstats);
+ var oldstats = stats;
+ while(drawing) {}
+ stats = newstats;
+ delete oldstats;
+ xmlReturned = true;
+}
+
+// set max and average
+function setDerivedStats(serverStats) {
+ var avgStat = 0;
+ var maxStat = 0;
+ var maxIndex = 0;
+ for (var s in statNames) {
+ if (statNames[s])
+ continue;
+ normStat = serverStats[s]/maxStatValues[s];
+ if (normStat > 0)
+ avgStat += normStat;
+ if (maxStat < normStat) {
+ maxStat = normStat;
+ maxIndex = s;
+ }
+ }
+ serverStats.allmax = Math.floor(significance.allmax*Math.min(1,maxStat))/significance.allmax;
+ serverStats.allavg = Math.floor(significance.allavg*avgStat/numNormalStats)/significance.allavg;
+ serverStats.maxStat = maxIndex;
+}
+
+function initDerivedInfo(newstats) {
+ for (var i in newstats.servers) {
+ if ('dead' in newstats.servers[i] || 'bad' in newstats.servers[i]) {
+ continue;
+ }
+ if (i >= dots.length) {
+ dots.push({'size': maxDotRadius, 'growing': false});
+ }
+ setDerivedStats(newstats.servers[i]);
+ }
+}
+
+// construct server info for hover
+function getInfo(serverStats) {
+ var extra = '<strong>' + serverStats.ip + '</strong>';
+ if ('dead' in serverStats || 'bad' in serverStats)
+ return extra;
+ extra = extra + ' (' + serverStats.hostname + ')';
+ var j = 0;
+ for (var s in statNames) {
+ if (j % 4 == 0)
+ extra = extra + '<br>\n';
+ extra = extra + ' ' + s + ': <strong>' + serverStats[s] + '</strong>';
+ j++;
+ }
+ extra = extra + ' (' + serverStats.maxStat + ')';
+ return extra;
+}
+
+// reload xml
+function getXML() {
+ if (xmlReturned == true) {
+ xmlReturned = false;
+ xmlhttp.open('POST',jsonurl,true);
+ xmlhttp.send();
+ }
+}
+
+// redraw
+function drawDots() {
+ requestAnimFrame(drawDots);
+
+ var width = Math.ceil(Math.sqrt(stats.servers.length));
+ var height = Math.ceil(stats.servers.length/width);
+ var x;
+ var y;
+ var server
+ var sizeChange;
+ drawing = true;
+ for (var i in stats.servers) {
+ server = stats.servers[i];
+ x = i % width;
+ y = Math.floor(i / width);
+ if ('bad' in server || 'dead' in server) {
+ strokeDot(x,y,maxDotRadius-1,deadColor);
+ continue;
+ }
+ if (speedDisabled || Math.floor(dots[i].size) > maxDotRadius) {
+ // check for resize by the user
+ dots[i].size = maxDotRadius;
+ } else if (server[speedStatType]<=0) {
+ // if not changing size, increase to max radius
+ if (dots[i].size < maxDotRadius)
+ dots[i].size = dots[i].size + 1;
+ if (dots[i].size > maxDotRadius)
+ dots[i].size = maxDotRadius;
+ } else {
+ sizeChange = getStat(i,speedStatType);
+ if (dots[i].growing) {
+ dots[i].size = dots[i].size + sizeChange;
+ if (dots[i].size + sizeChange > maxDotRadius) {
+ dots[i].growing = false;
+ }
+ }
+ else {
+ dots[i].size = dots[i].size - sizeChange;
+ if (dots[i].size - sizeChange < minDotRadius) {
+ dots[i].growing = true;
+ }
+ }
+ }
+ drawDot(x,y,Math.floor(dots[i].size),getColor(getStat(i,colorStatType)));
+ }
+ // mousedDot shouldn't be set to an invalid dot, but stats might have changed since then
+ if (mousedDot >= 0 && mousedDot < stats.servers.length)
+ document.getElementById('vishoverinfo').innerHTML=getInfo(stats.servers[mousedDot]);
+ drawing = false;
+}
+
+// fill in a few grey dots
+function drawGrid() {
+ context.clearRect(0, 0, canvas.width, canvas.height);
+ for (var i=0, k=0; i < canvas.width; i+=dotSpacing*2,k++) {
+ for (var j=0, l=0; j < canvas.height; j+=dotSpacing*2,l++) {
+ drawDot(k,l,maxDotRadius,nullColor);
+ }
+ }
+}
+
+// fill a dot specified by indices into dot grid
+function drawDot(i,j,r,c) {
+ var x = i*dotSpacing*2 + dotSpacing;
+ var y = j*dotSpacing*2 + dotSpacing;
+ context.clearRect(x-dotSpacing, y-dotSpacing, dotSpacing*2, dotSpacing*2);
+ if (useCircles)
+ fillCircle(x,y,r-dotPadding,c);
+ else
+ fillSquare(x-r,y-r,(r-dotPadding)*2,c);
+}
+
+// stroke a dot specified by indices into dot grid
+function strokeDot(i,j,r,c) {
+ var x = i*dotSpacing*2 + dotSpacing;
+ var y = j*dotSpacing*2 + dotSpacing;
+ context.clearRect(x-dotSpacing, y-dotSpacing, dotSpacing*2, dotSpacing*2);
+ if (useCircles)
+ strokeCircle(x,y,r-dotPadding,c);
+ else
+ strokeSquare(x-r,y-r,(r-dotPadding)*2,c);
+}
+
+function getStat(dotIndex,statIndex) {
+ return Math.min(1,stats.servers[dotIndex][statIndex]/maxStatValues[statIndex]);
+}
+
+// translate color between 0 and maxObservedColor into an html color code
+function getColor(normColor) {
+ return colorPalette[Math.round((colorPalette.length-1)*normColor)];
+}
+
+function strokeCircle(x,y,r,c) {
+ context.strokeStyle = c;
+ context.lineWidth = 2;
+ context.beginPath();
+ context.arc(x,y,r,0,Math.PI*2,true);
+ context.closePath();
+ context.stroke();
+}
+
+function fillCircle(x,y,r,c) {
+ context.fillStyle = c;
+ context.beginPath();
+ context.arc(x,y,r,0,Math.PI*2,true);
+ context.closePath();
+ context.fill();
+}
+
+function strokeSquare(x,y,d,c) {
+ context.strokeStyle = c;
+ context.lineWidth = 2;
+ context.strokeRect(x,y,d,d);
+}
+
+function fillSquare(x,y,d,c) {
+ context.fillStyle = c;
+ context.fillRect(x,y,d,d);
+}
+
+// callback for shape selection
+function setShape(obj) {
+ switch (obj.selectedIndex) {
+ case 0:
+ useCircles = true;
+ break;
+ case 1:
+ useCircles = false;
+ break;
+ default:
+ useCircles = true;
+ }
+ drawGrid();
+ setState();
+}
+
+// callback for size selection
+function setSize(obj) {
+ switch (obj.selectedIndex) {
+ case 0:
+ dotSpacing = 5;
+ minDotRadius = 1;
+ break;
+ case 1:
+ dotSpacing = 10;
+ minDotRadius = 3;
+ break;
+ case 2:
+ dotSpacing = 20;
+ minDotRadius = 5;
+ break;
+ case 3:
+ dotSpacing = 40;
+ minDotRadius = 7;
+ break;
+ default:
+ dotSpacing = 10;
+ minDotRadius = 3;
+ }
+ maxDotRadius = dotSpacing - dotPadding;
+ drawGrid();
+ setState();
+}
+
+// callback for motion selection
+function setMotion(obj) {
+ if (obj.selectedIndex==0) {
+ speedDisabled = true;
+ setState();
+ return;
+ }
+ var i = 1;
+ for (var s in statNames) {
+ if (i==obj.selectedIndex) {
+ speedStatType = s;
+ break;
+ }
+ i++;
+ }
+ speedDisabled = false;
+ setState();
+}
+
+// callback for color selection
+function setColor(obj) {
+ var i = 0;
+ for (var s in statNames) {
+ if (i==obj.selectedIndex) {
+ colorStatType = s;
+ break;
+ }
+ i++;
+ }
+ setState();
+}
+
+// hide server info on mouseout
+function hideId(e) {
+ document.getElementById('vishoverinfo').style.visibility='hidden';
+}
+
+// display server info on mouseover
+function showId(e) {
+ var x;
+ var y;
+ if (e.pageX || e.pageY) {
+ x = e.pageX + main.scrollLeft;
+ y = e.pageY + main.scrollTop;
+ }
+ else {
+ // clientX and clientY unimplemented
+ return;
+ }
+ var relx = x - canvas.offsetLeft - main.offsetLeft;
+ var rely = y - canvas.offsetTop - main.offsetTop;
+ var width = Math.ceil(Math.sqrt(stats.servers.length));
+ gotDot = Math.floor(relx/(dotSpacing*2)) + width*Math.floor(rely/(dotSpacing*2));
+ mousedDot = -1;
+ if (relx < (width*dotSpacing*2) && gotDot >= 0 && gotDot < stats.servers.length) {
+ mousedDot = gotDot;
+ document.getElementById('vishoverinfo').style.left=relx+canvas.offsetLeft;
+ document.getElementById('vishoverinfo').style.top=Math.max(0,rely+canvas.offsetTop-70);
+ document.getElementById('vishoverinfo').style.visibility='visible';
+ }
+ else {
+ document.getElementById('vishoverinfo').style.visibility='hidden';
+ }
+}
+
+function setState() {
+ var url = visurl+'?shape='+(useCircles?'circles':'squares')+'&size='+(dotSpacing*2)+(speedDisabled ? '' : '&motion='+speedStatType)+'&color='+colorStatType;
+ window.history.replaceState(window.history.state,'Server Activity',url);
+}
+
+// go to server page on click
+function goToServer(e) {
+ // mousedDot shouldn't be set to an invalid dot, but stats might have changed since then
+ if (mousedDot >= 0 && mousedDot < stats.servers.length)
+ window.location = serverurl + stats.servers[mousedDot].ip;
+}
+
+window.onload = function() {
+ drawGrid();
+ drawDots();
+ getXML();
+}
+
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/templates/bulkImport.ftl
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/templates/bulkImport.ftl b/server/monitor/src/main/resources/templates/bulkImport.ftl
new file mode 100644
index 0000000..649a1b1
--- /dev/null
+++ b/server/monitor/src/main/resources/templates/bulkImport.ftl
@@ -0,0 +1,28 @@
+<#--
+ 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.
+-->
+ <div><h3>${title}</h3></div>
+ <div class="center-block">
+ <table id="masterBulkImportStatus" class="table table-bordered table-striped table-condensed">
+
+ </table>
+ </div>
+
+ <div class="center-block">
+ <table id="bulkImportStatus" class="table table-bordered table-striped table-condensed">
+
+ </table>
+ </div>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/templates/footer.ftl
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/templates/footer.ftl b/server/monitor/src/main/resources/templates/footer.ftl
new file mode 100644
index 0000000..7c8a7b5
--- /dev/null
+++ b/server/monitor/src/main/resources/templates/footer.ftl
@@ -0,0 +1,44 @@
+<#--
+ 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.
+-->
+ <footer id="footer">
+ <div>
+ <div class="input-group input-group-sm" style="float: left; width: 15%;">
+ <span class="smalltext">Refresh Rate </span>
+ <span class="input-group-btn">
+ <button type="button" class="btn btn-default">
+ <span class="glyphicon glyphicon-minus-sign"></span>
+ </button>
+ </span>
+ <input type="text" class="form-control">
+ <span class="input-group-btn">
+ <button type="button" class="btn btn-default">
+ <span class="glyphicon glyphicon-plus-sign">
+ </button>
+ </span>
+ </div>
+ <div style="float: left; width: 70%;">
+ <div class="smalltext"><a href="https://accumulo.apache.org/" target="_blank">Apache Accumulo</a>
+ ${version}
+ </div>
+ <div class="smalltext">${instance_id}</div>
+ <div class="smalltext" id="currentDate"></div>
+ <script>
+ document.getElementById('currentDate').innerHTML = Date();
+ </script>
+ </div>
+ </div>
+ </footer>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/templates/gc.ftl
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/templates/gc.ftl b/server/monitor/src/main/resources/templates/gc.ftl
new file mode 100644
index 0000000..94426c2
--- /dev/null
+++ b/server/monitor/src/main/resources/templates/gc.ftl
@@ -0,0 +1,23 @@
+<#--
+ 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.
+-->
+ <div><h3>${title}</h3></div>
+ <div id="gcBanner"></div>
+ <div class="center-block">
+ <table id="gcActivity" class="table table-bordered table-striped table-condensed">
+
+ </table>
+ </div>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/templates/header.ftl
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/templates/header.ftl b/server/monitor/src/main/resources/templates/header.ftl
index 61ef8bc..b69af52 100644
--- a/server/monitor/src/main/resources/templates/header.ftl
+++ b/server/monitor/src/main/resources/templates/header.ftl
@@ -14,12 +14,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
- <div id='header' class="navbar navbar-inverse navbar-fixed-top">
- <div id='headertitle'>
- <h1>${title}</h1>
- </div>
- <div id='subheader'>Instance Name: ${instance_name} Version: ${version}
- <br><span class='smalltext'>Instance ID: ${instance_id}</span>
- <br><span class='smalltext'>${current_date}</span>
- </div>
- </div>
+ <div id="headertitle">
+ <ul class="nav nav-pills">
+ <li><a href="/">${instance_name}</a></li>
+ </ul>
+ </div>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/templates/index.ftl
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/templates/index.ftl b/server/monitor/src/main/resources/templates/index.ftl
new file mode 100644
index 0000000..773c4c2
--- /dev/null
+++ b/server/monitor/src/main/resources/templates/index.ftl
@@ -0,0 +1,72 @@
+<!--
+ 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.
+-->
+<html>
+ <head>
+ <title>${title} - Accumulo ${version}</title>
+ <meta http-equiv="Content-Type" content="test/html" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <meta http-equiv="Content-Style-Type" content="text/css" />
+ <link rel="shortcut icon" type="image/jng" href="/resources/favicon.png" />
+ <script src="/resources/global.js" type="text/javascript"></script>
+ <script src="/resources/functions.js" type="text/javascript"></script>
+
+ <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
+ <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
+
+ <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
+ <script language="javascript" type="text/javascript" src="/resources/flot/jquery.flot.js"></script>
+ <script language="javascript" type="text/javascript" src="/resources/flot/jquery.flot.time.js"></script>
+ <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css" rel="stylesheet" />
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"></script>
+
+ <link rel="stylesheet" type="text/css" href="/resources/screen.css" media="screen" />
+ <script>
+ /**
+ * Sets up autorefresh on initial load
+ */
+ $(document).ready(function() {
+ setupAutoRefresh();
+ });
+ </script>
+ <#if js??>
+ <script src="/resources/${js}"></script>
+ </#if>
+ <script src="/resources/sidebar.js"></script>
+ </head>
+
+ <body>
+ <#include "/templates/modals.ftl">
+ <div id="content-wrapper">
+ <div id="content">
+ <div id="sidebar" class="navbar navbar-inverse navbar-fixed-top">
+ <!--<#include "/templates/header.ftl">-->
+ <#include "/templates/sidebar.ftl">
+ </div>
+
+ <div id="main">
+ <#include "/templates/${template}">
+
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/templates/listType.ftl
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/templates/listType.ftl b/server/monitor/src/main/resources/templates/listType.ftl
new file mode 100644
index 0000000..caae21c
--- /dev/null
+++ b/server/monitor/src/main/resources/templates/listType.ftl
@@ -0,0 +1,32 @@
+<#--
+ 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.
+-->
+ <script>
+ /**
+ * Creates initial trace list type table, and passes type and minutes values from template
+ */
+ $(document).ready(function() {
+ createHeader('${type}', '${minutes}');
+ refreshListType();
+ });
+ </script>
+
+ <div><h3>${title}</h3></div>
+ <div class="center-block">
+ <table id="trace" class="table table-bordered table-striped table-condensed">
+
+ </table>
+ </div>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/templates/log.ftl
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/templates/log.ftl b/server/monitor/src/main/resources/templates/log.ftl
new file mode 100644
index 0000000..9bebd24
--- /dev/null
+++ b/server/monitor/src/main/resources/templates/log.ftl
@@ -0,0 +1,22 @@
+<#--
+ 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.
+-->
+ <div><h3>${title}</h3></div>
+ <div class="center-block">
+ <table id="logTable" class="table table-bordered table-striped table-condensed">
+
+ </table>
+ </div>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/templates/master.ftl
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/templates/master.ftl b/server/monitor/src/main/resources/templates/master.ftl
new file mode 100644
index 0000000..128b695
--- /dev/null
+++ b/server/monitor/src/main/resources/templates/master.ftl
@@ -0,0 +1,29 @@
+<#--
+ 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.
+-->
+ <div><h3>${title}</h3></div>
+ <div id="masterBanner"></div>
+ <div class="center-block">
+ <table id="masterStatus" class="table table-bordered table-striped table-condensed">
+
+ </table>
+ <table id="recoveryList" class="table table-bordered table-striped table-condensed">
+
+ </table>
+ </div>
+ <br />
+ <script src="/resources/${tablesJs}"></script>
+ <#include "/templates/${tablesTemplate}">
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/templates/modals.ftl
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/templates/modals.ftl b/server/monitor/src/main/resources/templates/modals.ftl
new file mode 100644
index 0000000..49cd390
--- /dev/null
+++ b/server/monitor/src/main/resources/templates/modals.ftl
@@ -0,0 +1,39 @@
+<#--
+ 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.
+-->
+ <!-- Modal -->
+ <div id="aboutModal" data-target="#aboutModal" class="modal fade" role="dialog">
+ <div class="modal-dialog" role="document">
+
+ <!-- Modal content -->
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">×</button>
+ <h4 class="modal-title">About ${instance_name}</h4>
+ </div>
+ <div class="modal-body">
+ <p><a href='https://accumulo.apache.org/' target='_blank'>Apache Accumulo</a>
+ ${version}
+ </p>
+ <p>${instance_id}</p>
+ <p id='currentDate'></p>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+ </div>
+ </div>
+ </div>
+ </div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/BulkImport/bulkImport.ftl
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/BulkImport/bulkImport.ftl b/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/BulkImport/bulkImport.ftl
deleted file mode 100644
index d6e4c3b..0000000
--- a/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/BulkImport/bulkImport.ftl
+++ /dev/null
@@ -1,113 +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.
--->
-<html>
- <head>
- <title>${title} - Accumulo ${version}</title>
- <#if refresh gt 0 ><meta http-equiv='refresh' content='${refresh}' /></#if>
- <meta http-equiv='Content-Type' content='test/html"' />
- <meta http-equiv='Content-Script-Type' content='text/javascript' />
- <meta http-equiv='Content-Style-Type' content='text/css' />
- <link rel='shortcut icon' type='image/jpg' href='http://localhost:9995/web/favicon.png' />
- <link rel='stylesheet' type='text/css' href='http://localhost:9995/web/screen.css' media='screen' />
- <script src='http://localhost:9995/web/functions.js' type='text/javascript'></script>
-
- <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/excanvas.min.js"></script><![endif]-->
- <script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/jquery.js"></script>
- <script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/jquery.flot.js"></script>
- </head>
-
- <body>
- <script type="text/javascript">
- $.getJSON("rest/bulkImports", function(data) {
- var items = [];
-
- if (data.bulkImport.length === 0) {
- items.push("<td class='center' colspan='3'><i>Empty</i></td>");
-
- $("<tr/>", {
- html: items.join("")
- }).appendTo("#masterBulkImportStatus");
-
- } else {
- $.each(data.bulkImport, function(key, val) {
- items.push("<td class='firstcell left'>" + val.filename + "</td>");
- items.push("<td class='right'>" + val.age + "</td>");
- items.push("<td class='right'>" + val.state + "</td>");
- });
-
- $("<tr/>", {
- html: items.join(""),
- class: "highlight"
- }).appendTo("#masterBulkImportStatus");
- }
-
- var items2 = [];
- if (data.tabletServerBulkImport.length === 0) {
- items2.push("<td class='center' colspan='3'><i>Empty</i></td>");
- $("<tr/>", {
- html: items2.join("")
- }).appendTo("#bulkImportStatus");
- } else {
- $.each(data.tabletServerBulkImport, function(key, val) {
- items2.push("<td class='firstcell left'><a href='/tservers/" + val.server + "'>" + val.server + "</a></td>");
- items2.push("<td class='right'>" + val.importSize + "</td>");
- items2.push("<td class='right'>" + (val.oldestAge > 0 ? val.oldestAge : "—") + "</td>");
- });
-
- $("<tr/>", {
- html: items2.join(""),
- class: "highlight"
- }).appendTo("#bulkImportStatus");
- }
- });
-
- </script>
- <div id='content-wrapper'>
- <div id='content'>
- <div id='header'>
- <#include "/templates/header.ftl">
- </div>
-
- <#include "/templates/sidebar.ftl">
-
- <div id='main' style='bottom:0'>
- <div>
- <a name='masterBulkImportStatus'> </a>
- <table id='masterBulkImportStatus' class='sortable'>
- <caption>
- <span class='table-caption'>Bulk Import Status</span><br />
- <a href='/op?action=toggleLegend&redir=%2FbulkImports&page=/bulkImports&table=masterBulkImportStatus&show=true'>Show Legend</a>
- </caption>
- <tr><th class='firstcell'>Directory</th><th>Age</th><th>State</th></tr>
- </table>
- </div>
-
- <div>
- <a name='bulkImportStatus'> </a>
- <table id='bulkImportStatus' class='sortable'>
- <caption>
- <span class='table-caption'>TabletServer Bulk Import Status</span><br />
- <a href='/op?action=toggleLegend&redir=%2FbulkImports&page=/bulkImports&table=bulkImportStatus&show=true'>Show Legend</a>
- </caption>
- <tr><th class='firstcell'>Server</th><th>#</th><th>Oldest Age</th></tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/GarbageCollector/gc.ftl
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/GarbageCollector/gc.ftl b/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/GarbageCollector/gc.ftl
deleted file mode 100644
index 097aac7..0000000
--- a/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/GarbageCollector/gc.ftl
+++ /dev/null
@@ -1,169 +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.
--->
-<html>
- <head>
- <title>${title} - Accumulo ${version}</title>
- <#if refresh gt 0 ><meta http-equiv='refresh' content='${refresh}' /></#if>
- <meta http-equiv='Content-Type' content='test/html"' />
- <meta http-equiv='Content-Script-Type' content='text/javascript' />
- <meta http-equiv='Content-Style-Type' content='text/css' />
- <link rel='shortcut icon' type='image/jpg' href='http://localhost:9995/web/favicon.png' />
- <link rel='stylesheet' type='text/css' href='http://localhost:9995/web/screen.css' media='screen' />
- <script src='http://localhost:9995/web/functions.js' type='text/javascript'></script>
-
- <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/excanvas.min.js"></script><![endif]-->
- <script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/jquery.js"></script>
- <script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/jquery.flot.js"></script>
- </head>
-
- <body>
- <script type="text/javascript">
- $.getJSON("rest/gc", function(data) {
-
- var count = 0;
-
- if (data.files.lastCycle.finished > 0) {
- var items = [];
-
- var working = data.files.lastCycle;
-
- items.push("<td class='firstcell left'>File Collection, Last Cycle</td>");
- var date = new Date(working.finished);
- items.push("<td class='right'>" + date.toLocaleString() + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(working.candidates) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(working.deleted) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(working.inUse) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(working.errors) + "</td>");
- items.push("<td class='right'>" + timeDuration(working.finished - working.started) + "</td>");
-
- if (count % 2 == 0) {
- $("<tr/>", {
- html: items.join(""),
- class: "highlight"
- }).appendTo("#gcActivity");
- } else {
- $("<tr/>", {
- html: items.join("")
- }).appendTo("#gcActivity");
- }
- count += 1;
- }
-
- if (data.files.currentCycle.started > 0) {
- var items = [];
-
- var working = data.files.currentCycle;
-
- items.push("<td class='firstcell left'>File Collection, Running</td>");
- var date = new Date(working.finished);
- items.push("<td class='right'>" + date.toLocaleString() + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(working.candidates) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(working.deleted) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(working.inUse) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(working.errors) + "</td>");
- items.push("<td class='right'>" + timeDuration(working.finished - working.started) + "</td>");
-
- if (count % 2 == 0) {
- $("<tr/>", {
- html: items.join(""),
- class: "highlight"
- }).appendTo("#gcActivity");
- } else {
- $("<tr/>", {
- html: items.join("")
- }).appendTo("#gcActivity");
- }
- count += 1;
- }
- if (data.wals.lastCycle.finished > 0) {
- var items = [];
-
- var working = data.wals.lastCycle;
-
- items.push("<td class='firstcell left'>WAL Collection, Last Cycle</td>");
- var date = new Date(working.finished);
- items.push("<td class='right'>" + date.toLocaleString() + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(working.candidates) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(working.deleted) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(working.inUse) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(working.errors) + "</td>");
- items.push("<td class='right'>" + timeDuration(working.finished - working.started) + "</td>");
-
- if (count % 2 == 0) {
- $("<tr/>", {
- html: items.join(""),
- class: "highlight"
- }).appendTo("#gcActivity");
- } else {
- $("<tr/>", {
- html: items.join("")
- }).appendTo("#gcActivity");
- }
- count += 1;
- }
- if (data.wals.currentCycle.started > 0) {
- var items = [];
-
- var working = data.wals.currentCycle;
-
- items.push("<td class='firstcell left'>WAL Collection, Running</td>");
- var date = new Date(working.finished);
- items.push("<td class='right'>" + date.toLocaleString() + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(working.candidates) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(working.deleted) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(working.inUse) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(working.errors) + "</td>");
- items.push("<td class='right'>" + timeDuration(working.finished - working.started) + "</td>");
-
- if (count % 2 == 0) {
- $("<tr/>", {
- html: items.join(""),
- class: "highlight"
- }).appendTo("#gcActivity");
- } else {
- $("<tr/>", {
- html: items.join("")
- }).appendTo("#gcActivity");
- }
- count += 1;
- }
- });
-
- </script>
- <div id='content-wrapper'>
- <div id='content'>
- <div id='header'>
- <#include "/templates/header.ftl">
- </div>
-
- <#include "/templates/sidebar.ftl">
-
- <div id='main' style='bottom:0'>
- <div>
- <a name='gcActivity'> </a>
- <table id='gcActivity' class='sortable'>
- <caption>
- <span class='table-caption'>Collection Activity</span><br />
- </caption>
- <tr><th class='firstcell'><a href='/op?action=sortTable&redir=%2Fgc&page=/gc&table=gcActivity&asc=false'>Activity <img width='10px' height='10px' src='/web/up.gif' alt='v' /></a></th><th><a href='/op?action=sortTable&redir=%2Fgc&page=/gc&table=gcActivity&col=1'>Finished</a></th><th><a href='/op?action=sortTable&redir=%2Fgc&page=/gc&table=gcActivity&col=2'>Candidates</a></th><th><a href='/op?action=sortTable&redir=%2Fgc&page=/gc&table=gcActivity&col=3'>Deleted</a></th><th><a href='/op?action=sortTable&redir=%2Fgc&page=/gc&table=gcActivity&col=4'>In Use</a></th><th><a href='/op?action=sortTable&redir=%2Fgc&page=/gc&table=gcActivity&col=5'>Errors</a></th><th><a href='/op?action=sortTable&redir=%2Fgc&page=/gc&table=gcActivity&col=6'>Duration</a></th></tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/Master/master.ftl
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/Master/master.ftl b/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/Master/master.ftl
deleted file mode 100644
index bb737d8..0000000
--- a/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/Master/master.ftl
+++ /dev/null
@@ -1,83 +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.
--->
-<html>
- <head>
- <title>${title} - Accumulo ${version}</title>
- <#if refresh gt 0 ><meta http-equiv='refresh' content='${refresh}' /></#if>
- <meta http-equiv='Content-Type' content='test/html"' />
- <meta http-equiv='Content-Script-Type' content='text/javascript' />
- <meta http-equiv='Content-Style-Type' content='text/css' />
- <link rel='shortcut icon' type='image/jpg' href='http://localhost:9995/web/favicon.png' />
- <link rel='stylesheet' type='text/css' href='http://localhost:9995/web/screen.css' media='screen' />
- <script src='http://localhost:9995/web/functions.js' type='text/javascript'></script>
-
- <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/excanvas.min.js"></script><![endif]-->
- <script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/jquery.js"></script>
- <script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/jquery.flot.js"></script>
- </head>
-
- <body>
- <script type="text/javascript">
- $.getJSON("rest/master", function(data) {
- var items = [];
- items.push("<td class='firstcell left'>" + data.master + "</td>");
- items.push("<td class='right'>" + data.onlineTabletServers + "</td>");
- items.push("<td class='right'>" + data.totalTabletServers + "</td>");
- var date = new Date(parseInt(data.lastGC));
- items.push("<td class='left'><a href='/gc'>" + date.toLocaleString() + "</a></td>");
- items.push("<td class='right'>" + bigNumberForQuantity(data.tablets) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(data.unassignedTablets) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(data.numentries) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(Math.round(data.ingestrate)) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(Math.round(data.entriesRead)) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(Math.round(data.queryrate)) + "</td>");
- items.push("<td class='right'>" + timeDuration(data.holdTime) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(data.osload) + "</td>");
-
- $("<tr/>", {
- html: items.join(""),
- class: "highlight"
- }).appendTo("#masterStatus");
- });
-
- </script>
- <div id='content-wrapper'>
- <div id='content'>
- <div id='header'>
- <#include "/templates/header.ftl">
- </div>
-
- <#include "/templates/sidebar.ftl">
-
- <div id='main' style='bottom:0'>
-
- <div>
- <a name='masterStatus'> </a>
- <table id='masterStatus' class='sortable'>
- <caption>
- <span class='table-caption'>Master Status</span><br />
- <a href='/op?action=toggleLegend&redir=%2Fmaster&page=/master&table=masterStatus&show=true'>Show Legend</a>
- </caption>
- <tr><th class='firstcell'>Master</th><th># Online<br />Tablet Servers</th><th># Total<br />Tablet Servers</th><th>Last GC</th><th># Tablets</th><th># Unassigned<br />Tablets</th><th>Entries</th><th>Ingest</th><th>Entries<br />Read</th><th>Entries<br />Returned</th><th>Hold Time</th><th>OS Load</th></tr>
- </table>
- </div>
-
- </div>
- </div>
- </div>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/Overview/index.ftl
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/Overview/index.ftl b/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/Overview/index.ftl
deleted file mode 100644
index 66c1d40..0000000
--- a/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/Overview/index.ftl
+++ /dev/null
@@ -1,222 +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.
--->
-<html>
- <head>
- <title>${title} - Accumulo ${version}</title>
- <#if refresh gt 0 ><meta http-equiv='refresh' content='${refresh}' /></#if>
- <meta http-equiv='Content-Type' content='test/html"' />
- <meta http-equiv='Content-Script-Type' content='text/javascript' />
- <meta http-equiv='Content-Style-Type' content='text/css' />
- <link rel='shortcut icon' type='image/jpg' href='http://localhost:9995/web/favicon.png' />
- <link rel='stylesheet' type='text/css' href='http://localhost:9995/web/screen.css' media='screen' />
- <script src='http://localhost:9995/web/functions.js' type='text/javascript'></script>
-
- <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/excanvas.min.js"></script><![endif]-->
- <script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/jquery.js"></script>
- <script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/jquery.flot.js"></script>
- </head>
-
- <body>
- <script type="text/javascript">
- $.getJSON("rest/master", function(data) {
- var items = [];
- items.push("<tr><th colspan='2'><a href='/master'>Accumulo Master</a></th></tr>");
- items.push("<tr class='highlight'><td class='left'><a href='/tables'>Tables</a></td><td class='right'>" + bigNumberForQuantity(data.tables) + "</td></tr>");
- items.push("<tr><td class='left'><a href='/tservers'>Tablet Servers</a></td><td class='right'>" + bigNumberForQuantity(data.totalTabletServers) + "</td></tr>");
- items.push("<tr class='highlight'><td class='left'><a href='/tservers'>Dead Tablet Servers</a></td><td class='right'>" + bigNumberForQuantity(data.deadTabletServersCount) + "</td></tr>");
- items.push("<tr><td class='left'>Tablets</td><td class='right'>" + bigNumberForQuantity(data.tablets) + "</td></tr>");
- items.push("<tr class='highlight'><td class='left'>Entries</td><td class='right'>" + bigNumberForQuantity(data.numentries) + "</td></tr>");
- items.push("<tr><td class='left'>Lookups</td><td class='right'>" + bigNumberForQuantity(data.lookups) + "</td></tr>");
- items.push("<tr class='highlight'><td class='left'>Uptime</td><td class='right'>" + timeDuration(data.uptime) + "</td></tr>");
-
- $("<table/>", {
- html: items.join("")
- }).appendTo("#master");
- });
-
- $.getJSON("rest/zk", function(data) {
- var items = [];
- items.push("<tr><th colspan='3'>Zookeeper</th></tr>");
- items.push("<tr><th>Server</th><th>Mode</th><th>Clients</th></tr>");
- $.each(data.zkServers, function(key, val) {
- items.push("<tr class='highlight'><td class='left'>" + val.server + "</td>");
- items.push("<td class='left'>" + val.mode + "</td>");
- items.push("<td class='right'>" + val.clients + "</td></tr>");
- });
-
- $("<table/>", {
- html: items.join("")
- }).appendTo("#zookeeper");
- });
-
- $.getJSON("rest/statistics/time/ingestRate", function(data) {
- var d0 = [];
- $.each(data, function(key, val) {
- d0.push([val.first, val.second]);
- });
- $.plot($("#ingest_entries"),[{ data: d0, lines: { show: true }, color:"red" }], {yaxis:{}, xaxis:{mode:"time",minTickSize: [1, "minute"],timeformat: "%H:%M<br />EST", ticks:3}});
- });
-
- $.getJSON("rest/statistics/time/scanEntries", function(data) {
- var d0 = [];
- var d1 = [];
- $.each(data, function(key, val) {
- if (val.first == "Read") {
- $.each(val.second, function(key2, val2) {
- d0.push([val2.first, val2.second]);
- });
- }
- if (val.first == "Returned") {
- $.each(val.second, function(key2, val2) {
- d1.push([val2.first, val2.second]);
- })
- }
- });
-
- $.plot($("#scan_entries"),[{ label: "Read", data: d0, lines: { show: true }, color:"red" },{ label: "Returned", data: d1, lines: { show: true }, color:"blue" }], {yaxis:{}, xaxis:{mode:"time",minTickSize: [1, "minute"],timeformat: "%H:%M<br />EST", ticks:3}});
- });
-
- $.getJSON("rest/statistics/time/ingestByteRate", function(data) {
- var d0 = [];
- $.each(data, function(key, val) {
- d0.push([val.first, val.second]);
- });
- $.plot($("#ingest_mb"),[{ data: d0, lines: { show: true }, color:"red" }], {yaxis:{}, xaxis:{mode:"time",minTickSize: [1, "minute"],timeformat: "%H:%M<br />EST", ticks:3}});
- });
-
- $.getJSON("rest/statistics/time/queryByteRate", function(data) {
- var d0 = [];
- $.each(data, function(key, val) {
- d0.push([val.first, val.second]);
- });
- $.plot($("#scan_mb"),[{ data: d0, lines: { show: true }, color:"red" }], {yaxis:{}, xaxis:{mode:"time",minTickSize: [1, "minute"],timeformat: "%H:%M<br />EST", ticks:3}});
- });
-
- $.getJSON("rest/statistics/time/load", function(data) {
- var d0 = [];
- $.each(data, function(key, val) {
- d0.push([val.first, val.second]);
- });
- $.plot($("#load_avg"),[{ data: d0, lines: { show: true }, color:"red" }], {yaxis:{}, xaxis:{mode:"time",minTickSize: [1, "minute"],timeformat: "%H:%M<br />EST", ticks:3}});
- });
-
- $.getJSON("rest/statistics/time/lookups", function(data) {
- var d0 = [];
- $.each(data, function(key, val) {
- d0.push([val.first, val.second]);
- });
- $.plot($("#seeks"),[{ data: d0, lines: { show: true }, color:"red" }], {yaxis:{}, xaxis:{mode:"time",minTickSize: [1, "minute"],timeformat: "%H:%M<br />EST", ticks:3}});
- });
-
- $.getJSON("rest/statistics/time/minorCompactions", function(data) {
- var d0 = [];
- $.each(data, function(key, val) {
- d0.push([val.first, val.second]);
- });
- $.plot($("#minor"),[{ data: d0, lines: { show: true }, color:"red" }], {yaxis:{}, xaxis:{mode:"time",minTickSize: [1, "minute"],timeformat: "%H:%M<br />EST", ticks:3}});
- });
-
- $.getJSON("rest/statistics/time/majorCompactions", function(data) {
- var d0 = [];
- $.each(data, function(key, val) {
- d0.push([val.first, val.second]);
- });
- $.plot($("#major"),[{ data: d0, lines: { show: true }, color:"red" }], {yaxis:{}, xaxis:{mode:"time",minTickSize: [1, "minute"],timeformat: "%H:%M<br />EST", ticks:3}});
- });
-
- $.getJSON("rest/statistics/time/indexCacheHitRate", function(data) {
- var d0 = [];
- $.each(data, function(key, val) {
- d0.push([val.first, val.second]);
- });
- $.plot($("#index_cache"),[{ data: d0, points: { show: true, radius: 1 }, color:"red" }], {yaxis:{}, xaxis:{mode:"time",minTickSize: [1, "minute"],timeformat: "%H:%M<br />EST", ticks:3}});
- });
-
- $.getJSON("rest/statistics/time/dataCacheHitRate", function(data) {
- var d0 = [];
- $.each(data, function(key, val) {
- d0.push([val.first, val.second]);
- });
- $.plot($("#data_cache"),[{ data: d0, points: { show: true, radius: 1 }, color:"red" }], {yaxis:{}, xaxis:{mode:"time",minTickSize: [1, "minute"],timeformat: "%H:%M<br />EST", ticks:3}});
- });
-
- </script>
- <div id='content-wrapper'>
- <div id='content'>
- <div id='header'>
- <#include "/templates/header.ftl">
- </div>
-
- <#include "/templates/sidebar.ftl">
-
- <div id='main' style='bottom:0'>
-
- <table class='noborder'>
- <tr>
- <td class='noborder' id='master'></td>
- <td class='noborder' id='zookeeper'></td>
- </tr>
- </table>
- <br />
- <table class="noborder">
- <tr>
- <td>
- <div class="plotHeading">Ingest (Entries/s)</div></br><div id="ingest_entries" style="width:450px;height:150px;"></div>
- </td>
- <td>
- <div class="plotHeading">Scan (Entries/s)</div></br><div id="scan_entries" style="width:450px;height:150px;"></div>
- </td>
- </tr>
- <tr>
- <td>
- <div class="plotHeading">Ingest (MB/s)</div></br><div id="ingest_mb" style="width:450px;height:150px;"></div>
- </td>
- <td>
- <div class="plotHeading">Scan (MB/s)</div></br><div id="scan_mb" style="width:450px;height:150px;"></div>
- </td>
- </tr>
- <tr>
- <td>
- <div class="plotHeading">Load Average</div></br><div id="load_avg" style="width:450px;height:150px;"></div>
- </td>
- <td>
- <div class="plotHeading">Seeks</div></br><div id="seeks" style="width:450px;height:150px;"></div>
- </td>
- </tr>
- <tr>
- <td>
- <div class="plotHeading">Minor Compactions</div></br><div id="minor" style="width:450px;height:150px;"></div>
- </td>
- <td>
- <div class="plotHeading">Major Compactions</div></br><div id="major" style="width:450px;height:150px;"></div>
- </td>
- </tr>
- <tr>
- <td>
- <div class="plotHeading">Index Cache Hit Rate</div></br><div id="index_cache" style="width:450px;height:150px;"></div>
- </td>
- <td>
- <div class="plotHeading">Data Cache Hit Rate</div></br><div id="data_cache" style="width:450px;height:150px;"></div>
- </td>
- </tr>
- </table>
-
- </div>
- </div>
- </div>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/Replication/replication.ftl
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/Replication/replication.ftl b/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/Replication/replication.ftl
deleted file mode 100644
index 4d97dba..0000000
--- a/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/Replication/replication.ftl
+++ /dev/null
@@ -1,86 +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.
--->
-<html>
- <head>
- <title>${title} - Accumulo ${version}</title>
- <#if refresh gt 0 ><meta http-equiv='refresh' content='${refresh}' /></#if>
- <meta http-equiv='Content-Type' content='test/html"' />
- <meta http-equiv='Content-Script-Type' content='text/javascript' />
- <meta http-equiv='Content-Style-Type' content='text/css' />
- <link rel='shortcut icon' type='image/jpg' href='http://localhost:9995/web/favicon.png' />
- <link rel='stylesheet' type='text/css' href='http://localhost:9995/web/screen.css' media='screen' />
- <script src='http://localhost:9995/web/functions.js' type='text/javascript'></script>
-
- <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/excanvas.min.js"></script><![endif]-->
- <script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/jquery.js"></script>
- <script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/jquery.flot.js"></script>
- </head>
-
- <body>
- <script type="text/javascript">
- $.getJSON("../rest/tables/${tableID}", function(data) {
- var count = 0;
-
- $.each(data.servers, function(key, val) {
- var items = [];
- items.push("<td class='firstcell left'><a href='/tables/" + val.tableId + "'>" + val.tableName + "</a></td>");
- items.push("<td class='right'>" + val.peerName + "</td>");
- items.push("<td class='right'>" + val.remoteIdentifier + "</td>");
- items.push("<td class='right'>" + val.replicaSystemType + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(val.filesNeedingReplication) + "</td>");
-
- if (count % 2 == 0) {
- $("<tr/>", {
- html: items.join(""),
- class: "highlight"
- }).appendTo("#participatingTServers");
- } else {
- $("<tr/>", {
- html: items.join("")
- }).appendTo("#participatingTServers");
- }
- count += 1;
-
- });
- });
-
- </script>
- <div id='content-wrapper'>
- <div id='content'>
- <div id='header'>
- <#include "/templates/header.ftl">
- </div>
-
- <#include "/templates/sidebar.ftl">
-
- <div id='main' style='bottom:0'>
- <div>
- <a name='participatingTServers'> </a>
- <table id='participatingTServers' class='sortable'>
- <caption>
- <span class='table-caption'>Replication Status</span><br />
- <span class='table-subcaption'></span><br />
- <a href='/op?action=toggleLegend&redir=%2Ftables%3Ft%3D1&page=/tables&table=participatingTServers&show=true'>Show Legend</a>
- </caption>
- <tr><th class='firstcell'>Table</th><th>Peer</th><th>remote Identifier</th><th>Replica System Type</th><th>Files needing replication</th></tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/Scans/scans.ftl
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/Scans/scans.ftl b/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/Scans/scans.ftl
deleted file mode 100644
index d31154b..0000000
--- a/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/Scans/scans.ftl
+++ /dev/null
@@ -1,74 +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.
--->
-<html>
- <head>
- <title>${title} - Accumulo ${version}</title>
- <#if refresh gt 0 ><meta http-equiv='refresh' content='${refresh}' /></#if>
- <meta http-equiv='Content-Type' content='test/html"' />
- <meta http-equiv='Content-Script-Type' content='text/javascript' />
- <meta http-equiv='Content-Style-Type' content='text/css' />
- <link rel='shortcut icon' type='image/jpg' href='http://localhost:9995/web/favicon.png' />
- <link rel='stylesheet' type='text/css' href='http://localhost:9995/web/screen.css' media='screen' />
- <script src='http://localhost:9995/web/functions.js' type='text/javascript'></script>
-
- <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/excanvas.min.js"></script><![endif]-->
- <script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/jquery.js"></script>
- <script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/jquery.flot.js"></script>
- </head>
-
- <body>
- <script type="text/javascript">
- $.getJSON("rest/scans", function(data) {
- var items = [];
-
- $.each(data.scans, function(key, val) {
- items.push("<td class='firstcell left'><a href='/tservers/" + val.server + "'>" + val.server + "</a></td>");
- items.push("<td class='right'>" + val.scanCount + "</td>");
- items.push("<td class='right'>" + timeDuration(val.oldestScan) + "</td>");
- });
-
- $("<tr/>", {
- html: items.join(""),
- class: "highlight"
- }).appendTo("#scanStatus");
- });
-
- </script>
- <div id='content-wrapper'>
- <div id='content'>
- <div id='header'>
- <#include "/templates/header.ftl">
- </div>
-
- <#include "/templates/sidebar.ftl">
-
- <div id='main' style='bottom:0'>
- <div>
- <a name='scanStatus'> </a>
- <table id='scanStatus' class='sortable'>
- <caption>
- <span class='table-caption'>Scan Status</span><br />
- <a href='/op?action=toggleLegend&redir=%2Fscans&page=/scans&table=scanStatus&show=true'>Show Legend</a>
- </caption>
- <tr><th class='firstcell'>Server</th><th>#</th><th>Oldest Age</th></tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/ServerActivity/vis.ftl
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/ServerActivity/vis.ftl b/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/ServerActivity/vis.ftl
deleted file mode 100644
index 38df410..0000000
--- a/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/ServerActivity/vis.ftl
+++ /dev/null
@@ -1,97 +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.
--->
-<html>
- <head>
- <title>${title} - Accumulo ${version}</title>
- <#if refresh gt 0 ><meta http-equiv='refresh' content='${refresh}' /></#if>
- <meta http-equiv='Content-Type' content='test/html"' />
- <meta http-equiv='Content-Script-Type' content='text/javascript' />
- <meta http-equiv='Content-Style-Type' content='text/css' />
- <link rel='shortcut icon' type='image/jpg' href='http://localhost:9995/web/favicon.png' />
- <link rel='stylesheet' type='text/css' href='http://localhost:9995/web/screen.css' media='screen' />
- <script src='http://localhost:9995/web/functions.js' type='text/javascript'></script>
-
- <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/excanvas.min.js"></script><![endif]-->
- <script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/jquery.js"></script>
- <script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/jquery.flot.js"></script>
- </head>
-
- <body>
- <script type="text/javascript">
- $.getJSON("../rest/tservers/serverStats", function(data) {
-
- $.each(data.serverStats, function(key, val) {
- var item = val.description;
-
- $("<option/>", {
- html: item,
- class: "highlight"
- }).appendTo("#motion");
-
- $("<option/>", {
- html: item,
- class: "highlight"
- }).appendTo("#color");
-
- });
- });
-
- </script>
- <div id='content-wrapper'>
- <div id='content'>
- <div id='header'>
- <#include "/templates/header.ftl">
- </div>
-
- <#include "/templates/sidebar.ftl">
-
- <div id='main' style='bottom:0'>
- <div class='left'>
- <div id='parameters' class='nowrap'>
- <span class='viscontrol'>Shape: <select id='shape' onchange='setShape(this)'><option>Circles</option><option>Squares</option></select></span>
-  <span class='viscontrol'>Size: <select id='size' onchange='setSize(this)'><option>10</option><option>20</option><option selected='true'>40</option><option>80</option></select></span>
-  <span class='viscontrol'>Motion: <select id='motion' onchange='setMotion(this)'><option selected='true'></option></select></span>
-  <span class='viscontrol'>Color: <select id='color' onchange='setColor(this)'></select></span>
-  <span class='viscontrol'>(hover for info, click for details)</span></div>
-
- <div id='hoverable'>
- <div id='vishoverinfo'></div>
-
- <br><canvas id='visCanvas' width='640' height='640'>Browser does not support canvas.</canvas>
-
- </div>
- </div>
- <script type='text/javascript'>
- var numCores = 8;
- var jsonurl = 'http://localhost:50096/rest/json';
- var visurl = 'http://localhost:50096/vis';
- var serverurl = 'http://localhost:50096/rest/tservers/';
-
- // observable stats that can be connected to motion or color
- var statNames = {'osload': false,'ingest': false,'query': false,'ingestMB': false,'queryMB': false,'scans': false,'scansessions': false,'holdtime': false,'allavg': true,'allmax': true};
- var maxStatValues = {'osload': 8, 'ingest': 1000, 'query': 10000, 'ingestMB': 10, 'queryMB': 5, 'scans': 128, 'scansessions': 50, 'holdtime': 60000, 'allavg': 1, 'allmax': 1}; // initial values that are system-dependent may increase based on observed values
- var adjustMax = {'osload': true, 'ingest': true, 'query': true, 'ingestMB': true, 'queryMB': true, 'scans': false, 'scansessions': true, 'holdtime': false, 'allavg': false, 'allmax': false}; // whether to allow increases in the max based on observed values
- var significance = {'osload': 100.0, 'ingest': 1.0, 'query': 1.0, 'ingestMB': 10.0, 'queryMB': 10.0, 'scans': 1.0, 'scansessions': 10.0, 'holdtime': 1.0, 'allavg': 100.0, 'allmax': 100.0}; // values will be converted by floor(this*value)/this
- var numNormalStats = 8;
- </script>
- <script src='http://localhost:9995/web/vis.js' type='text/javascript'></script>
-
- </div>
- </div>
- </div>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ca5cd33/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/TablesStatus/table.ftl
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/TablesStatus/table.ftl b/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/TablesStatus/table.ftl
deleted file mode 100644
index 6a687ed..0000000
--- a/server/monitor/src/main/resources/templates/org/apache/accumulo/monitor/rest/view/TablesStatus/table.ftl
+++ /dev/null
@@ -1,94 +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.
--->
-<html>
- <head>
- <title>${title} - Accumulo ${version}</title>
- <#if refresh gt 0 ><meta http-equiv='refresh' content='${refresh}' /></#if>
- <meta http-equiv='Content-Type' content='test/html"' />
- <meta http-equiv='Content-Script-Type' content='text/javascript' />
- <meta http-equiv='Content-Style-Type' content='text/css' />
- <link rel='shortcut icon' type='image/jpg' href='http://localhost:9995/web/favicon.png' />
- <link rel='stylesheet' type='text/css' href='http://localhost:9995/web/screen.css' media='screen' />
- <script src='http://localhost:9995/web/functions.js' type='text/javascript'></script>
-
- <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/excanvas.min.js"></script><![endif]-->
- <script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/jquery.js"></script>
- <script language="javascript" type="text/javascript" src="http://localhost:9995/web/flot/jquery.flot.js"></script>
- </head>
-
- <body>
- <script type="text/javascript">
- $.getJSON("../rest/tables/${tableID}", function(data) {
- var count = 0;
-
- $.each(data.servers, function(key, val) {
- var items = [];
- items.push("<td class='firstcell left'><a href='/tservers/" + val.id + "'>" + val.hostname + "</a></td>");
- items.push("<td class='right'>" + bigNumberForQuantity(val.tablets) + "</td>");
- items.push("<td class='right'>" + timeDuration(val.lastContact) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(val.entries) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(Math.floor(val.ingest)) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(Math.floor(val.query)) + "</td>");
- items.push("<td class='right'>" + timeDuration(val.holdtime) + "</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(val.compactions.scans.running) + " (" + val.compactions.scans.queued + ")</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(val.compactions.minor.running) + " (" + val.compactions.minor.queued + ")</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(val.compactions.major.running) + " (" + val.compactions.major.queued + ")</td>");
- items.push("<td class='right'>" + Math.round(val.indexCacheHitRate*100) + "%</td>");
- items.push("<td class='right'>" + Math.round(val.dataCacheHitRate*100) + "%</td>");
- items.push("<td class='right'>" + bigNumberForQuantity(val.osload) + "</td>");
-
- if (count % 2 == 0) {
- $("<tr/>", {
- html: items.join(""),
- class: "highlight"
- }).appendTo("#participatingTServers");
- } else {
- $("<tr/>", {
- html: items.join("")
- }).appendTo("#participatingTServers");
- }
- count += 1;
-
- });
- });
-
- </script>
- <div id='content-wrapper'>
- <div id='content'>
- <div id='header'>
- <#include "/templates/header.ftl">
- </div>
-
- <#include "/templates/sidebar.ftl">
-
- <div id='main' style='bottom:0'>
- <div>
- <a name='participatingTServers'> </a>
- <table id='participatingTServers' class='sortable'>
- <caption>
- <span class='table-caption'>Participating Tablet Servers</span><br />
- <span class='table-subcaption'>${table}</span><br />
- <a href='/op?action=toggleLegend&redir=%2Ftables%3Ft%3D1&page=/tables&table=participatingTServers&show=true'>Show Legend</a>
- </caption>
- <tr><th class='firstcell'>Server</th><th>Hosted Tablets</th><th>Last Contact</th><th>Entries</th><th>Ingest</th><th>Query</th><th>Hold Time</th><th>Running<br />Scans</th><th>Minor<br />Compactions</th><th>Major<br />Compactions</th><th>Index Cache<br />Hit Rate</th><th>Data Cache<br />Hit Rate</th><th>OS Load</th></tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- </body>
-</html>