(prometheus) table support

This commit is contained in:
Mitsuhiro Tanda
2016-09-28 21:31:26 +09:00
parent 51f80affe3
commit d018d2a23f
4 changed files with 85 additions and 3 deletions

View File

@@ -12,6 +12,7 @@ class PrometheusQueryCtrl extends QueryCtrl {
metric: any;
resolutions: any;
resultFormats: any;
oldTarget: any;
suggestMetrics: any;
linkToPrometheus: any;
@@ -23,11 +24,16 @@ class PrometheusQueryCtrl extends QueryCtrl {
var target = this.target;
target.expr = target.expr || '';
target.intervalFactor = target.intervalFactor || 2;
target.resultFormat = target.resultFormat || 'time_series';
this.metric = '';
this.resolutions = _.map([1,2,3,4,5,10], function(f) {
return {factor: f, label: '1/' + f};
});
this.resultFormats = [
{text: 'Time series', value: 'time_series'},
{text: 'Table', value: 'table'},
];
$scope.$on('typeahead-updated', () => {
this.$scope.$apply(() => {