From 9469b20cbd52312d4d3d653e84921d08e041e010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 14 Apr 2016 08:41:54 -0400 Subject: [PATCH 1/6] fix(graph): Fixed issue with light theme text color issue in tooltip, fixes #4702 --- CHANGELOG.md | 7 ++++++- public/sass/_variables.light.scss | 2 +- public/sass/components/_panel_graph.scss | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86103f8e8c3..da82105ec29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ -# 3.0.0-beta4 (unreleased) +# 3.0.0-beta5 () + +### Bug fixes +* **Graph**: Fixed issue with light theme text color issue in tooltip, fixes [#4702](https://github.com/grafana/grafana/issues/4702) + +# 3.0.0-beta4 (2016-04-13) ### Bug fixes * **Home dashboard**: Fixed issue with permission denied error on home dashboard, fixes [#4686](https://github.com/grafana/grafana/issues/4686) diff --git a/public/sass/_variables.light.scss b/public/sass/_variables.light.scss index e2e374b48ee..4d41ca59a4a 100644 --- a/public/sass/_variables.light.scss +++ b/public/sass/_variables.light.scss @@ -281,7 +281,7 @@ $tooltipColor: $popover-help-color; $tooltipBackground: $popover-help-bg; $tooltipArrowWidth: 5px; $tooltipArrowColor: $tooltipBackground; -$tooltipLinkColor: $link-color; +$tooltipLinkColor: lighten($popover-help-color, 5%); $graph-tooltip-bg: $gray-5; // images diff --git a/public/sass/components/_panel_graph.scss b/public/sass/components/_panel_graph.scss index 12215f16798..ca79034a0bd 100644 --- a/public/sass/components/_panel_graph.scss +++ b/public/sass/components/_panel_graph.scss @@ -236,6 +236,7 @@ white-space: nowrap; font-size: $font-size-sm; background-color: $graph-tooltip-bg; + color: $text-color; .graph-tooltip-time { text-align: center; @@ -248,7 +249,7 @@ display: table-row; &--highlight { - color: $link-color; + color: $text-color-emphasis; font-weight: bold; } } From 6216ce455f8f0a208a341d687f63f455bdf27dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 14 Apr 2016 10:55:24 -0400 Subject: [PATCH 2/6] fix(pluginlist): fixed issue with pluginlist link, fixes #4705 --- .../app/plugins/panel/pluginlist/module.html | 56 +++++++++---------- public/app/plugins/panel/pluginlist/module.ts | 6 +- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/public/app/plugins/panel/pluginlist/module.html b/public/app/plugins/panel/pluginlist/module.html index d9a52c29ac1..c73da35b391 100644 --- a/public/app/plugins/panel/pluginlist/module.html +++ b/public/app/plugins/panel/pluginlist/module.html @@ -1,30 +1,30 @@ diff --git a/public/app/plugins/panel/pluginlist/module.ts b/public/app/plugins/panel/pluginlist/module.ts index 9ad43b25e56..8ec86efd9c2 100644 --- a/public/app/plugins/panel/pluginlist/module.ts +++ b/public/app/plugins/panel/pluginlist/module.ts @@ -35,12 +35,14 @@ class PluginListCtrl extends PanelCtrl { this.addEditorTab('Options', 'public/app/plugins/panel/pluginlist/editor.html'); } - gotoPlugin(plugin) { - this.$location.path(`plugins/${plugin.id}/edit`); + gotoPlugin(plugin, evt) { + if (evt) { evt.stopPropagation(); } + this.$location.url(`plugins/${plugin.id}/edit`); } updateAvailable(plugin, $event) { $event.stopPropagation(); + $event.preventDefault(); var modalScope = this.$scope.$new(true); modalScope.plugin = plugin; From 635589658415995d37d20743a523efc81f082039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 14 Apr 2016 11:06:48 -0400 Subject: [PATCH 3/6] fix(snapshots): Fixed issue with empty snapshots, fixes #4706 --- CHANGELOG.md | 1 + public/app/features/panel/metrics_panel_ctrl.ts | 2 +- public/app/plugins/panel/graph/module.ts | 2 +- public/app/plugins/panel/singlestat/module.ts | 6 +----- public/app/plugins/panel/table/module.ts | 6 +----- 5 files changed, 5 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f8e2c47e09..f28fb65b492 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Bug fixes * **Graph**: Fixed issue with light theme text color issue in tooltip, fixes [#4702](https://github.com/grafana/grafana/issues/4702) +* **Snapshot**: Fixed issue with empty snapshots, fixes [#4706](https://github.com/grafana/grafana/issues/4706) # 3.0.0-beta4 (2016-04-13) diff --git a/public/app/features/panel/metrics_panel_ctrl.ts b/public/app/features/panel/metrics_panel_ctrl.ts index df4e912211e..e8c16fd9ab7 100644 --- a/public/app/features/panel/metrics_panel_ctrl.ts +++ b/public/app/features/panel/metrics_panel_ctrl.ts @@ -65,7 +65,7 @@ class MetricsPanelCtrl extends PanelCtrl { var data = this.panel.snapshotData; // backward compatability if (!_.isArray(data)) { - data = data; + data = data.data; } this.events.emit('data-snapshot-load', data); diff --git a/public/app/plugins/panel/graph/module.ts b/public/app/plugins/panel/graph/module.ts index b626cc8d767..1fcd44204f7 100644 --- a/public/app/plugins/panel/graph/module.ts +++ b/public/app/plugins/panel/graph/module.ts @@ -161,7 +161,7 @@ class GraphCtrl extends MetricsPanelCtrl { onDataSnapshotLoad(snapshotData) { this.annotationsPromise = this.annotationsSrv.getAnnotations(this.dashboard); - this.onDataReceived(snapshotData.data); + this.onDataReceived(snapshotData); } onDataError(err) { diff --git a/public/app/plugins/panel/singlestat/module.ts b/public/app/plugins/panel/singlestat/module.ts index cd85fda7c92..8af684c9d68 100644 --- a/public/app/plugins/panel/singlestat/module.ts +++ b/public/app/plugins/panel/singlestat/module.ts @@ -56,7 +56,7 @@ class SingleStatCtrl extends MetricsPanelCtrl { this.events.on('data-received', this.onDataReceived.bind(this)); this.events.on('data-error', this.onDataError.bind(this)); - this.events.on('data-snapshot-load', this.onDataSnapshotLoad.bind(this)); + this.events.on('data-snapshot-load', this.onDataReceived.bind(this)); this.events.on('init-edit-mode', this.onInitEditMode.bind(this)); } @@ -71,10 +71,6 @@ class SingleStatCtrl extends MetricsPanelCtrl { this.render(); } - onDataSnapshotLoad(snapshotData) { - this.onDataReceived(snapshotData.data); - } - onDataError(err) { this.onDataReceived({data: []}); } diff --git a/public/app/plugins/panel/table/module.ts b/public/app/plugins/panel/table/module.ts index d9bba0576b7..7a2973cc390 100644 --- a/public/app/plugins/panel/table/module.ts +++ b/public/app/plugins/panel/table/module.ts @@ -60,7 +60,7 @@ class TablePanelCtrl extends MetricsPanelCtrl { this.events.on('data-received', this.onDataReceived.bind(this)); this.events.on('data-error', this.onDataError.bind(this)); - this.events.on('data-snapshot-load', this.onDataSnapshotLoad.bind(this)); + this.events.on('data-snapshot-load', this.onDataReceived.bind(this)); this.events.on('init-edit-mode', this.onInitEditMode.bind(this)); this.events.on('init-panel-actions', this.onInitPanelActions.bind(this)); } @@ -86,10 +86,6 @@ class TablePanelCtrl extends MetricsPanelCtrl { return super.issueQueries(datasource); } - onDataSnapshotLoad(data) { - this.onDataReceived(data.data); - } - onDataError(err) { this.dataRaw = []; this.render(); From 8ac5c3673585efb83e88da249cdcab57770936ad Mon Sep 17 00:00:00 2001 From: Matt Toback Date: Thu, 14 Apr 2016 11:12:00 -0400 Subject: [PATCH 4/6] Still not fixed, not sure why. despite having pushed that code with @torkelo. --- public/app/plugins/panel/pluginlist/module.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/plugins/panel/pluginlist/module.html b/public/app/plugins/panel/pluginlist/module.html index c73da35b391..1aa9f7ad2eb 100644 --- a/public/app/plugins/panel/pluginlist/module.html +++ b/public/app/plugins/panel/pluginlist/module.html @@ -22,7 +22,7 @@ From c1a5771fcd4605b891703eb2c9dbbd6421dd09dc Mon Sep 17 00:00:00 2001 From: Matt Toback Date: Thu, 14 Apr 2016 11:38:07 -0400 Subject: [PATCH 5/6] Updated colors to fix issue --- public/sass/_variables.dark.scss | 4 +++- public/sass/_variables.light.scss | 3 ++- public/sass/base/_code.scss | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/public/sass/_variables.dark.scss b/public/sass/_variables.dark.scss index bb5fdc0b026..560f2d2dab1 100644 --- a/public/sass/_variables.dark.scss +++ b/public/sass/_variables.dark.scss @@ -102,7 +102,9 @@ $tight-form-func-bg: #333; $tight-form-func-highlight-bg: #444; $modal-background: $black; -$code-tag-bg: #444; +$code-tag-bg: $dark-5; +$code-tag-border: lighten($code-tag-bg, 2%); + // Lists $grafanaListBackground: $dark-3; diff --git a/public/sass/_variables.light.scss b/public/sass/_variables.light.scss index 4d41ca59a4a..a7b5c72af2b 100644 --- a/public/sass/_variables.light.scss +++ b/public/sass/_variables.light.scss @@ -109,7 +109,8 @@ $tight-form-func-bg: $gray-5; $tight-form-func-highlight-bg: $gray-6; $modal-background: $body-bg; -$code-tag-bg: $dark-5; +$code-tag-bg: $gray-6; +$code-tag-border: darken($code-tag-bg, 3%); // Lists $grafanaListBackground: $gray-6; diff --git a/public/sass/base/_code.scss b/public/sass/base/_code.scss index 464eed966ce..eb085c0577c 100644 --- a/public/sass/base/_code.scss +++ b/public/sass/base/_code.scss @@ -10,7 +10,7 @@ pre { font-size: $font-size-base - 2; background-color: $code-tag-bg; color: $text-color; - border: 1px solid darken($code-tag-bg, 15%); + border: 1px solid $code-tag-border; padding: 10px; border-radius: 4px; } From d27da57b0298ac14ae943c855852c8b1487c278f Mon Sep 17 00:00:00 2001 From: Matt Toback Date: Thu, 14 Apr 2016 12:39:37 -0400 Subject: [PATCH 6/6] Fixed the fix. --- public/app/plugins/panel/pluginlist/module.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/plugins/panel/pluginlist/module.html b/public/app/plugins/panel/pluginlist/module.html index 1aa9f7ad2eb..c73da35b391 100644 --- a/public/app/plugins/panel/pluginlist/module.html +++ b/public/app/plugins/panel/pluginlist/module.html @@ -22,7 +22,7 @@