From 25e8e9b5ae84227546e019a46a037dddd498a64d Mon Sep 17 00:00:00 2001 From: stack Date: Wed, 18 Feb 2015 11:34:50 -0800 Subject: [PATCH] HBASE-13056 Refactor table.jsp code to remove repeated code and make it easier to add new checks (Vikas Vishwakarma) --- .../resources/hbase-webapps/master/table.jsp | 64 +++++-------------- 1 file changed, 16 insertions(+), 48 deletions(-) diff --git a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp index a27792c26ba..8f9fc73507a 100644 --- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp +++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp @@ -62,21 +62,21 @@ if (showFragmentation) { frags = FSUtils.getTableFragmentation(master); } + String action = request.getParameter("action"); + String key = request.getParameter("key"); %> - -<% - String action = request.getParameter("action"); - String key = request.getParameter("key"); - if ( !readOnly && action != null ) { -%> - HBase Master: <%= master.getServerName() %> + <% if ( !readOnly && action != null ) { %> + HBase Master: <%= master.getServerName() %> + <% } else { %> + Table: <%= fqtn %> + <% } %> @@ -85,11 +85,17 @@ + <% if ( !readOnly && action != null ) { %> + <% } else { %> + + <% } %> +<% +if ( !readOnly && action != null ) { +%>
@@ -154,47 +163,6 @@ <% } else { %> - - - Table: <%= fqtn %> - - - - - - - - - - - -