ux(): updated light theme

This commit is contained in:
Torkel Ödegaard 2016-04-12 14:26:49 -04:00
parent 6961cb7440
commit ad0794cc59
4 changed files with 10 additions and 7 deletions

View File

@ -42,6 +42,7 @@ export default class TimeSeries {
fillBelowTo: any; fillBelowTo: any;
transform: any; transform: any;
flotpairs: any; flotpairs: any;
unit: any;
constructor(opts) { constructor(opts) {
this.datapoints = opts.datapoints; this.datapoints = opts.datapoints;
@ -52,6 +53,7 @@ export default class TimeSeries {
this.valueFormater = kbn.valueFormats.none; this.valueFormater = kbn.valueFormats.none;
this.stats = {}; this.stats = {};
this.legend = true; this.legend = true;
this.unit = opts.unit;
} }
applySeriesOverrides(overrides) { applySeriesOverrides(overrides) {

View File

@ -34,7 +34,7 @@
</div> </div>
<info-popover offset="0px -130px"> <info-popover offset="0px -130px">
The name is used when you select the data source in panels. The name is used when you select the data source in panels.
The <code>Default</code> data source is preselected in new The <em>Default</em> data source is preselected in new
panels. panels.
</info-popover> </info-popover>
<gf-form-switch class="gf-form" label="Default" checked="ctrl.current.isDefault" switch-class="max-width-6"></gf-form-switch> <gf-form-switch class="gf-form" label="Default" checked="ctrl.current.isDefault" switch-class="max-width-6"></gf-form-switch>

View File

@ -202,6 +202,7 @@ class GraphCtrl extends MetricsPanelCtrl {
datapoints: datapoints, datapoints: datapoints,
alias: alias, alias: alias,
color: color, color: color,
unit: seriesData.unit,
}); });
if (datapoints && datapoints.length > 0) { if (datapoints && datapoints.length > 0) {
@ -212,13 +213,9 @@ class GraphCtrl extends MetricsPanelCtrl {
} }
this.datapointsCount += datapoints.length; this.datapointsCount += datapoints.length;
this.panel.tooltip.msResolution = this.panel.tooltip.msResolution || series.isMsResolutionNeeded(); this.panel.tooltip.msResolution = this.panel.tooltip.msResolution || series.isMsResolutionNeeded();
} }
if (seriesData.unit) {
this.panel.yaxes[series.yaxis-1].format = seriesData.unit;
}
return series; return series;
} }
@ -228,6 +225,10 @@ class GraphCtrl extends MetricsPanelCtrl {
for (let series of this.seriesList) { for (let series of this.seriesList) {
series.applySeriesOverrides(this.panel.seriesOverrides); series.applySeriesOverrides(this.panel.seriesOverrides);
if (series.unit) {
this.panel.yaxes[series.yaxis-1].format = series.unit;
}
} }
} }

View File

@ -277,8 +277,8 @@ $popover-help-color: $gray-6;
// Tooltips and popovers // Tooltips and popovers
// ------------------------- // -------------------------
$tooltipColor: $text-color; $tooltipColor: $popover-help-color;
$tooltipBackground: $gray-5; $tooltipBackground: $popover-help-bg;
$tooltipArrowWidth: 5px; $tooltipArrowWidth: 5px;
$tooltipArrowColor: $tooltipBackground; $tooltipArrowColor: $tooltipBackground;
$tooltipLinkColor: $link-color; $tooltipLinkColor: $link-color;