Skip to content

Commit

Permalink
Update TasksList to display last run date
Browse files Browse the repository at this point in the history
  • Loading branch information
Palakp41 committed Feb 12, 2019
1 parent 7200ab8 commit 0ec0ca7
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 6 deletions.
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[2]}
sort={sortKey === headerKeys[2] ? 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="every"
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="every"
width="10%"
/>
<IndexListHeaderCell
alignment="left"
columnName=""
width="10%"
/>
</IndexListHeader>
<IndexListBody
columnCount={5}
columnCount={6}
emptyState={
<EmptyTasksLists
onCreate={[Function]}
Expand Down

0 comments on commit 0ec0ca7

Please sign in to comment.