Repository: knox
Updated Branches:
  refs/heads/master cbe21a0a0 -> 5adc17610


KNOX-972 - Update Hbase UI service (Jeffrey E Rodriguez via lmccay)

Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/5adc1761
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/5adc1761
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/5adc1761

Branch: refs/heads/master
Commit: 5adc176102b1a32591bce737f8993b26903cca36
Parents: cbe21a0
Author: Larry McCay <lmc...@hortonworks.com>
Authored: Sat Aug 5 10:18:30 2017 -0400
Committer: Larry McCay <lmc...@hortonworks.com>
Committed: Sat Aug 5 10:18:30 2017 -0400

----------------------------------------------------------------------
 .../services/hbaseui/1.1.0/rewrite.xml          | 172 ++++++++++++++-----
 .../services/hbaseui/1.1.0/service.xml          |  34 +++-
 2 files changed, 155 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/5adc1761/gateway-service-definitions/src/main/resources/services/hbaseui/1.1.0/rewrite.xml
----------------------------------------------------------------------
diff --git 
a/gateway-service-definitions/src/main/resources/services/hbaseui/1.1.0/rewrite.xml
 
b/gateway-service-definitions/src/main/resources/services/hbaseui/1.1.0/rewrite.xml
index 8045811..4b2106e 100644
--- 
a/gateway-service-definitions/src/main/resources/services/hbaseui/1.1.0/rewrite.xml
+++ 
b/gateway-service-definitions/src/main/resources/services/hbaseui/1.1.0/rewrite.xml
@@ -16,9 +16,8 @@
    limitations under the License.
 -->
 <rules>
-
-  <rule dir="IN" name="HBASEUI/hbase/inbound/master/root" 
pattern="*://*:*/**/hbase/webui">
-    <rewrite template="{$serviceUrl[HBASEUI]}/master-status"/>
+  <rule dir="IN" name="HBASEUI/hbase/inbound/master/root" 
pattern="*://*:*/**/hbase/webui/">
+    <rewrite template="{$serviceUrl[HBASEUI]}/"/>
   </rule>
   <rule dir="IN" name="HBASEUI/hbase/inbound/master/path" 
pattern="*://*:*/**/hbase/webui/{**}">
     <rewrite template="{$serviceUrl[HBASEUI]}/{**}"/>
@@ -26,80 +25,161 @@
   <rule dir="IN" name="HBASEUI/hbase/inbound/master/query" 
pattern="*://*:*/**/hbase/webui/{**}?{**}">
     <rewrite template="{$serviceUrl[HBASEUI]}/{**}?{**}"/>
   </rule>
-  <rule dir="IN" name="HBASEUI/hbase/inbound/regionserver/home" 
pattern="*://*:*/**/hbase/webui/regionserver/rs-status?{host}?{port}">
+  <rule dir="IN" name="HBASEUI/hbase/inbound/regionserver/home" 
pattern="*://*:*/**//hbase/webui/regionserver?{host}?{port}">
     <rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/rs-status"/>
   </rule>
-  <rule dir="IN" name="HBASEUI/hbase/inbound/master/home" 
pattern="*://*:*/**/hbase/webui/master/master-status?{host}?{port}">
+  <rule dir="IN" name="HBASEUI/hbase/inbound/master/home" 
pattern="*://*:*/**//hbase/webui/master?{host}?{port}">
     <rewrite 
template="{$serviceScheme[HBASEUI]}://{host}:{port}/master-status"/>
   </rule>
-
-  <rule dir="IN" name="HBASEUI/hbase/inbound/logs" 
pattern="*://*:*/**/hbase/webui/logs?{scheme}?{host}?{port}?{**}">
+  <rule dir="IN" name="HBASEUI/hbase/inbound/logs1" 
pattern="*://*:*/**/hbase/webui/logs?{scheme}?{host}?{port}?{**}">
     <rewrite template="{scheme}://{host}:{port}/logs/?{**}"/>
   </rule>
+  <rule dir="IN" name="HBASEUI/hbase/inbound/masterlogs" 
pattern="*://*:*/**/hbase/webui/logs">
+    <rewrite template="{$serviceUrl[HBASEUI]}/logs/"/>
+  </rule>
+  <rule dir="IN" name="HBASEUI/hbase/inbound/dump" 
pattern="*://*:*/**/hbase/webui/dump?{host}?{port}">
+    <rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/dump"/>
+  </rule>
+  <rule dir="IN" name="HBASEUI/hbase/inbound/masterdump" 
pattern="*://*:*/**/hbase/webui/dump">
+    <rewrite template="{$serviceUrl[HBASEUI]}/dump"/>
+  </rule>
+  <rule dir="IN" name="HBASEUI/hbase/inbound/jmx" 
pattern="*://*:*/**/hbase/webui/jmx?{host}?{port}">
+    <rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/jmx"/>
+  </rule>
+  <rule dir="IN" name="HBASEUI/hbase/inbound/masterjmx" 
pattern="*://*:*/**/hbase/webui/jmx">
+    <rewrite template="{$serviceUrl[HBASEUI]}/jmx"/>
+  </rule>
 
-  <filter name="HBASEUI/hbase/outbound/headers">
-    <content type="application/x-http-headers">
-      <apply path="Location" rule="HBASEUI/hbase/outbound/headers/location"/>
-    </content>
-  </filter>
-  <rule dir="OUT" name="HBASEUI/hbase/outbound/headers/location">
-    <match pattern="{scheme}://{host}:{port}/logs/?{**}"/>
-    <rewrite 
template="{$frontend[url]}/hbase/webui/logs?{scheme}?host={$hostmap(host)}?{port}?{**}"/>
+  <rule dir="IN" name="HBASEUI/hbase/inbound/zkdump" 
pattern="*://*:*/**/hbase/webui/zk.jsp">
+    <rewrite template="{$serviceUrl[HBASEUI]}/zk.jsp"/>
+  </rule>
+  <rule dir="IN" name="HBASEUI/hbase/inbound/loglevel" 
pattern="*://*:*/**/hbase/webui/logLevel?{host}?{port}">
+    <rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/logLevel"/>
+  </rule>
+  <rule dir="IN" name="HBASEUI/hbase/inbound/regions" 
pattern="*://*:*/**/hbase/webui/region.jsp?{host}?{port}?name={**}">
+    <rewrite 
template="{$serviceScheme[HBASEUI]}://{host}:{port}/region.jsp?name={**}"/>
+  </rule>
+  <rule dir="IN" name="HBASEUI/hbase/inbound/storefile" 
pattern="*://*:*/**/hbase/webui/storeFile.jsp?{host}?{port}?name={**}">
+    <rewrite 
template="{$serviceScheme[HBASEUI]}://{host}:{port}/storeFile.jsp?name={**}"/>
   </rule>
 
+  <rule dir="IN" name="HBASEUI/hbase/inbound/logfile" 
pattern="*://*:*/**/hbase/webui/{host}/{port}/logs/{**}">
+    <rewrite 
template="{$serviceScheme[HBASEUI]}://{host}:{port}/{host}/{port}/logs/{**}"/>
+  </rule>
   <rule dir="OUT" name="HBASEUI/hbase/outbound/regionserver/home" 
pattern="//{host}:{port}/rs-status/">
-    <rewrite 
template="{$frontend[url]}/hbase/webui/regionserver/rs-status?host={$hostmap(host)}?{port}"/>
+    <rewrite 
template="{gateway.url}/hbase/webui/regionserver?host={$hostmap(host)}?{port}"/>
   </rule>
   <rule dir="OUT" name="HBASEUI/hbase/outbound/master/home" 
pattern="//{host}:{port}/master-status/">
-    <rewrite 
template="{$frontend[url]}/hbase/webui/master/master-status?host={$hostmap(host)}?{port}"/>
+    <rewrite 
template="{gateway.url}/hbase/webui/master?host={$hostmap(host)}?{port}"/>
   </rule>
 
-  <rule dir="OUT" name="HBASEUI/hbase/outbound/png" 
pattern="/static/{hbase*.png}">
-    <rewrite template="{$frontend[url]}/hbase/webui/static/{hbase*.png}"/>
+  <rule dir="OUT" name="HBASEUI/png" pattern="/static/hbase_logo_small.png">
+    <rewrite template="{gateway.url}/hbase/webui/static/hbase_logo_small.png"/>
   </rule>
-  <rule dir="OUT" name="HBASEUI/hbase/outbound/static" pattern="/static/{**}">
-    <rewrite template="{$frontend[url]}/hbase/webui/static/{**}"/>
+  <rule dir="OUT" name="HBASEUI/css" pattern="/static/css/{**}">
+    <rewrite template="{gateway.url}/hbase/webui/static/css/{**}"/>
   </rule>
-  <rule dir="OUT" name="HBASEUI/hbase/outbound/master" 
pattern="/master-status">
-    <rewrite template="{$frontend[url]}/hbase/webui/master-status"/>
+  <rule dir="OUT" name="HBASEUI/js" pattern="/static/js/{**}">
+    <rewrite template="{gateway.url}/hbase/webui/static/js/{**}"/>
   </rule>
-  <rule dir="OUT" name="HBASEUI/hbase/outbound/tables" 
pattern="/tablesDetailed.jsp">
-    <rewrite template="{$frontend[url]}/hbase/webui/tablesDetailed.jsp"/>
+  <rule dir="OUT" name="HBASEUI/static" pattern="/static/{**}">
+    <rewrite template="{gateway.url}/hbase/webui/static/{**}"/>
+  </rule>
+  <rule dir="OUT" name="HBASEUI/master" pattern="/master-status">
+    <rewrite template="{gateway.url}/hbase/webui/master-status"/>
+  </rule>
+  <rule dir="OUT" name="HBASEUI/hbase/webui/outbound/zkdump" 
pattern="//{host}:{port}/zk.jsp">
+    <rewrite template="{gateway.url}/hbase/webui/zk.jsp"/>
+  </rule>
+  <rule dir="OUT" name="HBASEUI/hbase/webui/outbound/zkdump2" 
pattern="/zk.jsp">
+    <rewrite template="{gateway.url}/hbase/webui/zk.jsp"/>
+  </rule>
+  <rule dir="OUT" name="HBASEUI/tables" 
pattern="//{host}:{port}/tablesDetailed.jsp">
+    <rewrite template="{gateway.url}/hbase/webui/tablesDetailed.jsp"/>
+  </rule>
+  <rule dir="OUT" name="HBASEUI/tables2" pattern="/tablesDetailed.jsp">
+    <rewrite template="{gateway.url}/hbase/webui/tablesDetailed.jsp"/>
+  </rule>
+  <rule dir="OUT" name="HBASEUI/procedures" pattern="/procedures.jsp">
+    <rewrite template="{gateway.url}/hbase/webui/procedures.jsp"/>
+  </rule>
+  <rule dir="OUT" name="HBASEUI/regions" 
pattern="//{host}:{port}/region.jsp?name={**}">
+    <rewrite 
template="{gateway.url}/hbase/webui/region.jsp?host={$hostmap(host)}?{port}?name={**}"/>
+  </rule>
+  <rule dir="OUT" name="HBASEUI/logs" 
pattern="//{host}:{port}/{**}/{**}/logs/">
+    <rewrite 
template="{gateway.url}/hbase/webui/logs?host={$hostmap(host)}?{port}"/>
+  </rule>
+  <rule dir="OUT" name="HBASEUI/logs1" pattern="/logs/">
+    <rewrite template="{gateway.url}/hbase/webui/logs/"/>
   </rule>
-  <rule dir="OUT" name="HBASEUI/hbase/outbound/logs" pattern="/logs/">
+  <rule dir="OUT" name="HBASEUI/logs/files" pattern="/{host}/{port}/logs/{**}">
+    <rewrite template="{gateway.url}/hbase/webui/{host}/{port}/logs/{**}"/>
+  </rule>
+  <rule dir="OUT" name="HBASEUI/logs/files1" pattern="/logs/{**}">
+    <rewrite template="{gateway.url}/hbase/webui/logs/{**}"/>
+  </rule>
+  <rule dir="OUT" name="HBASEUI/hbase/outbound/logs2" pattern="/logs/">
     <rewrite template="{$frontend[url]}/hbase/webui/logs/"/>
   </rule>
-  <rule dir="OUT" name="HBASEUI/hbase/outbound/logs/files" 
pattern="/logs/{**}">
+  <rule dir="OUT" name="HBASEUI/hbase/outbound/logs/files2" 
pattern="/logs/{**}">
     <rewrite template="{$frontend[url]}/hbase/webui/logs/{**}"/>
   </rule>
-  <rule dir="OUT" name="HBASEUI/hbase/outbound/logLevel" pattern="/logLevel">
-    <rewrite template="{$frontend[url]}/hbase/webui/logLevel"/>
+  <rule dir="OUT" name="HBASEUI/logLevel" pattern="//{host}:{port}/logLevel">
+    <rewrite 
template="{gateway.url}/hbase/webui/logLevel?host={$hostmap(host)}?{port}"/>
   </rule>
-  <rule dir="OUT" name="HBASEUI/hbase/outbound/debug" pattern="/dump">
-    <rewrite template="{$frontend[url]}/hbase/webui/dump"/>
+  <rule dir="OUT" name="HBASEUI/debug" pattern="//{host}:{port}/dump">
+    <rewrite 
template="{gateway.url}/hbase/webui/dump?host={$hostmap(host)}?{port}"/>
   </rule>
-  <rule dir="OUT" name="HBASEUI/hbase/outbound/jmx" pattern="/jmx">
-    <rewrite template="{$frontend[url]}/hbase/webui/jmx"/>
+  <rule dir="OUT" name="HBASEUI/jmx" pattern="//{host}:{port}/jmx">
+    <rewrite 
template="{gateway.url}/hbase/webui/jmx?host={$hostmap(host)}?{port}"/>
+  </rule>
+  <rule dir="OUT" name="HBASEUI/conf" pattern="//{host}:{port}/conf">
+    <rewrite 
template="{gateway.url}/hbase/webui/conf?host={$hostmap(host)}?{port}"/>
+  </rule>
+  <rule dir="OUT" name="HBASEUI/table" 
pattern="//{host}:{port}/table.jsp?name={**}">
+    <rewrite 
template="{gateway.url}/hbase/webui/table.jsp?host={$hostmap(host)}?{port}?name={**}"/>
   </rule>
-  <rule dir="OUT" name="HBASEUI/hbase/outbound/conf" pattern="/conf">
+  <rule dir="OUT" name="HBASEUI/hbase/outbound/storefile" 
pattern="//{host}:{port}/storeFile.jsp?name={**}">
+    <rewrite 
template="{gateway.url}/hbase/webui/storeFile.jsp?host={$hostmap(host)}?{port}?name={**}"/>
+  </rule>
+  <rule dir="OUT" name="HBASEUI/filter" pattern="?{filter}">
+    <rewrite template="{gateway.url}/hbase/webui/master-status?{filter}"/>
+  </rule>
+  <rule dir="OUT" name="HBASEUI/format" pattern="?{format}?{filter}">
+    <rewrite 
template="{gateway.url}/hbase/webui/master-status?{format}?{filter}"/>
+  </rule>
+  <rule dir="OUT" name="HBASEUI/hbase/outbound/conf2" pattern="/conf">
     <rewrite template="{$frontend[url]}/hbase/webui/conf"/>
   </rule>
-  <rule dir="OUT" name="HBASEUI/hbase/outbound/table" pattern="table.jsp?{**}">
-    <rewrite template="{$frontend[url]}/hbase/webui/table.jsp?{**}"/>
+  <rule dir="OUT" name="HBASEUI/hbase/outbound/jmx2" pattern="/jmx">
+    <rewrite template="{$frontend[url]}/hbase/webui/jmx"/>
   </rule>
-  <rule dir="OUT" name="HBASEUI/hbase/outbound/filter" pattern="?{filter}">
-    <rewrite template="{$frontend[url]}/hbase/webui/master-status?{filter}"/>
+  <rule dir="OUT" name="HBASEUI/hbase/outbound/debug2" pattern="/dump">
+    <rewrite template="{$frontend[url]}/hbase/webui/dump"/>
   </rule>
-  <rule dir="OUT" name="HBASEUI/hbase/outbound/format" 
pattern="?{format}?{filter}">
-    <rewrite 
template="{$frontend[url]}/hbase/webui/master-status?{format}?{filter}"/>
+  <rule dir="OUT" name="HBASEUI/hbase/outbound/logLevel2" pattern="/logLevel">
+    <rewrite template="{$frontend[url]}/hbase/webui/logLevel"/>
   </rule>
-  <rule dir="OUT" name="HBASEUI/hbase/outbound/zkdump" pattern="/zk.jsp">
-    <rewrite template="{$frontend[url]}/hbase/webui/zk.jsp"/>
+  <rule dir="OUT" name="HBASEUI/hbase/outbound/logs/files2" 
pattern="/logs/{**}">
+    <rewrite template="{$frontend[url]}/hbase/webui/logs/{**}"/>
   </rule>
-
-  <filter name="HBASEUI/hbase/outbound/configuration">
-    <content type="*/xml">
-      <buffer path="/configuration/property"/>
+  <rule dir="OUT" name="HBASEUI/hbase/outbound/logs2" pattern="/logs/">
+    <rewrite template="{$frontend[url]}/hbase/webui/logs/"/>
+  </rule>
+  <rule dir="OUT" name="HBASEUI/hbase/outbound/tables2" 
pattern="/tablesDetailed.jsp">
+    <rewrite template="{$frontend[url]}/hbase/webui/tablesDetailed.jsp"/>
+  </rule>
+  <rule dir="OUT" name="HBASEUI/hbase/outbound/master" 
pattern="/master-status">
+    <rewrite template="{$frontend[url]}/hbase/webui/master-status"/>
+  </rule>
+  <filter name="HBASEUI/hbase/outbound/headers/logs">
+    <content type="application/x-http-headers">
+      <apply path="Location" 
rule="HBASEUI/hbase/outbound/headers/logs/location"/>
     </content>
   </filter>
+  <rule dir="OUT" name="HBASEUI/hbase/outbound/headers/logs/location">
+    <match pattern="{scheme}://{host}:{port}/logs/?{**}"/>
+    <rewrite 
template="{$frontend[url]}/hbase/webui/logs?{scheme}?host={$hostmap(host)}?{port}?{**}"/>
+  </rule>
+
 </rules>

http://git-wip-us.apache.org/repos/asf/knox/blob/5adc1761/gateway-service-definitions/src/main/resources/services/hbaseui/1.1.0/service.xml
----------------------------------------------------------------------
diff --git 
a/gateway-service-definitions/src/main/resources/services/hbaseui/1.1.0/service.xml
 
b/gateway-service-definitions/src/main/resources/services/hbaseui/1.1.0/service.xml
index 98e17fe..7a7de1e 100644
--- 
a/gateway-service-definitions/src/main/resources/services/hbaseui/1.1.0/service.xml
+++ 
b/gateway-service-definitions/src/main/resources/services/hbaseui/1.1.0/service.xml
@@ -15,7 +15,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<service role="HBASEUI" name="hbase" version="1.1.0">
+<service role="HBASEUI" name="hbase" version="1.2.4">
     <routes>
         <route path="/hbase/webui/">
             <rewrite apply="HBASEUI/hbase/inbound/master/root" 
to="request.url"/>
@@ -28,18 +28,42 @@
             <rewrite apply="HBASEUI/hbase/inbound/master/query" 
to="request.url"/>
             <rewrite apply="HBASEUI/hbase/outbound/tasks" to="response.body"/>
         </route>
-        <route path="/hbase/webui/regionserver/**?{host}?{port}">
+        <route path="/hbase/webui/regionserver?**">
             <rewrite apply="HBASEUI/hbase/inbound/regionserver/home" 
to="request.url"/>
         </route>
-        <route path="/hbase/webui/master/**?{host}?{port}">
+        <route path="/hbase/webui/master?**">
             <rewrite apply="HBASEUI/hbase/inbound/master/home" 
to="request.url"/>
         </route>
         <route path="/hbase/webui/logs?**">
-            <rewrite apply="HBASEUI/hbase/outbound/headers" 
to="response.headers"/>
+            <rewrite apply="HBASEUI/hbase/outbound/headers/logs" 
to="response.headers"/>
+        </route>
+        <route path="/hbase/webui/logs?{host}?{port}">
+            <rewrite apply="HBASEUI/hbase/inbound/logs" to="request.url"/>
+        </route>
+        <route path="/hbase/webui/dump/">
+            <rewrite apply="HBASEUI/hbase/inbound/masterdump" 
to="request.url"/>
+        </route>
+         <route path="/hbase/webui/dump?{host}?{port}">
+            <rewrite apply="HBASEUI/hbase/inbound/dump" to="request.url"/>
+         </route>
+        <route path="/hbase/webui/jmx?{host}?{port}">
+            <rewrite apply="HBASEUI/hbase/inbound/jmx" to="request.url"/>
+        </route>
+        <route path="/hbase/webui/jmx">
+           <rewrite apply="HBASEUI/hbase/inbound/masterjmx" to="request.url"/>
+        </route>
+        <route path="/hbase/webui/region.jsp?{**}">
+           <rewrite apply="HBASEUI/hbase/inbound/regions" to="request.url"/>
+        </route>
+        <route path="/hbase/webui/storeFile.jsp?{**}">
+           <rewrite apply="HBASEUI/hbase/inbound/storefile" to="request.url"/>
+        </route>
+        <route path="/hbase/webui/{host}/{post}/logs/{**}">
+           <rewrite apply="HBASEUI/hbase/inbound/logfile" to="request.url"/>
         </route>
         <route path="/hbase/webui/conf">
             <rewrite apply="HBASEUI/hbase/outbound/configuration" 
to="response.body"/>
         </route>
     </routes>
     <dispatch classname="org.apache.hadoop.gateway.hbase.HBaseDispatch"/>
-</service>
\ No newline at end of file
+</service>

Reply via email to