blob: 90bdcc20b771d92bb3ebd50d836c85c0dd43031a [file] [log] [blame]
Michael Davis428375e2017-08-01 15:48:34 -05001<loader loading="loading"></loader>
Michael Davisaeedf9e2017-04-06 14:35:56 -05002<div id="sensors-overview">
Gunnar Mills5f0b7762018-09-25 14:10:45 -05003 <div class="row column">
4 <h1>Sensors</h1>
5 </div>
6 <section class="row column">
7 <div class="page-header">
Gunnar Mills615a2f82019-04-17 14:30:39 -05008 <h2 class="inline">All sensors present in the system</h2>
Yoshie Muranakac86ce3c2019-06-05 12:30:30 -05009 <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>
Gunnar Mills5f0b7762018-09-25 14:10:45 -050010 </div>
11 </section>
12 <section class="row column">
Gunnar Mills615a2f82019-04-17 14:30:39 -050013 <!-- search -->
Gunnar Mills5f0b7762018-09-25 14:10:45 -050014 <p class="content-label" aria-label="sensors filter">Filter sensors</p>
15 <div class="content__search">
16 <label for="content__search-input">Sensors Search</label>
17 <input id="content__search-input" type="text" ng-model="customSearch" ng-keydown="doSearchOnEnter($event)"/>
18 <div class="search-submit__wrapper">
19 <button class="clear-input" ng-click="clear()">&#10005;</button>
20 <input id="content__search-submit" type="submit" class="btn btn-primary content__search-submit" value="Filter" ng-click="doSearchOnClick()"/>
21 </div>
Gunnar Mills615a2f82019-04-17 14:30:39 -050022 </div> <!-- end search -->
Iftekharul Islama547ff42017-08-09 11:20:15 -050023
Gunnar Mills5f0b7762018-09-25 14:10:45 -050024 <div class="toggle-filter">
25 <p class="content-label">FILTER BY SEVERITY</p>
Yoshie Muranakac86ce3c2019-06-05 12:30:30 -050026 <button class="btn" ng-click="toggleSeverityAll()"
Gunnar Mills5f0b7762018-09-25 14:10:45 -050027 ng-class="selectedSeverity.all ? 'btn-primary' : 'btn-secondary'">All
28 </button>
Yoshie Muranakac86ce3c2019-06-05 12:30:30 -050029 <button class="btn" ng-click="toggleSeverity('critical')"
Gunnar Mills5f0b7762018-09-25 14:10:45 -050030 ng-class="selectedSeverity.critical ? 'btn-primary' : 'btn-secondary'">Critical
31 </button>
Yoshie Muranakac86ce3c2019-06-05 12:30:30 -050032 <button class="btn" ng-click="toggleSeverity('warning')"
Gunnar Mills5f0b7762018-09-25 14:10:45 -050033 ng-class="selectedSeverity.warning ? 'btn-primary' : 'btn-secondary'">Warning
34 </button>
Yoshie Muranakac86ce3c2019-06-05 12:30:30 -050035 <button class="btn" ng-click="toggleSeverity('normal')"
Gunnar Mills615a2f82019-04-17 14:30:39 -050036 ng-class="selectedSeverity.normal ? 'btn-primary' : 'btn-secondary'">Normal
Gunnar Mills5f0b7762018-09-25 14:10:45 -050037 </button>
38 </div>
Gunnar Mills615a2f82019-04-17 14:30:39 -050039
Gunnar Mills84e114a2018-11-14 13:44:41 -060040 </section>
Michael Davisaeedf9e2017-04-06 14:35:56 -050041
Gunnar Mills615a2f82019-04-17 14:30:39 -050042 <section class="row column" ng-show="filteredSensorData.length == 0">
43 <!-- message -->
Gunnar Mills5f0b7762018-09-25 14:10:45 -050044 <span ng-if="selectedSeverity.all">{{messages.NO_SENSOR_DATA}}</span>
45 <span ng-if="selectedSeverity.critical">{{messages.CRITICAL_NO_SENSOR_DATA}}</span>
46 <span ng-if="selectedSeverity.warning">{{messages.WARNING_NO_SENSOR_DATA}}</span>
Gunnar Mills615a2f82019-04-17 14:30:39 -050047 <span ng-if="selectedSeverity.normal">{{messages.NORMAL_NO_SENSOR_DATA}}</span>
48 <!-- end message -->
Gunnar Mills5f0b7762018-09-25 14:10:45 -050049 </section>
Gunnar Mills615a2f82019-04-17 14:30:39 -050050
51 <section id="sensor-categories" class="row column" ng-show="filteredSensorData.length">
52 <div class="row column header-row fixed-table-header">
53 <div class="column large-12 header__actions-bar">
54 <p class="inline sensor__title">Sensors ({{filteredSensorData.length}})</p>
55 <p class="inline sensor__reading">Low critical</p>
56 <p class="inline sensor__reading">Low warning</p>
57 <p class="inline sensor__reading sensor__heading-current">Current</p>
58 <p class="inline sensor__reading">High warning</p>
59 <p class="inline sensor__reading">High critical</p>
Gunnar Mills5f0b7762018-09-25 14:10:45 -050060 </div>
Gunnar Mills615a2f82019-04-17 14:30:39 -050061 </div>
62 <!-- sensor -->
63 <div class="sensor__readings-row" ng-repeat="sensor in data|filter:filterBySeverity|filter:filterBySearchTerms|orderBy:'+custom_order' as filteredSensorData">
64 <p class="inline sensor__title"><span class="icon" ng-class="{'icon__critical': sensor.status == 'critical', 'icon__warning': sensor.status == 'warning', 'icon__normal': sensor.status == 'normal'}" aria-label="sensor.status" ></span>{{sensor.title}}</p>
65 <p class="inline sensor__reading"><span class="sensor__label">Low critical</span>{{sensor.CriticalLow}}<span class="content-label">{{sensor.unit}}<span ng-if="sensor.unit == 'C'">&deg;</span></p>
66 <p class="inline sensor__reading"><span class="sensor__label">Low warning</span>{{sensor.WarningLow}}<span class="content-label">{{sensor.unit}}<span ng-if="sensor.unit == 'C'">&deg;</span></p>
67 <p class="inline sensor__reading sensor__current" ng-class="{'sensor__critical': sensor.status == 'critical', 'sensor__warn': sensor.status == 'warning', 'sensor__normal': sensor.status == 'normal'}"><span class="sensor__label">Current</span>{{sensor.Value}}<span class="content-label">{{sensor.unit}}<span ng-if="sensor.unit == 'C'">&deg;</span></span></p>
68 <p class="inline sensor__reading"><span class="sensor__label">High warning</span>{{sensor.WarningHigh}}<span class="content-label">{{sensor.unit}}<span ng-if="sensor.unit == 'C'">&deg;</span></p>
69 <p class="inline sensor__reading"><span class="sensor__label">High critical</span>{{sensor.CriticalHigh}}<span class="content-label">{{sensor.unit}}<span ng-if="sensor.unit == 'C'">&deg;</span></p>
70 </div>
Gunnar Mills5f0b7762018-09-25 14:10:45 -050071 </section>
Gunnar Mills84e114a2018-11-14 13:44:41 -060072</div>