diff --git a/ui/src/dashboards/constants/index.js b/ui/src/dashboards/constants/index.js index 7a09fab60..875699fa9 100644 --- a/ui/src/dashboards/constants/index.js +++ b/ui/src/dashboards/constants/index.js @@ -5,16 +5,7 @@ import { import {CELL_TYPE_LINE} from 'src/dashboards/graphics/graph' import {TEMP_VAR_DASHBOARD_TIME} from 'src/shared/constants' -export const UNTITLED_CELL = 'Untitled Graph' -export const UNTITLED_CELL_LINE = 'Untitled Line Graph' -export const UNTITLED_CELL_STACKED = 'Untitled Stacked Graph' -export const UNTITLED_CELL_STEPPLOT = 'Untitled Step-Plot Graph' -export const UNTITLED_CELL_BAR = 'Untitled Bar Graph' -export const UNTITLED_CELL_LINE_PLUS_SINGLE_STAT = - 'Untitled Line Graph + Single Stat' -export const UNTITLED_CELL_SINGLE_STAT = 'Untitled Single Stat' -export const UNTITLED_CELL_GAUGE = 'Untitled Gauge' -export const UNTITLED_CELL_TABLE = 'Untitled Table' +export const UNTITLED_GRAPH = 'Untitled Graph' export const TIME_FORMAT_TOOLTIP_LINK = 'http://momentjs.com/docs/#/parsing/string-format/' @@ -56,7 +47,7 @@ export const NEW_DEFAULT_DASHBOARD_CELL = { y: 0, w: 4, h: 4, - name: UNTITLED_CELL, + name: UNTITLED_GRAPH, type: CELL_TYPE_LINE, queries: [], tableOptions: DEFAULT_TABLE_OPTIONS, diff --git a/ui/src/dashboards/utils/cellGetters.js b/ui/src/dashboards/utils/cellGetters.js index 31774d8f9..44ba00abe 100644 --- a/ui/src/dashboards/utils/cellGetters.js +++ b/ui/src/dashboards/utils/cellGetters.js @@ -1,6 +1,6 @@ import {NEW_DEFAULT_DASHBOARD_CELL} from 'src/dashboards/constants' import {CELL_TYPE_LINE} from 'src/dashboards/graphics/graph' -import {UNTITLED_CELL} from 'src/dashboards/constants' +import {UNTITLED_GRAPH} from 'src/dashboards/constants' const getMostCommonValue = values => { const results = values.reduce( @@ -23,7 +23,7 @@ const getMostCommonValue = values => { } export const isCellUntitled = cellName => { - return cellName === UNTITLED_CELL + return cellName === UNTITLED_GRAPH } const numColumns = 12 @@ -58,7 +58,7 @@ export const getNewDashboardCell = (dashboard, cellType) => { const typedCell = { ...NEW_DEFAULT_DASHBOARD_CELL, type, - name: UNTITLED_CELL, + name: UNTITLED_GRAPH, } if (dashboard.cells.length === 0) { diff --git a/ui/test/dashboards/reducers/cellEditorOverlay.test.js b/ui/test/dashboards/reducers/cellEditorOverlay.test.js index 1fe88c7d7..e0b05d9b4 100644 --- a/ui/test/dashboards/reducers/cellEditorOverlay.test.js +++ b/ui/test/dashboards/reducers/cellEditorOverlay.test.js @@ -21,10 +21,10 @@ import { import {validateLineColors} from 'src/shared/constants/graphColorPalettes' import {CELL_TYPE_LINE} from 'src/dashboards/graphics/graph' -import {UNTITLED_CELL_LINE} from 'src/dashboards/constants' +import {UNTITLED_GRAPH} from 'src/dashboards/constants' const defaultCellType = CELL_TYPE_LINE -const defaultCellName = UNTITLED_CELL_LINE +const defaultCellName = UNTITLED_GRAPH const defaultCellAxes = { y: { base: '10',