Rename constant to be consistent

pull/2993/head
Alex P 2018-03-16 10:37:22 -07:00
parent 5b383dd122
commit 5d9977d7df
2 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
import { import {
THRESHOLD_TYPE_TEXT, THRESHOLD_TYPE_TEXT,
DEFAULT_SINGLESTAT_COLORS, DEFAULT_THRESHOLDS_LIST_COLORS,
DEFAULT_GAUGE_COLORS, DEFAULT_GAUGE_COLORS,
validateGaugeColors, validateGaugeColors,
validateThresholdsListColors, validateThresholdsListColors,
@ -12,7 +12,7 @@ import {initializeOptions} from 'src/dashboards/constants/cellEditor'
export const initialState = { export const initialState = {
cell: null, cell: null,
thresholdsListType: THRESHOLD_TYPE_TEXT, thresholdsListType: THRESHOLD_TYPE_TEXT,
thresholdsListColors: DEFAULT_SINGLESTAT_COLORS, thresholdsListColors: DEFAULT_THRESHOLDS_LIST_COLORS,
gaugeColors: DEFAULT_GAUGE_COLORS, gaugeColors: DEFAULT_GAUGE_COLORS,
} }

View File

@ -111,7 +111,7 @@ export const DEFAULT_GAUGE_COLORS = [
}, },
] ]
export const DEFAULT_SINGLESTAT_COLORS = [ export const DEFAULT_THRESHOLDS_LIST_COLORS = [
{ {
type: THRESHOLD_TYPE_TEXT, type: THRESHOLD_TYPE_TEXT,
hex: GAUGE_COLORS[11].hex, hex: GAUGE_COLORS[11].hex,
@ -133,7 +133,7 @@ export const DEFAULT_TABLE_COLORS = [
export const validateThresholdsListColors = (colors, type) => { export const validateThresholdsListColors = (colors, type) => {
if (!colors || colors.length === 0) { if (!colors || colors.length === 0) {
return DEFAULT_SINGLESTAT_COLORS return DEFAULT_THRESHOLDS_LIST_COLORS
} }
let containsBaseColor = false let containsBaseColor = false
@ -150,7 +150,7 @@ export const validateThresholdsListColors = (colors, type) => {
const formattedColorsWithBase = [ const formattedColorsWithBase = [
...formattedColors, ...formattedColors,
DEFAULT_SINGLESTAT_COLORS[0], DEFAULT_THRESHOLDS_LIST_COLORS[0],
] ]
return containsBaseColor ? formattedColors : formattedColorsWithBase return containsBaseColor ? formattedColors : formattedColorsWithBase