Skip to content

Commit

Permalink
Merge pull request #2840 from swaterkamp/startSchedTask
Browse files Browse the repository at this point in the history
Show StartIcon for scheduled tasks on task listpage
  • Loading branch information
swaterkamp authored Apr 7, 2021
2 parents e6c1de0 + ecfa869 commit c22a231
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Added the CVSS v3.1 BaseScore calculator to the `/cvsscalculator` page in the Help section. [#2536](https://github.com/greenbone/gsa/pull/2536)

### Changed
- Show StartIcon for scheduled tasks [#2840](https://github.com/greenbone/gsa/pull/2840)
- Move error message and adjust design on login page [#2780](https://github.com/greenbone/gsa/pull/2780)
- Refactored useFormValidation hook [#2704](https://github.com/greenbone/gsa/pull/2704)
- Updated copyright and footer layout [#2687](https://github.com/greenbone/gsa/pull/2687)
Expand Down
5 changes: 3 additions & 2 deletions gsa/src/web/pages/tasks/__tests__/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,10 @@ describe('Task Actions tests', () => {
'View Details of Schedule schedule1 (Next due: over)',
);

fireEvent.click(icons[1]);
fireEvent.click(icons[2]);
expect(handleTaskResume).not.toHaveBeenCalled();
expect(icons[1]).toHaveAttribute('title', 'Task is scheduled');
expect(icons[1]).toHaveAttribute('title', 'Start');
expect(icons[2]).toHaveAttribute('title', 'Task is scheduled');
});

test('should call click handlers for container task', () => {
Expand Down
5 changes: 2 additions & 3 deletions gsa/src/web/pages/tasks/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,10 @@ const Actions = ({
onTaskStopClick,
}) => (
<IconDivider align={['center', 'center']} grow>
{isDefined(entity.schedule) ? (
{isDefined(entity.schedule) && (
<ScheduleIcon schedule={entity.schedule} links={links} />
) : (
<StartIcon task={entity} onClick={onTaskStartClick} />
)}
<StartIcon task={entity} onClick={onTaskStartClick} />

<ImportReportIcon task={entity} onClick={onReportImportClick} />

Expand Down

0 comments on commit c22a231

Please sign in to comment.