Skip to content

Commit

Permalink
Merge pull request #11824 from influxdata/feat/tasks-add-lastupdated
Browse files Browse the repository at this point in the history
Update TasksList to display last run date
  • Loading branch information
Palakp41 authored Feb 12, 2019
2 parents 4b80fc4 + 76f3bc1 commit 08b658b
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
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
1. [11804](https://github.com/influxdata/influxdb/pull/11804): Add the ability to view runs for a task
1. [11824](https://github.com/influxdata/influxdb/pull/11824): Display last completed run for tasks list

### Bug Fixes
1. [11819](https://github.com/influxdata/influxdb/pull/11819): Update the inline edit for resource names to guard for empty strings
Expand Down
1 change: 1 addition & 0 deletions ui/src/tasks/components/TaskRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export class TaskRow extends PureComponent<Props & WithRouterProps> {
/>
</IndexList.Cell>
<IndexList.Cell>{this.schedule}</IndexList.Cell>
<IndexList.Cell>{task.latestCompleted}</IndexList.Cell>
<IndexList.Cell alignment={Alignment.Right} revealOnHover={true}>
<ComponentSpacer align={Alignment.Right}>
<Button
Expand Down
12 changes: 10 additions & 2 deletions ui/src/tasks/components/TasksList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export default class TasksList extends PureComponent<Props, State> {
'status',
'every',
'organization.name',
'latestCompleted',
]

return (
Expand All @@ -71,7 +72,7 @@ export default class TasksList extends PureComponent<Props, State> {
<IndexList.Header>
<IndexList.HeaderCell
columnName="Name"
width="55%"
width="45%"
sortKey={headerKeys[0]}
sort={sortKey === headerKeys[0] ? sortDirection : Sort.None}
onClick={this.handleClickColumn}
Expand All @@ -97,6 +98,13 @@ export default class TasksList extends PureComponent<Props, State> {
sort={sortKey === headerKeys[2] ? sortDirection : Sort.None}
onClick={this.handleClickColumn}
/>
<IndexList.HeaderCell
columnName="Last Completed"
width="10%"
sortKey={headerKeys[4]}
sort={sortKey === headerKeys[4] ? sortDirection : Sort.None}
onClick={this.handleClickColumn}
/>
<IndexList.HeaderCell columnName="" width="10%" />
</IndexList.Header>
<IndexList.Body
Expand All @@ -107,7 +115,7 @@ export default class TasksList extends PureComponent<Props, State> {
totalCount={totalCount}
/>
}
columnCount={5}
columnCount={6}
>
{this.sortedRows}
</IndexList.Body>
Expand Down
4 changes: 4 additions & 0 deletions ui/src/tasks/components/__snapshots__/TaskRow.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ exports[`Tasks.Components.TaskRow renders 1`] = `
>
2 0 * * *
</IndexListRowCell>
<IndexListRowCell
alignment="left"
revealOnHover={false}
/>
<IndexListRowCell
alignment="right"
revealOnHover={true}
Expand Down
12 changes: 10 additions & 2 deletions ui/src/tasks/components/__snapshots__/TasksList.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports[`TasksList rendering renders 1`] = `
onClick={[Function]}
sort="none"
sortKey="name"
width="55%"
width="45%"
/>
<IndexListHeaderCell
alignment="left"
Expand All @@ -36,14 +36,22 @@ exports[`TasksList rendering renders 1`] = `
sortKey="every"
width="15%"
/>
<IndexListHeaderCell
alignment="left"
columnName="Last Completed"
onClick={[Function]}
sort="none"
sortKey="latestCompleted"
width="10%"
/>
<IndexListHeaderCell
alignment="left"
columnName=""
width="10%"
/>
</IndexListHeader>
<IndexListBody
columnCount={5}
columnCount={6}
emptyState={
<EmptyTasksLists
onCreate={[Function]}
Expand Down
12 changes: 10 additions & 2 deletions ui/src/tasks/containers/__snapshots__/TasksPage.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports[`TasksList rendering renders 1`] = `
onClick={[Function]}
sort="none"
sortKey="name"
width="55%"
width="45%"
/>
<IndexListHeaderCell
alignment="left"
Expand All @@ -36,14 +36,22 @@ exports[`TasksList rendering renders 1`] = `
sortKey="every"
width="15%"
/>
<IndexListHeaderCell
alignment="left"
columnName="Last Completed"
onClick={[Function]}
sort="none"
sortKey="latestCompleted"
width="10%"
/>
<IndexListHeaderCell
alignment="left"
columnName=""
width="10%"
/>
</IndexListHeader>
<IndexListBody
columnCount={5}
columnCount={6}
emptyState={
<EmptyTasksLists
onCreate={[Function]}
Expand Down

0 comments on commit 08b658b

Please sign in to comment.