diff --git a/CHANGELOG.md b/CHANGELOG.md index f57f0a89b24..0ed82f10ec6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ 1. [12663](https://github.com/influxdata/influxdb/pull/12663): Insert flux function near cursor in flux editor ### Bug Fixes +1. [12684](https://github.com/influxdata/influxdb/pull/12684): Fix mismatch in bucket row and header ### UI Improvements diff --git a/ui/src/organizations/components/BucketRow.tsx b/ui/src/organizations/components/BucketRow.tsx index dd856a60b73..00f6b47381c 100644 --- a/ui/src/organizations/components/BucketRow.tsx +++ b/ui/src/organizations/components/BucketRow.tsx @@ -1,5 +1,6 @@ // Libraries import React, {PureComponent} from 'react' +import {withRouter, WithRouterProps} from 'react-router' // Components import {IndexList, ConfirmationButton, Context} from 'src/clockface' @@ -33,7 +34,7 @@ interface Props { onFilterChange: (searchTerm: string) => void } -export default class BucketRow extends PureComponent { +class BucketRow extends PureComponent { public render() { const {bucket, onDeleteBucket} = this.props return ( @@ -47,7 +48,7 @@ export default class BucketRow extends PureComponent { noNameString={DEFAULT_BUCKET_NAME} /> - {bucket.organization} + {this.organization} {bucket.ruleString} { ) } + private get organization(): JSX.Element { + if (!this.props.params.orgID) { + return {this.props.bucket.organization} + } + } + private handleUpdateBucketName = async (value: string) => { await this.props.onUpdateBucket({...this.props.bucket, name: value}) } @@ -111,3 +118,5 @@ export default class BucketRow extends PureComponent { this.props.onAddData(this.props.bucket, DataLoaderType.Scraping) } } + +export default withRouter(BucketRow) diff --git a/ui/src/organizations/components/__snapshots__/Buckets.test.tsx.snap b/ui/src/organizations/components/__snapshots__/Buckets.test.tsx.snap index 18e38906f33..a396237ce77 100644 --- a/ui/src/organizations/components/__snapshots__/Buckets.test.tsx.snap +++ b/ui/src/organizations/components/__snapshots__/Buckets.test.tsx.snap @@ -32,316 +32,17 @@ Object { - - - -
- -
- - -
- default -
- - -
- - -
-
- -
-
- Confirm -
-
-
-
- - -
-
-
- -
-
- - - -
-
-
-
-
- - - - -
- -
- - -
- default -
- - -
- - -
-
- -
-
- Confirm -
-
-
-
- - -
-
-
- -
-
- - - -
-
-
-
-
- - - + here + + . +

- - - -
- -
- - -
- default -
- - -
- - -
-
- -
-
- Confirm -
-
-
-
- - -
-
-
- -
-
- - - -
-
-
-
-
- - - - -
- -
- - -
- default -
- - -
- - -
-
- -
-
- Confirm -
-
-
-
- - -
-
-
- -
-
- - - -
-
-
-
-
- - - + here + + . +