Commit 69137e67 by Erik Sundell

stackdriver: revert project test stuff

parent b9d5fa1b
...@@ -111,11 +111,6 @@ export default class StackdriverDatasource { ...@@ -111,11 +111,6 @@ export default class StackdriverDatasource {
return unit; return unit;
} }
async getProjects() {
const response = await this.doRequest(`/cloudresourcemanager/v1/projects`);
return response.data.projects.map(p => ({ value: p.projectId, name: p.name }));
}
async query(options) { async query(options) {
const result = []; const result = [];
const data = await this.getTimeSeries(options); const data = await this.getTimeSeries(options);
......
...@@ -63,16 +63,10 @@ export class StackdriverQueryCtrl extends QueryCtrl { ...@@ -63,16 +63,10 @@ export class StackdriverQueryCtrl extends QueryCtrl {
constructor($scope, $injector) { constructor($scope, $injector) {
super($scope, $injector); super($scope, $injector);
_.defaultsDeep(this.target, this.defaults); _.defaultsDeep(this.target, this.defaults);
this.setProjects($scope.ctrl.datasource);
this.panelCtrl.events.on('data-received', this.onDataReceived.bind(this), $scope); this.panelCtrl.events.on('data-received', this.onDataReceived.bind(this), $scope);
this.panelCtrl.events.on('data-error', this.onDataError.bind(this), $scope); this.panelCtrl.events.on('data-error', this.onDataError.bind(this), $scope);
} }
async setProjects(ds) {
this.projects = await ds.getProjects();
console.log(this.projects);
}
onDataReceived(dataList) { onDataReceived(dataList) {
this.lastQueryError = null; this.lastQueryError = null;
this.lastQueryMeta = null; this.lastQueryMeta = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment