Skip to content

Commit

Permalink
Add support for gauge aggregates over multiple metrics.
Browse files Browse the repository at this point in the history
  • Loading branch information
pilhuhn committed Oct 16, 2015
1 parent 727b989 commit c245b09
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
14 changes: 14 additions & 0 deletions dist/hawkular-ui-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,20 @@ var hawkularRest;
}
});
};
factory.GaugeMetricMultipleStats = function (tenantId) {
var metrics = '@metrics';
var myRequest = $resource(url + '/gauges/data', {
buckets: '@buckets'
}, {
get: {
method: 'GET',
headers: { 'Hawkular-Tenant': tenantId },
isArray: true,
params: { metrics: metrics }
}
});
return myRequest;
};
factory.CounterMetric = function (tenantId) {
return $resource(url + '/counters', null, {
get: {
Expand Down
14 changes: 14 additions & 0 deletions dist/hawkular-ui-service.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,20 @@ var hawkularRest;
}
});
};
factory.GaugeMetricMultipleStats = function (tenantId) {
var metrics = '@metrics';
var myRequest = $resource(url + '/gauges/data', {
buckets: '@buckets'
}, {
get: {
method: 'GET',
headers: { 'Hawkular-Tenant': tenantId },
isArray: true,
params: { metrics: metrics }
}
});
return myRequest;
};
factory.CounterMetric = function (tenantId) {
return $resource(url + '/counters', null, {
get: {
Expand Down
16 changes: 16 additions & 0 deletions src/rest/hawkRest-metric-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,22 @@ module hawkularRest {
});
};

factory.GaugeMetricMultipleStats = function (tenantId) {
let metrics = '@metrics';
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,...
}
});
return myRequest;
};


factory.CounterMetric = function(tenantId){
return $resource(url + '/counters', null, {
get: {
Expand Down

0 comments on commit c245b09

Please sign in to comment.