blob: 5d510aa1c77b554e0e3db181cd073054c6d5ef4f [file] [log] [blame]
<loader loading="loading"></loader>
<div id="sensors-overview">
<div class="row column">
<h1>Sensors</h1>
</div>
<section class="row column">
<div class="page-header">
<h2 class="inline h4">All sensors present in the system</h2>
<a ng-href="data:text/json;charset=utf-8,{{export_data}}" class="inline btn-export float-right" download="{{export_name}}">Export</a>
</div>
</section>
<section class="row column">
<!-- search -->
<p class="content-label" aria-label="sensors filter">Filter sensors</p>
<div class="content__search">
<label for="content__search-input">Sensors Search</label>
<input id="content__search-input" type="text" ng-model="customSearch" ng-keydown="doSearchOnEnter($event)"/>
<div class="search-submit__wrapper">
<button class="clear-input" ng-click="clear()">&#10005;</button>
<input id="content__search-submit" type="submit" class="btn btn-primary content__search-submit" value="Filter" ng-click="doSearchOnClick()"/>
</div>
</div> <!-- end search -->
<div class="toggle-filter">
<p class="content-label">FILTER BY SEVERITY</p>
<button class="inline first btn-primary" ng-click="toggleSeverityAll()"
ng-class="selectedSeverity.all ? 'btn-primary' : 'btn-secondary'">All
</button>
<button class="inline " ng-click="toggleSeverity('critical')"
ng-class="selectedSeverity.critical ? 'btn-primary' : 'btn-secondary'">Critical
</button>
<button class="inline" ng-click="toggleSeverity('warning')"
ng-class="selectedSeverity.warning ? 'btn-primary' : 'btn-secondary'">Warning
</button>
<button class="inline" ng-click="toggleSeverity('normal')"
ng-class="selectedSeverity.normal ? 'btn-primary' : 'btn-secondary'">Normal
</button>
</div>
</section>
<section class="row column" ng-show="filteredSensorData.length == 0">
<!-- message -->
<span ng-if="selectedSeverity.all">{{messages.NO_SENSOR_DATA}}</span>
<span ng-if="selectedSeverity.critical">{{messages.CRITICAL_NO_SENSOR_DATA}}</span>
<span ng-if="selectedSeverity.warning">{{messages.WARNING_NO_SENSOR_DATA}}</span>
<span ng-if="selectedSeverity.normal">{{messages.NORMAL_NO_SENSOR_DATA}}</span>
<!-- end message -->
</section>
<section id="sensor-categories" class="row column" ng-show="filteredSensorData.length">
<div class="row column header-row">
<div class="column large-12 header__actions-bar">
<p class="inline sensor__title">Sensors</p>
<p class="inline sensor__reading">Low critical</p>
<p class="inline sensor__reading">Low warning</p>
<p class="inline sensor__reading sensor__heading-current">Current</p>
<p class="inline sensor__reading">High warning</p>
<p class="inline sensor__reading">High critical</p>
</div>
</div>
<!-- sensor -->
<div class="sensor__readings-row" ng-repeat="sensor in data|filter:filterBySeverity|filter:filterBySearchTerms|orderBy:'+custom_order' as filteredSensorData">
<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>
<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>
<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>
<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>
<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>
<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>
</div>
</section>
</div>