Skip to content

Commit

Permalink
feat(ui): Display scraper name in scrapers list
Browse files Browse the repository at this point in the history
  • Loading branch information
ischolten committed Feb 12, 2019
1 parent 0b890e7 commit 7da37c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions ui/src/organizations/components/ScraperList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ export default class ScraperList extends PureComponent<Props> {
<>
<IndexList>
<IndexList.Header>
<IndexList.HeaderCell columnName="URL" width="50%" />
<IndexList.HeaderCell columnName="Bucket" width="50%" />
<IndexList.HeaderCell columnName="Name" width="33%" />
<IndexList.HeaderCell columnName="URL" width="34%" />
<IndexList.HeaderCell columnName="Bucket" width="33%" />
</IndexList.Header>
<IndexList.Body columnCount={3} emptyState={emptyState}>
{this.scrapersList}
Expand Down
9 changes: 5 additions & 4 deletions ui/src/organizations/components/ScraperRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ export default class ScraperRow extends PureComponent<Props> {
<IndexList.Row>
<IndexList.Cell>
<EditableName
onUpdate={this.handleUpdateScraper}
name={scraper.url}
onUpdate={this.handleUpdateScraperName}
name={scraper.name}
noNameString={DEFAULT_SCRAPER_NAME}
/>
</IndexList.Cell>
<IndexList.Cell>{scraper.url}</IndexList.Cell>
<IndexList.Cell>{scraper.bucket}</IndexList.Cell>
<IndexList.Cell revealOnHover={true} alignment={Alignment.Right}>
<ConfirmationButton
Expand All @@ -48,8 +49,8 @@ export default class ScraperRow extends PureComponent<Props> {
)
}

private handleUpdateScraper = (name: string) => {
private handleUpdateScraperName = (name: string) => {
const {onUpdateScraper, scraper} = this.props
onUpdateScraper({...scraper, url: name})
onUpdateScraper({...scraper, name})
}
}

0 comments on commit 7da37c3

Please sign in to comment.