Skip to content

Commit

Permalink
Allow to pass the 'stacked' parameter. Default is false.
Browse files Browse the repository at this point in the history
  • Loading branch information
pilhuhn committed Oct 20, 2015
1 parent 81a5769 commit 74ebddd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion dist/hawkular-ui-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,14 +580,16 @@ var hawkularRest;
};
factory.GaugeMetricMultipleStats = function (tenantId) {
var metrics = '@metrics';
var useStacked = '@stacked' || false;
var myRequest = $resource(url + '/gauges/data', {
buckets: '@buckets'
}, {
get: {
method: 'GET',
headers: { 'Hawkular-Tenant': tenantId },
isArray: true,
params: { metrics: metrics }
params: { metrics: metrics,
stacked: useStacked }
}
});
return myRequest;
Expand Down
4 changes: 3 additions & 1 deletion dist/hawkular-ui-service.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,14 +580,16 @@ var hawkularRest;
};
factory.GaugeMetricMultipleStats = function (tenantId) {
var metrics = '@metrics';
var useStacked = '@stacked' || false;
var myRequest = $resource(url + '/gauges/data', {
buckets: '@buckets'
}, {
get: {
method: 'GET',
headers: { 'Hawkular-Tenant': tenantId },
isArray: true,
params: { metrics: metrics }
params: { metrics: metrics,
stacked: useStacked }
}
});
return myRequest;
Expand Down
6 changes: 4 additions & 2 deletions src/rest/hawkRest-metric-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,17 @@ module hawkularRest {
};

factory.GaugeMetricMultipleStats = function (tenantId) {
let metrics = '@metrics';
let metrics = '@metrics'; // array of metric ids
let useStacked = '@stacked' || false;
let myRequest = $resource(url + '/gauges/data', {
buckets: '@buckets'
}, {
get: {
method: 'GET',
headers: {'Hawkular-Tenant': tenantId},
isArray: true,
params: {metrics: metrics} // send metrics=id1,metrics=id2,...
params: {metrics: metrics, // send metrics=id1,metrics=id2,...
stacked:useStacked}
}
});
return myRequest;
Expand Down

0 comments on commit 74ebddd

Please sign in to comment.