Fix missed conflic and update types and fixtures based on type changes from master
parent
b2399a1594
commit
bb0719160b
|
@ -102,13 +102,8 @@ const createWorkingDraft = (source: string, query: CellQuery): QueryConfig => {
|
||||||
|
|
||||||
const createWorkingDrafts = (
|
const createWorkingDrafts = (
|
||||||
source: string,
|
source: string,
|
||||||
<<<<<<< HEAD
|
|
||||||
queries: CellQuery[] = []
|
|
||||||
): Query[] =>
|
|
||||||
=======
|
|
||||||
queries: CellQuery[]
|
queries: CellQuery[]
|
||||||
): QueryConfig[] =>
|
): QueryConfig[] =>
|
||||||
>>>>>>> Add types to handleEditRawText in CEO
|
|
||||||
_.cloneDeep(
|
_.cloneDeep(
|
||||||
queries.map((query: CellQuery) => createWorkingDraft(source, query))
|
queries.map((query: CellQuery) => createWorkingDraft(source, query))
|
||||||
)
|
)
|
||||||
|
|
|
@ -15,14 +15,13 @@ export interface Axes {
|
||||||
y: Axis
|
y: Axis
|
||||||
}
|
}
|
||||||
|
|
||||||
interface FieldName {
|
export interface FieldName {
|
||||||
internalName: string
|
internalName: string
|
||||||
displayName: string
|
displayName: string
|
||||||
visible: boolean
|
visible: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TableOptions {
|
export interface TableOptions {
|
||||||
timeFormat: string
|
|
||||||
verticalTimeAxis: boolean
|
verticalTimeAxis: boolean
|
||||||
sortBy: FieldName
|
sortBy: FieldName
|
||||||
wrapping: string
|
wrapping: string
|
||||||
|
@ -43,7 +42,7 @@ export interface Legend {
|
||||||
orientation?: string
|
orientation?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DecimalPlaces {
|
export interface DecimalPlaces {
|
||||||
isEnforced: boolean
|
isEnforced: boolean
|
||||||
digits: number
|
digits: number
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import {
|
||||||
TimeRange,
|
TimeRange,
|
||||||
Template,
|
Template,
|
||||||
} from 'src/types'
|
} from 'src/types'
|
||||||
import {Axes, TableOptions} from 'src/types/dashboard'
|
import {Axes, TableOptions, FieldName, DecimalPlaces} from 'src/types/dashboard'
|
||||||
import {ColorString, ColorNumber} from 'src/types/colors'
|
import {ColorString, ColorNumber} from 'src/types/colors'
|
||||||
|
|
||||||
export const sourceLinks: SourceLinks = {
|
export const sourceLinks: SourceLinks = {
|
||||||
|
@ -101,8 +101,15 @@ export const axes: Axes = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const fieldOptions: FieldName[] = [
|
||||||
|
{
|
||||||
|
internalName: 'time',
|
||||||
|
displayName: '',
|
||||||
|
visible: true,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
export const tableOptions: TableOptions = {
|
export const tableOptions: TableOptions = {
|
||||||
timeFormat: 'MM/DD/YYYY HH:mm:ss',
|
|
||||||
verticalTimeAxis: true,
|
verticalTimeAxis: true,
|
||||||
sortBy: {
|
sortBy: {
|
||||||
internalName: 'time',
|
internalName: 'time',
|
||||||
|
@ -110,13 +117,6 @@ export const tableOptions: TableOptions = {
|
||||||
visible: true,
|
visible: true,
|
||||||
},
|
},
|
||||||
wrapping: 'truncate',
|
wrapping: 'truncate',
|
||||||
fieldNames: [
|
|
||||||
{
|
|
||||||
internalName: 'time',
|
|
||||||
displayName: '',
|
|
||||||
visible: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
fixFirstColumn: true,
|
fixFirstColumn: true,
|
||||||
}
|
}
|
||||||
export const lineColors: ColorString[] = [
|
export const lineColors: ColorString[] = [
|
||||||
|
@ -143,6 +143,11 @@ export const lineColors: ColorString[] = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
export const decimalPlaces: DecimalPlaces = {
|
||||||
|
isEnforced: true,
|
||||||
|
digits: 4,
|
||||||
|
}
|
||||||
|
|
||||||
export const cell: Cell = {
|
export const cell: Cell = {
|
||||||
id: '67435af2-17bf-4caa-a5fc-0dd1ffb40dab',
|
id: '67435af2-17bf-4caa-a5fc-0dd1ffb40dab',
|
||||||
x: 0,
|
x: 0,
|
||||||
|
@ -156,6 +161,9 @@ export const cell: Cell = {
|
||||||
colors: lineColors,
|
colors: lineColors,
|
||||||
legend: {},
|
legend: {},
|
||||||
tableOptions: tableOptions,
|
tableOptions: tableOptions,
|
||||||
|
fieldOptions: fieldOptions,
|
||||||
|
timeFormat: 'MM/DD/YYYY HH:mm:ss',
|
||||||
|
decimalPlaces: decimalPlaces,
|
||||||
links: {
|
links: {
|
||||||
self:
|
self:
|
||||||
'/chronograf/v1/dashboards/9/cells/67435af2-17bf-4caa-a5fc-0dd1ffb40dab',
|
'/chronograf/v1/dashboards/9/cells/67435af2-17bf-4caa-a5fc-0dd1ffb40dab',
|
||||||
|
|
Loading…
Reference in New Issue