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