accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmil...@apache.org
Subject [accumulo] branch master updated: ACCUMULO-4764 Move html to server.ftl
Date Wed, 20 Dec 2017 18:00:24 GMT
This is an automated email from the ASF dual-hosted git repository.

mmiller pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/master by this push:
     new dae1d29  ACCUMULO-4764 Move html to server.ftl
dae1d29 is described below

commit dae1d29062938d4f04a6e8eddf6f31286471f35f
Author: Mike Miller <mmiller@apache.org>
AuthorDate: Wed Dec 20 12:41:29 2017 -0500

    ACCUMULO-4764 Move html to server.ftl
---
 .../apache/accumulo/monitor/resources/js/server.js | 130 +--------------------
 .../apache/accumulo/monitor/templates/server.ftl   |  51 ++++++--
 2 files changed, 43 insertions(+), 138 deletions(-)

diff --git a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/server.js
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/server.js
index cd82a54..7c57704 100644
--- a/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/server.js
+++ b/server/monitor/src/main/resources/org/apache/accumulo/monitor/resources/js/server.js
@@ -281,132 +281,4 @@ function sortTable(table, n) {
   sessionStorage.tableColumnSort = n;
 
   sortTables(tableIDs[table], direction, n);
-}
-
-/**
- * Creates the server detail header
- *
- * @param {string} server Server name
- */
-function createDetailHeader(server) {
-  var caption = [];
-  serv = server;
-
-  caption.push('<span class="table-caption">Details</span><br>');
-  caption.push('<span class="table-subcaption">' + server + '</span><br>');
-
-  $('<caption/>', {
-    html: caption.join('')
-  }).appendTo('#tServerDetail');
-
-  var items = [];
-
-  var columns = ['Hosted&nbsp;Tablets&nbsp;', 'Entries&nbsp;',
-      'Minor&nbsp;Compacting&nbsp;', 'Major&nbsp;Compacting&nbsp;',
-      'Splitting&nbsp;'];
-
-  for (i = 0; i < columns.length; i++) {
-    var first = i == 0 ? true : false;
-    items.push(createHeaderCell(first, 'sortTable(0,' + i + ')',
-      '', columns[i]));
-  }
-
-  $('<tr/>', {
-    html: items.join('')
-  }).appendTo('#tServerDetail');
-}
-
-/**
- * Creates the server history header
- */
-function createHistoryHeader() {
-  var caption = [];
-
-  caption.push('<span class="table-caption">All-Time&nbsp;Tablet&nbsp;' +
-      'Operation&nbsp;Results</span><br>');
-
-  $('<caption/>', {
-    html: caption.join('')
-  }).appendTo('#opHistoryDetails');
-
-  var items = [];
-
-  var columns = ['Operation&nbsp;', 'Success&nbsp;', 'Failure&nbsp;',
-      'Average<br>Queue&nbsp;Time&nbsp;',
-      'Std.&nbsp;Dev.<br>Queue&nbsp;Time&nbsp;',
-      'Average<br>Time&nbsp;', 'Std.&nbsp;Dev.<br>Time&nbsp;',
-      'Percentage&nbsp;Time&nbsp;Spent&nbsp;'];
-
-  for (i = 0; i < columns.length; i++) {
-    var first = i == 0 ? true : false;
-    items.push(createHeaderCell(first, 'sortTable(1,' + i + ')',
-      '', columns[i]));
-  }
-
-  $('<tr/>', {
-    html: items.join('')
-  }).appendTo('#opHistoryDetails');
-}
-
-/**
- * Creates the current server header
- */
-function createCurrentHeader() {
-  var caption = [];
-
-  caption.push('<span class="table-caption">Current&nbsp;Tablet&nbsp;' +
-      'Operation&nbsp;Results</span><br>');
-
-  $('<caption/>', {
-    html: caption.join('')
-  }).appendTo('#currentTabletOps');
-
-  var items = [];
-
-  var columns = ['Minor&nbsp;Average&nbsp;', 'Minor&nbsp;Std&nbsp;Dev&nbsp;',
-      'Major&nbsp;Avg&nbsp;', 'Major&nbsp;Std&nbsp;Dev&nbsp;'];
-
-  for (i = 0; i < columns.length; i++) {
-    var first = i == 0 ? true : false;
-    items.push(createHeaderCell(first, 'sortTable(2,' + i + ')',
-      '', columns[i]));
-  }
-
-  $('<tr/>', {
-    html: items.join('')
-  }).appendTo('#currentTabletOps');
-}
-
-/**
- * Creates the server result header
- */
-function createResultsHeader() {
-  var caption = [];
-
-  caption.push('<span class="table-caption">Detailed&nbsp;Current&nbsp;' +
-      'Operations</span><br>');
-  caption.push('<span class="table-subcaption">Per-tablet&nbsp;' +
-      'Details</span><br>');
-
-  $('<caption/>', {
-    html: caption.join('')
-  }).appendTo('#perTabletResults');
-
-  var items = [];
-
-  var columns = ['Table&nbsp;', 'Tablet&nbsp;', 'Entries&nbsp;',
-      'Ingest&nbsp;', 'Query&nbsp;', 'Minor&nbsp;Avg&nbsp;',
-      'Minor&nbsp;Std&nbsp;Dev&nbsp;', 'Minor&nbsp;Avg&nbsp;e/s&nbsp;',
-      'Major&nbsp;Avg&nbsp;', 'Major&nbsp;Std&nbsp;Dev&nbsp;',
-      'Major&nbsp;Avg&nbsp;e/s&nbsp;'];
-
-  for (i = 0; i < columns.length; i++) {
-    var first = i == 0 ? true : false;
-    items.push(createHeaderCell(first, 'sortTable(3,' + i + ')',
-      '', columns[i]));
-  }
-
-  $('<tr/>', {
-    html: items.join('')
-  }).appendTo('#perTabletResults');
-}
+}
\ No newline at end of file
diff --git a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/server.ftl
b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/server.ftl
index 3066dd1..297c61a 100644
--- a/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/server.ftl
+++ b/server/monitor/src/main/resources/org/apache/accumulo/monitor/templates/server.ftl
@@ -19,31 +19,64 @@
          * Creates server initial tables, passes values from template
          */
         $(document).ready(function() {
-          createDetailHeader('${server}');
-          createHistoryHeader();
-          createCurrentHeader();
-          createResultsHeader();
-          refreshServer('${server}');
+          serv = '${server}';
+          refreshServer();
         });
       </script>
       <div><h3>${title}</h3></div>
       <div class="center-block">
         <table id="tServerDetail" class="table table-bordered table-striped table-condensed">
-
+            <caption><span class="table-caption">Details</span><br/><span
class="table-subcaption">'${server}'</span><br/></caption>
+            <tbody>
+            <tr><th class="firstcell" onclick="sortTable(0,0)">Hosted&nbsp;Tablets&nbsp;</th>
+                <th onclick="sortTable(0,1)">Entries&nbsp;</th>
+                <th onclick="sortTable(0,2)">Minor&nbsp;Compacting&nbsp;</th>
+                <th onclick="sortTable(0,3)">Major&nbsp;Compacting&nbsp;</th>
+                <th onclick="sortTable(0,4)">Splitting&nbsp;</th></tr>
+            </tbody>
         </table>
       </div>
       <div class="center-block">
         <table id="opHistoryDetails" class="table table-bordered table-striped table-condensed">
-
+            <caption><span class="table-caption">All-Time&nbsp;Tablet&nbsp;Operation&nbsp;Results</span><br/></caption>
+            <tbody>
+            <tr><th class="firstcell" onclick="sortTable(1,0)">Operation&nbsp;</th>
+                <th onclick="sortTable(1,1)">Success&nbsp;</th>
+                <th onclick="sortTable(1,2)">Failure&nbsp;</th>
+                <th onclick="sortTable(1,3)">Average<br/>Queue&nbsp;Time&nbsp;</th>
+                <th onclick="sortTable(1,4)">Std.&nbsp;Dev.<br/>Queue&nbsp;Time&nbsp;</th>
+                <th onclick="sortTable(1,5)">Average<br/>Time&nbsp;</th>
+                <th onclick="sortTable(1,6)">Std.&nbsp;Dev.<br/>Time&nbsp;</th>
+                <th onclick="sortTable(1,7)">Percentage&nbsp;Time&nbsp;Spent&nbsp;</th></tr>
+            </tbody>
         </table>
       </div>
       <div class="center-block">
         <table id="currentTabletOps" class="table table-bordered table-striped table-condensed">
-
+            <caption><span class="table-caption">Current&nbsp;Tablet&nbsp;Operation&nbsp;Results</span><br/></caption>
+            <tbody>
+            <tr><th class="firstcell" onclick="sortTable(2,0)">Minor&nbsp;Average&nbsp;</th>
+                <th onclick="sortTable(2,1)">Minor&nbsp;Std&nbsp;Dev&nbsp;</th>
+                <th onclick="sortTable(2,2)">Major&nbsp;Avg&nbsp;</th>
+                <th onclick="sortTable(2,3)">Major&nbsp;Std&nbsp;Dev&nbsp;</th></tr>
+            </tbody>
         </table>
       </div>
       <div class="center-block">
         <table id="perTabletResults" class="table table-bordered table-striped table-condensed">
-
+            <caption><span class="table-caption">Detailed&nbsp;Current&nbsp;Operations</span><br/><span
class="table-subcaption">Per-tablet&nbsp;Details</span><br/></caption>
+            <tbody>
+            <tr><th class="firstcell" onclick="sortTable(3,0)">Table&nbsp;</th>
+                <th onclick="sortTable(3,1)">Tablet&nbsp;</th>
+                <th onclick="sortTable(3,2)">Entries&nbsp;</th>
+                <th onclick="sortTable(3,3)">Ingest&nbsp;</th>
+                <th onclick="sortTable(3,4)">Query&nbsp;</th>
+                <th onclick="sortTable(3,5)">Minor&nbsp;Avg&nbsp;</th>
+                <th onclick="sortTable(3,6)">Minor&nbsp;Std&nbsp;Dev&nbsp;</th>
+                <th onclick="sortTable(3,7)">Minor&nbsp;Avg&nbsp;e/s&nbsp;</th>
+                <th onclick="sortTable(3,8)">Major&nbsp;Avg&nbsp;</th>
+                <th onclick="sortTable(3,9)">Major&nbsp;Std&nbsp;Dev&nbsp;</th>
+                <th onclick="sortTable(3,10)">Major&nbsp;Avg&nbsp;e/s&nbsp;</th></tr>
+            </tbody>
         </table>
       </div>

-- 
To stop receiving notification emails like this one, please contact
['"commits@accumulo.apache.org" <commits@accumulo.apache.org>'].

Mime
View raw message