From 0e4b70a4a87f57c2ae96bcecc1671857abbb9576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 28 Apr 2016 10:13:18 +0200 Subject: [PATCH] feat(query_editors): more work --- .../app/features/panel/metrics_ds_selector.ts | 4 +- .../panel/partials/query_editor_row.html | 14 ++--- .../opentsdb/partials/query.editor.html | 2 +- public/sass/components/_gf-form.scss | 37 ------------- public/sass/components/_query_editor.scss | 53 +++++++++++++++++++ 5 files changed, 65 insertions(+), 45 deletions(-) diff --git a/public/app/features/panel/metrics_ds_selector.ts b/public/app/features/panel/metrics_ds_selector.ts index 25cda0a29f8..0c3c61955e3 100644 --- a/public/app/features/panel/metrics_ds_selector.ts +++ b/public/app/features/panel/metrics_ds_selector.ts @@ -55,8 +55,10 @@ export class MetricsDsSelectorCtrl { constructor(private uiSegmentSrv, datasourceSrv) { this.datasources = datasourceSrv.getMetricSources(); + var dsValue = this.panelCtrl.panel.datasource || null; + for (let ds of this.datasources) { - if (ds.value === this.panelCtrl.panel.datasource) { + if (ds.value === dsValue) { this.current = ds; } } diff --git a/public/app/features/panel/partials/query_editor_row.html b/public/app/features/panel/partials/query_editor_row.html index 6acd1b5dfe2..e8dbe1434e7 100644 --- a/public/app/features/panel/partials/query_editor_row.html +++ b/public/app/features/panel/partials/query_editor_row.html @@ -1,12 +1,14 @@
diff --git a/public/app/plugins/datasource/opentsdb/partials/query.editor.html b/public/app/plugins/datasource/opentsdb/partials/query.editor.html index 7ccdc60d0a2..4683f9c300a 100644 --- a/public/app/plugins/datasource/opentsdb/partials/query.editor.html +++ b/public/app/plugins/datasource/opentsdb/partials/query.editor.html @@ -219,7 +219,7 @@
- +