Michael Davis | 428375e | 2017-08-01 15:48:34 -0500 | [diff] [blame] | 1 | <loader loading="loading"></loader> |
Derick Montague | 1f690f3 | 2019-06-23 12:20:17 -0500 | [diff] [blame] | 2 | <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 Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 6 | <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 Montague | 1f690f3 | 2019-06-23 12:20:17 -0500 | [diff] [blame] | 7 | </div> |
| 8 | |
| 9 | <div> |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 10 | <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"> |
Dixsie Wolmers | db1e89e | 2019-09-09 13:21:12 -0500 | [diff] [blame] | 15 | <button class="btn" type="button" aria-label="clear filter" ng-click="clear()"> |
| 16 | <icon file="icon-close.svg" aria-hidden="true"></icon> |
| 17 | </button> |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 18 | <input id="content__search-submit" type="submit" class="btn btn-primary content__search-submit" value="Filter" ng-click="doSearchOnClick()"/> |
| 19 | </div> |
Derick Montague | 1f690f3 | 2019-06-23 12:20:17 -0500 | [diff] [blame] | 20 | </div> |
Iftekharul Islam | a547ff4 | 2017-08-09 11:20:15 -0500 | [diff] [blame] | 21 | |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 22 | <div class="toggle-filter"> |
| 23 | <p class="content-label">FILTER BY SEVERITY</p> |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 24 | <button class="btn" ng-click="toggleSeverityAll()" |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 25 | ng-class="selectedSeverity.all ? 'btn-primary' : 'btn-secondary'">All |
| 26 | </button> |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 27 | <button class="btn" ng-click="toggleSeverity('critical')" |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 28 | ng-class="selectedSeverity.critical ? 'btn-primary' : 'btn-secondary'">Critical |
| 29 | </button> |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 30 | <button class="btn" ng-click="toggleSeverity('warning')" |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 31 | ng-class="selectedSeverity.warning ? 'btn-primary' : 'btn-secondary'">Warning |
| 32 | </button> |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 33 | <button class="btn" ng-click="toggleSeverity('normal')" |
Gunnar Mills | 615a2f8 | 2019-04-17 14:30:39 -0500 | [diff] [blame] | 34 | ng-class="selectedSeverity.normal ? 'btn-primary' : 'btn-secondary'">Normal |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 35 | </button> |
| 36 | </div> |
Derick Montague | 1f690f3 | 2019-06-23 12:20:17 -0500 | [diff] [blame] | 37 | </div> |
Gunnar Mills | 615a2f8 | 2019-04-17 14:30:39 -0500 | [diff] [blame] | 38 | |
Derick Montague | 1f690f3 | 2019-06-23 12:20:17 -0500 | [diff] [blame] | 39 | <div ng-show="filteredSensorData.length == 0"> |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 40 | <span ng-if="selectedSeverity.all">{{messages.NO_SENSOR_DATA}}</span> |
| 41 | <span ng-if="selectedSeverity.critical">{{messages.CRITICAL_NO_SENSOR_DATA}}</span> |
| 42 | <span ng-if="selectedSeverity.warning">{{messages.WARNING_NO_SENSOR_DATA}}</span> |
Gunnar Mills | 615a2f8 | 2019-04-17 14:30:39 -0500 | [diff] [blame] | 43 | <span ng-if="selectedSeverity.normal">{{messages.NORMAL_NO_SENSOR_DATA}}</span> |
Derick Montague | 1f690f3 | 2019-06-23 12:20:17 -0500 | [diff] [blame] | 44 | </div> |
Gunnar Mills | 615a2f8 | 2019-04-17 14:30:39 -0500 | [diff] [blame] | 45 | |
Derick Montague | 1f690f3 | 2019-06-23 12:20:17 -0500 | [diff] [blame] | 46 | <table id="sensor-categories" class="sensors__table" cellpadding="0" cellspacing="0" ng-show="filteredSensorData.length"> |
| 47 | <thead class="sensors__thead fixed-table-header"> |
| 48 | <tr class="sensors__thead-row"> |
| 49 | <th class="sensors__thead-cell">Sensors ({{filteredSensorData.length}})<th> |
| 50 | <th class="sensors__thead-cell">Low critical<th> |
| 51 | <th class="sensors__thead-cell">Low warning<th> |
| 52 | <th class="sensors__thead-cell sensor__heading-current">Current<th> |
| 53 | <th class="sensors__thead-cell">High warning<th> |
| 54 | <th class="sensors__thead-cell">High critical<th> |
| 55 | </tr> |
| 56 | </thead> |
| 57 | <tbody class="sensors__tbody"> |
| 58 | <tr class="sensors__tbody-row" ng-repeat="sensor in data|filter:filterBySeverity|filter:filterBySearchTerms|orderBy:'+custom_order' as filteredSensorData"> |
| 59 | <th class="sensors__tbody-header"> |
Yoshie Muranaka | 4b366b5 | 2019-09-24 08:32:42 -0700 | [diff] [blame^] | 60 | <status-icon status="{{ sensor.status == 'critical' ? 'error' : |
| 61 | sensor.status == 'warning' ? 'warn' : null }}" |
| 62 | aria-label="Sensor status: {{sensor.status}}"> |
| 63 | </status-icon> |
Derick Montague | 1f690f3 | 2019-06-23 12:20:17 -0500 | [diff] [blame] | 64 | <span>{{sensor.title}}</span> |
| 65 | </th> |
| 66 | <td class="sensors__tbody-cell"> |
| 67 | <span class="sensors__tbody-cell__title">Low critical</span> |
| 68 | <span class="sensors__tbody-cell__content"> |
| 69 | <span class="sensors__tbody-info">{{sensor.CriticalLow}}</span> |
| 70 | <span class="sensors__tbody-degree" ng-if="sensor.unit == 'C'">°</span> |
| 71 | <span class="sensors__tbody-unit">{{sensor.unit}}</span> |
| 72 | </span> |
| 73 | </td> |
| 74 | <td class="sensors__tbody-cell"> |
| 75 | <span class="sensors__tbody-cell__title">Low warning</span> |
| 76 | <span class="sensors__tbody-cell__content"> |
| 77 | <span class="sensors__tbody-info">{{sensor.WarningLow}}</span> |
| 78 | <span class="sensors__tbody-degree" ng-if="sensor.unit == 'C'">°</span> |
| 79 | <span class="sensors__tbody-unit">{{sensor.unit}}</span> |
| 80 | </span> |
| 81 | </td> |
| 82 | <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'}"> |
| 83 | <span class="sensors__tbody-cell__title">Current</span> |
| 84 | <span class="sensors__tbody-cell__content"> |
| 85 | <span class="sensors__tbody-info">{{sensor.Value}}</span> |
| 86 | <span class="sensors__tbody-degree" ng-if="sensor.unit == 'C'">°</span> |
| 87 | <span class="sensors__tbody-unit">{{sensor.unit}}</span> |
| 88 | </span> |
| 89 | </td> |
| 90 | <td class="sensors__tbody-cell"> |
| 91 | <span class="sensors__tbody-cell__title">High warning</span> |
| 92 | <span class="sensors__tbody-cell__content"> |
| 93 | <span class="sensors__tbody-info">{{sensor.WarningHigh}}</span> |
| 94 | <span class="sensors__tbody-degree" ng-if="sensor.unit == 'C'">°</span> |
| 95 | <span class="sensors__tbody-unit">{{sensor.unit}}</span> |
| 96 | </span> |
| 97 | </td> |
| 98 | <td class="sensors__tbody-cell"> |
| 99 | <span class="sensors__tbody-cell__title">High critical</span> |
| 100 | <span class="sensors__tbody-cell__content"> |
| 101 | <span class="sensors__tbody-info">{{sensor.CriticalHigh}}</span> |
| 102 | <span class="sensors__tbody-degree" ng-if="sensor.unit == 'C'">°</span> |
| 103 | <span class="sensors__tbody-unit">{{sensor.unit}}</span> |
| 104 | </span> |
| 105 | </td> |
| 106 | </tr> |
| 107 | </tbody> |
| 108 | </table> |
Gunnar Mills | 84e114a | 2018-11-14 13:44:41 -0600 | [diff] [blame] | 109 | </div> |