From 2626cf89558c1fd2ebf87f6d5ed8c6456f7e62b5 Mon Sep 17 00:00:00 2001 From: Jared Scheib Date: Fri, 22 Jun 2018 18:08:57 -0700 Subject: [PATCH] Rename types/dashboard.ts to plural for consistency --- ui/src/dashboards/actions/cellEditorOverlay.ts | 4 ++-- ui/src/dashboards/actions/index.ts | 2 +- ui/src/dashboards/components/DashboardEmpty.tsx | 2 +- ui/src/dashboards/components/DashboardHeader.tsx | 2 +- ui/src/dashboards/components/GraphOptionsDecimalPlaces.tsx | 2 +- ui/src/dashboards/components/TableOptions.tsx | 2 +- ui/src/dashboards/components/Visualization.tsx | 2 +- ui/src/dashboards/constants/cellEditor.ts | 2 +- ui/src/dashboards/constants/index.ts | 2 +- ui/src/dashboards/containers/DashboardPage.tsx | 2 +- ui/src/dashboards/containers/DashboardsPage.tsx | 2 +- ui/src/dashboards/graphics/graph.tsx | 2 +- ui/src/dashboards/reducers/cellEditorOverlay.ts | 2 +- ui/src/dashboards/utils/cellGetters.ts | 2 +- ui/src/dashboards/utils/tableGraph.ts | 2 +- ui/src/shared/components/LayoutCellMenu.tsx | 2 +- ui/src/shared/components/SingleStat.tsx | 2 +- ui/src/shared/components/TableGraph.tsx | 2 +- ui/src/shared/components/WidgetCell.tsx | 2 +- ui/src/shared/constants/colorOperations.ts | 2 +- ui/src/shared/constants/index.tsx | 2 +- ui/src/status/fixtures.ts | 2 +- ui/src/types/actions/dashboards.ts | 2 +- ui/src/types/apis/dashboard.ts | 2 +- ui/src/types/{dashboard.ts => dashboards.ts} | 0 ui/test/fixtures/index.ts | 4 ++-- 26 files changed, 27 insertions(+), 27 deletions(-) rename ui/src/types/{dashboard.ts => dashboards.ts} (100%) diff --git a/ui/src/dashboards/actions/cellEditorOverlay.ts b/ui/src/dashboards/actions/cellEditorOverlay.ts index b1f91b7b54..018444bad6 100644 --- a/ui/src/dashboards/actions/cellEditorOverlay.ts +++ b/ui/src/dashboards/actions/cellEditorOverlay.ts @@ -1,12 +1,12 @@ import {Cell} from 'src/types' -import {CellType, ThresholdType} from 'src/types/dashboard' +import {CellType, ThresholdType} from 'src/types/dashboards' import {ColorNumber, ColorString} from 'src/types/colors' import { Axes, DecimalPlaces, FieldOption, TableOptions, -} from 'src/types/dashboard' +} from 'src/types/dashboards' export type Action = | ShowCellEditorOverlayAction diff --git a/ui/src/dashboards/actions/index.ts b/ui/src/dashboards/actions/index.ts index be1e1502c7..c15e3b5d12 100644 --- a/ui/src/dashboards/actions/index.ts +++ b/ui/src/dashboards/actions/index.ts @@ -67,7 +67,7 @@ import { TimeRange, URLQueryParams, } from 'src/types' -import * as DashboardData from 'src/types/dashboard' +import * as DashboardData from 'src/types/dashboards' import * as DashboardActions from 'src/types/actions/dashboards' import * as DashboardAPIs from 'src/types/apis/dashboard' import * as DashboardReducers from 'src/types/reducers/dashboards' diff --git a/ui/src/dashboards/components/DashboardEmpty.tsx b/ui/src/dashboards/components/DashboardEmpty.tsx index 5a450dbfd8..c514699750 100644 --- a/ui/src/dashboards/components/DashboardEmpty.tsx +++ b/ui/src/dashboards/components/DashboardEmpty.tsx @@ -1,5 +1,5 @@ import React, {Component} from 'react' -import {Cell} from 'src/types/dashboard' +import {Cell} from 'src/types/dashboards' import {connect} from 'react-redux' import {bindActionCreators} from 'redux' diff --git a/ui/src/dashboards/components/DashboardHeader.tsx b/ui/src/dashboards/components/DashboardHeader.tsx index ba320a9c59..ecf04c380b 100644 --- a/ui/src/dashboards/components/DashboardHeader.tsx +++ b/ui/src/dashboards/components/DashboardHeader.tsx @@ -12,7 +12,7 @@ import DashboardHeaderEdit from 'src/dashboards/components/DashboardHeaderEdit' import DashboardSwitcher from 'src/dashboards/components/DashboardSwitcher' import {Dashboard, TimeRange} from 'src/types' -import {DashboardName} from 'src/types/dashboard' +import {DashboardName} from 'src/types/dashboards' import * as AppActions from 'src/shared/actions/app' interface Props { diff --git a/ui/src/dashboards/components/GraphOptionsDecimalPlaces.tsx b/ui/src/dashboards/components/GraphOptionsDecimalPlaces.tsx index 75de17b1b8..0a1c8c390d 100644 --- a/ui/src/dashboards/components/GraphOptionsDecimalPlaces.tsx +++ b/ui/src/dashboards/components/GraphOptionsDecimalPlaces.tsx @@ -2,7 +2,7 @@ import React, {PureComponent} from 'react' import {ErrorHandling} from 'src/shared/decorators/errors' import OptIn from 'src/shared/components/OptIn' -import {DecimalPlaces} from 'src/types/dashboard' +import {DecimalPlaces} from 'src/types/dashboards' interface Props extends DecimalPlaces { onDecimalPlacesChange: (decimalPlaces: DecimalPlaces) => void diff --git a/ui/src/dashboards/components/TableOptions.tsx b/ui/src/dashboards/components/TableOptions.tsx index 8527929b59..9d365b747d 100644 --- a/ui/src/dashboards/components/TableOptions.tsx +++ b/ui/src/dashboards/components/TableOptions.tsx @@ -24,7 +24,7 @@ import { import {DEFAULT_TIME_FIELD} from 'src/dashboards/constants' import {ErrorHandling} from 'src/shared/decorators/errors' -import {DecimalPlaces} from 'src/types/dashboard' +import {DecimalPlaces} from 'src/types/dashboards' import {QueryConfig} from 'src/types/query' interface DropdownOption { diff --git a/ui/src/dashboards/components/Visualization.tsx b/ui/src/dashboards/components/Visualization.tsx index ddbbc13b93..98b9d440ce 100644 --- a/ui/src/dashboards/components/Visualization.tsx +++ b/ui/src/dashboards/components/Visualization.tsx @@ -15,7 +15,7 @@ import { DecimalPlaces, FieldOption, CellType, -} from 'src/types/dashboard' +} from 'src/types/dashboards' import {ColorString, ColorNumber} from 'src/types/colors' interface Props { diff --git a/ui/src/dashboards/constants/cellEditor.ts b/ui/src/dashboards/constants/cellEditor.ts index a22bc262d6..a7f941bd9f 100644 --- a/ui/src/dashboards/constants/cellEditor.ts +++ b/ui/src/dashboards/constants/cellEditor.ts @@ -1,6 +1,6 @@ import {DEFAULT_TABLE_OPTIONS} from 'src/dashboards/constants' import {stringifyColorValues} from 'src/shared/constants/colorOperations' -import {CellType, Axis} from 'src/types/dashboard' +import {CellType, Axis} from 'src/types/dashboards' import {ColorString, ColorNumber} from 'src/types/colors' export const initializeOptions = (cellType: CellType) => { diff --git a/ui/src/dashboards/constants/index.ts b/ui/src/dashboards/constants/index.ts index 99ec7a64a3..e72994dae1 100644 --- a/ui/src/dashboards/constants/index.ts +++ b/ui/src/dashboards/constants/index.ts @@ -3,7 +3,7 @@ import { DEFAULT_FIX_FIRST_COLUMN, } from 'src/shared/constants/tableGraph' import {Cell, QueryConfig} from 'src/types' -import {CellType, Dashboard, DecimalPlaces} from 'src/types/dashboard' +import {CellType, Dashboard, DecimalPlaces} from 'src/types/dashboards' export const UNTITLED_GRAPH: string = 'Untitled Graph' diff --git a/ui/src/dashboards/containers/DashboardPage.tsx b/ui/src/dashboards/containers/DashboardPage.tsx index 1f8433e044..1a2443561c 100644 --- a/ui/src/dashboards/containers/DashboardPage.tsx +++ b/ui/src/dashboards/containers/DashboardPage.tsx @@ -59,7 +59,7 @@ import { TemplateValue, TimeRange, } from 'src/types' -import {DashboardName} from 'src/types/dashboard' +import {DashboardName} from 'src/types/dashboards' import {ColorNumber, ColorString} from 'src/types/colors' import * as AnnotationActions from 'src/types/actions/annotations' import * as AppActions from 'src/shared/actions/app' diff --git a/ui/src/dashboards/containers/DashboardsPage.tsx b/ui/src/dashboards/containers/DashboardsPage.tsx index f3452b1c29..450b370053 100644 --- a/ui/src/dashboards/containers/DashboardsPage.tsx +++ b/ui/src/dashboards/containers/DashboardsPage.tsx @@ -26,7 +26,7 @@ import { import {Source, Dashboard} from 'src/types' import {Notification} from 'src/types/notifications' -import {DashboardFile} from 'src/types/dashboard' +import {DashboardFile} from 'src/types/dashboards' interface Props { source: Source diff --git a/ui/src/dashboards/graphics/graph.tsx b/ui/src/dashboards/graphics/graph.tsx index 971e0b8dfa..1f235160ed 100644 --- a/ui/src/dashboards/graphics/graph.tsx +++ b/ui/src/dashboards/graphics/graph.tsx @@ -1,6 +1,6 @@ import React, {ReactElement} from 'react' -import {CellType} from 'src/types/dashboard' +import {CellType} from 'src/types/dashboards' type Graphic = ReactElement diff --git a/ui/src/dashboards/reducers/cellEditorOverlay.ts b/ui/src/dashboards/reducers/cellEditorOverlay.ts index c72d744b95..bf0e8e61c8 100644 --- a/ui/src/dashboards/reducers/cellEditorOverlay.ts +++ b/ui/src/dashboards/reducers/cellEditorOverlay.ts @@ -16,7 +16,7 @@ import { import {initializeOptions} from 'src/dashboards/constants/cellEditor' import {Action} from 'src/dashboards/actions/cellEditorOverlay' import {CellType, Cell} from 'src/types' -import {ThresholdType, TableOptions} from 'src/types/dashboard' +import {ThresholdType, TableOptions} from 'src/types/dashboards' import {ThresholdColor, GaugeColor, LineColor} from 'src/types/colors' interface CEOInitialState { diff --git a/ui/src/dashboards/utils/cellGetters.ts b/ui/src/dashboards/utils/cellGetters.ts index e76334166d..162e5c022d 100644 --- a/ui/src/dashboards/utils/cellGetters.ts +++ b/ui/src/dashboards/utils/cellGetters.ts @@ -1,5 +1,5 @@ import {NEW_DEFAULT_DASHBOARD_CELL} from 'src/dashboards/constants' -import {Cell, CellType, Dashboard} from 'src/types/dashboard' +import {Cell, CellType, Dashboard} from 'src/types/dashboards' import {NewDefaultCell, UNTITLED_GRAPH} from 'src/dashboards/constants' const getMostCommonValue = (values: number[]): number => { diff --git a/ui/src/dashboards/utils/tableGraph.ts b/ui/src/dashboards/utils/tableGraph.ts index b84e3acd07..f4e842a1ba 100644 --- a/ui/src/dashboards/utils/tableGraph.ts +++ b/ui/src/dashboards/utils/tableGraph.ts @@ -13,7 +13,7 @@ import { FieldOption, TableOptions, DecimalPlaces, -} from 'src/types/dashboard' +} from 'src/types/dashboards' import {TimeSeriesValue} from 'src/types/series' interface ColumnWidths { diff --git a/ui/src/shared/components/LayoutCellMenu.tsx b/ui/src/shared/components/LayoutCellMenu.tsx index 8253ad04e5..ed4636cab9 100644 --- a/ui/src/shared/components/LayoutCellMenu.tsx +++ b/ui/src/shared/components/LayoutCellMenu.tsx @@ -11,7 +11,7 @@ import CustomTimeIndicator from 'src/shared/components/CustomTimeIndicator' import Authorized, {EDITOR_ROLE} from 'src/auth/Authorized' import {EDITING} from 'src/shared/annotations/helpers' import {cellSupportsAnnotations} from 'src/shared/constants/index' -import {Cell} from 'src/types/dashboard' +import {Cell} from 'src/types/dashboards' import {QueryConfig} from 'src/types/query' import { diff --git a/ui/src/shared/components/SingleStat.tsx b/ui/src/shared/components/SingleStat.tsx index 1b89456539..cb64f54005 100644 --- a/ui/src/shared/components/SingleStat.tsx +++ b/ui/src/shared/components/SingleStat.tsx @@ -7,7 +7,7 @@ import {SMALL_CELL_HEIGHT} from 'src/shared/graphs/helpers' import {DYGRAPH_CONTAINER_V_MARGIN} from 'src/shared/constants' import {generateThresholdsListHexs} from 'src/shared/constants/colorOperations' import {ColorNumber} from 'src/types/colors' -import {CellType} from 'src/types/dashboard' +import {CellType} from 'src/types/dashboards' import {Data} from 'src/types/dygraphs' import {ErrorHandling} from 'src/shared/decorators/errors' diff --git a/ui/src/shared/components/TableGraph.tsx b/ui/src/shared/components/TableGraph.tsx index 4b2a2c48c6..6d2af48bcd 100644 --- a/ui/src/shared/components/TableGraph.tsx +++ b/ui/src/shared/components/TableGraph.tsx @@ -36,7 +36,7 @@ import { FieldOption, DecimalPlaces, Sort, -} from 'src/types/dashboard' +} from 'src/types/dashboards' interface Label { label: string diff --git a/ui/src/shared/components/WidgetCell.tsx b/ui/src/shared/components/WidgetCell.tsx index 259dbdfa24..f9ce6f95ee 100644 --- a/ui/src/shared/components/WidgetCell.tsx +++ b/ui/src/shared/components/WidgetCell.tsx @@ -4,7 +4,7 @@ import AlertsApp from 'src/alerts/containers/AlertsApp' import NewsFeed from 'src/status/components/NewsFeed' import GettingStarted from 'src/status/components/GettingStarted' -import {Cell} from 'src/types/dashboard' +import {Cell} from 'src/types/dashboards' import {Source} from 'src/types/sources' import {TimeRange} from 'src/types/query' import {RECENT_ALERTS_LIMIT} from 'src/status/constants' diff --git a/ui/src/shared/constants/colorOperations.ts b/ui/src/shared/constants/colorOperations.ts index 0c011709a4..6e7780c150 100644 --- a/ui/src/shared/constants/colorOperations.ts +++ b/ui/src/shared/constants/colorOperations.ts @@ -7,7 +7,7 @@ import { THRESHOLD_TYPE_TEXT, } from 'src/shared/constants/thresholds' -import {CellType} from 'src/types/dashboard' +import {CellType} from 'src/types/dashboards' const getLegibleTextColor = bgColorHex => { const darkText = '#292933' diff --git a/ui/src/shared/constants/index.tsx b/ui/src/shared/constants/index.tsx index 216ed85f15..10f1931b91 100644 --- a/ui/src/shared/constants/index.tsx +++ b/ui/src/shared/constants/index.tsx @@ -1,7 +1,7 @@ import _ from 'lodash' import {TemplateValueType, TemplateType} from 'src/types' -import {CellType} from 'src/types/dashboard' +import {CellType} from 'src/types/dashboards' export const NO_CELL = 'none' diff --git a/ui/src/status/fixtures.ts b/ui/src/status/fixtures.ts index 95c44b5aa6..116b07d2c2 100644 --- a/ui/src/status/fixtures.ts +++ b/ui/src/status/fixtures.ts @@ -3,7 +3,7 @@ import {TEMP_VAR_DASHBOARD_TIME} from 'src/shared/constants' import {NEW_DEFAULT_DASHBOARD_CELL} from 'src/dashboards/constants/index' import {DEFAULT_AXIS} from 'src/dashboards/constants/cellEditor' import {Cell, CellQuery, Axes} from 'src/types' -import {CellType} from 'src/types/dashboard' +import {CellType} from 'src/types/dashboards' const emptyQuery: CellQuery = { query: '', diff --git a/ui/src/types/actions/dashboards.ts b/ui/src/types/actions/dashboards.ts index a3a61d7077..ac50659e7f 100644 --- a/ui/src/types/actions/dashboards.ts +++ b/ui/src/types/actions/dashboards.ts @@ -2,7 +2,7 @@ import {Dispatch} from 'redux' import {InjectedRouter} from 'react-router' import {LocationAction} from 'react-router-redux' import {Source} from 'src/types' -import * as DashboardData from 'src/types/dashboard' +import * as DashboardData from 'src/types/dashboards' import * as QueryData from 'src/types/query' import * as TempVarData from 'src/types/tempVars' import * as ErrorActions from 'src/types/actions/errors' diff --git a/ui/src/types/apis/dashboard.ts b/ui/src/types/apis/dashboard.ts index 07d7b7debc..af470c7dd9 100644 --- a/ui/src/types/apis/dashboard.ts +++ b/ui/src/types/apis/dashboard.ts @@ -1,4 +1,4 @@ -import {Dashboard} from 'src/types/dashboard' +import {Dashboard} from 'src/types/dashboards' export interface DashboardsResponse { dashboards: Dashboard[] diff --git a/ui/src/types/dashboard.ts b/ui/src/types/dashboards.ts similarity index 100% rename from ui/src/types/dashboard.ts rename to ui/src/types/dashboards.ts diff --git a/ui/test/fixtures/index.ts b/ui/test/fixtures/index.ts index 234fea24ee..172651d2fb 100644 --- a/ui/test/fixtures/index.ts +++ b/ui/test/fixtures/index.ts @@ -15,9 +15,9 @@ import { TableOptions, FieldOption, DecimalPlaces, -} from 'src/types/dashboard' +} from 'src/types/dashboards' import {LineColor, ColorNumber} from 'src/types/colors' -import {CellType} from 'src/types/dashboard' +import {CellType} from 'src/types/dashboards' export const sourceLinks: SourceLinks = { services: '/chronograf/v1/sources/4',