From 1d6af29ca8697f5fcd737f8bdd9a07f77705939d Mon Sep 17 00:00:00 2001 From: Steffen Waterkamp Date: Thu, 30 Aug 2018 11:52:14 +0200 Subject: [PATCH 1/2] Update imports --- gsa/src/web/pages/results/row.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/gsa/src/web/pages/results/row.js b/gsa/src/web/pages/results/row.js index 9ed16f6577..9a36c2d6c7 100644 --- a/gsa/src/web/pages/results/row.js +++ b/gsa/src/web/pages/results/row.js @@ -2,6 +2,7 @@ * * Authors: * Björn Ricks + * Seffen Waterkamp * * Copyright: * Copyright (C) 2017 - 2018 Greenbone Networks GmbH @@ -29,21 +30,21 @@ import {isDefined} from 'gmp/utils/identity'; import {shorten} from 'gmp/utils/string'; -import PropTypes from '../../utils/proptypes.js'; -import {renderComponent} from '../../utils/render.js'; +import PropTypes from 'web/utils/proptypes'; +import {renderComponent} from 'web/utils/render'; -import {withEntityRow, RowDetailsToggle} from '../../entities/row.js'; +import {withEntityRow, RowDetailsToggle} from 'web/entities/row'; -import SeverityBar from '../../components/bar/severitybar.js'; +import SeverityBar from 'web/components/bar/severitybar'; -import SolutionTypeIcon from '../../components/icon/solutiontypeicon.js'; +import SolutionTypeIcon from 'web/components/icon/solutiontypeicon'; -import DetailsLink from '../../components/link/detailslink.js'; +import DetailsLink from 'web/components/link/detailslink'; -import TableRow from '../../components/table/row.js'; -import TableData from '../../components/table/data.js'; +import TableRow from 'web/components/table/row'; +import TableData from 'web/components/table/data'; -import ResultDelta from './delta.js'; +import ResultDelta from './delta'; const Row = ({ actions, From f9d3af13d72af6fc5e1fdef3b86a61b2f5d66f3d Mon Sep 17 00:00:00 2001 From: Steffen Waterkamp Date: Thu, 30 Aug 2018 15:07:28 +0200 Subject: [PATCH 2/2] Add indicator to results whether notes or overrides are defined --- gsa/src/web/pages/results/row.js | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/gsa/src/web/pages/results/row.js b/gsa/src/web/pages/results/row.js index 9a36c2d6c7..700398df1d 100644 --- a/gsa/src/web/pages/results/row.js +++ b/gsa/src/web/pages/results/row.js @@ -24,6 +24,8 @@ import React from 'react'; +import _ from 'gmp/locale'; + import {longDate} from 'gmp/locale/date'; import {isDefined} from 'gmp/utils/identity'; @@ -37,8 +39,12 @@ import {withEntityRow, RowDetailsToggle} from 'web/entities/row'; import SeverityBar from 'web/components/bar/severitybar'; +import Icon from 'web/components/icon/icon'; import SolutionTypeIcon from 'web/components/icon/solutiontypeicon'; +import IconDivider from 'web/components/layout/icondivider'; +import Layout from 'web/components/layout/layout'; + import DetailsLink from 'web/components/link/detailslink'; import TableRow from 'web/components/table/row'; @@ -57,7 +63,10 @@ const Row = ({ const {host} = entity; const shown_name = isDefined(entity.name) ? entity.name : entity.nvt.oid; const has_tags = isDefined(entity.nvt) && isDefined(entity.nvt.tags); - + const hasActiveNotes = + entity.notes.filter(note => note.isActive()).length > 0; + const hasActiveOverrides = + entity.overrides.filter(override => override.isActive()).length > 0; return ( {delta && @@ -74,7 +83,25 @@ const Row = ({ name={entity.id} onClick={onToggleDetailsClick} > - {shown_name} + + + {shown_name} + + + {hasActiveNotes && + + } + {hasActiveOverrides && + + } + +