Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Powerfilter edit icon if isLoading #1714

Merged
merged 4 commits into from
Oct 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Changed
- Sorting of SecInfo items [#1717](https://github.com/greenbone/gsa/pull/1717))
- Disable edit PowerFilter icon if isLoading [#1714](https://github.com/greenbone/gsa/pull/1714)
- Don't show empty menu section [#1711](https://github.com/greenbone/gsa/pull/1711)
- Increase clickable area for Logout [#1711](https://github.com/greenbone/gsa/pull/1711)

Expand Down
4 changes: 3 additions & 1 deletion gsa/src/web/components/powerfilter/powerfilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ class PowerFilter extends React.Component {
capabilities,
filter,
filters,
isLoading = false,
onEditClick,
onRemoveClick,
onResetClick,
Expand Down Expand Up @@ -233,7 +234,7 @@ class PowerFilter extends React.Component {
{onEditClick && (
<EditIcon
title={_('Edit Filter')}
active={isDefined(filter)}
disabled={!isDefined(filter) || isLoading}
onClick={isDefined(filter) ? onEditClick : undefined}
/>
)}
Expand Down Expand Up @@ -265,6 +266,7 @@ PowerFilter.propTypes = {
filter: PropTypes.filter,
filters: PropTypes.array,
gmp: PropTypes.gmp.isRequired,
isLoading: PropTypes.bool,
onEditClick: PropTypes.func,
onError: PropTypes.func,
onFilterCreated: PropTypes.func,
Expand Down
2 changes: 2 additions & 0 deletions gsa/src/web/entities/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ class EntitiesPage extends React.Component {
filter,
filterEditDialog,
filters,
isLoading,
powerfilter = PowerFilter,
onError,
onFilterChanged,
Expand All @@ -205,6 +206,7 @@ class EntitiesPage extends React.Component {
<PowerFilterComponent
filter={filter}
filters={filters}
isLoading={isLoading}
onEditClick={handler}
onError={onError}
onRemoveClick={onFilterRemoved}
Expand Down
1 change: 1 addition & 0 deletions gsa/src/web/pages/reports/detailscontent.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ const PageContent = ({
createFilterType="result"
filter={filter}
filters={filters}
isLoading={isLoading || isUpdating}
onEditClick={onFilterEditClick}
onError={onError}
onFilterCreated={onFilterCreated}
Expand Down