Skip to content

Commit

Permalink
fix(ui): fixed dark lines in checks (#17651)
Browse files Browse the repository at this point in the history
  • Loading branch information
asalem1 authored Apr 7, 2020
1 parent 6854ead commit ffa48c5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 56 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
### Bug Fixes

1. [17612](https://github.com/influxdata/influxdb/pull/17612): Fix card size and layout jank in dashboards index view
1. [17651](https://github.com/influxdata/influxdb/pull/17651): Fix check graph font and lines defaulting to black causing graph to be unreadable

### UI Improvements

Expand Down
2 changes: 1 addition & 1 deletion http/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8872,7 +8872,7 @@ components:
description: Colors define color encoding of data into a visualization
type: array
items:
type: string
$ref: "#/components/schemas/DashboardColor"
Axes:
description: The viewport for a View's visualizations
type: object
Expand Down
8 changes: 7 additions & 1 deletion ui/src/shared/components/CheckPlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {getFormatter, filterNoisyColumns} from 'src/shared/utils/vis'
// Constants
import {VIS_THEME} from 'src/shared/constants'
import {INVALID_DATA_COPY} from 'src/shared/copy/cell'
import {DEFAULT_LINE_COLORS} from 'src/shared/constants/graphColorPalettes'

// Types
import {
Expand Down Expand Up @@ -100,6 +101,11 @@ const CheckPlot: FunctionComponent<Props> = ({

const yTicks = thresholdValues.length ? thresholdValues : null

const colorHexes =
colors && colors.length
? colors.map(c => c.hex)
: DEFAULT_LINE_COLORS.map(c => c.hex)

const config: Config = {
...VIS_THEME,
table,
Expand All @@ -119,7 +125,7 @@ const CheckPlot: FunctionComponent<Props> = ({
y: Y_COLUMN,
fill: groupKey,
interpolation: 'linear',
colors,
colors: colorHexes,
},
{
type: 'custom',
Expand Down
49 changes: 0 additions & 49 deletions ui/src/timeMachine/components/view_options/CheckOptions.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import TableOptions from 'src/timeMachine/components/view_options/TableOptions'
import HistogramOptions from 'src/timeMachine/components/view_options/HistogramOptions'
import HeatmapOptions from 'src/timeMachine/components/view_options/HeatmapOptions'
import ScatterOptions from 'src/timeMachine/components/view_options/ScatterOptions'
import CheckOptions from 'src/timeMachine/components/view_options/CheckOptions'

// Types
import {View, NewView} from 'src/types'
Expand Down Expand Up @@ -44,8 +43,6 @@ class OptionsSwitcher extends PureComponent<Props> {
return <HeatmapOptions {...view.properties} />
case 'scatter':
return <ScatterOptions {...view.properties} />
case 'check':
return <CheckOptions properties={view.properties} />
default:
return <div />
}
Expand Down
4 changes: 2 additions & 2 deletions ui/src/views/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ const NEW_VIEW_CREATORS = {
},
},
],
colors: NINETEEN_EIGHTY_FOUR,
colors: DEFAULT_LINE_COLORS as Color[],
},
}),
deadman: (): NewView<CheckViewProperties> => ({
Expand All @@ -308,7 +308,7 @@ const NEW_VIEW_CREATORS = {
},
},
],
colors: NINETEEN_EIGHTY_FOUR,
colors: DEFAULT_LINE_COLORS as Color[],
},
}),
custom: (): NewView<TableViewProperties> => ({
Expand Down

0 comments on commit ffa48c5

Please sign in to comment.