Merge pull request #11821 from influxdata/feat/show-scraper-name
feat(ui): Display scraper name in scrapers listpull/11819/head
commit
7200ab869f
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
1. [11809](https://github.com/influxdata/influxdb/pull/11809): Add the ability to name a scraper target
|
1. [11809](https://github.com/influxdata/influxdb/pull/11809): Add the ability to name a scraper target
|
||||||
|
1. [11821](https://github.com/influxdata/influxdb/pull/11821): Display scraper name as the first and only updatable column in scrapers list
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,9 @@ export default class ScraperList extends PureComponent<Props> {
|
||||||
<>
|
<>
|
||||||
<IndexList>
|
<IndexList>
|
||||||
<IndexList.Header>
|
<IndexList.Header>
|
||||||
<IndexList.HeaderCell columnName="URL" width="50%" />
|
<IndexList.HeaderCell columnName="Name" width="33%" />
|
||||||
<IndexList.HeaderCell columnName="Bucket" width="50%" />
|
<IndexList.HeaderCell columnName="URL" width="34%" />
|
||||||
|
<IndexList.HeaderCell columnName="Bucket" width="33%" />
|
||||||
</IndexList.Header>
|
</IndexList.Header>
|
||||||
<IndexList.Body columnCount={3} emptyState={emptyState}>
|
<IndexList.Body columnCount={3} emptyState={emptyState}>
|
||||||
{this.scrapersList}
|
{this.scrapersList}
|
||||||
|
|
|
@ -28,11 +28,12 @@ export default class ScraperRow extends PureComponent<Props> {
|
||||||
<IndexList.Row>
|
<IndexList.Row>
|
||||||
<IndexList.Cell>
|
<IndexList.Cell>
|
||||||
<EditableName
|
<EditableName
|
||||||
onUpdate={this.handleUpdateScraper}
|
onUpdate={this.handleUpdateScraperName}
|
||||||
name={scraper.url}
|
name={scraper.name}
|
||||||
noNameString={DEFAULT_SCRAPER_NAME}
|
noNameString={DEFAULT_SCRAPER_NAME}
|
||||||
/>
|
/>
|
||||||
</IndexList.Cell>
|
</IndexList.Cell>
|
||||||
|
<IndexList.Cell>{scraper.url}</IndexList.Cell>
|
||||||
<IndexList.Cell>{scraper.bucket}</IndexList.Cell>
|
<IndexList.Cell>{scraper.bucket}</IndexList.Cell>
|
||||||
<IndexList.Cell revealOnHover={true} alignment={Alignment.Right}>
|
<IndexList.Cell revealOnHover={true} alignment={Alignment.Right}>
|
||||||
<ConfirmationButton
|
<ConfirmationButton
|
||||||
|
@ -48,8 +49,8 @@ export default class ScraperRow extends PureComponent<Props> {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private handleUpdateScraper = (name: string) => {
|
private handleUpdateScraperName = (name: string) => {
|
||||||
const {onUpdateScraper, scraper} = this.props
|
const {onUpdateScraper, scraper} = this.props
|
||||||
onUpdateScraper({...scraper, url: name})
|
onUpdateScraper({...scraper, name})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,15 +4,20 @@ exports[`ScraperList rendering renders 1`] = `
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<IndexList>
|
<IndexList>
|
||||||
<IndexListHeader>
|
<IndexListHeader>
|
||||||
|
<IndexListHeaderCell
|
||||||
|
alignment="left"
|
||||||
|
columnName="Name"
|
||||||
|
width="33%"
|
||||||
|
/>
|
||||||
<IndexListHeaderCell
|
<IndexListHeaderCell
|
||||||
alignment="left"
|
alignment="left"
|
||||||
columnName="URL"
|
columnName="URL"
|
||||||
width="50%"
|
width="34%"
|
||||||
/>
|
/>
|
||||||
<IndexListHeaderCell
|
<IndexListHeaderCell
|
||||||
alignment="left"
|
alignment="left"
|
||||||
columnName="Bucket"
|
columnName="Bucket"
|
||||||
width="50%"
|
width="33%"
|
||||||
/>
|
/>
|
||||||
</IndexListHeader>
|
</IndexListHeader>
|
||||||
<IndexListBody
|
<IndexListBody
|
||||||
|
|
Loading…
Reference in New Issue