blob: e07a87a5efd7a0b055bee4a53a9d8f61b5994bd8 [file] [log] [blame]
Matteo Scandolo5dd94182015-12-09 17:09:55 -08001<div ng-show="vm.loader" class="loader">Loading</div>
2
3<section ng-if="!vm.loader && !vm.error">
4
5 <div class="alert alert-danger" ng-if="vm.stats.length == 0">
6 No result
7 </div>
8
9 <table class="table" ng-if="vm.stats.length > 0">
10 <tr>
Matteo Scandolo15290462015-12-17 16:50:16 -080011 <th>
Matteo Scandolo9a998332016-03-07 17:50:38 -080012 <a ng-click="(order == 'category') ? order = '-category' : order = 'category'">Type:</a>
Matteo Scandolo15290462015-12-17 16:50:16 -080013 </th>
14 <th>
Matteo Scandolo9a998332016-03-07 17:50:38 -080015 <a ng-click="(order == 'resource_name') ? order = '-resource_name' : order = 'resource_name'">Resource:</a>
Matteo Scandolo15290462015-12-17 16:50:16 -080016 </th>
17 <th>
Matteo Scandolo9a998332016-03-07 17:50:38 -080018 <a ng-click="(order == 'meter') ? order = '-meter' : order = 'meter'">Meter:</a>
Matteo Scandolo15290462015-12-17 16:50:16 -080019 </th>
20 <th>
21 Unit:
22 </th>
23 <th>
24 Value:
25 </th>
Matteo Scandolo5dd94182015-12-09 17:09:55 -080026 </tr>
Matteo Scandolo15290462015-12-17 16:50:16 -080027 <!-- <tr>
28 <td>
29 <input type="text" ng-model="query.category">
30 </td>
31 <td>
32 <input type="text" ng-model="query.resource_name">
33 </td>
34 <td>
35 <input type="text" ng-model="query.meter">
36 </td>
37 <td>
38 <input type="text" ng-model="query.unit">
39 </td>
40 <td>
41 <input type="text" ng-model="query.value">
42 </td>
43 </tr> -->
44 <tr ng-repeat="item in vm.stats | orderBy:order">
Matteo Scandolod9e1c412015-12-15 14:37:27 -080045 <td>{{item.category}}</td>
Matteo Scandolo15290462015-12-17 16:50:16 -080046 <td>{{item.resource_name}}</td>
Matteo Scandolo5dd94182015-12-09 17:09:55 -080047 <td>{{item.meter}}</td>
48 <td>{{item.unit}}</td>
49 <td>{{item.value}}</td>
50 </tr>
51 </table>
52</section>
53
54<section ng-if="!vm.loader && vm.error">
55 <div class="alert alert-danger">
56 {{vm.error}}
57 </div>
58</section>