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

fixed secinfo severitybars #1530

Merged
merged 5 commits into from
Jul 31, 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 @@ -38,6 +38,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
requests in gsad [#1355](https://github.com/greenbone/gsa/pull/1355)

### Fixed
- fixed secinfo severitybars not displaying severity.[#1530](https://github.com/greenbone/gsa/pull/1530)
- Fixed outer click issues for multi select and select boxes
[#1504](https://github.com/greenbone/gsa/pull/1504)

Expand Down
11 changes: 6 additions & 5 deletions gsa/src/gmp/models/certbund.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,19 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
import {isDefined} from '../utils/identity';
import {forEach, map} from '../utils/array';
import {isDefined} from 'gmp/utils/identity';
import {forEach, map} from 'gmp/utils/array';

import {parseSeverity, parseDate} from '../parser';
import {parseSeverity, parseDate} from 'gmp/parser';

import Info from './info';

class CertBundAdv extends Info {
static entityType = 'certbund';

parseProperties(elem) {
const ret = super.parseProperties(elem, 'cert_bund_adv');
elem = super.parseProperties(elem, 'cert_bund_adv');
const ret = {...elem};

ret.severity = parseSeverity(elem.max_cvss);
delete ret.max_cvss;
Expand All @@ -38,7 +39,7 @@ class CertBundAdv extends Info {
ret.additionalInformation = [];

if (isDefined(elem.raw_data) && isDefined(elem.raw_data.Advisory)) {
const {raw_data} = elem;
const {raw_data} = elem;
const {Advisory: advisory} = raw_data;

ret.version = advisory.Version;
Expand Down
11 changes: 6 additions & 5 deletions gsa/src/gmp/models/cpe.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,20 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/

import {isDefined} from '../utils/identity';
import {isEmpty} from '../utils/string';
import {map} from '../utils/array';
import {isDefined} from 'gmp/utils/identity';
import {isEmpty} from 'gmp/utils/string';
import {map} from 'gmp/utils/array';

import Info from './info';

import {parseSeverity, parseDate} from '../parser';
import {parseSeverity, parseDate} from 'gmp/parser';

class Cpe extends Info {
static entityType = 'cpe';

parseProperties(elem) {
const ret = super.parseProperties(elem, 'cpe');
elem = super.parseProperties(elem, 'cpe');
const ret = {...elem};

ret.severity = parseSeverity(elem.max_cvss);
delete ret.max_cvss;
Expand Down
11 changes: 6 additions & 5 deletions gsa/src/gmp/models/cve.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
*/
import 'core-js/fn/object/entries';

import {isDefined} from '../utils/identity';
import {isEmpty} from '../utils/string';
import {map} from '../utils/array';
import {isDefined} from 'gmp/utils/identity';
import {isEmpty} from 'gmp/utils/string';
import {map} from 'gmp/utils/array';

import {
parseSeverity,
parseCvssBaseVector,
parseDate,
setProperties,
} from '../parser';
} from 'gmp/parser';

import Info from './info';

Expand All @@ -52,7 +52,8 @@ class Cve extends Info {
static entityType = 'cve';

parseProperties(elem) {
const ret = super.parseProperties(elem, 'cve');
elem = super.parseProperties(elem, 'cve');
const ret = {...elem};

if (isDefined(elem.update_time)) {
ret.updateTime = parseDate(elem.update_time);
Expand Down
9 changes: 5 additions & 4 deletions gsa/src/gmp/models/dfncert.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,19 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
import {isDefined} from '../utils/identity';
import {forEach, map} from '../utils/array';
import {isDefined} from 'gmp/utils/identity';
import {forEach, map} from 'gmp/utils/array';

import {parseSeverity} from '../parser';
import {parseSeverity} from 'gmp/parser';

import Info from './info';

class DfnCertAdv extends Info {
static entityType = 'dfncert';

parseProperties(elem) {
const ret = super.parseProperties(elem, 'dfn_cert_adv');
elem = super.parseProperties(elem, 'dfn_cert_adv');
const ret = {...elem};

ret.severity = parseSeverity(elem.max_cvss);
delete ret.max_cvss;
Expand Down
11 changes: 6 additions & 5 deletions gsa/src/gmp/models/nvt.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
*/
import 'core-js/fn/string/starts-with';

import {isDefined, isArray, isString} from '../utils/identity';
import {isEmpty, split} from '../utils/string';
import {map} from '../utils/array';
import {isDefined, isArray, isString} from 'gmp/utils/identity';
import {isEmpty, split} from 'gmp/utils/string';
import {map} from 'gmp/utils/array';

import {parseFloat, parseSeverity} from '../parser';
import {parseFloat, parseSeverity} from 'gmp/parser';

import Info from './info';

Expand Down Expand Up @@ -102,7 +102,8 @@ class Nvt extends Info {
static entityType = 'nvt';

parseProperties(elem) {
const ret = super.parseProperties(elem, 'nvt');
elem = super.parseProperties(elem, 'nvt');
const ret = {...elem};

ret.nvtType = elem._type;

Expand Down
9 changes: 5 additions & 4 deletions gsa/src/gmp/models/ovaldef.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
*/
import 'core-js/fn/object/entries';

import {map} from '../utils/array';
import {isDefined} from '../utils/identity';
import {isEmpty} from '../utils/string';
import {map} from 'gmp/utils/array';
import {isDefined} from 'gmp/utils/identity';
import {isEmpty} from 'gmp/utils/string';

import {parseSeverity, parseYesNo, YES_VALUE, parseDate} from '../parser';

Expand Down Expand Up @@ -74,7 +74,8 @@ class Ovaldef extends Info {
static entityType = 'ovaldef';

parseProperties(elem) {
const ret = super.parseProperties(elem, 'ovaldef');
elem = super.parseProperties(elem, 'ovaldef');
const ret = {...elem};

ret.severity = parseSeverity(elem.max_cvss);
delete ret.max_cvss;
Expand Down