diff --git a/public/app/plugins/datasource/stackdriver/query_ctrl.ts b/public/app/plugins/datasource/stackdriver/query_ctrl.ts index 07728787c53..32fcc5638bc 100644 --- a/public/app/plugins/datasource/stackdriver/query_ctrl.ts +++ b/public/app/plugins/datasource/stackdriver/query_ctrl.ts @@ -13,17 +13,18 @@ export class StackdriverQueryCtrl extends QueryCtrl { }; defaultDropdownValue = 'select'; + defaults = { + project: { + id: 'default', + name: 'loading project...', + }, + metricType: this.defaultDropdownValue, + }; + /** @ngInject */ constructor($scope, $injector) { super($scope, $injector); - this.target = { - project: { - id: 'default', - name: 'loading project...', - }, - metricType: this.defaultDropdownValue, - }; - + _.defaultsDeep(this.target, this.defaults); this.getCurrentProject().then(this.getMetricTypes.bind(this)); }