From 39f549aaece91cf3ccc076ea171889c43b158a49 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 db48b6c79aa..274f6605fa3 100644 --- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp +++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp @@ -61,21 +61,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 %> + <% } %> @@ -84,11 +84,17 @@ + <% if ( !readOnly && action != null ) { %> + <% } else { %> + + <% } %> +<% +if ( !readOnly && action != null ) { +%>
@@ -153,47 +162,6 @@ <% } else { %> - - - Table: <%= fqtn %> - - - - - - - - - - - -