1<loader loading="loading"></loader>
2<div id="sensors-overview">
3  <div class="row column">
4    <h1>Sensors</h1>
5  </div>
6  <section class="row column">
7    <div class="page-header">
8      <h2 class="inline">All Sensors information </h2>
9      <a ng-href="data:text/json;charset=utf-8,{{fullSensorsInfo}}" class="inline btn-export float-right" download="{{export_name}}">Export</a>
10    </div>
11  </section>
12  <section class="row column">
13    <p class="content-label" aria-label="sensors filter">Filter sensors</p>
14    <div class="content__search">
15      <label for="content__search-input">Sensors Search</label>
16      <input id="content__search-input" type="text" ng-model="customSearch" ng-keydown="doSearchOnEnter($event)"/>
17      <div class="search-submit__wrapper">
18        <button class="clear-input" ng-click="clear()">&#10005;</button>
19        <input id="content__search-submit" type="submit" class="btn btn-primary content__search-submit" value="Filter" ng-click="doSearchOnClick()"/>
20      </div>
21    </div>
22
23    <div class="toggle-filter">
24      <p class="content-label">FILTER BY SEVERITY</p>
25      <button class="inline first btn-primary" ng-click="toggleSeverityAll()"
26          ng-class="selectedSeverity.all ? 'btn-primary' : 'btn-secondary'">All
27      </button>
28      <button class="inline " ng-click="toggleSeverity('critical')"
29          ng-class="selectedSeverity.critical ? 'btn-primary' : 'btn-secondary'">Critical
30      </button>
31      <button class="inline" ng-click="toggleSeverity('warning')"
32          ng-class="selectedSeverity.warning ? 'btn-primary' : 'btn-secondary'">Warning
33      </button>
34      <button class="inline" ng-click="toggleSeverity('ok')"
35          ng-class="selectedSeverity.ok ? 'btn-primary' : 'btn-secondary'">OK
36      </button>
37    </div>
38    <div class="select__filter">
39      <p class="content-label">Select Component</p>
40      <div class="inline dropdown__wrapper" >
41        <button type="button" class="dropdown__button" ng-click="showCompDropdown = !showCompDropdown" ng-disabled="fullSensorsInfo.length <= 1"><strong>{{selectedComponent.Name}}</strong></button>
42        <ul class="dropdown__list inline" ng-show="showCompDropdown">
43          <li>
44            <button type="button" ng-click="selectComponent(-1);">All</button>
45          </li>
46          <li ng-repeat="component in fullSensorsInfo track by $index">
47            <button type="button" ng-click="selectComponent($index);">{{component.Name}}</button>
48          </li>
49        </ul>
50      </div>
51    </div>
52  </section>
53
54  <section class="row column" ng-show="(filteredVoltSensors.length + filteredTempSensors.length + filteredFanSensors.length) == 0">
55    <span ng-if="selectedSeverity.all">{{messages.NO_SENSOR_DATA}}</span>
56    <span ng-if="selectedSeverity.critical">{{messages.CRITICAL_NO_SENSOR_DATA}}</span>
57    <span ng-if="selectedSeverity.warning">{{messages.WARNING_NO_SENSOR_DATA}}</span>
58    <span ng-if="selectedSeverity.ok">{{messages.NORMAL_NO_SENSOR_DATA}}</span>
59  </section>
60  <section id="sensor-categories" class="table row column" ng-hide="(filteredVoltSensors.length + filteredTempSensors.length + filteredFanSensors.length) == 0">
61      <div class="table row column sensor__table" ng-hide="loading">
62        <div class="table__head fixed-table-header">
63          <div class="table__row">
64            <div class="table__cell sensor__title">Name</div>
65            <div class="table__cell sensor__status">Status</div>
66            <div class="table__cell sensor__threshold" ng-show="showThresholds">LC</div>
67            <div class="table__cell sensor__threshold" ng-show="showThresholds">LW</div>
68            <div class="table__cell sensor__reading">Reading</div>
69            <div class="table__cell sensor__threshold" ng-show="showThresholds">HW</div>
70            <div class="table__cell sensor__threshold" ng-show="showThresholds">HC</div>
71          </div>
72        </div>
73        <div class="table__body">
74          <div class="table__row" ng-repeat="sensor in (filteredVoltSensors = (sensorsInfo.Voltages | filter:filterBySearchTerms | filter:filterBySeverity))">
75            <div class="table__cell sensor__title">{{sensor.Name}}</div>
76            <div class="table__cell sensor__status sensor__{{sensor.Status.Health}}">{{sensor.Status.Health}}</div>
77            <div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.LowerThresholdCritical | number:2}} Volts</div>
78            <div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.LowerThresholdNonCritical | number:2}} Volts</div>
79            <div class="table__cell sensor__reading">{{sensor.ReadingVolts | number:2}} Volts</div>
80            <div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.UpperThresholdNonCritical | number:2}} Volts</div>
81            <div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.UpperThresholdCritical | number:2}} Volts</div>
82          </div>
83          <div class="table__row" ng-repeat="sensor in (filteredTempSensors = (sensorsInfo.Temperatures | filter:filterBySearchTerms | filter:filterBySeverity))">
84            <div class="table__cell sensor__title">{{sensor.Name}}</div>
85            <div class="table__cell sensor__status sensor__{{sensor.Status.Health}}">{{sensor.Status.Health}}</div>
86            <div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.LowerThresholdCritical | number:2}} &deg;C</div>
87            <div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.LowerThresholdNonCritical | number:2}} &deg;C</div>
88            <div class="table__cell sensor__reading">{{sensor.ReadingCelsius | number:2}} &deg;C</div>
89            <div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.UpperThresholdNonCritical | number:2}} &deg;C</div>
90            <div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.UpperThresholdCritical | number:2}} &deg;C</div>
91          </div>
92          <div class="table__row" ng-repeat="sensor in (filteredFanSensors = (sensorsInfo.Fans | filter:filterBySearchTerms | filter:filterBySeverity))">
93            <div class="table__cell sensor__title">{{sensor.Name}}</div>
94            <div class="table__cell sensor__status sensor__{{sensor.Status.Health}}">{{sensor.Status.Health}}</div>
95            <div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.LowerThresholdCritical | number:2}} {{sensor.ReadingUnits}}</div>
96            <div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.LowerThresholdNonCritical | number:2}} {{sensor.ReadingUnits}}</div>
97            <div class="table__cell sensor__reading">{{sensor.Reading | number:2}} {{sensor.ReadingUnits}}</div>
98            <div class="table__cell sensor__threshold" ng-show="showThresholds">NA</div>
99            <div class="table__cell sensor__threshold" ng-show="showThresholds">NA</div>
100          </div>
101        </div>
102      </div>
103  </section>
104</div>
105