-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Serve angular UI from current jaxrs API
- Loading branch information
Showing
83 changed files
with
194,421 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
.../src/main/java/org/hawkular/metrics/api/jaxrs/handler/ClientRouterDispatchingServlet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright 2014-2017 Red Hat, Inc. and/or its affiliates | ||
* and other contributors as indicated by the @author tags. | ||
* | ||
* Licensed 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. | ||
*/ | ||
package org.hawkular.metrics.api.jaxrs.handler; | ||
|
||
import java.io.IOException; | ||
|
||
import javax.servlet.ServletException; | ||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
|
||
import io.undertow.servlet.handlers.DefaultServlet; | ||
|
||
/** | ||
* Servlet used for delivering static data as undertow's DefaultServlet and preserves url for client-side router | ||
* such as Angular's in single-page app context | ||
* @author Joel Takvorian | ||
*/ | ||
public class ClientRouterDispatchingServlet extends DefaultServlet { | ||
|
||
@Override | ||
protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { | ||
String path = req.getPathInfo(); | ||
// FIXME: find a safer & more generic way. | ||
// Beware, urls could be like "hawkular/metrics/ui/something/file/abc.json" which is not necessarily static content | ||
// Maybe put all in "assets", but need to find how to do it with dynamically loaded fonts | ||
if (path.endsWith(".js") | ||
|| path.endsWith(".css") | ||
|| path.endsWith(".woff2") | ||
|| path.endsWith(".ttf") | ||
|| path.endsWith(".html") | ||
|| path.endsWith(".png") | ||
|| path.endsWith(".jpg")) { | ||
super.doGet(req, resp); | ||
return; | ||
} | ||
req.getRequestDispatcher("/ui/index.html").forward(req, resp); | ||
} | ||
} |
Binary file added
BIN
+96.5 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Bold-webfont.0d8fa9d9810a6543e922.woff
Binary file not shown.
Binary file added
BIN
+219 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Bold-webfont.50145685042b4df07a1f.ttf
Binary file not shown.
Binary file added
BIN
+98 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Bold-webfont.60449ee63020f7a26f19.eot
Binary file not shown.
Binary file added
BIN
+62.2 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Bold-webfont.7a1d4327518eab8c5600.woff2
Binary file not shown.
19,028 changes: 19,028 additions & 0 deletions
19,028
...etrics-api-jaxrs/src/main/webapp/OpenSans-Bold-webfont.99c9f24dd717e50a36d0.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19,036 changes: 19,036 additions & 0 deletions
19,036
...-api-jaxrs/src/main/webapp/OpenSans-BoldItalic-webfont.04b273bca14cbdba6b0b.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+208 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-BoldItalic-webfont.78b08a68d05d5fabb0b8.ttf
Binary file not shown.
Binary file added
BIN
+91.5 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-BoldItalic-webfont.8642dbfe531a38f6ab83.woff
Binary file not shown.
Binary file added
BIN
+93.8 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-BoldItalic-webfont.d09461e773d7a1945022.eot
Binary file not shown.
Binary file added
BIN
+58.1 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-BoldItalic-webfont.fba8b2a7052485cec44b.woff2
Binary file not shown.
Binary file added
BIN
+97.8 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-ExtraBold-webfont.2291980bac6d45447c90.eot
Binary file not shown.
Binary file added
BIN
+217 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-ExtraBold-webfont.8bac22ed4fd7c8a30536.ttf
Binary file not shown.
Binary file added
BIN
+96.2 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-ExtraBold-webfont.b40092f742715ad203db.woff
Binary file not shown.
Binary file added
BIN
+62.2 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-ExtraBold-webfont.b91b03551cbc5aec3c29.woff2
Binary file not shown.
19,030 changes: 19,030 additions & 0 deletions
19,030
...s-api-jaxrs/src/main/webapp/OpenSans-ExtraBold-webfont.c13d9e6d9d5e10ed7891.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+92 KB
...rics-api-jaxrs/src/main/webapp/OpenSans-ExtraBoldItalic-webfont.51c4ab203f9003ce49cc.woff
Binary file not shown.
19,036 changes: 19,036 additions & 0 deletions
19,036
...jaxrs/src/main/webapp/OpenSans-ExtraBoldItalic-webfont.6be75e80b3b60ec7e673.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+208 KB
...trics-api-jaxrs/src/main/webapp/OpenSans-ExtraBoldItalic-webfont.73d6bb0d4f596a91992e.ttf
Binary file not shown.
Binary file added
BIN
+58.4 KB
...ics-api-jaxrs/src/main/webapp/OpenSans-ExtraBoldItalic-webfont.7789cb285e0fdd866795.woff2
Binary file not shown.
Binary file added
BIN
+94.1 KB
...trics-api-jaxrs/src/main/webapp/OpenSans-ExtraBoldItalic-webfont.957287ebc80dcf9381c2.eot
Binary file not shown.
19,043 changes: 19,043 additions & 0 deletions
19,043
...rics-api-jaxrs/src/main/webapp/OpenSans-Italic-webfont.3e2b2e91221492e315c4.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+91.7 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Italic-webfont.7aee35e0d937a1fa3456.woff
Binary file not shown.
Binary file added
BIN
+94.6 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Italic-webfont.b07fc5b16bb5ecf336f3.eot
Binary file not shown.
Binary file added
BIN
+208 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Italic-webfont.c7dcce084c445260a266.ttf
Binary file not shown.
Binary file added
BIN
+58.5 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Italic-webfont.f01a4402103c9ef93506.woff2
Binary file not shown.
Binary file added
BIN
+217 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Light-webfont.1bf71be111189e76987a.ttf
Binary file not shown.
Binary file added
BIN
+96.9 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Light-webfont.357d675366cce0fbb6ca.eot
Binary file not shown.
Binary file added
BIN
+95.6 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Light-webfont.3b3cbaef084e27f7fa05.woff
Binary file not shown.
19,026 changes: 19,026 additions & 0 deletions
19,026
...trics-api-jaxrs/src/main/webapp/OpenSans-Light-webfont.41ef8e5d0ac536545113.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+61.7 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Light-webfont.ea284cc760cad1896d4c.woff2
Binary file not shown.
Binary file added
BIN
+57.8 KB
...metrics-api-jaxrs/src/main/webapp/OpenSans-LightItalic-webfont.3ea4cffdf67ebf2ad373.woff2
Binary file not shown.
Binary file added
BIN
+208 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-LightItalic-webfont.6943fb6fd4200f3d0734.ttf
Binary file not shown.
Binary file added
BIN
+93.9 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-LightItalic-webfont.9a599f54797d2ae5a61a.eot
Binary file not shown.
Binary file added
BIN
+91.7 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-LightItalic-webfont.9c9017a313819aa54e95.woff
Binary file not shown.
19,039 changes: 19,039 additions & 0 deletions
19,039
...api-jaxrs/src/main/webapp/OpenSans-LightItalic-webfont.b348357e35677da79b5c.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+93.9 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Regular-webfont.60bdb28dc8230486c5b0.woff
Binary file not shown.
Binary file added
BIN
+212 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Regular-webfont.629a55a7e793da068dc5.ttf
Binary file not shown.
Binary file added
BIN
+60.5 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Regular-webfont.6fd1f924cd0bea5d5f74.woff2
Binary file not shown.
Binary file added
BIN
+96.4 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Regular-webfont.98255d04bb0ce821171e.eot
Binary file not shown.
19,030 changes: 19,030 additions & 0 deletions
19,030
...ics-api-jaxrs/src/main/webapp/OpenSans-Regular-webfont.d9bee607e42329e3ae45.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+96.2 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Semibold-webfont.2418db91905ed032bf3a.woff
Binary file not shown.
Binary file added
BIN
+216 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Semibold-webfont.33f225b8f5f7d6b34a09.ttf
Binary file not shown.
19,030 changes: 19,030 additions & 0 deletions
19,030
...cs-api-jaxrs/src/main/webapp/OpenSans-Semibold-webfont.400ab808e8b3ba053d41.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+62.2 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Semibold-webfont.aa22ff6fd92ecdf402f0.woff2
Binary file not shown.
Binary file added
BIN
+98.2 KB
api/metrics-api-jaxrs/src/main/webapp/OpenSans-Semibold-webfont.ce26ce4629f1e78f6665.eot
Binary file not shown.
19,043 changes: 19,043 additions & 0 deletions
19,043
...-jaxrs/src/main/webapp/OpenSans-SemiboldItalic-webfont.7350876ed9eaf44d9555.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+208 KB
...etrics-api-jaxrs/src/main/webapp/OpenSans-SemiboldItalic-webfont.73f7301a9cd7a0862954.ttf
Binary file not shown.
Binary file added
BIN
+59.5 KB
...rics-api-jaxrs/src/main/webapp/OpenSans-SemiboldItalic-webfont.ca4d226c2c041ce9d9e9.woff2
Binary file not shown.
Binary file added
BIN
+95.8 KB
...etrics-api-jaxrs/src/main/webapp/OpenSans-SemiboldItalic-webfont.ca4e3b468e0d24ae948b.eot
Binary file not shown.
Binary file added
BIN
+92.3 KB
...trics-api-jaxrs/src/main/webapp/OpenSans-SemiboldItalic-webfont.cc62fb5c139ff4ec74ef.woff
Binary file not shown.
Binary file added
BIN
+23.8 KB
api/metrics-api-jaxrs/src/main/webapp/PatternFlyIcons-webfont.796dc070009d7c9693e2.woff
Binary file not shown.
Binary file added
BIN
+24 KB
api/metrics-api-jaxrs/src/main/webapp/PatternFlyIcons-webfont.8bf6792086b15b1e0adf.eot
Binary file not shown.
Binary file added
BIN
+23.8 KB
api/metrics-api-jaxrs/src/main/webapp/PatternFlyIcons-webfont.a5dc93ff2515400fbc31.ttf
Binary file not shown.
102 changes: 102 additions & 0 deletions
102
...rics-api-jaxrs/src/main/webapp/PatternFlyIcons-webfont.da9cde28a8e5b52d1720.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added
BIN
+162 KB
api/metrics-api-jaxrs/src/main/webapp/fontawesome-webfont.674f50d287a8c48dc19b.eot
Binary file not shown.
Oops, something went wrong.