diff --git a/gsa/src/web/components/powerfilter/relationselector.js b/gsa/src/web/components/powerfilter/relationselector.js index cf2e3c274c..dd322e5b4d 100644 --- a/gsa/src/web/components/powerfilter/relationselector.js +++ b/gsa/src/web/components/powerfilter/relationselector.js @@ -23,18 +23,22 @@ import _ from 'gmp/locale'; import Select from 'web/components/form/select'; import PropTypes from 'web/utils/proptypes.js'; +import {UNSET_LABEL, UNSET_VALUE} from 'web/utils/render'; -const RelationSelector = ({relation, onChange}) => ( - '}, + {label: _('is less than'), value: '<'}, + ]} + /> + ); +}; RelationSelector.propTypes = { relation: PropTypes.string, diff --git a/gsa/src/web/components/powerfilter/severityvaluesgroup.js b/gsa/src/web/components/powerfilter/severityvaluesgroup.js index 4555a0542b..621484c836 100644 --- a/gsa/src/web/components/powerfilter/severityvaluesgroup.js +++ b/gsa/src/web/components/powerfilter/severityvaluesgroup.js @@ -26,6 +26,8 @@ import RelationSelector from 'web/components/powerfilter/relationselector'; import NumberField from 'web/components/form/numberfield'; import Divider from 'web/components/layout/divider'; +import {UNSET_VALUE} from 'web/utils/render'; + const SeverityValuesGroup = ({filter, name, title, onChange}) => { /* useState is analogous to setState in class components. * the first argument is the state variable. @@ -39,7 +41,7 @@ const SeverityValuesGroup = ({filter, name, title, onChange}) => { const term = filter.getTerm(name); const severity = isDefined(term) ? parseSeverity(term.value) : 0; - const [rel, setRel] = useState(isDefined(term) ? term.relation : '='); // here rel is set to '=' + const [rel, setRel] = useState(isDefined(term) ? term.relation : UNSET_VALUE); const keyword = name; return (