diff --git a/public/app/plugins/datasource/stackdriver/config_ctrl.ts b/public/app/plugins/datasource/stackdriver/config_ctrl.ts new file mode 100644 index 00000000000..405d91833cd --- /dev/null +++ b/public/app/plugins/datasource/stackdriver/config_ctrl.ts @@ -0,0 +1,11 @@ +export class StackdriverConfigCtrl { + static templateUrl = 'public/app/plugins/datasource/stackdriver/partials/config.html'; + datasourceSrv: any; + current: any; + + /** @ngInject */ + constructor($scope, datasourceSrv) { + this.datasourceSrv = datasourceSrv; + this.current.jsonData = this.current.jsonData || {}; + } +} diff --git a/public/app/plugins/datasource/stackdriver/datasource.ts b/public/app/plugins/datasource/stackdriver/datasource.ts new file mode 100644 index 00000000000..1bb2d4721a8 --- /dev/null +++ b/public/app/plugins/datasource/stackdriver/datasource.ts @@ -0,0 +1,13 @@ +/** @ngInject */ +export function StackdriverDatasource(this: any, instanceSettings, $q, backendSrv, templateSrv) { + // this.basicAuth = instanceSettings.basicAuth; + // this.url = instanceSettings.url; + // this.name = instanceSettings.name; + // this.graphiteVersion = instanceSettings.jsonData.graphiteVersion || '0.9'; + // this.supportsTags = supportsTags(this.graphiteVersion); + // this.cacheTimeout = instanceSettings.cacheTimeout; + // this.withCredentials = instanceSettings.withCredentials; + // this.render_method = instanceSettings.render_method || 'POST'; + // this.funcDefs = null; + // this.funcDefsPromise = null; +} diff --git a/public/app/plugins/datasource/stackdriver/module.ts b/public/app/plugins/datasource/stackdriver/module.ts new file mode 100644 index 00000000000..52d3aa58453 --- /dev/null +++ b/public/app/plugins/datasource/stackdriver/module.ts @@ -0,0 +1,14 @@ +// import { StackdriverDatasource } from './datasource'; +// import { StackdriverQueryCtrl } from './query_ctrl'; +import { StackdriverConfigCtrl } from './config_ctrl'; + +// class AnnotationsQueryCtrl { +// static templateUrl = 'partials/annotations.editor.html'; +// } + +export { + // StackdriverDatasource as Datasource, + // StackdriverQueryCtrl as QueryCtrl, + StackdriverConfigCtrl as ConfigCtrl, + // AnnotationsQueryCtrl, +}; diff --git a/public/app/plugins/datasource/stackdriver/partials/annotations.editor.html b/public/app/plugins/datasource/stackdriver/partials/annotations.editor.html new file mode 100644 index 00000000000..9d228b8e4f9 --- /dev/null +++ b/public/app/plugins/datasource/stackdriver/partials/annotations.editor.html @@ -0,0 +1,13 @@ +
+
+ Graphite query + +
+ +
Or
+ +
+ Graphite events tags + +
+
diff --git a/public/app/plugins/datasource/stackdriver/partials/config.html b/public/app/plugins/datasource/stackdriver/partials/config.html new file mode 100644 index 00000000000..c0af41fb891 --- /dev/null +++ b/public/app/plugins/datasource/stackdriver/partials/config.html @@ -0,0 +1,6 @@ + + + +

Hello Stackdriver

diff --git a/public/app/plugins/datasource/stackdriver/partials/query.editor.html b/public/app/plugins/datasource/stackdriver/partials/query.editor.html new file mode 100755 index 00000000000..51c25100c1e --- /dev/null +++ b/public/app/plugins/datasource/stackdriver/partials/query.editor.html @@ -0,0 +1,81 @@ + + +
+ +
+ +
+
+
+ +
+ +
+ + + + +
+ + + + + +
+ +
+ +
+
+
+
+ +
+
+ +
+ +
+ +
+ + + +
+
+
+
+
+ +
diff --git a/public/app/plugins/datasource/stackdriver/plugin.json b/public/app/plugins/datasource/stackdriver/plugin.json new file mode 100644 index 00000000000..c2d04eb9717 --- /dev/null +++ b/public/app/plugins/datasource/stackdriver/plugin.json @@ -0,0 +1,16 @@ +{ + "name": "Stackdriver", + "type": "datasource", + "id": "stackdriver", + "metrics": true, + "alerting": false, + "annotations": false, + "queryOptions": { + "maxDataPoints": true, + "cacheTimeout": true + }, + "info": { + "description": "Data Source for Stackdriver", + "version": "1.0.0" + } +} \ No newline at end of file diff --git a/public/app/plugins/datasource/stackdriver/query_ctrl.ts b/public/app/plugins/datasource/stackdriver/query_ctrl.ts new file mode 100644 index 00000000000..94389237eb2 --- /dev/null +++ b/public/app/plugins/datasource/stackdriver/query_ctrl.ts @@ -0,0 +1,11 @@ +import './add_graphite_func'; +import './func_editor'; +import { QueryCtrl } from 'app/plugins/sdk'; + +export class StackdriverQueryCtrl extends QueryCtrl { + static templateUrl = 'partials/query.editor.html'; + /** @ngInject */ + constructor($scope, $injector) { + super($scope, $injector); + } +}