knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kris...@apache.org
Subject knox git commit: KNOX-1343 - Support Ganglia for Knox (Mert Hocanin via Kevin Risden)
Date Wed, 07 Nov 2018 20:43:16 GMT
Repository: knox
Updated Branches:
  refs/heads/master 2135bc22c -> 013d535d0


KNOX-1343 - Support Ganglia for Knox (Mert Hocanin via Kevin Risden)

Signed-off-by: Kevin Risden <krisden@apache.org>


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

Branch: refs/heads/master
Commit: 013d535d0aa12165ae4cf3552e760cfb41235b85
Parents: 2135bc2
Author: Kevin Risden <krisden@apache.org>
Authored: Wed Nov 7 15:12:16 2018 -0500
Committer: Kevin Risden <krisden@apache.org>
Committed: Wed Nov 7 15:12:19 2018 -0500

----------------------------------------------------------------------
 .../services/ganglia/3.7.2/rewrite.xml          | 120 +++++++++++++++++++
 .../services/ganglia/3.7.2/service.xml          |  29 +++++
 2 files changed, 149 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/013d535d/gateway-service-definitions/src/main/resources/services/ganglia/3.7.2/rewrite.xml
----------------------------------------------------------------------
diff --git a/gateway-service-definitions/src/main/resources/services/ganglia/3.7.2/rewrite.xml
b/gateway-service-definitions/src/main/resources/services/ganglia/3.7.2/rewrite.xml
new file mode 100644
index 0000000..ef8baf8
--- /dev/null
+++ b/gateway-service-definitions/src/main/resources/services/ganglia/3.7.2/rewrite.xml
@@ -0,0 +1,120 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<rules>
+
+    <!-- INBOUND RULES -->
+
+    <rule dir="IN" name="GANGLIA/ganglia/inbound/root" pattern="*://*:*/**/ganglia">
+        <rewrite template="{$serviceUrl[GANGLIA]}/"/>
+    </rule>
+
+    <rule dir="IN" name="GANGLIA/ganglia/inbound/root/query" pattern="*://*:*/**/ganglia?{**}">
+        <rewrite template="{$serviceUrl[GANGLIA]}/?{**}"/>
+    </rule>
+
+    <rule dir="IN" name="GANGLIA/ganglia/inbound/path/query" pattern="*://*:*/**/ganglia/{**}?{**}">
+        <rewrite template="{$serviceUrl[GANGLIA]}/{**}?{**}"/>
+    </rule>
+
+    <rule dir="IN" name="GANGLIA/ganglia/inbound/css" pattern="*://*:*/**/ganglia/css/{path=**}">
+        <rewrite template="{$serviceUrl[GANGLIA]}/css/{path}"/>
+    </rule>
+
+    <rule dir="IN" name="GANGLIA/ganglia/inbound/js" pattern="*://*:*/**/ganglia/js/{path=**}">
+        <rewrite template="{$serviceUrl[GANGLIA]}/js/{path}"/>
+    </rule>
+
+    <rule dir="IN" name="GANGLIA/ganglia/inbound/img" pattern="*://*:*/**/ganglia/img/{path=**}">
+        <rewrite template="{$serviceUrl[GANGLIA]}/img/{path}"/>
+    </rule>
+
+    <!-- OUTBOUND RULES -->
+
+    <rule dir="OUT" name="GANGLIA/ganglia/inbound/root" pattern="*://*:*/**/ganglia">
+        <rewrite template="{$frontend[url]}/ganglia/"/>
+    </rule>
+
+    <rule dir="OUT" name="GANGLIA/ganglia/inbound/root/query" pattern="*://*:*/**/ganglia?{**}">
+        <rewrite template="{$frontend[url]}/ganglia/?{**}"/>
+    </rule>
+
+    <rule dir="OUT" name="GANGLIA/ganglia/outbound/css" pattern="css/{path=**}">
+        <rewrite template="{$frontend[url]}/ganglia/css/{path}"/>
+    </rule>
+
+    <rule dir="OUT" name="GANGLIA/ganglia/outbound/js" pattern="js/{path=**}">
+        <rewrite template="{$frontend[url]}/ganglia/js/{path}"/>
+    </rule>
+
+    <rule dir="OUT" name="GANGLIA/ganglia/outbound/imgslash" pattern="/img/{path=**}">
+        <rewrite template="{$frontend[url]}/ganglia/img/{path}"/>
+    </rule>
+
+    <rule dir="OUT" name="GANGLIA/ganglia/outbound/img" pattern="img/{path=**}">
+        <rewrite template="{$frontend[url]}/ganglia/img/{path}"/>
+    </rule>
+
+    <rule dir="OUT" name="GANGLIA/ganglia/outbound/script/root/query" pattern="./{**}?{**}">
+        <rewrite template="{$frontend[url]}/ganglia/{**}?{**}"/>
+    </rule>
+
+    <rule dir="OUT" name="GANGLIA/ganglia/outbound/script/root/path" pattern="./{**}">
+        <rewrite template="{$frontend[url]}/ganglia/{**}"/>
+    </rule>
+
+    <rule flow="OR" dir="OUT" name="GANGLIA/ganglia/outbound/graph" >
+        <match pattern="./graph.php?{query=**}">
+          <rewrite template="{$frontend[url]}/ganglia/graph.php?{query}"/>
+        </match>
+        <match pattern="{**}/graph.php?{query=**}">
+          <rewrite template="{$frontend[url]}/ganglia/graph.php?{query}"/>
+        </match>
+    </rule>
+
+    <rule dir="OUT" name="GANGLIA/ganglia/outbound/stacked" pattern="stacked.php?{**}">
+        <rewrite template="{$frontend[url]}/ganglia/stacked.php?{**}"/>
+    </rule>
+
+    <rule dir="OUT" name="GANGLIA/ganglia/outbound/stacked" pattern="/stacked.php?{**}">
+        <rewrite template="{$frontend[url]}/ganglia/stacked.php?{**}"/>
+    </rule>
+
+    <rule dir="OUT" name="GANGLIA/ganglia/outbound/calendar" pattern="calendar.gif">
+        <rewrite template="{$frontend[url]}/ganglia/calendar.gif"/>
+    </rule>
+
+    <!-- HEADERS RULES -->
+
+    <rule flow="OR" dir="OUT" name="GANGLIA/ganglia/outbound/headers">
+        <match pattern="*://*:*/**/ganglia/{path=**}">
+          <rewrite template="{$serviceUrl[GANGLIA]}/{path}"/>
+        </match>
+        <match pattern="*://*:*/**/ganglia/{path=**}?{query=**}">
+          <rewrite template="{$serviceUrl[GANGLIA]}/{path}?{query}"/>
+        </match>
+        <match pattern="*://*:*/**/ganglia?{query=**}">
+          <rewrite template="{$serviceUrl[GANGLIA]}/?{query}"/>
+        </match>
+        <match pattern="*://*:*/**/ganglia/">
+          <rewrite template="{$serviceUrl[GANGLIA]}/"/>
+        </match>
+        <match pattern="*://*:*/**/ganglia">
+          <rewrite template="{$serviceUrl[GANGLIA]}/"/>
+        </match>
+    </rule>
+
+</rules>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/knox/blob/013d535d/gateway-service-definitions/src/main/resources/services/ganglia/3.7.2/service.xml
----------------------------------------------------------------------
diff --git a/gateway-service-definitions/src/main/resources/services/ganglia/3.7.2/service.xml
b/gateway-service-definitions/src/main/resources/services/ganglia/3.7.2/service.xml
new file mode 100644
index 0000000..0921580
--- /dev/null
+++ b/gateway-service-definitions/src/main/resources/services/ganglia/3.7.2/service.xml
@@ -0,0 +1,29 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<service role="GANGLIA" name="ganglia" version="3.7.2">
+    <routes>
+        <route path="/ganglia/">
+            <rewrite apply="GANGLIA/ganglia/outbound/headers" to="response.headers"/>
+        </route>
+        <route path="/ganglia/**">
+            <rewrite apply="GANGLIA/ganglia/outbound/headers" to="response.headers"/>
+        </route>
+        <route path="/ganglia/**?**">
+            <rewrite apply="GANGLIA/ganglia/outbound/headers" to="response.headers"/>
+        </route>
+    </routes>
+</service>


Mime
View raw message