From 00ab8cc1d9a2a7e83b33880bf9cc4d7fa99a9270 Mon Sep 17 00:00:00 2001 From: Steffen Waterkamp Date: Tue, 8 Oct 2019 16:43:12 +0200 Subject: [PATCH 01/10] Adjust TlsCertificate model and pages according to last gvmd changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This includes renaming lastCollected to lastSeen, and using the extended source information Co-Authored-By: Björn Ricks --- gsa/src/gmp/models/tlscertificate.js | 26 ++++++++++++------- .../web/pages/tlscertificates/detailspage.js | 25 +++++++++++------- gsa/src/web/pages/tlscertificates/row.js | 2 +- 3 files changed, 32 insertions(+), 21 deletions(-) diff --git a/gsa/src/gmp/models/tlscertificate.js b/gsa/src/gmp/models/tlscertificate.js index 0d5377668f..01593e3f0a 100644 --- a/gsa/src/gmp/models/tlscertificate.js +++ b/gsa/src/gmp/models/tlscertificate.js @@ -45,8 +45,8 @@ export const getTranslatableTimeStatus = status => class TlsCertificate extends Model { static entityType = 'tlscertificate'; - parseProperties(elem) { - const ret = super.parseProperties(elem); + static parseElement(elem) { + const ret = super.parseElement(elem); ret.certificate = elem.certificate.__text; @@ -59,26 +59,32 @@ class TlsCertificate extends Model { ret.expirationTime = parseDate(elem.expiration_time); delete ret.expiration_time; - ret.lastCollected = parseDate(elem.last_collected); - delete ret.last_collected; + ret.lastSeen = parseDate(elem.last_seen); + delete ret.last_seen; ret.timeStatus = elem.time_status; delete ret.time_status; - const sourceReportIds = new Set(); - const sourceHostIps = new Set(); + const sourceReports = new Set(); + const sourceHosts = new Set(); const sourcePorts = new Set(); if (isDefined(ret.sources)) { forEach(ret.sources.source, source => { if (isDefined(source.origin)) { if (source.origin.origin_type === 'Report') { - sourceReportIds.add(source.origin.origin_id); + sourceReports.add({ + id: source.origin.origin_id, + timestamp: source.origin.report.date, + }); } } if (isDefined(source.location)) { if (isDefined(source.location.host)) { - sourceHostIps.add(source.location.host.ip); + sourceHosts.add({ + id: source.location.host.asset._id, + ip: source.location.host.ip, + }); } if (isDefined(source.location.port)) { sourcePorts.add(source.location.port); @@ -87,8 +93,8 @@ class TlsCertificate extends Model { }); } - ret.sourceReportIds = [...sourceReportIds]; - ret.sourceHostIps = [...sourceHostIps]; + ret.sourceReports = [...sourceReports]; + ret.sourceHosts = [...sourceHosts]; ret.sourcePorts = [...sourcePorts]; delete ret.sources; diff --git a/gsa/src/web/pages/tlscertificates/detailspage.js b/gsa/src/web/pages/tlscertificates/detailspage.js index 6837a5c7e7..ae488b8e9a 100644 --- a/gsa/src/web/pages/tlscertificates/detailspage.js +++ b/gsa/src/web/pages/tlscertificates/detailspage.js @@ -112,7 +112,8 @@ ToolBarIcons.propTypes = { }; const Details = ({entity, ...props}) => { - const showSourceBlock = entity.sourceReportIds.length > 0; + const showSourceBlock = + entity.sourceReports.length > 0 || entity.sourceHosts.length > 0; return ( @@ -132,7 +133,7 @@ const Details = ({entity, ...props}) => { {showSourceBlock && ( - {entity.sourceReportIds.length > 0 && ( + {entity.sourceReports.length > 0 && ( @@ -143,9 +144,13 @@ const Details = ({entity, ...props}) => { {_('Reports')} - {entity.sourceReportIds.map((reportId, index) => ( - - {reportId} + {entity.sourceReports.map((report, index) => ( + + {report.timestamp} ))} @@ -154,7 +159,7 @@ const Details = ({entity, ...props}) => { )} - {entity.sourceHostIps.length > 0 && ( + {entity.sourceHosts.length > 0 && ( @@ -165,10 +170,10 @@ const Details = ({entity, ...props}) => { {_('Hosts')} - {entity.sourceHostIps.map((hostIp, index) => ( - - {hostIp} - + {entity.sourceHosts.map((host, index) => ( + + {host.ip} + ))} diff --git a/gsa/src/web/pages/tlscertificates/row.js b/gsa/src/web/pages/tlscertificates/row.js index f88fdf1bb0..91951604e4 100644 --- a/gsa/src/web/pages/tlscertificates/row.js +++ b/gsa/src/web/pages/tlscertificates/row.js @@ -106,7 +106,7 @@ const Row = ({ - + From edc5bd85e9d195b4474f1e305e38dc798f27131d Mon Sep 17 00:00:00 2001 From: Steffen Waterkamp Date: Tue, 8 Oct 2019 17:04:20 +0200 Subject: [PATCH 02/10] Update SortFields for TlsCertificate FilterDialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Björn Ricks --- .../web/pages/tlscertificates/filterdialog.js | 26 +++++++------------ 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/gsa/src/web/pages/tlscertificates/filterdialog.js b/gsa/src/web/pages/tlscertificates/filterdialog.js index fe64dc0d7c..79f8b3e4c6 100644 --- a/gsa/src/web/pages/tlscertificates/filterdialog.js +++ b/gsa/src/web/pages/tlscertificates/filterdialog.js @@ -23,31 +23,23 @@ import {createFilterDialog} from '../../components/powerfilter/dialog.js'; const SORT_FIELDS = [ { name: 'name', - displayName: _l('Name'), + displayName: _l('Issuer DN'), }, { - name: 'title', - displayName: _l('Title'), + name: 'serial', + displayName: _l('Serial'), }, { - name: 'latest_severity', - displayName: _l('Severity: Latest'), + name: 'activates', + displayName: _l('Activates'), }, { - name: 'highest_severity', - displayName: _l('Severity: Highest'), + name: 'expires', + displayName: _l('Expires'), }, { - name: 'average_severity', - displayName: _l('Severity: Average'), - }, - { - name: 'hosts', - displayName: _l('Hosts'), - }, - { - name: 'modified', - displayName: _l('Modified'), + name: 'lastSeen', + displayName: _l('Last Seen'), }, ]; From 3a7acc964a12225cd87a200eaa20bd15b06825ba Mon Sep 17 00:00:00 2001 From: Steffen Waterkamp Date: Thu, 10 Oct 2019 09:48:57 +0200 Subject: [PATCH 03/10] Rename variable in TlsCertificate model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit elem > element Co-Authored-By: Björn Ricks --- gsa/src/gmp/models/tlscertificate.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/gsa/src/gmp/models/tlscertificate.js b/gsa/src/gmp/models/tlscertificate.js index 01593e3f0a..9c02004ea4 100644 --- a/gsa/src/gmp/models/tlscertificate.js +++ b/gsa/src/gmp/models/tlscertificate.js @@ -45,24 +45,24 @@ export const getTranslatableTimeStatus = status => class TlsCertificate extends Model { static entityType = 'tlscertificate'; - static parseElement(elem) { - const ret = super.parseElement(elem); + static parseElement(element) { + const ret = super.parseElement(element); - ret.certificate = elem.certificate.__text; + ret.certificate = element.certificate.__text; - ret.name = elem.issuer_dn; + ret.name = element.issuer_dn; delete ret.issuer_dn; - ret.activationTime = parseDate(elem.activation_time); + ret.activationTime = parseDate(element.activation_time); delete ret.activation_time; - ret.expirationTime = parseDate(elem.expiration_time); + ret.expirationTime = parseDate(element.expiration_time); delete ret.expiration_time; - ret.lastSeen = parseDate(elem.last_seen); + ret.lastSeen = parseDate(element.last_seen); delete ret.last_seen; - ret.timeStatus = elem.time_status; + ret.timeStatus = element.time_status; delete ret.time_status; const sourceReports = new Set(); @@ -99,13 +99,13 @@ class TlsCertificate extends Model { delete ret.sources; - ret.valid = parseBoolean(elem.valid); - ret.trust = parseBoolean(elem.trust); + ret.valid = parseBoolean(element.valid); + ret.trust = parseBoolean(element.trust); - ret.sha256Fingerprint = elem.sha256_fingerprint; + ret.sha256Fingerprint = element.sha256_fingerprint; delete ret.sha256_fingerprint; - ret.md5Fingerprint = elem.md5_fingerprint; + ret.md5Fingerprint = element.md5_fingerprint; delete ret.md5_fingerprint; return ret; From ecdfec1a4e6afee0430d7851b4e5fc03c257ff48 Mon Sep 17 00:00:00 2001 From: Steffen Waterkamp Date: Thu, 10 Oct 2019 09:55:30 +0200 Subject: [PATCH 04/10] Handle 'undefined' and 'unlimited' dates in TlsCertificate model --- gsa/src/gmp/models/tlscertificate.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/gsa/src/gmp/models/tlscertificate.js b/gsa/src/gmp/models/tlscertificate.js index 9c02004ea4..e783342e5a 100644 --- a/gsa/src/gmp/models/tlscertificate.js +++ b/gsa/src/gmp/models/tlscertificate.js @@ -53,13 +53,24 @@ class TlsCertificate extends Model { ret.name = element.issuer_dn; delete ret.issuer_dn; - ret.activationTime = parseDate(element.activation_time); + ret.activationTime = + element.activation_time === 'undefined' || + element.activation_time === 'unlimited' + ? undefined + : parseDate(element.activation_time); delete ret.activation_time; - ret.expirationTime = parseDate(element.expiration_time); + ret.expirationTime = + element.expiration_time === 'undefined' || + element.expiration_time === 'unlimited' + ? undefined + : parseDate(element.expiration_time); delete ret.expiration_time; - ret.lastSeen = parseDate(element.last_seen); + ret.lastSeen = + element.last_seen === 'undefined' || element.last_seen === 'unlimited' + ? undefined + : parseDate(element.last_seen); delete ret.last_seen; ret.timeStatus = element.time_status; From 6ddbd8efcd906af5a3417f85c0472788e151ac08 Mon Sep 17 00:00:00 2001 From: Steffen Waterkamp Date: Thu, 10 Oct 2019 10:27:59 +0200 Subject: [PATCH 05/10] Fix build --- gsa/src/web/pages/tlscertificates/detailspage.js | 1 - 1 file changed, 1 deletion(-) diff --git a/gsa/src/web/pages/tlscertificates/detailspage.js b/gsa/src/web/pages/tlscertificates/detailspage.js index ae488b8e9a..9f00c7929a 100644 --- a/gsa/src/web/pages/tlscertificates/detailspage.js +++ b/gsa/src/web/pages/tlscertificates/detailspage.js @@ -27,7 +27,6 @@ import Layout from 'web/components/layout/layout'; import PageTitle from 'web/components/layout/pagetitle'; import DetailsLink from 'web/components/link/detailslink'; -import Link from 'web/components/link/link'; import DownloadIcon from 'web/components/icon/downloadicon'; import ExportIcon from 'web/components/icon/exporticon'; From 6d10cd7fe6214cb609f10e07b7fa9c8381458686 Mon Sep 17 00:00:00 2001 From: Steffen Waterkamp Date: Thu, 10 Oct 2019 12:03:28 +0200 Subject: [PATCH 06/10] Don't crash when no certificate is given in TlsCertificate model --- gsa/src/gmp/models/tlscertificate.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gsa/src/gmp/models/tlscertificate.js b/gsa/src/gmp/models/tlscertificate.js index e783342e5a..6dcf2defdb 100644 --- a/gsa/src/gmp/models/tlscertificate.js +++ b/gsa/src/gmp/models/tlscertificate.js @@ -48,7 +48,9 @@ class TlsCertificate extends Model { static parseElement(element) { const ret = super.parseElement(element); - ret.certificate = element.certificate.__text; + ret.certificate = isDefined(element.certificate) + ? element.certificate.__text + : undefined; ret.name = element.issuer_dn; delete ret.issuer_dn; From ae6b4b7395ab3a39711ffafd37290c47443dc9bf Mon Sep 17 00:00:00 2001 From: Steffen Waterkamp Date: Thu, 10 Oct 2019 12:06:34 +0200 Subject: [PATCH 07/10] Add tests for TlsCertificate model --- .../gmp/models/__tests__/tlscertificate.js | 381 ++++++++++++++++++ 1 file changed, 381 insertions(+) create mode 100644 gsa/src/gmp/models/__tests__/tlscertificate.js diff --git a/gsa/src/gmp/models/__tests__/tlscertificate.js b/gsa/src/gmp/models/__tests__/tlscertificate.js new file mode 100644 index 0000000000..8efe2bd18a --- /dev/null +++ b/gsa/src/gmp/models/__tests__/tlscertificate.js @@ -0,0 +1,381 @@ +/* Copyright (C) 2019 Greenbone Networks GmbH + * + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + */ +import TlsCertificate, {TIME_STATUS} from '../tlscertificate'; + +import {testModel} from 'gmp/models/testing'; + +import {parseDate} from 'gmp/parser'; + +describe('TlsCertificate Model tests', () => { + testModel(TlsCertificate, 'tlscertificate'); + + test('should parse certificate', () => { + const element = { + certificate: { + __text: 'CERT123', + }, + }; + const tlsCertificate1 = TlsCertificate.fromElement(element); + const tlsCertificate2 = TlsCertificate.fromElement(); + + expect(tlsCertificate1.certificate).toEqual('CERT123'); + expect(tlsCertificate2.certificate).toBeUndefined(); + }); + + test('should parse issuer_dn as name', () => { + const element = { + certificate: { + __text: 'CERT123', + }, + issuer_dn: 'dn', + }; + const tlsCertificate = TlsCertificate.fromElement(element); + + expect(tlsCertificate.name).toEqual('dn'); + expect(tlsCertificate.issuer_dn).toBeUndefined(); + }); + + test('should parse activation_time', () => { + const element1 = { + certificate: { + __text: 'CERT123', + }, + activation_time: '2019-10-10T11:09:23.022Z', + }; + const element2 = { + certificate: { + __text: 'CERT123', + }, + activation_time: 'undefined', + }; + const element3 = { + certificate: { + __text: 'CERT123', + }, + activation_time: 'unlimited', + }; + const tlsCertificate1 = TlsCertificate.fromElement(element1); + const tlsCertificate2 = TlsCertificate.fromElement(element2); + const tlsCertificate3 = TlsCertificate.fromElement(element3); + + expect(tlsCertificate1.activationTime).toEqual( + parseDate('2019-10-10T11:09:23.022Z'), + ); + expect(tlsCertificate1.activation_time).toBeUndefined(); + expect(tlsCertificate2.activationTime).toBeUndefined(); + expect(tlsCertificate3.activationTime).toBeUndefined(); + }); + + test('should parse expiration_time', () => { + const element1 = { + certificate: { + __text: 'CERT123', + }, + expiration_time: '2019-10-10T11:09:23.022Z', + }; + const element2 = { + certificate: { + __text: 'CERT123', + }, + expiration_time: 'undefined', + }; + const element3 = { + certificate: { + __text: 'CERT123', + }, + expiration_time: 'unlimited', + }; + const tlsCertificate1 = TlsCertificate.fromElement(element1); + const tlsCertificate2 = TlsCertificate.fromElement(element2); + const tlsCertificate3 = TlsCertificate.fromElement(element3); + + expect(tlsCertificate1.expirationTime).toEqual( + parseDate('2019-10-10T11:09:23.022Z'), + ); + expect(tlsCertificate1.expiration_time).toBeUndefined(); + expect(tlsCertificate2.expirationTime).toBeUndefined(); + expect(tlsCertificate3.expirationTime).toBeUndefined(); + }); + + test('should parse last_seen', () => { + const element1 = { + certificate: { + __text: 'CERT123', + }, + last_seen: '2019-10-10T11:09:23.022Z', + }; + const element2 = { + certificate: { + __text: 'CERT123', + }, + last_seen: 'undefined', + }; + const element3 = { + certificate: { + __text: 'CERT123', + }, + last_seen: 'unlimited', + }; + const tlsCertificate1 = TlsCertificate.fromElement(element1); + const tlsCertificate2 = TlsCertificate.fromElement(element2); + const tlsCertificate3 = TlsCertificate.fromElement(element3); + + expect(tlsCertificate1.lastSeen).toEqual( + parseDate('2019-10-10T11:09:23.022Z'), + ); + expect(tlsCertificate1.last_seen).toBeUndefined(); + expect(tlsCertificate2.lastSeen).toBeUndefined(); + expect(tlsCertificate3.lastSeen).toBeUndefined(); + }); + + test('should parse time_status', () => { + const element1 = { + certificate: { + __text: 'CERT123', + }, + time_status: 'inactive', + }; + const element2 = { + certificate: { + __text: 'CERT123', + }, + time_status: 'valid', + }; + const element3 = { + certificate: { + __text: 'CERT123', + }, + time_status: 'expired', + }; + const element4 = { + certificate: { + __text: 'CERT123', + }, + time_status: 'unknown', + }; + const tlsCertificate1 = TlsCertificate.fromElement(element1); + const tlsCertificate2 = TlsCertificate.fromElement(element2); + const tlsCertificate3 = TlsCertificate.fromElement(element3); + const tlsCertificate4 = TlsCertificate.fromElement(element4); + + expect(tlsCertificate1.timeStatus).toEqual(TIME_STATUS.inactive); + expect(tlsCertificate2.timeStatus).toEqual(TIME_STATUS.valid); + expect(tlsCertificate3.timeStatus).toEqual(TIME_STATUS.expired); + expect(tlsCertificate4.timeStatus).toEqual(TIME_STATUS.unknown); + expect(tlsCertificate1.time_status).toBeUndefined(); + }); + + test('should parse valid', () => { + const element1 = { + certificate: { + __text: 'CERT123', + }, + valid: '1', + }; + const element2 = { + certificate: { + __text: 'CERT123', + }, + valid: '0', + }; + const element3 = { + certificate: { + __text: 'CERT123', + }, + }; + const tlsCertificate1 = TlsCertificate.fromElement(element1); + const tlsCertificate2 = TlsCertificate.fromElement(element2); + const tlsCertificate3 = TlsCertificate.fromElement(element3); + + expect(tlsCertificate1.valid).toEqual(true); + expect(tlsCertificate2.valid).toEqual(false); + expect(tlsCertificate3.valid).toEqual(false); + }); + + test('should parse trust', () => { + const element1 = { + certificate: { + __text: 'CERT123', + }, + trust: '1', + }; + const element2 = { + certificate: { + __text: 'CERT123', + }, + trust: '0', + }; + const element3 = { + certificate: { + __text: 'CERT123', + }, + }; + const tlsCertificate1 = TlsCertificate.fromElement(element1); + const tlsCertificate2 = TlsCertificate.fromElement(element2); + const tlsCertificate3 = TlsCertificate.fromElement(element3); + + expect(tlsCertificate1.trust).toEqual(true); + expect(tlsCertificate2.trust).toEqual(false); + expect(tlsCertificate3.trust).toEqual(false); + }); + + test('should parse sha256_fingerprint', () => { + const element1 = { + certificate: { + __text: 'CERT123', + }, + sha256_fingerprint: 'SHA256', + }; + const tlsCertificate1 = TlsCertificate.fromElement(element1); + + expect(tlsCertificate1.sha256Fingerprint).toEqual('SHA256'); + expect(tlsCertificate1.sha256_fingerprint).toBeUndefined(); + }); + + test('should parse md5_fingerprint', () => { + const element1 = { + certificate: { + __text: 'CERT123', + }, + md5_fingerprint: 'MD5', + }; + const tlsCertificate1 = TlsCertificate.fromElement(element1); + + expect(tlsCertificate1.md5Fingerprint).toEqual('MD5'); + expect(tlsCertificate1.md5_fingerprint).toBeUndefined(); + }); + + test('should parse source reports', () => { + const element = { + certificate: { + __text: 'CERT123', + }, + sources: { + source: [ + { + origin: { + origin_id: 'ID123', + origin_type: 'Report', + report: { + date: '2019-10-10T11:09:23.022Z', + }, + }, + }, + { + origin: { + origin_id: 'ID456', + origin_type: 'Report', + report: { + date: '2019-10-10T11:09:23.022Z', + }, + }, + }, + ], + }, + }; + const resSourceReports = [ + { + id: 'ID123', + timestamp: '2019-10-10T11:09:23.022Z', + }, + { + id: 'ID456', + timestamp: '2019-10-10T11:09:23.022Z', + }, + ]; + const tlsCertificate = TlsCertificate.fromElement(element); + + expect(tlsCertificate.sourceReports).toEqual(resSourceReports); + expect(tlsCertificate.sources).toBeUndefined(); + }); + + test('should parse source hosts', () => { + const element = { + certificate: { + __text: 'CERT123', + }, + sources: { + source: [ + { + location: { + host: { + asset: { + _id: 'ID123', + }, + ip: '123.456.789.0', + }, + }, + }, + { + location: { + host: { + asset: { + _id: 'ID456', + }, + ip: '123.456.789.42', + }, + }, + }, + ], + }, + }; + const resSourceHosts = [ + { + id: 'ID123', + ip: '123.456.789.0', + }, + { + id: 'ID456', + ip: '123.456.789.42', + }, + ]; + const tlsCertificate = TlsCertificate.fromElement(element); + + expect(tlsCertificate.sourceHosts).toEqual(resSourceHosts); + expect(tlsCertificate.sources).toBeUndefined(); + }); + + test('should parse source ports', () => { + const element = { + certificate: { + __text: 'CERT123', + }, + sources: { + source: [ + { + location: { + port: '1234', + }, + }, + { + location: { + port: '5678', + }, + }, + ], + }, + }; + const tlsCertificate = TlsCertificate.fromElement(element); + + expect(tlsCertificate.sourcePorts).toEqual(['1234', '5678']); + expect(tlsCertificate.sources).toBeUndefined(); + }); +}); + +// vim: set ts=2 sw=2 tw=80: From dad93cd7b26fe2f85713052ec51cc7475cc4f8d7 Mon Sep 17 00:00:00 2001 From: Steffen Waterkamp Date: Thu, 10 Oct 2019 12:07:52 +0200 Subject: [PATCH 08/10] Update Changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37d7eb0e1e..b5cd953f76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Added TLS certificates to the asset management. [#1455](https://github.com/greenbone/gsa/pull/1455), [#1461](https://github.com/greenbone/gsa/pull/1461), - [#1600](https://github.com/greenbone/gsa/pull/1600) + [#1600](https://github.com/greenbone/gsa/pull/1600), + [#1681](https://github.com/greenbone/gsa/pull/1681) - Add usage type to task and scanconfig commands [#1460](https://github.com/greenbone/gsa/pull/1460) [#1466](https://github.com/greenbone/gsa/pull/1466) [#1467](https://github.com/greenbone/gsa/pull/1467) From 15b145346becd273cfbbc7d79932fabc8fb972fb Mon Sep 17 00:00:00 2001 From: Steffen Waterkamp Date: Thu, 10 Oct 2019 12:28:48 +0200 Subject: [PATCH 09/10] Adjust table header for TlsCertificate LastSeen info --- gsa/src/web/pages/tlscertificates/table.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gsa/src/web/pages/tlscertificates/table.js b/gsa/src/web/pages/tlscertificates/table.js index 1ed7f07dbd..d789e244ab 100644 --- a/gsa/src/web/pages/tlscertificates/table.js +++ b/gsa/src/web/pages/tlscertificates/table.js @@ -81,7 +81,7 @@ const Header = ({ currentSortBy={currentSortBy} sortBy={sort ? 'modified' : false} onSortChange={onSortChange} - title={_('Latest collection')} + title={_('Last seen')} /> {_('Actions')} From 36394c13be92e9a71e4734333fe9652dfa108252 Mon Sep 17 00:00:00 2001 From: Steffen Waterkamp Date: Thu, 10 Oct 2019 12:32:36 +0200 Subject: [PATCH 10/10] Don't use index when mapping through sources on TlsCertificate detailspage --- gsa/src/web/pages/tlscertificates/detailspage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gsa/src/web/pages/tlscertificates/detailspage.js b/gsa/src/web/pages/tlscertificates/detailspage.js index 9f00c7929a..08a2c22229 100644 --- a/gsa/src/web/pages/tlscertificates/detailspage.js +++ b/gsa/src/web/pages/tlscertificates/detailspage.js @@ -143,7 +143,7 @@ const Details = ({entity, ...props}) => { {_('Reports')} - {entity.sourceReports.map((report, index) => ( + {entity.sourceReports.map(report => ( { {_('Hosts')} - {entity.sourceHosts.map((host, index) => ( + {entity.sourceHosts.map(host => ( {host.ip}