hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ecl...@apache.org
Subject [08/50] [abbrv] git commit: [HBASE-11336] Escape regionName and start/endKeys for HTML. Show numbers with thousand separators and right align
Date Thu, 31 Jul 2014 22:07:44 GMT
[HBASE-11336] Escape regionName and start/endKeys for HTML. Show numbers with thousand separators
and right align

Summary: As title.

Test Plan: `TestFsUtils`

Reviewers: manukranthk, gauravm, fan, elliott

Reviewed By: elliott

Subscribers: hbase-eng@

Differential Revision: https://phabricator.fb.com/D1383779

Tasks: 4513820

git-svn-id: svn+ssh://tubbs/svnhive/hadoop/branches/titan/VENDOR.hbase/hbase-trunk@42885 e7acf4d4-3532-417f-9e73-7a9ae25a1f51


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/31b1af17
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/31b1af17
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/31b1af17

Branch: refs/heads/0.89-fb
Commit: 31b1af177320feb78a9ba70d126f9bbe416f51ca
Parents: 301bf74
Author: daviddeng <daviddeng@e7acf4d4-3532-417f-9e73-7a9ae25a1f51>
Authored: Sun Jun 15 13:14:25 2014 +0000
Committer: Elliott Clark <elliott@fb.com>
Committed: Thu Jul 31 14:44:22 2014 -0700

----------------------------------------------------------------------
 src/main/resources/hbase-webapps/master/table.jsp | 9 +++++----
 src/main/resources/hbase-webapps/static/hbase.css | 4 ++++
 2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/31b1af17/src/main/resources/hbase-webapps/master/table.jsp
----------------------------------------------------------------------
diff --git a/src/main/resources/hbase-webapps/master/table.jsp b/src/main/resources/hbase-webapps/master/table.jsp
index 65bfa49..704e43e 100644
--- a/src/main/resources/hbase-webapps/master/table.jsp
+++ b/src/main/resources/hbase-webapps/master/table.jsp
@@ -13,6 +13,7 @@
   import="org.apache.hadoop.hbase.util.Bytes"
   import="org.apache.hadoop.hbase.util.FSUtils"
   import="org.apache.hadoop.util.StringUtils"
+  import="org.apache.commons.lang.StringEscapeUtils"
   import="java.util.Map"
   import="org.apache.hadoop.hbase.HConstants"%><%
   HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER);
@@ -153,11 +154,11 @@
         "http://" + hriEntry.getValue().getHostname().toString() + ":" + rsInfoPort + "/";
 %>
   <tr>
-    <td><%= Bytes.toStringBinary(hriEntry.getKey().getRegionName())%></td>
+    <td><%= StringEscapeUtils.escapeHtml(Bytes.toStringBinary(hriEntry.getKey().getRegionName()))
%></td>
     <td><a href="<%= urlRegionServer %>"><%= hriEntry.getValue().getHostname().toString()
+ ":" + rsInfoPort %></a></td>
-    <td><%= Bytes.toStringBinary(hriEntry.getKey().getStartKey())%></td>
-    <td><%= Bytes.toStringBinary(hriEntry.getKey().getEndKey())%></td>
-    <td><%= StringUtils.byteDesc(regionSizes.get(hriEntry.getKey())) %></td>
+    <td><%= StringEscapeUtils.escapeHtml(Bytes.toStringBinary(hriEntry.getKey().getStartKey()))
%></td>
+    <td><%= StringEscapeUtils.escapeHtml(Bytes.toStringBinary(hriEntry.getKey().getEndKey()))
%></td>
+    <td class="number"><%= String.format("%,d", regionSizes.get(hriEntry.getKey()))
%></td>
   </tr>
 <% } %>
  </table>

http://git-wip-us.apache.org/repos/asf/hbase/blob/31b1af17/src/main/resources/hbase-webapps/static/hbase.css
----------------------------------------------------------------------
diff --git a/src/main/resources/hbase-webapps/static/hbase.css b/src/main/resources/hbase-webapps/static/hbase.css
index 4bc5301..8f2063a 100644
--- a/src/main/resources/hbase-webapps/static/hbase.css
+++ b/src/main/resources/hbase-webapps/static/hbase.css
@@ -31,3 +31,7 @@ tr.task-monitor-IDLE td {
 tr.task-monitor-ABORTED td {
   background-color: #f66;
 }
+
+td.number {
+  text-align: right;
+}


Mime
View raw message