incremental
diff --git a/static/CMakeLists.txt b/static/CMakeLists.txt
index acfc8a8..183eeb2 100644
--- a/static/CMakeLists.txt
+++ b/static/CMakeLists.txt
@@ -8,6 +8,8 @@
js/kvmController.js
js/loginController.js
js/ipmiController.js
+ js/versionController.js
+ js/sensorController.js
js/angular-resource.js
js/angular-sanitize.js
js/bmcApp.js
@@ -15,7 +17,7 @@
js/angular-animate.js
js/run_prettify.js
js/angular.js
- js/versionController.js
+
noVNC/core/inflator.js
noVNC/core/input/xtscancodes.js
noVNC/core/input/util.js
@@ -51,6 +53,7 @@
partial-home-list.html
partial-ipmi.html
partial-kvm.html
+ partial-sensor.html
partial-systeminfo.html
)
diff --git a/static/index.html b/static/index.html
index 687aa64..de7f47c 100644
--- a/static/index.html
+++ b/static/index.html
@@ -31,6 +31,7 @@
<script type="text/javascript" src="static/js/loginController.js" defer></script>
<script type="text/javascript" src="static/js/kvmController.js" defer></script>
<script type="text/javascript" src="static/js/ipmiController.js" defer></script>
+ <script type="text/javascript" src="static/js/sensorController.js" defer></script>
<script type="text/javascript" src="static/noVNC/core/util.js" defer></script>
<script type="text/javascript" src="static/noVNC/app/webutil.js" defer></script>
@@ -85,7 +86,7 @@
<li class="dropdown" uib-dropdown dropdown-append-to-body>
<a href="#" class="dropdown-toggle" uib-dropdown-toggle role="button" aria-haspopup="true" aria-expanded="false">Server Health <span class="caret"></span></a>
<ul class="dropdown-menu" uib-dropdown-menu role="menu">
- <li><a href="#">Sensor Information</a></li>
+ <li><a ui-sref="sensor">Sensor Information</a></li>
<li><a ui-sref="eventlog">Event Log</a></li>
</ul>
</li>
diff --git a/static/js/bmcApp.js b/static/js/bmcApp.js
index 2678ac0..7575e34 100644
--- a/static/js/bmcApp.js
+++ b/static/js/bmcApp.js
@@ -130,6 +130,9 @@
.state(
'ipmi', {url: '/ipmi', templateUrl: 'static/partial-ipmi.html'})
+ .state(
+ 'sensor', {url: '/sensor', templateUrl: 'static/partial-sensor.html'})
+
// ABOUT PAGE AND MULTIPLE NAMED VIEWS =================================
.state('about', {url: '/about', templateUrl: 'static/partial-fruinfo.html'})
diff --git a/static/js/sensorController.js b/static/js/sensorController.js
new file mode 100644
index 0000000..3554c0f
--- /dev/null
+++ b/static/js/sensorController.js
@@ -0,0 +1,11 @@
+angular.module('bmcApp').controller('sensorController', [
+ '$scope', '$resource',
+ function($scope, $resource) {
+
+ var systeminfo = $resource("/sensortest");
+ systeminfo.get(function(sensor_values) {
+ $scope.sensor_values = sensor_values;
+ });
+
+ }
+]);
\ No newline at end of file
diff --git a/static/partial-sensor.html b/static/partial-sensor.html
new file mode 100644
index 0000000..09f1cad
--- /dev/null
+++ b/static/partial-sensor.html
@@ -0,0 +1,28 @@
+<div class="container" ng-controller="sensorController">
+ <div class="row">
+ <div class="col-lg-8">
+ <div class="box box-primary">
+ <div class="box-header with-border">
+ <h4>Summary
+ <h4>
+ </div>
+ <div class="box-body">
+ <table class="table table-striped system-status-table">
+ <thead>
+ <tr>
+ <th>Sensor</th>
+ <th>Value</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="(sensor_name, value) in sensor_values">
+ <td class="fit">{{ sensor_name }}</td>
+ <td class="fit">{{ value }}</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
\ No newline at end of file