blob: 8669c33879fc4f54a63f0e9bbc7bec444776f94c [file] [log] [blame]
Michael Davis428375e2017-08-01 15:48:34 -05001<loader loading="loading"></loader>
Derick Montague1f690f32019-06-23 12:20:17 -05002<div id="sensors" class="sensors">
3 <h1>Sensors</h1>
4 <div class="page-header">
5 <h2 class="inline">All sensors present in the system</h2>
Yoshie Muranakac86ce3c2019-06-05 12:30:30 -05006 <a ng-href="data:text/json;charset=utf-8,{{export_data}}" class="btn btn-tertiary float-right" download="{{export_name}}"><icon file="icon-export.svg"></icon>Export</a>
Derick Montague1f690f32019-06-23 12:20:17 -05007 </div>
8
9 <div>
Gunnar Mills5f0b7762018-09-25 14:10:45 -050010 <p class="content-label" aria-label="sensors filter">Filter sensors</p>
11 <div class="content__search">
12 <label for="content__search-input">Sensors Search</label>
13 <input id="content__search-input" type="text" ng-model="customSearch" ng-keydown="doSearchOnEnter($event)"/>
14 <div class="search-submit__wrapper">
15 <button class="clear-input" ng-click="clear()">&#10005;</button>
16 <input id="content__search-submit" type="submit" class="btn btn-primary content__search-submit" value="Filter" ng-click="doSearchOnClick()"/>
17 </div>
Derick Montague1f690f32019-06-23 12:20:17 -050018 </div>
Iftekharul Islama547ff42017-08-09 11:20:15 -050019
Gunnar Mills5f0b7762018-09-25 14:10:45 -050020 <div class="toggle-filter">
21 <p class="content-label">FILTER BY SEVERITY</p>
Yoshie Muranakac86ce3c2019-06-05 12:30:30 -050022 <button class="btn" ng-click="toggleSeverityAll()"
Gunnar Mills5f0b7762018-09-25 14:10:45 -050023 ng-class="selectedSeverity.all ? 'btn-primary' : 'btn-secondary'">All
24 </button>
Yoshie Muranakac86ce3c2019-06-05 12:30:30 -050025 <button class="btn" ng-click="toggleSeverity('critical')"
Gunnar Mills5f0b7762018-09-25 14:10:45 -050026 ng-class="selectedSeverity.critical ? 'btn-primary' : 'btn-secondary'">Critical
27 </button>
Yoshie Muranakac86ce3c2019-06-05 12:30:30 -050028 <button class="btn" ng-click="toggleSeverity('warning')"
Gunnar Mills5f0b7762018-09-25 14:10:45 -050029 ng-class="selectedSeverity.warning ? 'btn-primary' : 'btn-secondary'">Warning
30 </button>
Yoshie Muranakac86ce3c2019-06-05 12:30:30 -050031 <button class="btn" ng-click="toggleSeverity('normal')"
Gunnar Mills615a2f82019-04-17 14:30:39 -050032 ng-class="selectedSeverity.normal ? 'btn-primary' : 'btn-secondary'">Normal
Gunnar Mills5f0b7762018-09-25 14:10:45 -050033 </button>
34 </div>
Derick Montague1f690f32019-06-23 12:20:17 -050035 </div>
Gunnar Mills615a2f82019-04-17 14:30:39 -050036
Derick Montague1f690f32019-06-23 12:20:17 -050037 <div ng-show="filteredSensorData.length == 0">
Gunnar Mills5f0b7762018-09-25 14:10:45 -050038 <span ng-if="selectedSeverity.all">{{messages.NO_SENSOR_DATA}}</span>
39 <span ng-if="selectedSeverity.critical">{{messages.CRITICAL_NO_SENSOR_DATA}}</span>
40 <span ng-if="selectedSeverity.warning">{{messages.WARNING_NO_SENSOR_DATA}}</span>
Gunnar Mills615a2f82019-04-17 14:30:39 -050041 <span ng-if="selectedSeverity.normal">{{messages.NORMAL_NO_SENSOR_DATA}}</span>
Derick Montague1f690f32019-06-23 12:20:17 -050042 </div>
Gunnar Mills615a2f82019-04-17 14:30:39 -050043
Derick Montague1f690f32019-06-23 12:20:17 -050044 <table id="sensor-categories" class="sensors__table" cellpadding="0" cellspacing="0" ng-show="filteredSensorData.length">
45 <thead class="sensors__thead fixed-table-header">
46 <tr class="sensors__thead-row">
47 <th class="sensors__thead-cell">Sensors ({{filteredSensorData.length}})<th>
48 <th class="sensors__thead-cell">Low critical<th>
49 <th class="sensors__thead-cell">Low warning<th>
50 <th class="sensors__thead-cell sensor__heading-current">Current<th>
51 <th class="sensors__thead-cell">High warning<th>
52 <th class="sensors__thead-cell">High critical<th>
53 </tr>
54 </thead>
55 <tbody class="sensors__tbody">
56 <tr class="sensors__tbody-row" ng-repeat="sensor in data|filter:filterBySeverity|filter:filterBySearchTerms|orderBy:'+custom_order' as filteredSensorData">
57 <th class="sensors__tbody-header">
58 <span class="icon" ng-class="{'icon__critical': sensor.status == 'critical', 'icon__warning': sensor.status == 'warning', 'icon__normal': sensor.status == 'normal'}" aria-label="Sensor status: {{sensor.status}}" ></span>
59 <span>{{sensor.title}}</span>
60 </th>
61 <td class="sensors__tbody-cell">
62 <span class="sensors__tbody-cell__title">Low critical</span>
63 <span class="sensors__tbody-cell__content">
64 <span class="sensors__tbody-info">{{sensor.CriticalLow}}</span>
65 <span class="sensors__tbody-degree" ng-if="sensor.unit == 'C'">&deg;</span>
66 <span class="sensors__tbody-unit">{{sensor.unit}}</span>
67 </span>
68 </td>
69 <td class="sensors__tbody-cell">
70 <span class="sensors__tbody-cell__title">Low warning</span>
71 <span class="sensors__tbody-cell__content">
72 <span class="sensors__tbody-info">{{sensor.WarningLow}}</span>
73 <span class="sensors__tbody-degree" ng-if="sensor.unit == 'C'">&deg;</span>
74 <span class="sensors__tbody-unit">{{sensor.unit}}</span>
75 </span>
76 </td>
77 <td class="sensors__tbody-cell sensors__tbody-current" ng-class="{'sensors__tbody-current--critical': sensor.status == 'critical', 'sensors__tbody-current--warn': sensor.status == 'warning', 'sensors__tbody-current--normal': sensor.status == 'normal'}">
78 <span class="sensors__tbody-cell__title">Current</span>
79 <span class="sensors__tbody-cell__content">
80 <span class="sensors__tbody-info">{{sensor.Value}}</span>
81 <span class="sensors__tbody-degree" ng-if="sensor.unit == 'C'">&deg;</span>
82 <span class="sensors__tbody-unit">{{sensor.unit}}</span>
83 </span>
84 </td>
85 <td class="sensors__tbody-cell">
86 <span class="sensors__tbody-cell__title">High warning</span>
87 <span class="sensors__tbody-cell__content">
88 <span class="sensors__tbody-info">{{sensor.WarningHigh}}</span>
89 <span class="sensors__tbody-degree" ng-if="sensor.unit == 'C'">&deg;</span>
90 <span class="sensors__tbody-unit">{{sensor.unit}}</span>
91 </span>
92 </td>
93 <td class="sensors__tbody-cell">
94 <span class="sensors__tbody-cell__title">High critical</span>
95 <span class="sensors__tbody-cell__content">
96 <span class="sensors__tbody-info">{{sensor.CriticalHigh}}</span>
97 <span class="sensors__tbody-degree" ng-if="sensor.unit == 'C'">&deg;</span>
98 <span class="sensors__tbody-unit">{{sensor.unit}}</span>
99 </span>
100 </td>
101 </tr>
102 </tbody>
103 </table>
Gunnar Mills84e114a2018-11-14 13:44:41 -0600104</div>