Merge pull request #5514 from vlastahajek/fix/reedit-issue
fix: Avoiding passing invalid number to Gridpull/5516/head
commit
71b9d07f4f
|
@ -8,6 +8,7 @@
|
|||
1. [#5503](https://github.com/influxdata/chronograf/pull/5503): Repair tick script editor scrolling on Firefox
|
||||
1. [#5506](https://github.com/influxdata/chronograf/pull/5506): Parse flux CSV results in a way to support existing dockerized 1.8.0 InfluxDB
|
||||
1. [#5492](https://github.com/influxdata/chronograf/pull/5492): Support `.Time.Unix` in alert message validation
|
||||
1. [#5514](https://github.com/influxdata/chronograf/pull/5514): Error when viewing flux raw data after edit
|
||||
1. [#5505](https://github.com/influxdata/chronograf/pull/5505): Repair management of kapacitor rules and tick scripts
|
||||
|
||||
### Features
|
||||
|
|
|
@ -69,7 +69,10 @@ class RawFluxDataTable extends PureComponent<Props, State> {
|
|||
scrollTop: number
|
||||
): JSX.Element {
|
||||
const rowCount = data.length
|
||||
const columnWidth = Math.max(MIN_COLUMN_WIDTH, width / maxColumnCount)
|
||||
const columnWidth =
|
||||
maxColumnCount > 0
|
||||
? Math.max(MIN_COLUMN_WIDTH, width / maxColumnCount)
|
||||
: MIN_COLUMN_WIDTH
|
||||
const style = this.gridStyle(columnWidth, maxColumnCount, rowCount)
|
||||
|
||||
return (
|
||||
|
|
|
@ -126,7 +126,10 @@ interface ParseResponseRawResult {
|
|||
export const parseResponseRaw = (response: string): ParseResponseRawResult => {
|
||||
const chunks = parseChunks(response)
|
||||
const parsedChunks = chunks.map(c => Papa.parse(c).data)
|
||||
const maxColumnCount = Math.max(...parsedChunks.map(c => c[0].length))
|
||||
const maxColumnCount =
|
||||
parsedChunks.length > 0
|
||||
? Math.max(...parsedChunks.map(c => c[0].length))
|
||||
: 0
|
||||
const data = []
|
||||
|
||||
for (let i = 0; i < parsedChunks.length; i++) {
|
||||
|
|
Loading…
Reference in New Issue