stackdriver: only load default project from backend if it's not available on the target. this might happen when using gce authentication and provisioning

This commit is contained in:
Erik Sundell
2018-10-10 11:04:06 +02:00
parent 835f1d788e
commit 09fb1760a1
4 changed files with 46 additions and 60 deletions

View File

@@ -14,10 +14,7 @@ export interface QueryMeta {
export class StackdriverQueryCtrl extends QueryCtrl {
static templateUrl = 'partials/query.editor.html';
target: {
project: {
id: string;
name: string;
};
defaultProject: string;
unit: string;
metricType: string;
service: string;
@@ -38,10 +35,7 @@ export class StackdriverQueryCtrl extends QueryCtrl {
defaultServiceValue = 'All Services';
defaults = {
project: {
id: 'default',
name: 'loading project...',
},
defaultProject: 'loading project...',
metricType: this.defaultDropdownValue,
service: this.defaultServiceValue,
metric: '',