From ad0794cc59f1c144b02cb5a922863dc2e48f4c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 12 Apr 2016 14:26:49 -0400 Subject: [PATCH] ux(): updated light theme --- public/app/core/time_series2.ts | 2 ++ public/app/features/plugins/partials/ds_edit.html | 2 +- public/app/plugins/panel/graph/module.ts | 9 +++++---- public/sass/_variables.light.scss | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/public/app/core/time_series2.ts b/public/app/core/time_series2.ts index e0a3dd47b4e..cbceff7afd8 100644 --- a/public/app/core/time_series2.ts +++ b/public/app/core/time_series2.ts @@ -42,6 +42,7 @@ export default class TimeSeries { fillBelowTo: any; transform: any; flotpairs: any; + unit: any; constructor(opts) { this.datapoints = opts.datapoints; @@ -52,6 +53,7 @@ export default class TimeSeries { this.valueFormater = kbn.valueFormats.none; this.stats = {}; this.legend = true; + this.unit = opts.unit; } applySeriesOverrides(overrides) { diff --git a/public/app/features/plugins/partials/ds_edit.html b/public/app/features/plugins/partials/ds_edit.html index 54254169b0b..a43a9db4345 100644 --- a/public/app/features/plugins/partials/ds_edit.html +++ b/public/app/features/plugins/partials/ds_edit.html @@ -34,7 +34,7 @@ The name is used when you select the data source in panels. - The Default data source is preselected in new + The Default data source is preselected in new panels. diff --git a/public/app/plugins/panel/graph/module.ts b/public/app/plugins/panel/graph/module.ts index 748518ce92e..b626cc8d767 100644 --- a/public/app/plugins/panel/graph/module.ts +++ b/public/app/plugins/panel/graph/module.ts @@ -202,6 +202,7 @@ class GraphCtrl extends MetricsPanelCtrl { datapoints: datapoints, alias: alias, color: color, + unit: seriesData.unit, }); if (datapoints && datapoints.length > 0) { @@ -212,13 +213,9 @@ class GraphCtrl extends MetricsPanelCtrl { } this.datapointsCount += datapoints.length; - this.panel.tooltip.msResolution = this.panel.tooltip.msResolution || series.isMsResolutionNeeded(); } - if (seriesData.unit) { - this.panel.yaxes[series.yaxis-1].format = seriesData.unit; - } return series; } @@ -228,6 +225,10 @@ class GraphCtrl extends MetricsPanelCtrl { for (let series of this.seriesList) { series.applySeriesOverrides(this.panel.seriesOverrides); + + if (series.unit) { + this.panel.yaxes[series.yaxis-1].format = series.unit; + } } } diff --git a/public/sass/_variables.light.scss b/public/sass/_variables.light.scss index bea22947da5..e2e374b48ee 100644 --- a/public/sass/_variables.light.scss +++ b/public/sass/_variables.light.scss @@ -277,8 +277,8 @@ $popover-help-color: $gray-6; // Tooltips and popovers // ------------------------- -$tooltipColor: $text-color; -$tooltipBackground: $gray-5; +$tooltipColor: $popover-help-color; +$tooltipBackground: $popover-help-bg; $tooltipArrowWidth: 5px; $tooltipArrowColor: $tooltipBackground; $tooltipLinkColor: $link-color;