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