Skip to content

Commit

Permalink
Merge pull request #14887 from influxdata/fix/no-buckets-alert
Browse files Browse the repository at this point in the history
fix(ui): Polish no buckets warning in telegraf tab
  • Loading branch information
ischolten authored Aug 30, 2019
2 parents d147874 + d29a123 commit b0a7a8e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
1. [14889](https://github.com/influxdata/influxdb/pull/14889): Make adding data to buckets more discoverable
1. [14709](https://github.com/influxdata/influxdb/pull/14709): Move Buckets, Telgrafs, and Scrapers pages into a tab called "Load Data" for ease of discovery
1. [14846](https://github.com/influxdata/influxdb/pull/14846): Standardize formatting of "updated at" timestamp in all resource cards
1. [14887](https://github.com/influxdata/influxdb/pull/14887): Move no buckets warning in telegraf tab above the search box

### Bug Fixes

Expand Down
3 changes: 3 additions & 0 deletions ui/src/buckets/components/NoBucketsWarning.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.no-buckets-warning {
margin-bottom: $ix-marg-c;
}
14 changes: 8 additions & 6 deletions ui/src/buckets/components/NoBucketsWarning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ interface Props {
const NoBucketsWarning: SFC<Props> = ({visible, resourceName}) => {
return (
visible && (
<Alert color={ComponentColor.Primary} icon={IconFont.AlertTriangle}>
<p>
You don't currently have any buckets. Any{' '}
<strong>{resourceName}</strong> you have will not be able to write
data until a bucket is created and they are directed to that bucket.
</p>
<Alert
color={ComponentColor.Primary}
icon={IconFont.AlertTriangle}
className="no-buckets-warning"
>
You don't currently have any buckets. Any{' '}
<strong>{resourceName}</strong> you have will not be able to write data
until a bucket is created and they are directed to that bucket.
</Alert>
)
)
Expand Down
1 change: 1 addition & 0 deletions ui/src/style/chronograf.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
@import 'src/shared/components/CodeSnippet.scss';
@import 'src/buckets/components/Retention.scss';
@import 'src/buckets/components/BucketAddDataButton.scss';
@import 'src/buckets/components/NoBucketsWarning.scss';
@import 'src/telegrafs/components/TelegrafConfigOverlay.scss';
@import 'src/variables/components/CreateVariableOverlay.scss';
@import 'src/authorizations/components/BucketsSelector.scss';
Expand Down
9 changes: 5 additions & 4 deletions ui/src/telegrafs/components/Collectors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ class Collectors extends PureComponent<Props, State> {

return (
<>
<NoBucketsWarning
visible={this.hasNoBuckets}
resourceName="Telegraf Configurations"
/>

<SettingsTabbedPageHeader>
<SearchWidget
placeholderText="Filter telegraf configurations..."
Expand All @@ -107,10 +112,6 @@ class Collectors extends PureComponent<Props, State> {
widthSM={Columns.Eight}
widthMD={Columns.Ten}
>
<NoBucketsWarning
visible={this.hasNoBuckets}
resourceName="Telegraf Configurations"
/>
<GetResources resource={ResourceTypes.Labels}>
<FilterList<Telegraf>
searchTerm={searchTerm}
Expand Down

0 comments on commit b0a7a8e

Please sign in to comment.