blob: b279123036f8b5f3f05274628fa0fa5c62e5ee3f [file] [log] [blame]
Matteo Scandoloc2d31102015-12-08 14:35:55 -08001<!-- <pre>{{ vm | json}}</pre> -->
2
3<div class="row">
4 <div class="col-xs-10">
5 <h1>{{vm.name | uppercase}}</h1>
6 </div>
7 <div class="col-xs-2">
8 <a ui-sref="ceilometerDashboard" class="btn btn-primary pull-right">
9 <i class="glyphicon glyphicon-arrow-left"></i> Back to list
10 </a>
11 </div>
12</div>
Matteo Scandolob172c4b2015-12-08 17:41:46 -080013<div class="row" ng-show="vm.loader">
14 <div class="col-xs-12">
Matteo Scandoloec8ad422015-12-04 15:55:20 -080015 <div class="loader">Loading</div>
16 </div>
Matteo Scandolob172c4b2015-12-08 17:41:46 -080017</div>
Matteo Scandolo30c23c72015-12-09 15:23:51 -080018<section ng-if="!vm.loader && !vm.error">
19 <div class="row">
20 <form class="form-inline col-xs-8" ng-submit="vm.addMeterToChart(vm.addMeterValue)">
Matteo Scandoloedea1db2015-12-14 14:42:28 -080021 <select ng-model="vm.addMeterValue" class="form-control" ng-options="resource.id as resource.name for resource in vm.sampleLabels"></select>
Matteo Scandolo30c23c72015-12-09 15:23:51 -080022 <button class="btn btn-success">
23 <i class="glyphicon glyphicon-plus"></i> Add
24 </button>
25 </form>
26 <div class="col-xs-4 text-right">
27 <a ng-click="vm.chartType = 'line'" class="btn" ng-class="{'btn-default': vm.chartType != 'bar', 'btn-primary': vm.chartType == 'line'}">Lines</a>
28 <a ng-click="vm.chartType = 'bar'" class="btn" ng-class="{'btn-default': vm.chartType != 'line', 'btn-primary': vm.chartType == 'bar'}">Bars</a>
29 </div>
Matteo Scandolob172c4b2015-12-08 17:41:46 -080030 </div>
Matteo Scandolo30c23c72015-12-09 15:23:51 -080031 <div class="row" ng-if="!vm.loader">
32 <div class="col-xs-12">
33 <canvas ng-if="vm.chartType === 'line'" id="line" class="chart chart-line" chart-data="vm.chart.data" chart-options="{datasetFill: false}"
34 chart-labels="vm.chart.labels" chart-legend="false" chart-series="vm.chart.series">
35 </canvas>
36 <canvas ng-if="vm.chartType === 'bar'" id="bar" class="chart chart-bar" chart-data="vm.chart.data"
37 chart-labels="vm.chart.labels" chart-legend="false" chart-series="vm.chart.series">
38 </canvas>
39 <!-- <pre>{{vm.chartMeters | json}}</pre> -->
40 </div>
Matteo Scandoloec8ad422015-12-04 15:55:20 -080041 </div>
Matteo Scandolo30c23c72015-12-09 15:23:51 -080042 <div class="row" ng-if="!vm.loader">
43 <div class="col-xs-12">
Matteo Scandoloedea1db2015-12-14 14:42:28 -080044 <a ng-click="vm.removeFromChart(meter)" class="btn btn-chart" ng-style="{'background-color': vm.chartColors[$index]}" ng-repeat="meter in vm.chartMeters">
Matteo Scandolod9e1c412015-12-15 14:37:27 -080045 {{meter.resource_name || meter.resource_id}}
Matteo Scandoloedea1db2015-12-14 14:42:28 -080046 </a>
Matteo Scandolo30c23c72015-12-09 15:23:51 -080047 </div>
48 </div>
49</section>
50<section ng-if="!vm.loader && vm.error">
51 <div class="alert alert-danger">
52 {{vm.error}}
53 </div>
54</section>