blob: 8b359d102375f96cca149fefc0fc0a4284a539c4 [file] [log] [blame]
Matteo Scandolod2044a42017-08-07 16:08:28 -07001
2<!--
3Copyright 2017-present Open Networking Foundation
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16-->
17
18
Matteo Scandolo41f5c152015-12-09 17:09:55 -080019<div ng-show="vm.loader" class="loader">Loading</div>
20
21<section ng-if="!vm.loader && !vm.error">
22
23 <div class="alert alert-danger" ng-if="vm.stats.length == 0">
24 No result
25 </div>
26
27 <table class="table" ng-if="vm.stats.length > 0">
28 <tr>
Matteo Scandolo6c512942015-12-17 16:50:16 -080029 <th>
Matteo Scandolo999d3a12016-03-07 17:50:38 -080030 <a ng-click="(order == 'category') ? order = '-category' : order = 'category'">Type:</a>
Matteo Scandolo6c512942015-12-17 16:50:16 -080031 </th>
32 <th>
Matteo Scandolo999d3a12016-03-07 17:50:38 -080033 <a ng-click="(order == 'resource_name') ? order = '-resource_name' : order = 'resource_name'">Resource:</a>
Matteo Scandolo6c512942015-12-17 16:50:16 -080034 </th>
35 <th>
Matteo Scandolo999d3a12016-03-07 17:50:38 -080036 <a ng-click="(order == 'meter') ? order = '-meter' : order = 'meter'">Meter:</a>
Matteo Scandolo6c512942015-12-17 16:50:16 -080037 </th>
38 <th>
39 Unit:
40 </th>
41 <th>
42 Value:
43 </th>
Matteo Scandolo41f5c152015-12-09 17:09:55 -080044 </tr>
Matteo Scandolo6c512942015-12-17 16:50:16 -080045 <!-- <tr>
46 <td>
47 <input type="text" ng-model="query.category">
48 </td>
49 <td>
50 <input type="text" ng-model="query.resource_name">
51 </td>
52 <td>
53 <input type="text" ng-model="query.meter">
54 </td>
55 <td>
56 <input type="text" ng-model="query.unit">
57 </td>
58 <td>
59 <input type="text" ng-model="query.value">
60 </td>
61 </tr> -->
62 <tr ng-repeat="item in vm.stats | orderBy:order">
Matteo Scandolo6c6b9282015-12-15 14:37:27 -080063 <td>{{item.category}}</td>
Matteo Scandolo6c512942015-12-17 16:50:16 -080064 <td>{{item.resource_name}}</td>
Matteo Scandolo41f5c152015-12-09 17:09:55 -080065 <td>{{item.meter}}</td>
66 <td>{{item.unit}}</td>
67 <td>{{item.value}}</td>
68 </tr>
69 </table>
70</section>
71
72<section ng-if="!vm.loader && vm.error">
73 <div class="alert alert-danger">
74 {{vm.error}}
75 </div>
76</section>