From 1de16619bef1257568f9bb6ad013a8e5e3d88e71 Mon Sep 17 00:00:00 2001 From: Alex P Date: Thu, 8 Feb 2018 11:02:34 -0800 Subject: [PATCH] Fix logic in single stat coloration getter Sometimes results in a situation where coloration state gets set to a weird value, which seems to be a factor in the auto refresh bug --- ui/src/dashboards/constants/gaugeColors.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/src/dashboards/constants/gaugeColors.js b/ui/src/dashboards/constants/gaugeColors.js index 61121fc80e..0fa0302db4 100644 --- a/ui/src/dashboards/constants/gaugeColors.js +++ b/ui/src/dashboards/constants/gaugeColors.js @@ -143,9 +143,11 @@ export const validateSingleStatColors = (colors, coloration) => { export const getSingleStatColoration = colors => { if (!colors || colors.length === 0) { return SINGLE_STAT_TEXT + } else if (colors[0].type === (SINGLE_STAT_TEXT || SINGLE_STAT_BG)) { + return colors[0].type } - return colors[0].type + return SINGLE_STAT_TEXT } export const validateGaugeColors = colors => {