Change navigation structure
Change-Id: I12c819293ce1eda188dc9f257ae9370f1b73cb18
Signed-off-by: Iftekharul Islam <iislam@us.ibm.com>
diff --git a/app/server-health/controllers/diagnostics-controller.html b/app/server-health/controllers/diagnostics-controller.html
new file mode 100644
index 0000000..04469f2
--- /dev/null
+++ b/app/server-health/controllers/diagnostics-controller.html
@@ -0,0 +1,5 @@
+<div id=diagnostics">
+ <div class="row column">
+ <h1>Diagnostics</h1>
+ </div>
+</div>
\ No newline at end of file
diff --git a/app/server-health/controllers/diagnostics-controller.js b/app/server-health/controllers/diagnostics-controller.js
new file mode 100644
index 0000000..1613d8d
--- /dev/null
+++ b/app/server-health/controllers/diagnostics-controller.js
@@ -0,0 +1,26 @@
+/**
+ * Controller for server
+ *
+ * @module app/serverHealth
+ * @exports diagnosticsController
+ * @name diagnosticsController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.serverHealth')
+ .controller('diagnosticsController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $window, APIUtils, dataService){
+ $scope.dataService = dataService;
+ }
+ ]
+ );
+
+})(angular);
diff --git a/app/server-health/controllers/fru-information-controller.html b/app/server-health/controllers/fru-information-controller.html
new file mode 100644
index 0000000..ce43386
--- /dev/null
+++ b/app/server-health/controllers/fru-information-controller.html
@@ -0,0 +1,5 @@
+<div id="fru-information-server">
+ <div class="row column">
+ <h1>fru information</h1>
+ </div>
+</div>
\ No newline at end of file
diff --git a/app/server-health/controllers/inventory-controller.html b/app/server-health/controllers/inventory-controller.html
index 2d2856a..2941aaa 100644
--- a/app/server-health/controllers/inventory-controller.html
+++ b/app/server-health/controllers/inventory-controller.html
@@ -16,43 +16,41 @@
<input id="content__search-input" type="text" placeholder="Filter hardware components"/>
<input id="content__search-submit" type="submit" class="btn btn-primary" value="Submit"/>
</div>
- <div class="toggle-filter">
- <button class="inline first" ng-click="toggleall = !toggleall"
- ng-class="toggleall ? 'btn-primary' : 'btn-secondary'">All
- </button>
- <button class="inline " ng-click="togglehigh = !togglehigh"
- ng-class="togglehigh ? 'btn-primary' : 'btn-secondary'">High
- </button>
- <button class="inline" ng-click="togglemed = !togglemed"
- ng-class="togglemed ? 'btn-primary' : 'btn-secondary'">Medium
- </button>
- <button class="inline last" ng-click="togglelow = !togglelow"
- ng-class="togglelow ? 'btn-primary' : 'btn-secondary'">Low
- </button>
- </div>
+ <!--<div class="toggle-filter">-->
+ <!--<button class="inline first" ng-click="toggleall = !toggleall"-->
+ <!--ng-class="toggleall ? 'btn-primary' : 'btn-secondary'">All-->
+ <!--</button>-->
+ <!--<button class="inline " ng-click="togglehigh = !togglehigh"-->
+ <!--ng-class="togglehigh ? 'btn-primary' : 'btn-secondary'">High-->
+ <!--</button>-->
+ <!--<button class="inline" ng-click="togglemed = !togglemed"-->
+ <!--ng-class="togglemed ? 'btn-primary' : 'btn-secondary'">Medium-->
+ <!--</button>-->
+ <!--<button class="inline last" ng-click="togglelow = !togglelow"-->
+ <!--ng-class="togglelow ? 'btn-primary' : 'btn-secondary'">Low-->
+ <!--</button>-->
+ <!--</div>-->
</section> <!-- end filter -->
<section class="row column">
- <div id="back-link">
- <a href="#/overview/inventory-overview">Back to Inventory overview</a>
+ <div class="back-link">
+ <a href="#/server-health/inventory-overview">Back to Inventory overview</a>
</div>
</section>
<section id="inventory__details" class="row">
<div class="row column header-row header__actions-bar">
- <div class="column small-12 large-3 ">
- <p class="inline inventory__heading inventory__device-col"><span
- class="inline priority-tag-circ high-priority" aria-label="High Priority"></span>CPU cores (6)
- </p>
+ <div class="column small-12">
+ <p class="h2">CPU cores (6)</p>
</div>
- <div class="column hide-for-medium-only large-3 ">
- <p class="inline inventory__heading inventory__function-col inv-active">Active</p>
- </div>
- <div class="column hide-for-medium-only large-3 ">
- <p class="inline inventory__heading inventory__present-col inv-present">Present</p>
- </div>
- <div class="column hide-for-medium-only large-2 ">
- <p class="inline inventory__heading inventory__state-col inventory__critical-label" aria-label="High - Emergency">High - Emergency</p>
- </div>
- <div class="column small-4 large-1 "></div>
+ <!--<div class="column hide-for-medium-only large-3 ">-->
+ <!--<p class="inline inventory__heading inventory__function-col inv-active">Active</p>-->
+ <!--</div>-->
+ <!--<div class="column hide-for-medium-only large-3 ">-->
+ <!--<p class="inline inventory__heading inventory__present-col inv-present">Present</p>-->
+ <!--</div>-->
+ <!--<div class="column hide-for-medium-only large-2 ">-->
+ <!--<p class="inline inventory__heading inventory__state-col inventory__critical-label" aria-label="High - Emergency">High - Emergency</p>-->
+ <!--</div>-->
+ <!--<div class="column small-4 large-1 "></div>-->
</div>
<!-- Inventory Item -->
@@ -71,7 +69,7 @@
<p class="content-label">Serial Number</p>
<p class="courier-bold">1230123ab</p>
</div>
- <div class="column small-12 small-4 large-2">
+ <div class="column small-12 large-2">
<p class="content-label">Model Number</p>
<p class="courier-bold">86399-2201</p>
</div>
@@ -82,11 +80,11 @@
<div class="column large-3 hide-for-medium-only">
</div>
- <div class="column large-3 small-12">
+ <div class="column small-12 large-3">
<p class="content-label">Manufacturer</p>
<p class="courier-bold">IBM</p>
</div>
- <div class="column large-3 small-12">
+ <div class="column small-12 large-3">
<p class="content-label">CCIN</p>
<p class="courier-bold">2BE3</p>
</div>
@@ -138,7 +136,7 @@
org.open_power.Error.Host.Event.Event.Cras.amet
</p>
<p class="column small-12 large-2">
- <a href="#/overviewlog"> View event log</a>
+ <a href="#/server-health/event-log"> View event log</a>
</p>
</div>
</div>
@@ -227,7 +225,7 @@
org.open_power.Error.Host.Event.Event.Cras.amet
</p>
<p class="column small-12 large-2">
- <a href="#/overviewlog"> View event log</a>
+ <a href="#/server-health/event-log"> View event log</a>
</p>
</div>
</div>
@@ -316,7 +314,7 @@
org.open_power.Error.Host.Event.Event.Cras.amet
</p>
<p class="column small-12 large-2">
- <a href="#/overviewlog"> View event log</a>
+ <a href="#/server-health/event-log"> View event log</a>
</p>
</div>
</div>
@@ -405,7 +403,7 @@
org.open_power.Error.Host.Event.Event.Cras.amet
</p>
<p class="column small-12 large-2">
- <a href="#/overviewlog"> View event log</a>
+ <a href="#/server-health/event-log"> View event log</a>
</p>
</div>
</div>
@@ -477,7 +475,7 @@
<div class="column large-9">
<p class="content-label">Unit Indicator</p><br />
<div class="toggle inline">
- <input id="toggle__switch-round"
+ <input title="toggle-switch"
class="toggle-switch toggle-switch__round-flat"
type="checkbox"
tabindex="0"
@@ -494,7 +492,7 @@
org.open_power.Error.Host.Event.Event.Cras.amet
</p>
<p class="column small-12 large-2">
- <a href="#/overviewlog"> View event log</a>
+ <a href="#/server-health/event-log"> View event log</a>
</p>
</div>
</div>
@@ -566,7 +564,7 @@
<div class="column large-9">
<p class="content-label">Unit Indicator</p><br />
<div class="toggle inline">
- <input id="toggle__switch-round"
+ <input title="toggle-switch"
class="toggle-switch toggle-switch__round-flat"
type="checkbox"
tabindex="0"
@@ -583,7 +581,7 @@
org.open_power.Error.Host.Event.Event.Cras.amet
</p>
<p class="column small-12 large-2">
- <a href="#/overviewlog"> View event log</a>
+ <a href="#/server-health/event-log"> View event log</a>
</p>
</div>
</div>
diff --git a/app/server-health/controllers/inventory-controller.js b/app/server-health/controllers/inventory-controller.js
new file mode 100644
index 0000000..7196f7b
--- /dev/null
+++ b/app/server-health/controllers/inventory-controller.js
@@ -0,0 +1,29 @@
+/**
+ * Controller for server
+ *
+ * @module app/serverHealth
+ * @exports inventoryController
+ * @name inventoryController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.serverHealth')
+ .controller('inventoryController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $window, APIUtils, dataService){
+ $scope.dataService = dataService;
+
+ // Force to top of page when viewing single group
+ $window.scrollTo(0, 0);
+ }
+ ]
+ );
+
+})(angular);
diff --git a/app/server-health/controllers/inventory-overview-controller.html b/app/server-health/controllers/inventory-overview-controller.html
index 1ad0357..977be6b 100644
--- a/app/server-health/controllers/inventory-overview-controller.html
+++ b/app/server-health/controllers/inventory-overview-controller.html
@@ -16,20 +16,20 @@
id="content__search-submit" type="submit" class="btn btn-secondary"
value="Submit"/>
</div>
- <div class="toggle-filter">
- <button class="inline first" ng-click="toggleall = !toggleall"
- ng-class="toggleall ? 'btn-primary' : 'btn-secondary'">All
- </button>
- <button class="inline " ng-click="togglehigh = !togglehigh"
- ng-class="togglehigh ? 'btn-primary' : 'btn-secondary'">High
- </button>
- <button class="inline" ng-click="togglemed = !togglemed"
- ng-class="togglemed ? 'btn-primary' : 'btn-secondary'">Medium
- </button>
- <button class="inline last" ng-click="togglelow = !togglelow"
- ng-class="togglelow ? 'btn-primary' : 'btn-secondary'">Low
- </button>
- </div>
+ <!--<div class="toggle-filter">-->
+ <!--<button class="inline first" ng-click="toggleall = !toggleall"-->
+ <!--ng-class="toggleall ? 'btn-primary' : 'btn-secondary'">All-->
+ <!--</button>-->
+ <!--<button class="inline " ng-click="togglehigh = !togglehigh"-->
+ <!--ng-class="togglehigh ? 'btn-primary' : 'btn-secondary'">High-->
+ <!--</button>-->
+ <!--<button class="inline" ng-click="togglemed = !togglemed"-->
+ <!--ng-class="togglemed ? 'btn-primary' : 'btn-secondary'">Medium-->
+ <!--</button>-->
+ <!--<button class="inline last" ng-click="togglelow = !togglelow"-->
+ <!--ng-class="togglelow ? 'btn-primary' : 'btn-secondary'">Low-->
+ <!--</button>-->
+ <!--</div>-->
</section>
<!-- end search -->
<section id="inventory-categories" class="row column">
@@ -56,7 +56,7 @@
<p class="inline inventory__present-col inv-present">Present</p>
<p class="inline inventory__state-col"> </p>
</a>
- <a class="inventory__group" href="#/overview/inventory">
+ <a class="inventory__group" href="#/server-health/inventory">
<p class="inline inventory__device-col"><span class="inline priority-tag-circ high-priority" aria-label="High Priority"></span>CPU cores (6)</p>
<p class="inline inventory__function-col inv-active">Active</p>
<p class="inline inventory__present-col inv-present">Present</p>
diff --git a/app/server-health/controllers/inventory-overview-controller.js b/app/server-health/controllers/inventory-overview-controller.js
new file mode 100644
index 0000000..3eda37b
--- /dev/null
+++ b/app/server-health/controllers/inventory-overview-controller.js
@@ -0,0 +1,26 @@
+/**
+ * Controller for server
+ *
+ * @module app/serverHealth
+ * @exports inventoryOverviewController
+ * @name inventoryOverviewController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.serverHealth')
+ .controller('inventoryOverviewController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $window, APIUtils, dataService){
+ $scope.dataService = dataService;
+ }
+ ]
+ );
+
+})(angular);
diff --git a/app/server-health/controllers/power-consumption-controller.html b/app/server-health/controllers/power-consumption-controller.html
new file mode 100644
index 0000000..7dfdf89
--- /dev/null
+++ b/app/server-health/controllers/power-consumption-controller.html
@@ -0,0 +1,5 @@
+<div id="power-consumption">
+ <div class="row column">
+ <h1>Power consumption</h1>
+ </div>
+</div>
\ No newline at end of file
diff --git a/app/server-health/controllers/power-consumption-controller.js b/app/server-health/controllers/power-consumption-controller.js
new file mode 100644
index 0000000..893ca31
--- /dev/null
+++ b/app/server-health/controllers/power-consumption-controller.js
@@ -0,0 +1,26 @@
+/**
+ * Controller for server
+ *
+ * @module app/serverHealth
+ * @exports powerConsumptionController
+ * @name powerConsumptionController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.serverHealth')
+ .controller('powerConsumptionController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $window, APIUtils, dataService){
+ $scope.dataService = dataService;
+ }
+ ]
+ );
+
+})(angular);
diff --git a/app/server-health/controllers/sensors-controller.html b/app/server-health/controllers/sensors-controller.html
new file mode 100644
index 0000000..79c9359
--- /dev/null
+++ b/app/server-health/controllers/sensors-controller.html
@@ -0,0 +1,173 @@
+<div id="sensors">
+ <div class="row column">
+ <h1>Fan Speed Sensors</h1>
+ </div>
+ <section class="row column">
+ <div class="page-header">
+ <h2 class="inline h4">Sensors present in the system</h2>
+ <button class="inline btn-export float-right">Export</button>
+ </div>
+ </section>
+
+ <!-- Filters -->
+ <section class="row column">
+ <!-- search -->
+ <div class="content__search">
+ <label for="content__search-input">Sensors Search</label>
+ <input id="content__search-input" type="text" placeholder="Filter issues"/>
+ <input id="content__search-submit" type="submit" class="btn btn-secondary" value="Submit"/>
+ </div>
+ <div class="toggle-filter">
+ <button class="inline first btn-primary">All
+ </button>
+ <button class="inline " ng-click="togglehigh = !togglehigh"
+ ng-class="togglehigh ? 'btn-primary' : 'btn-secondary'">Critical
+ </button>
+ <button class="inline" ng-click="togglemed = !togglemed"
+ ng-class="togglemed ? 'btn-primary' : 'btn-secondary'">Warning
+ </button>
+ <button class="inline last" ng-click="togglelow = !togglelow"
+ ng-class="togglelow ? 'btn-primary' : 'btn-secondary'">Normal
+ </button>
+ </div>
+ </section> <!-- end filter -->
+
+ <section class="row column">
+ <div id="back-link">
+ <a href="#/server-health/sensors-overview">Back to Sensor Overview</a>
+ </div>
+ </section>
+
+ <section id="sensor__details" class="row column">
+ <div class="row column header-row">
+ <div class="column small-10 large-11 header__actions-bar">
+ <p class="inline priority-tag-circ high-priority" aria-label="High Priority"></p>
+ <p class="inline sensor__heading sensor__category">Fan speed (RPMs)</p>
+ <p class="inline sensor__heading middle">Reading</p>
+ <p class="inline float-right sensor__heading right">State</p>
+ </div>
+ <div class="column small-2 large-1 sensor__heading trigger-col"></div>
+ </div>
+
+ <!-- Sensor -->
+ <div class="row column accord-row" ng-class="{'active': sensors__metadatarow, 'selected': sensors__selected}">
+ <div class="row">
+ <div class="column small-10 large-11 sensor__info" ng-click="sensors__metadatarow = ! sensors__metadatarow">
+ <p class="inline priority-tag-circ high-priority" aria-label="High Priority"></p>
+ <p class="inline sensor__title">Fan Speed 1</p>
+ <p class="inline sensor__reading">6200 <span>rpms</span></p>
+ <p class="inline float-right sensor__critical-label">Critical</p>
+ </div>
+ <div class="column small-2 large-1">
+ <button class="accord-trigger" ng-class="{'active': sensors__metadatarow}" ng-click="sensors__metadatarow = ! sensors__metadatarow"></button>
+ </div>
+ </div>
+ <div class="row sensors__metadata-row" ng-class="{'active': sensors__metadatarow}">
+ <div class="column small-12">
+ <div class="threshold-chart__wrapper">
+ <span class="threshold__label low">Low</span>
+ <div class="threshold-chart">
+ <span class="threshold__marker thresh__high-critical" style="left: 90%;"><span class="threshold__value">6200 RPMs</span></span>
+ <span class="threshold thresh__low-critical"></span>
+ <span class="threshold thresh__low-warn"></span>
+ <span class="threshold thresh__normal"></span>
+ <span class="threshold thresh__high-warn"></span>
+ <span class="threshold thresh__high-critical"></span>
+ </div>
+ <span class="threshold__label high">High</span>
+ </div>
+ </div>
+
+ <div class="column small-12 large-6">
+ <p class="h5 content-header">Associated Events</p>
+ <a href="#/overview/log">View 5 events related to Fan 1</a>
+ </div>
+ <div class="column small-12 large-6">
+ <p class="h5 content-header">Associated Hardware</p>
+ <a href="">Chassis0</a>
+ </div>
+ </div>
+ </div>
+
+ <!-- Sensor -->
+ <div class="row column accord-row" ng-class="{'active': sensors__metadatarow2, 'selected': sensors__selected}">
+ <div class="row">
+ <div class="column small-10 large-11 sensor__info" ng-click="sensors__metadatarow2 = ! sensors__metadatarow2">
+ <p class="inline priority-tag-circ normal-priority" aria-label="Normal Priority"></p>
+ <p class="inline sensor__title">Fan Speed 2</p>
+ <p class="inline sensor__reading">4600 <span>rpms</span></p>
+ </div>
+ <div class="column small-2 large-1">
+ <button class="accord-trigger" ng-class="{'active': sensors__metadatarow2}" ng-click="sensors__metadatarow2 = ! sensors__metadatarow2"></button>
+ </div>
+ </div>
+ <div class="row sensors__metadata-row" ng-class="{'active': sensors__metadatarow2}">
+ <div class="column small-12">
+ <div class="threshold-chart__wrapper">
+ <span class="threshold__label low">Low</span>
+ <div class="threshold-chart">
+ <span class="threshold__marker thresh__normal" style="left: 40%;"><span class="threshold__value">4600 RPMs</span></span>
+ <span class="threshold thresh__low-critical"></span>
+ <span class="threshold thresh__low-warn"></span>
+ <span class="threshold thresh__normal"></span>
+ <span class="threshold thresh__high-warn"></span>
+ <span class="threshold thresh__high-critical"></span>
+ </div>
+ <span class="threshold__label high">High</span>
+ </div>
+ </div>
+
+ <div class="column small-12 large-6">
+ <p class="h5 content-header">Associated Events</p>
+ <a href="#/overview/log">View 5 events related to Fan 1</a>
+ </div>
+ <div class="column small-12 large-6">
+ <p class="h5 content-header">Associated Hardware</p>
+ <p>None</p>
+ </div>
+ </div>
+ </div>
+
+ <!-- Sensor -->
+ <div class="row column accord-row" ng-class="{'active': sensors__metadatarow3, 'selected': sensors__selected}">
+ <div class="row">
+ <div class="column small-10 large-11 sensor__info" ng-click="sensors__metadatarow3 = ! sensors__metadatarow3">
+ <p class="inline priority-tag-circ warn-priority" aria-label="Medium Priority"></p>
+ <p class="inline sensor__title">Fan Speed 3</p>
+ <p class="inline sensor__reading">1200 <span>rpms</span></p>
+ <p class="inline float-right sensor__warning-label">warning</p>
+ </div>
+ <div class="column small-2 large-1">
+ <button class="accord-trigger" ng-class="{'active': sensors__metadatarow3}"
+ ng-click="sensors__metadatarow3 = ! sensors__metadatarow3"></button>
+ </div>
+ </div>
+ <div class="row sensors__metadata-row" ng-class="{'active': sensors__metadatarow3}">
+ <div class="column small-12">
+ <div class="threshold-chart__wrapper">
+ <span class="threshold__label low">Low</span>
+ <div class="threshold-chart">
+ <span class="threshold__marker thresh__low-warn" style="left: 15%;"><span class="threshold__value">1200 RPMs</span></span>
+ <span class="threshold thresh__low-critical"></span>
+ <span class="threshold thresh__low-warn"></span>
+ <span class="threshold thresh__normal"></span>
+ <span class="threshold thresh__high-warn"></span>
+ <span class="threshold thresh__high-critical"></span>
+ </div>
+ <span class="threshold__label high">High</span>
+ </div>
+ </div>
+
+ <div class="column small-12 large-6">
+ <p class="h5 content-header">Associated Events</p>
+ <a href="#/overview/log">View 5 events related to Fan 1</a>
+ </div>
+ <div class="column small-12 large-6">
+ <p class="h5 content-header">Associated Hardware</p>
+ <a href="">Chassis0</a>
+ </div>
+ </div>
+ </div>
+ </section>
+ <paginate ng-include="paginate"></paginate>
+</div> <!-- end event log -->
diff --git a/app/server-health/controllers/sensors-controller.js b/app/server-health/controllers/sensors-controller.js
new file mode 100644
index 0000000..aaa5aa6
--- /dev/null
+++ b/app/server-health/controllers/sensors-controller.js
@@ -0,0 +1,32 @@
+/**
+ * Controller for sensors
+ *
+ * @module app/serverHealth
+ * @exports sensorsController
+ * @name sensorsController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.overview')
+ .controller('sensorsController', [
+ '$scope',
+ '$log',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $log, $window, APIUtils, dataService, userModel){
+ $scope.dataService = dataService;
+
+ $scope.dropdown_selected = false;
+
+ $scope.$log = $log;
+ $scope.message = 'Hello World!';
+ }
+ ]
+ );
+
+})(angular);
\ No newline at end of file
diff --git a/app/server-health/controllers/sensors-overview-controller.html b/app/server-health/controllers/sensors-overview-controller.html
new file mode 100644
index 0000000..10ee4fa
--- /dev/null
+++ b/app/server-health/controllers/sensors-overview-controller.html
@@ -0,0 +1,50 @@
+<div id="sensors-overview">
+ <div class="row column">
+ <h1>Sensors Data</h1>
+ </div>
+ <section class="row column">
+ <div class="page-header">
+ <h2 class="inline h4">Sensors present in the system</h2>
+ <button class="inline btn-export float-right">Export</button>
+ </div>
+ </section>
+
+ <section class="row column">
+ <!-- search -->
+ <div class="content__search">
+ <label for="content__search-input">Event Log Search</label>
+ <input id="content__search-input" type="text" placeholder="Filter issues"/>
+ <input id="content__search-submit" type="submit" class="btn btn-secondary" value="Submit"/>
+ </div>
+ <div class="toggle-filter">
+ <button class="inline first btn-primary">All
+ </button>
+ <button class="inline " ng-click="togglehigh = !togglehigh"
+ ng-class="togglehigh ? 'btn-primary' : 'btn-secondary'">Critical
+ </button>
+ <button class="inline" ng-click="togglemed = !togglemed"
+ ng-class="togglemed ? 'btn-primary' : 'btn-secondary'">Warning
+ </button>
+ <button class="inline last" ng-click="togglelow = !togglelow"
+ ng-class="togglelow ? 'btn-primary' : 'btn-secondary'">Normal
+ </button>
+ </div>
+
+ </section> <!-- end search -->
+
+ <section id="sensor-categories" class="row column">
+ <div class="row column header-row">
+ <div class="column large-12 header__actions-bar">
+ <p class="inline sensor__heading sensor__category">Sensors</p>
+ <p class="inline float-right sensor__heading right">State</p>
+ </div>
+ </div>
+ <a class="sensor__group" href="">All Sensors (50)</a>
+ <a class="sensor__group" href=""><span class="inline priority-tag-circ normal-priority" aria-label="Normal Priority"></span>Temperature (20)</a>
+ <a class="sensor__group" href="#/server-health/sensors"> <span class="inline priority-tag-circ high-priority" aria-label="High Priority"></span>Fan Speed (15) <p class="inline float-right sensor__critical-label">Critical</p></a>
+ <a class="sensor__group" href=""><span class="inline priority-tag-circ normal-priority" aria-label="Normal Priority"></span>Altitude (1)</a>
+ <a class="sensor__group" href=""><span class="inline priority-tag-circ normal-priority" aria-label="Normal Priority"></span>Voltage (6)</a>
+ <a class="sensor__group" href=""><span class="inline priority-tag-circ warn-priority" aria-label="Warning Priority"></span>Current (5) <p class="inline float-right sensor__warning-label">Warning</p></a>
+ <a class="sensor__group" href=""><span class="inline priority-tag-circ normal-priority"></span>Power (3)</a>
+ </section>
+</div>
\ No newline at end of file
diff --git a/app/server-health/controllers/sensors-overview-controller.js b/app/server-health/controllers/sensors-overview-controller.js
new file mode 100644
index 0000000..1b7234d
--- /dev/null
+++ b/app/server-health/controllers/sensors-overview-controller.js
@@ -0,0 +1,32 @@
+/**
+ * Controller for sensors-overview
+ *
+ * @module app/serverHealth
+ * @exports sensorsOverviewController
+ * @name sensorsOverviewController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.overview')
+ .controller('sensorsOverviewController', [
+ '$scope',
+ '$log',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $log, $window, APIUtils, dataService, userModel){
+ $scope.dataService = dataService;
+
+ $scope.dropdown_selected = false;
+
+ $scope.$log = $log;
+ $scope.message = 'Hello World!';
+ }
+ ]
+ );
+
+})(angular);
\ No newline at end of file
diff --git a/app/server-health/controllers/unit-id-controller.html b/app/server-health/controllers/unit-id-controller.html
new file mode 100644
index 0000000..53bd242
--- /dev/null
+++ b/app/server-health/controllers/unit-id-controller.html
@@ -0,0 +1,29 @@
+<div id="uid-switch">
+ <div class="row column">
+ <h1>Unit ID Indicator</h1>
+ </div>
+
+ <div class="row column">
+ <h2 class="h4">Unit ID control</h2>
+ </div>
+
+ <div class="row column" ng-class="{disabled: dataService.server_unreachable || dataService.loading}">
+ <div class="btm-border-grey">
+ <div class="toggle inline">
+ <input id="toggle__switch-round"
+ class="toggle-switch toggle-switch__round-flat"
+ type="checkbox"
+ tabindex="0"
+ ng-click="toggleLED()"
+ ng-checked="dataService.LED_state == 'on'"
+ ng-disabled="dataService.server_unreachable"
+ >
+ <label for="toggle__switch-round" tabindex="0">Unit ID indicator is <span class="uid-switch__status">{{dataService.LED_state}}</span></label>
+ </div>
+ <div class="uid-switch__label inline">
+ <p>Unit ID indicator is <span class="uid-switch__status">{{dataService.LED_state}}</span></p>
+ <p>Control unit indicator to identify server unit.</p>
+ </div>
+ </div>
+ </div>
+</div>
\ No newline at end of file
diff --git a/app/server-health/controllers/unit-id-controller.js b/app/server-health/controllers/unit-id-controller.js
new file mode 100644
index 0000000..5494c61
--- /dev/null
+++ b/app/server-health/controllers/unit-id-controller.js
@@ -0,0 +1,46 @@
+/**
+ * Controller for unit Id
+ *
+ * @module app/serverHealth
+ * @exports unitIdController
+ * @name unitIdController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.serverHealth')
+ .controller('unitIdController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $window, APIUtils, dataService, userModel){
+ $scope.dataService = dataService;
+
+ $scope.getLEDState = function(){
+ APIUtils.getLEDState(function(state){
+ if(state == APIUtils.LED_STATE.on){
+ dataService.LED_state = APIUtils.LED_STATE_TEXT.on;
+ }else{
+ dataService.LED_state = APIUtils.LED_STATE_TEXT.off;
+ }
+ });
+ }
+ $scope.toggleLED = function(){
+ var toggleState = (dataService.LED_state == APIUtils.LED_STATE_TEXT.on) ?
+ APIUtils.LED_STATE.off : APIUtils.LED_STATE.on;
+ dataService.LED_state = (dataService.LED_state == APIUtils.LED_STATE_TEXT.on) ?
+ APIUtils.LED_STATE_TEXT.off : APIUtils.LED_STATE_TEXT.on;
+ APIUtils.setLEDState(toggleState, function(status){
+ });
+ }
+
+ $scope.getLEDState();
+ }
+ ]
+ );
+
+})(angular);