| <div ng-show="vm.loader" class="loader">Loading</div> |
| <section ng-if="!vm.loader && !vm.error"> |
| <div class="alert alert-danger" ng-if="vm.stats.length == 0"> |
| <table class="table" ng-if="vm.stats.length > 0"> |
| <a ng-click="(order == 'category') ? order = '-category' : order = 'category'">Type:</a> |
| <a ng-click="(order == 'resource_name') ? order = '-resource_name' : order = 'resource_name'">Resource:</a> |
| <a ng-click="(order == 'meter') ? order = '-meter' : order = 'meter'">Meter:</a> |
| <input type="text" ng-model="query.category"> |
| <input type="text" ng-model="query.resource_name"> |
| <input type="text" ng-model="query.meter"> |
| <input type="text" ng-model="query.unit"> |
| <input type="text" ng-model="query.value"> |
| <tr ng-repeat="item in vm.stats | orderBy:order"> |
| <td>{{item.category}}</td> |
| <td>{{item.resource_name}}</td> |
| <section ng-if="!vm.loader && vm.error"> |
| <div class="alert alert-danger"> |