Skip to content

Commit

Permalink
Merge pull request #1568 from saberlynx/task-nonalterable
Browse files Browse the repository at this point in the history
added tooltips for settings that cant be edited once task has been run
  • Loading branch information
bjoernricks authored Aug 14, 2019
2 parents 89e1b8a + 0aad4ec commit db0798b
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 25 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [8.0.2] - unreleased

### Added
- Added tooltip for settings in task edit dialog that can't be changed once the task has been run [#1568](https://github.com/greenbone/gsa/pull/1568)
- Added success dialog to report formats listpage [#1566](https://github.com/greenbone/gsa/pull/1566)
- Added an explicit get_capabilities command to gsad [#1538](https://github.com/greenbone/gsa/pull/1538)
- Highlight result diffs at delta reports [#1513](https://github.com/greenbone/gsa/pull/1513)
Expand Down
78 changes: 53 additions & 25 deletions gsa/src/web/pages/tasks/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,14 +331,24 @@ const TaskDialog = ({

<FormGroup title={_('Scan Targets')}>
<Divider>
<Select
name="target_id"
disabled={!change_task}
items={target_items}
value={state.target_id}
width="260px"
onChange={onTargetChange}
/>
<div
title={
change_task
? null
: _(
'This setting is not alterable once task has been run at least once.',
)
}
>
<Select
name="target_id"
disabled={!change_task}
items={target_items}
value={state.target_id}
width="260px"
onChange={onTargetChange}
/>
</div>
{change_task && (
<Layout>
<NewIcon
Expand Down Expand Up @@ -442,26 +452,44 @@ const TaskDialog = ({
autoDeleteData={state.auto_delete_data}
onChange={onValueChange}
/>

<ScannerSelect
scanConfigs={sorted_scan_configs}
scanners={scanners}
scannerId={state.scanner_id}
changeTask={change_task}
onScanConfigChange={onScanConfigChange}
onScannerChange={onScannerChange}
/>

<div
title={
change_task
? null
: _(
'This setting is not alterable once task has been run at least once.',
)
}
>
<ScannerSelect
scanConfigs={sorted_scan_configs}
scanners={scanners}
scannerId={state.scanner_id}
changeTask={change_task}
onScanConfigChange={onScanConfigChange}
onScannerChange={onScannerChange}
/>
</div>
{use_openvas_scan_config && (
<Layout flex="column" grow="1">
<FormGroup titleSize="2" title={_('Scan Config')}>
<Select
name="config_id"
disabled={!change_task}
items={openvas_scan_config_items}
value={openvas_config_id}
onChange={onScanConfigChange}
/>
<div
title={
change_task
? null
: _(
'This setting is not alterable once task has been run at least once.',
)
}
>
<Select
name="config_id"
disabled={!change_task}
items={openvas_scan_config_items}
value={openvas_config_id}
onChange={onScanConfigChange}
/>
</div>
</FormGroup>
<FormGroup titleSize="4" title={_('Network Source Interface')}>
<TextField
Expand Down

0 comments on commit db0798b

Please sign in to comment.