Skip to content

Commit a87b5f7

Browse files
committed
fix(datasources): minor fix to data sources after apps branch merge
1 parent 4db57cc commit a87b5f7

File tree

4 files changed

+45
-1
lines changed

4 files changed

+45
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ public/css/*.min.css
3131
conf/custom.ini
3232
fig.yml
3333
profile.cov
34-
grafana
34+
/grafana
3535
.notouch
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
///<reference path="../../../headers/common.d.ts" />
2+
3+
class GrafanaDatasource {
4+
5+
constructor(private backendSrv) {}
6+
7+
query(options) {
8+
return this.backendSrv.get('/api/metrics/test', {
9+
from: options.range.from.valueOf(),
10+
to: options.range.to.valueOf(),
11+
maxDataPoints: options.maxDataPoints
12+
});
13+
}
14+
}
15+
16+
export {GrafanaDatasource};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
///<reference path="../../../headers/common.d.ts" />
2+
3+
import angular from 'angular';
4+
import {GrafanaDatasource} from './datasource';
5+
6+
var module = angular.module('grafana.directives');
7+
8+
module.directive('metricQueryEditorGrafana', function() {
9+
return {templateUrl: 'app/plugins/datasource/grafana/partials/query.editor.html'};
10+
});
11+
12+
13+
export {GrafanaDatasource, GrafanaDatasource as Datasource};
14+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
///<reference path="../../../headers/common.d.ts" />
2+
3+
import angular from 'angular';
4+
import {MixedDatasource} from './datasource';
5+
6+
var module = angular.module('grafana.directives');
7+
8+
module.directive('metricQueryEditorMixed', function() {
9+
return {templateUrl: 'app/plugins/datasource/mixed/partials/query.editor.html'};
10+
});
11+
12+
13+
export {MixedDatasource, MixedDatasource as Datasource};
14+

0 commit comments

Comments
 (0)