Skip to content

Commit

Permalink
Parse condition_data_severity as severity
Browse files Browse the repository at this point in the history
  • Loading branch information
swaterkamp committed Oct 22, 2018
1 parent 0c3d0b5 commit 80383af
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions gsa/src/web/pages/alerts/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ import {selectSaveId} from 'gmp/utils/id';
import {first} from 'gmp/utils/array';
import {shorten} from 'gmp/utils/string';

import {parseInt, parseYesNo, NO_VALUE} from 'gmp/parser';
import {
parseInt,
parseSeverity,
parseYesNo,
NO_VALUE,
} from 'gmp/parser';

import PropTypes from 'web/utils/proptypes';
import withGmp from 'web/utils/withGmp';
Expand Down Expand Up @@ -304,8 +309,8 @@ class AlertComponent extends React.Component {
condition_data_at_least_filter_id: condition_data_filter_id,
condition_data_at_least_count: parseInt(
value(condition.data.count, 1)),
condition_data_severity: value(condition.data.severity,
DEFAULT_SEVERITY),
condition_data_severity: parseSeverity(value(condition.data.severity,
DEFAULT_SEVERITY)),

event: event_type,
event_data_status: value(event.data.status, DEFAULT_EVENT_STATUS),
Expand Down

0 comments on commit 80383af

Please sign in to comment.