blob: 3ad4aa6e077df0bdc6cdbd5002540953b6cb1997 [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">All Sensors information </h2>
<a ng-href="data:text/json;charset=utf-8,{{fullSensorsInfo}}" class="inline btn-export float-right" download="{{export_name}}">Export</a>
</div>
</section>
<section class="row column">
<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>
<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('ok')"
ng-class="selectedSeverity.ok ? 'btn-primary' : 'btn-secondary'">OK
</button>
</div>
<div class="select__filter">
<p class="content-label">Select Component</p>
<div class="inline dropdown__wrapper" >
<button type="button" class="dropdown__button" ng-click="showCompDropdown = !showCompDropdown" ng-disabled="fullSensorsInfo.length <= 1"><strong>{{selectedComponent.Name}}</strong></button>
<ul class="dropdown__list inline" ng-show="showCompDropdown">
<li>
<button type="button" ng-click="selectComponent(-1);">All</button>
</li>
<li ng-repeat="component in fullSensorsInfo track by $index">
<button type="button" ng-click="selectComponent($index);">{{component.Name}}</button>
</li>
</ul>
</div>
</div>
</section>
<section class="row column" ng-show="(filteredVoltSensors.length + filteredTempSensors.length + filteredFanSensors.length) == 0">
<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.ok">{{messages.NORMAL_NO_SENSOR_DATA}}</span>
</section>
<section id="sensor-categories" class="table row column" ng-hide="(filteredVoltSensors.length + filteredTempSensors.length + filteredFanSensors.length) == 0">
<div class="table row column sensor__table" ng-hide="loading">
<div class="table__head fixed-table-header">
<div class="table__row">
<div class="table__cell sensor__title">Name</div>
<div class="table__cell sensor__status">Status</div>
<div class="table__cell sensor__threshold" ng-show="showThresholds">LC</div>
<div class="table__cell sensor__threshold" ng-show="showThresholds">LW</div>
<div class="table__cell sensor__reading">Reading</div>
<div class="table__cell sensor__threshold" ng-show="showThresholds">HW</div>
<div class="table__cell sensor__threshold" ng-show="showThresholds">HC</div>
</div>
</div>
<div class="table__body">
<div class="table__row" ng-repeat="sensor in (filteredVoltSensors = (sensorsInfo.Voltages | filter:filterBySearchTerms | filter:filterBySeverity))">
<div class="table__cell sensor__title">{{sensor.Name}}</div>
<div class="table__cell sensor__status sensor__{{sensor.Status.Health}}">{{sensor.Status.Health}}</div>
<div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.LowerThresholdCritical | number:2}} Volts</div>
<div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.LowerThresholdNonCritical | number:2}} Volts</div>
<div class="table__cell sensor__reading">{{sensor.ReadingVolts | number:2}} Volts</div>
<div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.UpperThresholdNonCritical | number:2}} Volts</div>
<div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.UpperThresholdCritical | number:2}} Volts</div>
</div>
<div class="table__row" ng-repeat="sensor in (filteredTempSensors = (sensorsInfo.Temperatures | filter:filterBySearchTerms | filter:filterBySeverity))">
<div class="table__cell sensor__title">{{sensor.Name}}</div>
<div class="table__cell sensor__status sensor__{{sensor.Status.Health}}">{{sensor.Status.Health}}</div>
<div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.LowerThresholdCritical | number:2}} &deg;C</div>
<div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.LowerThresholdNonCritical | number:2}} &deg;C</div>
<div class="table__cell sensor__reading">{{sensor.ReadingCelsius | number:2}} &deg;C</div>
<div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.UpperThresholdNonCritical | number:2}} &deg;C</div>
<div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.UpperThresholdCritical | number:2}} &deg;C</div>
</div>
<div class="table__row" ng-repeat="sensor in (filteredFanSensors = (sensorsInfo.Fans | filter:filterBySearchTerms | filter:filterBySeverity))">
<div class="table__cell sensor__title">{{sensor.Name}}</div>
<div class="table__cell sensor__status sensor__{{sensor.Status.Health}}">{{sensor.Status.Health}}</div>
<div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.LowerThresholdCritical | number:2}} {{sensor.ReadingUnits}}</div>
<div class="table__cell sensor__threshold" ng-show="showThresholds">{{sensor.LowerThresholdNonCritical | number:2}} {{sensor.ReadingUnits}}</div>
<div class="table__cell sensor__reading">{{sensor.Reading | number:2}} {{sensor.ReadingUnits}}</div>
<div class="table__cell sensor__threshold" ng-show="showThresholds">NA</div>
<div class="table__cell sensor__threshold" ng-show="showThresholds">NA</div>
</div>
</div>
</div>
</section>
</div>