Place table options in dashboard types
parent
d94d4dcfed
commit
9d930c595f
|
@ -30,31 +30,13 @@ import {ErrorHandling} from 'src/shared/decorators/errors'
|
|||
|
||||
import {TimeSeriesServerResponse} from 'src/types/series'
|
||||
import {ColorString} from 'src/types/colors'
|
||||
|
||||
type dbData = string | number | null | undefined
|
||||
|
||||
interface TableOptions {
|
||||
verticalTimeAxis: boolean
|
||||
sortBy: FieldOption
|
||||
wrapping?: string
|
||||
fixFirstColumn: boolean
|
||||
}
|
||||
|
||||
interface DecimalPlaces {
|
||||
isEnforced: boolean
|
||||
digits: number
|
||||
}
|
||||
|
||||
interface FieldOption {
|
||||
internalName: string
|
||||
displayName: string
|
||||
visible: boolean
|
||||
}
|
||||
|
||||
interface Sort {
|
||||
field: string
|
||||
direction: string
|
||||
}
|
||||
import {
|
||||
TableOptions,
|
||||
FieldOption,
|
||||
DecimalPlaces,
|
||||
Sort,
|
||||
dbData,
|
||||
} from 'src/types/dashboard'
|
||||
|
||||
interface Props {
|
||||
data: TimeSeriesServerResponse
|
||||
|
|
|
@ -10,9 +10,12 @@ interface Axis {
|
|||
scale: string
|
||||
}
|
||||
|
||||
export interface Axes {
|
||||
x: Axis
|
||||
y: Axis
|
||||
export type dbData = string | number | null | undefined
|
||||
|
||||
export interface FieldOption {
|
||||
internalName: string
|
||||
displayName: string
|
||||
visible: boolean
|
||||
}
|
||||
|
||||
export interface FieldName {
|
||||
|
@ -24,10 +27,20 @@ export interface FieldName {
|
|||
export interface TableOptions {
|
||||
verticalTimeAxis: boolean
|
||||
sortBy: FieldName
|
||||
wrapping: string
|
||||
wrapping?: string
|
||||
fixFirstColumn: boolean
|
||||
}
|
||||
|
||||
export interface Sort {
|
||||
field: string
|
||||
direction: string
|
||||
}
|
||||
|
||||
export interface Axes {
|
||||
x: Axis
|
||||
y: Axis
|
||||
}
|
||||
|
||||
interface CellLinks {
|
||||
self: string
|
||||
}
|
||||
|
|
|
@ -7,7 +7,12 @@ import {
|
|||
Template,
|
||||
QueryConfig,
|
||||
} from 'src/types'
|
||||
import {Axes, TableOptions, FieldName, DecimalPlaces} from 'src/types/dashboard'
|
||||
import {
|
||||
Axes,
|
||||
TableOptions,
|
||||
FieldOption,
|
||||
DecimalPlaces,
|
||||
} from 'src/types/dashboard'
|
||||
import {ColorString, ColorNumber} from 'src/types/colors'
|
||||
|
||||
export const sourceLinks: SourceLinks = {
|
||||
|
@ -104,7 +109,7 @@ export const axes: Axes = {
|
|||
},
|
||||
}
|
||||
|
||||
export const fieldOptions: FieldName[] = [
|
||||
export const fieldOptions: FieldOption[] = [
|
||||
{
|
||||
internalName: 'time',
|
||||
displayName: '',
|
||||
|
|
Loading…
Reference in New Issue