Remove redundant FieldName in favor of FieldOption interface
parent
1066958a02
commit
31c4d347f5
|
@ -1,7 +1,12 @@
|
||||||
import {Cell} from 'src/types'
|
import {Cell} from 'src/types'
|
||||||
import {CellType} from 'src/types/dashboard'
|
import {CellType} from 'src/types/dashboard'
|
||||||
import {ColorNumber, ColorString} from 'src/types/colors'
|
import {ColorNumber, ColorString} from 'src/types/colors'
|
||||||
import {Axes, DecimalPlaces, FieldName, TableOptions} from 'src/types/dashboard'
|
import {
|
||||||
|
Axes,
|
||||||
|
DecimalPlaces,
|
||||||
|
FieldOption,
|
||||||
|
TableOptions,
|
||||||
|
} from 'src/types/dashboard'
|
||||||
|
|
||||||
interface ShowCellEditorOverlayAction {
|
interface ShowCellEditorOverlayAction {
|
||||||
type: 'SHOW_CELL_EDITOR_OVERLAY'
|
type: 'SHOW_CELL_EDITOR_OVERLAY'
|
||||||
|
@ -172,11 +177,11 @@ export const changeDecimalPlaces = (
|
||||||
interface UpdateFieldOptionsAction {
|
interface UpdateFieldOptionsAction {
|
||||||
type: 'UPDATE_FIELD_OPTIONS'
|
type: 'UPDATE_FIELD_OPTIONS'
|
||||||
payload: {
|
payload: {
|
||||||
fieldOptions: FieldName[]
|
fieldOptions: FieldOption[]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export const updateFieldOptions = (
|
export const updateFieldOptions = (
|
||||||
fieldOptions: FieldName[]
|
fieldOptions: FieldOption[]
|
||||||
): UpdateFieldOptionsAction => ({
|
): UpdateFieldOptionsAction => ({
|
||||||
type: 'UPDATE_FIELD_OPTIONS',
|
type: 'UPDATE_FIELD_OPTIONS',
|
||||||
payload: {
|
payload: {
|
||||||
|
|
|
@ -13,7 +13,7 @@ import {TimeRange, QueryConfig, Axes, Template, Source} from 'src/types'
|
||||||
import {
|
import {
|
||||||
TableOptions,
|
TableOptions,
|
||||||
DecimalPlaces,
|
DecimalPlaces,
|
||||||
FieldName,
|
FieldOption,
|
||||||
CellType,
|
CellType,
|
||||||
} from 'src/types/dashboard'
|
} from 'src/types/dashboard'
|
||||||
import {ColorString, ColorNumber} from 'src/types/colors'
|
import {ColorString, ColorNumber} from 'src/types/colors'
|
||||||
|
@ -29,7 +29,7 @@ interface Props {
|
||||||
tableOptions: TableOptions
|
tableOptions: TableOptions
|
||||||
timeFormat: string
|
timeFormat: string
|
||||||
decimalPlaces: DecimalPlaces
|
decimalPlaces: DecimalPlaces
|
||||||
fieldOptions: FieldName[]
|
fieldOptions: FieldOption[]
|
||||||
resizerTopHeight: number
|
resizerTopHeight: number
|
||||||
thresholdsListColors: ColorNumber[]
|
thresholdsListColors: ColorNumber[]
|
||||||
gaugeColors: ColorNumber[]
|
gaugeColors: ColorNumber[]
|
||||||
|
|
|
@ -18,15 +18,9 @@ export interface FieldOption {
|
||||||
visible: boolean
|
visible: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FieldName {
|
|
||||||
internalName: string
|
|
||||||
displayName: string
|
|
||||||
visible: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TableOptions {
|
export interface TableOptions {
|
||||||
verticalTimeAxis: boolean
|
verticalTimeAxis: boolean
|
||||||
sortBy: FieldName
|
sortBy: FieldOption
|
||||||
wrapping?: string
|
wrapping?: string
|
||||||
fixFirstColumn: boolean
|
fixFirstColumn: boolean
|
||||||
}
|
}
|
||||||
|
@ -76,7 +70,7 @@ export interface Cell {
|
||||||
axes: Axes
|
axes: Axes
|
||||||
colors: ColorString[]
|
colors: ColorString[]
|
||||||
tableOptions: TableOptions
|
tableOptions: TableOptions
|
||||||
fieldOptions: FieldName[]
|
fieldOptions: FieldOption[]
|
||||||
timeFormat: string
|
timeFormat: string
|
||||||
decimalPlaces: DecimalPlaces
|
decimalPlaces: DecimalPlaces
|
||||||
links: CellLinks
|
links: CellLinks
|
||||||
|
|
Loading…
Reference in New Issue