mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
ux(): updated light theme
This commit is contained in:
parent
6961cb7440
commit
ad0794cc59
@ -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) {
|
||||||
|
@ -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>
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user