You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chukwa.apache.org by ey...@apache.org on 2015/05/26 02:12:39 UTC
[04/19] chukwa git commit: CHUKWA-746. Redesigned Chukwa dashboard.
(Eric Yang)
http://git-wip-us.apache.org/repos/asf/chukwa/blob/dfe84a2c/src/main/web/hicc/jsp/heatmap.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/jsp/heatmap.jsp b/src/main/web/hicc/jsp/heatmap.jsp
index 581fcdb..4f1f4fe 100644
--- a/src/main/web/hicc/jsp/heatmap.jsp
+++ b/src/main/web/hicc/jsp/heatmap.jsp
@@ -23,7 +23,7 @@
response.setContentType("text/html; chartset=UTF-8//IGNORE");
response.setHeader("boxId", xf.getParameter("boxId"));
- String width = "600";
+ String width = "700";
if(xf.getParameter("width")!=null) {
width=xf.getParameter("width");
}
@@ -38,10 +38,15 @@
yLabel=xf.getParameter("yLabel");
}
- String url = "/hicc/v1/heatmap/SystemMetrics/cpu/combined.?max=100";
+ String url = "/hicc/v1/heatmap/SystemMetrics/cpu.combined.?max=100";
if(xf.getParameter("url")!=null) {
url=xf.getParameter("url");
}
+
+ String title = "CPU Utilization";
+ if(xf.getParameter("title")!=null) {
+ title=xf.getParameter("title");
+ }
%>
<!DOCTYPE html>
<html lang="en">
@@ -77,9 +82,8 @@
#xaxis {
width: <%= width %>px;
- position: absolute;
+ position: relative;
left: 0px;
- bottom: 10px;
height: 20px;
text-align: center;
display: block;
@@ -103,7 +107,7 @@
<script src="/hicc/js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="/hicc/js/heatmap.js"></script>
<script type="text/javascript">
- window.onload = function() {
+ function load() {
$.ajax({
url: "<%= url %>",
dataType: "json",
@@ -115,13 +119,17 @@
opacity: 50,
legend: {
position: 'br',
- title: '<%= xf.getParameter("title") %> Distribution'
+ title: '<%= title %> Distribution'
}
};
var heatmap = h337.create(config);
heatmap.store.setDataSet(data);
+ setTimeout(load, 5000);
}
});
+ }
+ window.onload = function() {
+ setTimeout(load, 5000);
};
</script>
</body>
http://git-wip-us.apache.org/repos/asf/chukwa/blob/dfe84a2c/src/main/web/hicc/login.jsp
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/login.jsp b/src/main/web/hicc/login.jsp
new file mode 100644
index 0000000..0f46b40
--- /dev/null
+++ b/src/main/web/hicc/login.jsp
@@ -0,0 +1,52 @@
+<%--
+ ~ 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.
+ --%>
+<html>
+<head>
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+ <meta http-equiv="Pragma" content="no-cache" />
+ <meta http-equiv="Expires" content="0" />
+ <link type="text/css" rel="stylesheet" href="css/login.css"/>
+ <link href="css/bootstrap.min.css" type="text/css" rel="stylesheet" />
+ <link href="css/bootstrap-theme.min.css" type="text/css" rel="stylesheet" />
+ <script src="js/jquery.js" type="text/javascript"></script>
+ <script src="js/bootstrap.min.js" type="text/javascript"></script>
+</head>
+<body>
+
+<div class="container">
+ <form class="form-signin" name="loginform" action="" method="post">
+ <h2 class="form-signin-heading">Sign in to Chukwa</h2>
+ <label for="inputEmail" class="sr-only">Username</label>
+ <input type="text" class="form-control" name="username" placeholder="Username" required autofocus>
+ <label for="inputPassword" class="sr-only">Password:</label>
+ <input type="password" class="form-control" name="password" placeholder="Password" required>
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" name="rememberMe"> Keep me signed in
+ </label>
+ </div>
+ <input type="submit" class="btn btn-lg btn-primary btn-block" name="submit" value="Login">
+ <span class="form-signin-footer">
+ Copyright (c) 2008-2015 Apache Software Foundation
+ </span>
+ </form>
+</div>
+
+</body>
+</html>