Added configuration page
Former-commit-id: 8ab1873678b8e4a56332da785cd6f943648f6afd
This commit is contained in:
parent
b88f260ebc
commit
de1706d67a
7 changed files with 176 additions and 106 deletions
54
web-resource/configure.html
Normal file
54
web-resource/configure.html
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<title>Power;Challenge</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="css/main.css" rel="stylesheet">
|
||||
|
||||
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
|
||||
<script src="js/bootstrap.min.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-brand" href="#">Power;Challenge</a>
|
||||
</div>
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="#">Ziver</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-3 col-md-2 sidebar">
|
||||
<ul class="nav nav-sidebar">
|
||||
<li><a href="/">Overview</a></li>
|
||||
<li><a href="#">Heat Map</a></li>
|
||||
<li><a href="#">Statistics</a></li>
|
||||
<li class="active"><a href="configure">Configuration <span class="sr-only">(current)</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<h1 class="page-header">Configuration</h1>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -90,7 +90,7 @@ body {
|
|||
*/
|
||||
|
||||
.placeholders {
|
||||
margin-bottom: 30px;
|
||||
margin-bottom: 200px;
|
||||
text-align: center;
|
||||
}
|
||||
.placeholders h4 {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<title>Dashboard Template for Bootstrap</title>
|
||||
<title>Power;Challenge</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="css/bootstrap.min.css" rel="stylesheet">
|
||||
|
|
@ -19,55 +19,36 @@
|
|||
|
||||
<script>
|
||||
$(function(){
|
||||
Morris.Line({
|
||||
element: 'min-power-chart',
|
||||
data: [
|
||||
{{#minData}}
|
||||
{ y: {{.timestamp}}, a: {{.data}} },
|
||||
{{/minData}}
|
||||
],
|
||||
xkey: 'y',
|
||||
ykeys: ['a'],
|
||||
labels: [
|
||||
'{{username}}'
|
||||
],
|
||||
continuousLine: false,
|
||||
pointSize: 0,
|
||||
postUnits: 'Wh'
|
||||
});
|
||||
Morris.Line({
|
||||
element: 'hour-power-chart',
|
||||
data: [
|
||||
{{#hourData}}
|
||||
{ y: {{.timestamp}}, a: {{.data}} },
|
||||
{{/hourData}}
|
||||
],
|
||||
xkey: 'y',
|
||||
ykeys: ['a'],
|
||||
labels: [
|
||||
'{{username}}'
|
||||
],
|
||||
continuousLine: false,
|
||||
pointSize: 0,
|
||||
postUnits: 'Wh'
|
||||
});
|
||||
Morris.Line({
|
||||
element: 'day-power-chart',
|
||||
data: [
|
||||
{{#dayData}}
|
||||
{ y: {{.timestamp}}, a: {{.data}} },
|
||||
{{/dayData}}
|
||||
],
|
||||
xkey: 'y',
|
||||
ykeys: ['a'],
|
||||
labels: [
|
||||
'{{username}}'
|
||||
],
|
||||
continuousLine: false,
|
||||
pointSize: 0,
|
||||
postUnits: 'Wh'
|
||||
});
|
||||
chartData("min-power-chart",
|
||||
[{{#minData}}
|
||||
{ y: {{.timestamp}}, {{.username}}: {{.data}}/1000 },
|
||||
{{/minData}}]
|
||||
);
|
||||
chartData("hour-power-chart",
|
||||
[{{#hourData}}
|
||||
{ y: {{.timestamp}}, {{.username}}: {{.data}}/1000 },
|
||||
{{/hourData}}]
|
||||
);
|
||||
chartData("day-power-chart",
|
||||
[{{#dayData}}
|
||||
{ y: {{.timestamp}}, {{.username}}: {{.data}}/1000 },
|
||||
{{/dayData}}]
|
||||
);
|
||||
});
|
||||
var userArray = [ {{#username}} '{{.}}', {{/username}} ];
|
||||
function chartData(elementId, data){
|
||||
Morris.Line({
|
||||
element: elementId,
|
||||
data: data,
|
||||
xkey: 'y',
|
||||
ykeys: userArray,
|
||||
labels: userArray,
|
||||
continuousLine: false,
|
||||
pointSize: 0,
|
||||
postUnits: 'kWh',
|
||||
resize: true
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
|
@ -91,53 +72,28 @@
|
|||
<div class="row">
|
||||
<div class="col-sm-3 col-md-2 sidebar">
|
||||
<ul class="nav nav-sidebar">
|
||||
<li class="active"><a href="#">Overview <span class="sr-only">(current)</span></a></li>
|
||||
<li><a href="#">Reports</a></li>
|
||||
<li><a href="#">Analytics</a></li>
|
||||
<li><a href="#">Export</a></li>
|
||||
<li class="active"><a href="/">Overview <span class="sr-only">(current)</span></a></li>
|
||||
<li><a href="#">Heat Map</a></li>
|
||||
<li><a href="#">Statistics</a></li>
|
||||
<li><a href="configure">Configuration</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<h1 class="page-header">Dashboard</h1>
|
||||
<h1 class="page-header">Overview</h1>
|
||||
|
||||
<div class="row placeholders">
|
||||
<H2>Last 24 hours</H2>
|
||||
<div id="min-power-chart"></div>
|
||||
<H1>Last 24 hours</H1>
|
||||
<div id="min-power-chart" style="height:450px;"></div>
|
||||
</div>
|
||||
|
||||
<div class="row placeholders">
|
||||
<H2>Previous two days</H2>
|
||||
<div id="hour-power-chart"></div>
|
||||
<H1>Previous two days</H1>
|
||||
<div id="hour-power-chart" style="height:450px;"></div>
|
||||
</div>
|
||||
|
||||
<div class="row placeholders">
|
||||
<H2>Long term</H2>
|
||||
<div id="day-power-chart"></div>
|
||||
</div>
|
||||
|
||||
<h2 class="sub-header">Section title</h2>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Header</th>
|
||||
<th>Header</th>
|
||||
<th>Header</th>
|
||||
<th>Header</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>1,001</td>
|
||||
<td>Lorem</td>
|
||||
<td>ipsum</td>
|
||||
<td>dolor</td>
|
||||
<td>sit</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<H1>Long term</H1>
|
||||
<div id="day-power-chart" style="height:450px;"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue