-
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.
Fixes RootITest and adds the status page.
Resources can't go in a 'static' folder because JBossWeb doesn't have something similar to 'resolve-against-context-root' in Undertow.
- Loading branch information
1 parent
de97ae3
commit c8e3641
Showing
7 changed files
with
167 additions
and
6 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
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!-- | ||
~ Copyright 2014-2015 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. | ||
--> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
<html> | ||
<head> | ||
<title>Hawkular Metrics</title> | ||
<link rel="shortcut icon" href="/hawkular/metrics/static/favicon.ico" type="image/x-icon"> | ||
<link rel="StyleSheet" href="/hawkular/metrics/static/welcome.css" type="text/css"> | ||
<script src="/hawkular/metrics/static/status.js"></script> | ||
</head> | ||
|
||
<body> | ||
<div class="content"> | ||
<div class="logo"/> | ||
<img src="/hawkular/metrics/static/hawkular_logo.png" alt="Hawkular Logo"/> | ||
</div> | ||
<h1>Hawkular Metrics</h1> | ||
|
||
<h3>A time series metrics engine based on Cassandra</h3> | ||
|
||
<p>${project.version}</p> | ||
|
||
<p id="status">Status: <i>Checking...</i></p> | ||
</div> | ||
</body> | ||
</html> |
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,45 @@ | ||
/* | ||
* Copyright 2014-2015 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. | ||
*/ | ||
|
||
var httpRequest; | ||
|
||
if (window.XMLHttpRequest) { | ||
httpRequest = new XMLHttpRequest(); | ||
} else if (window.ActiveXObject) { | ||
try { | ||
httpRequest = new ActiveXObject("Msxml2.XMLHTTP"); | ||
} catch (e) { | ||
httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); | ||
} | ||
} | ||
|
||
httpRequest.onreadystatechange = updateStatus; | ||
httpRequest.open("GET", "/hawkular/metrics/status"); | ||
httpRequest.send(); | ||
|
||
function updateStatus() { | ||
if (httpRequest.readyState === 4) { | ||
if (httpRequest.status === 200) { | ||
statusJson = JSON.parse(httpRequest.responseText); | ||
document.getElementById("status").innerHTML = "Metrics Service :" + statusJson.MetricsService; | ||
} else if (httpRequest.status === 404 || httpRequest.status === 503) { | ||
document.getElementById("status").innerHTML = "The server is not available"; | ||
} else { | ||
document.getElementById("status").innerHTML = "An error occured while accessing the server :" + httpRequest.responseText; | ||
} | ||
} | ||
} |
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,50 @@ | ||
/* | ||
* Copyright 2014-2015 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. | ||
*/ | ||
@import url(http://fonts.googleapis.com/css?family=Exo+2); | ||
|
||
html { | ||
width: 100%; | ||
} | ||
|
||
body { | ||
font-family: 'Exo 2', sans-serif; | ||
} | ||
|
||
.content { | ||
margin-left: auto; | ||
margin-right: auto; | ||
max-width: 100%; | ||
width: 50em padding : 1 em; | ||
text-align: center; | ||
} | ||
|
||
.logo { | ||
margin-left: auto; | ||
margin-right: auto; | ||
text-align: center; | ||
} | ||
|
||
.logo img { | ||
max-width: 100%; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
|
||
h1, h3 { | ||
text-align: center; | ||
word-wrap: break-word; | ||
} |