diff options
author | Ed Tanous <ed.tanous@intel.com> | 2017-05-11 20:27:23 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2017-05-11 20:27:23 +0300 |
commit | cc5a37f7362e8aabb8f21705c8583d2ff19a641d (patch) | |
tree | 5608eb4c28bc22aa221aa503916946fa5b79d827 /static | |
parent | e2fc45a1cd7645e50754d93ce52ec8935e723007 (diff) | |
download | bmcweb-cc5a37f7362e8aabb8f21705c8583d2ff19a641d.tar.xz |
incremental
Diffstat (limited to 'static')
-rw-r--r-- | static/CMakeLists.txt | 5 | ||||
-rw-r--r-- | static/index.html | 3 | ||||
-rw-r--r-- | static/js/bmcApp.js | 3 | ||||
-rw-r--r-- | static/js/sensorController.js | 11 | ||||
-rw-r--r-- | static/partial-sensor.html | 28 |
5 files changed, 48 insertions, 2 deletions
diff --git a/static/CMakeLists.txt b/static/CMakeLists.txt index acfc8a8924..183eeb2f43 100644 --- a/static/CMakeLists.txt +++ b/static/CMakeLists.txt @@ -8,6 +8,8 @@ set(JAVASCRIPT_ASSETS 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 @@ set(JAVASCRIPT_ASSETS 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 @@ set(HTML_ASSETS 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 687aa6418b..de7f47cce5 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 2678ac0a56..7575e346ce 100644 --- a/static/js/bmcApp.js +++ b/static/js/bmcApp.js @@ -130,6 +130,9 @@ app.config(['$stateProvider', '$urlRouterProvider', .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 0000000000..3554c0f507 --- /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 0000000000..09f1cadfde --- /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 |