You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zg...@apache.org on 2019/06/11 03:35:47 UTC

[hbase] 02/02: Revert "HBASE-22160 Add sorting functionality in regionserver web UI for user"

This is an automated email from the ASF dual-hosted git repository.

zghao pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 425936a9513ca724fa7a74e659935b4261084fde
Author: Guanghao Zhang <zg...@apache.org>
AuthorDate: Tue Jun 11 10:32:10 2019 +0800

    Revert "HBASE-22160 Add sorting functionality in regionserver web UI for user"
    
    This reverts commit d08e9c0716658eee8430ba6f35350eaa1310dfcf.
---
 .../hbase/tmpl/regionserver/RSStatusTmpl.jamon     | 35 ----------------------
 .../hbase/tmpl/regionserver/RegionListTmpl.jamon   | 34 +++++----------------
 2 files changed, 7 insertions(+), 62 deletions(-)

diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon
index bc4137b..863dcf9 100644
--- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon
+++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon
@@ -240,42 +240,7 @@ org.apache.hadoop.hbase.zookeeper.MasterAddressTracker;
     </div>
 </div>
 <script src="/static/js/jquery.min.js" type="text/javascript"></script>
-<script src="/static/js/jquery.tablesorter.min.js" type="text/javascript"></script>
 <script src="/static/js/bootstrap.min.js" type="text/javascript"></script>
 <script src="/static/js/tab.js" type="text/javascript"></script>
-<script>
-$(document).ready(function()
-    {
-        $.tablesorter.addParser({
-            id: 'filesize',
-            is: function(s) {
-                return s.match(new RegExp( /([\.0-9]+)\ (B|KB|MB|GB|TB)/ ));
-            },
-            format: function(s) {
-                var suf = s.match(new RegExp( /(KB|B|GB|MB|TB)$/ ))[1];
-                var num = parseFloat(s.match( new RegExp( /([\.0-9]+)\ (B|KB|MB|GB|TB)/ ))[0]);
-                switch(suf) {
-                    case 'B':
-                        return num;
-                    case 'KB':
-                        return num * 1024;
-                    case 'MB':
-                        return num * 1024 * 1024;
-                    case 'GB':
-                        return num * 1024 * 1024 * 1024;
-                    case 'TB':
-                        return num * 1024 * 1024 * 1024 * 1024;
-                }
-            },
-            type: 'numeric'
-        });
-        $("#baseStatsTable").tablesorter();
-        $("#requestStatsTable").tablesorter();
-        $("#storeStatsTable").tablesorter();
-        $("#compactionStatsTable").tablesorter();
-        $("#memstoreStatsTable").tablesorter();
-    }
-);
-</script>
 </body>
 </html>
diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon
index 7e983f5..6a01533 100644
--- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon
+++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon
@@ -88,17 +88,14 @@
 <%args>
     List<RegionInfo> onlineRegions;
 </%args>
-    <table id="baseStatsTable" class="tablesorter table table-striped">
-    <thead>
+    <table class="table table-striped">
         <tr>
             <th>Region Name</th>
             <th>Start Key</th>
             <th>End Key</th>
             <th>ReplicaID</th>
         </tr>
-    </thead>
 
-    <tbody>
         <%for RegionInfo r: onlineRegions %>
         <tr>
             <%java>
@@ -113,7 +110,6 @@
             <td><% r.getReplicaId() %></td>
         </tr>
         </%for>
-    </tbody>
     </table>
 </%def>
 
@@ -121,17 +117,14 @@
 <%args>
     List<RegionInfo> onlineRegions;
 </%args>
-    <table id="requestStatsTable" class="tablesorter table table-striped">
-    <thead>
+    <table class="table table-striped">
         <tr>
             <th>Region Name</th>
             <th>Read Request Count</th>
             <th>Filtered Read Request Count</th>
             <th>Write Request Count</th>
         </tr>
-    </thead>
 
-    <tbody>
         <%for RegionInfo r: onlineRegions %>
 
         <tr>
@@ -148,7 +141,6 @@
             </%if>
         </tr>
         </%for>
-    </tbody>
     </table>
 </%def>
 
@@ -157,8 +149,7 @@
 <%args>
     List<RegionInfo> onlineRegions;
 </%args>
-    <table id="storeStatsTable" class="tablesorter table table-striped">
-    <thead>
+    <table class="table table-striped">
         <tr>
             <th>Region Name</th>
             <th>Num. Stores</th>
@@ -169,9 +160,7 @@
             <th>Bloom Size</th>
             <th>Data Locality</th>
         </tr>
-    </thead>
 
-    <tbody>
         <%for RegionInfo r: onlineRegions %>
 
         <tr>
@@ -196,7 +185,6 @@
             </%if>
         </tr>
         </%for>
-    </tbody>
     </table>
 </%def>
 
@@ -205,18 +193,15 @@
 <%args>
     List<RegionInfo> onlineRegions;
 </%args>
-    <table id="compactionStatsTable" class="tablesorter table table-striped">
-    <thead>
+    <table class="table table-striped">
         <tr>
             <th>Region Name</th>
             <th>Num. Compacting Cells</th>
             <th>Num. Compacted Cells</th>
             <th>Compaction Progress</th>
-            <th data-date-format="yyyymmdd hhmm zz">Last Major Compaction</th>
+            <th>Last Major Compaction</th>
         </tr>
-    </thead>
 
-    <tbody>
         <%for RegionInfo r: onlineRegions %>
 
         <tr>
@@ -230,7 +215,7 @@
                     ((float) load.getCurrentCompactedKVs() / load.getTotalCompactingKVs())) + "%";
               }
               if (load.getLastMajorCompactionTs() > 0) {
-                FastDateFormat fdf = FastDateFormat.getInstance("yyyy-MM-dd HH:mm (ZZ)");
+                FastDateFormat fdf = FastDateFormat.getInstance("yyyy-MM-dd HH:mm ZZ");
                 compactTime = fdf.format(load.getLastMajorCompactionTs());
               }
             }
@@ -246,7 +231,6 @@
             </%if>
         </tr>
         </%for>
-    </tbody>
     </table>
 </%def>
 
@@ -254,15 +238,12 @@
 <%args>
     List<RegionInfo> onlineRegions;
 </%args>
-    <table id="memstoreStatsTable" class="tablesorter table table-striped">
-    <thead>
+    <table class="table table-striped">
         <tr>
             <th>Region Name</th>
             <th>Memstore Size</th>
         </tr>
-    </thead>
 
-    <tbody>
         <%for RegionInfo r: onlineRegions %>
 
         <tr>
@@ -278,6 +259,5 @@
             </%if>
         </tr>
         </%for>
-    </tbody>
     </table>
 </%def>