Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
HAWKULAR-964 : Fix toggling individual metrics in Platform FS Charts
Browse files Browse the repository at this point in the history
Also corrects some text and labels in the FS Charts
  • Loading branch information
ammendonca committed Jan 22, 2016
1 parent 022a3aa commit 5064a72
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,29 +160,29 @@ <h3 class="pull-left">Metrics</h3>
</div>
</div>
<div class="panel panel-default hk-graph" ng-if="os.resolvedChartFileSystemData[fs.id]">
<h2>Availability</h2>
<h2>File System Usage</h2>
<div class="hk-graph-container hk-graph-metrics">
<hawkular-chart
multi-data="os.chartFileSystemData[fs.id]"
chart-type="multiline"
y-axis-units="FS Usage (MB)"
y-axis-units="Disk Space (MB)"
chart-height="250">
</hawkular-chart>
</div>
<div class="row hk-legend hk-legend-inline text-left hk-legend-metrics">
<div class="col-md-12">
<h4>Connection Availability</h4>
<h4>Disk Space</h4>
<div class="hk-graphselector hk-orange">
<input id="connavail_{{$index}}" type="checkbox"
<input id="disktotal_{{$index}}" type="checkbox"
ng-checked="!os.skipChartData[fs.id + '_Total']"
ng-click="os.toggleChartData(fs.id + '_Total')">
<label for="connavail_{{$index}}"><span>Total space</span></label>
<label for="disktotal_{{$index}}"><span>Total space</span></label>
</div>
<div class="hk-graphselector hk-blue">
<input id="conninuse_{{$index}}" type="checkbox"
<input id="diskfree_{{$index}}" type="checkbox"
ng-checked="!os.skipChartData[fs.id + '_Free']"
ng-click="os.toggleChartData(fs.id + '_Free')">
<label for="conninuse_{{$index}}"><span>Free space</span></label>
<label for="diskfree_{{$index}}"><span>Free space</span></label>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
///
/// Copyright 2015 Red Hat, Inc. and/or its affiliates
/// Copyright 2015-2016 Red Hat, Inc. and/or its affiliates
/// and other contributors as indicated by the @author tags.
///
/// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -253,13 +253,15 @@ module HawkularMetrics {
}
}, this);
this.$q.all(availPromises).then((data)=> {
let tmpChartFileSystemData = {};
_.forEach(data, (item) => {
if (!this.chartFileSystemData[item.fileStoreId]) {
this.chartFileSystemData[item.fileStoreId] = [];
if (!tmpChartFileSystemData[item.fileStoreId]) {
tmpChartFileSystemData[item.fileStoreId] = [];
}
this.chartFileSystemData[item.fileStoreId].push(item);
tmpChartFileSystemData[item.fileStoreId].push(item);
this.resolvedChartFileSystemData[item.fileStoreId] = true;
});
this.chartFileSystemData = tmpChartFileSystemData;
});
}

Expand Down

0 comments on commit 5064a72

Please sign in to comment.