diff --git a/CHANGELOG.md b/CHANGELOG.md index ed1e646820..6fdab0bc1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,11 +21,25 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). [21.04]: https://github.com/greenbone/gsa/compare/gsa-20.08...master -## [20.08] - unreleased +## [20.8.1] - unreleased ### Added -- Add reload timer to feedstatuspage and displaying when updating is in progress [#2350](https://github.com/greenbone/gsa/pull/2350) -- Add filtered links to GVMD_DATA row in feed status page [#2339](https://github.com/greenbone/gsa/pull/2339) +- Added option for "Start Task" event upon "New SecInfo arrived" condition in alerts dialog [#2418](https://github.com/greenbone/gsa/pull/2418) + +### Changed +- Use to disable feed object editing and filter creation on feed status page [#2398](https://github.com/greenbone/gsa/pull/2398) + +### Fixed + +### Removed + +[20.8.1]: https://github.com/greenbone/gsa/compare/v20.8.0...gsa-20.08 + +## [20.8.0] - 2020-08-11 + +### Added +- Added reload timer to feedstatuspage and displaying when updating is in progress [#2350](https://github.com/greenbone/gsa/pull/2350) +- Added filtered links to GVMD_DATA row in feed status page [#2339](https://github.com/greenbone/gsa/pull/2339) - Added loading indicator for CVEs on CPE detailspage [#2248](https://github.com/greenbone/gsa/pull/2248) - Added new form validation feature, implemented on create and edit ticket dialog [#1782](https://github.com/greenbone/gsa/pull/1782) - Added German translation for About page [#1998](https://github.com/greenbone/gsa/pull/1998) @@ -38,11 +52,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Added handling of queued task status [#2208](https://github.com/greenbone/gsa/pull/2208) ### Changed +- Increase age for feed being too old [#2394](https://github.com/greenbone/gsa/pull/2394) - Do not use result filter from store on report detailspage by default [#2358](https://github.com/greenbone/gsa/pull/2358) - Improve performance of form fields in edit scan config dialog [#2354](https://github.com/greenbone/gsa/pull/2354) - Default to sorting nvts by "Created", newest first [#2352](https://github.com/greenbone/gsa/pull/2352) - Disable EditIcons for data objects from feed [#2346](https://github.com/greenbone/gsa/pull/2346) -- EmptyResultsReport uses the same counts as the results tab title in normal reports, when filtering for nonexistent results [#2335](https://github.com/greenbone/gsa/pull/2335) - Improve error 503 message at login [#2310](https://github.com/greenbone/gsa/pull/2310) - Use unified solution type instead of solution type nvt tag [#2268](https://github.com/greenbone/gsa/pull/2268) - Changed queued status color [#2227](https://github.com/greenbone/gsa/pull/2227) @@ -60,6 +74,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Deleting a single entity now removes its ID from store [#1839](https://github.com/greenbone/gsa/pull/1839) ### Fixed +- Fixed empty subsections on oval def details page [#2396](https://github.com/greenbone/gsa/pull/2396) +- Fixed missing NVT solution [#2388](https://github.com/greenbone/gsa/pull/2388) +- EmptyResultsReport uses the same counts as the results tab title in normal reports, when filtering for nonexistent results + [#2335](https://github.com/greenbone/gsa/pull/2335), [#2365](https://github.com/greenbone/gsa/pull/2365) +- Show proper error message on report detailspage when no report format is available [#2367](https://github.com/greenbone/gsa/pull/2367) +- Don't use stored result list page filter at report results tab [#2366](https://github.com/greenbone/gsa/pull/2366) +- Fixed pagination of report results [#2365](https://github.com/greenbone/gsa/pull/2365) - Fixed flickering reports [#2359](https://github.com/greenbone/gsa/pull/2359) - Fixed "Hosts scanned" in report details disappearing during page refresh [#2357](https://github.com/greenbone/gsa/pull/2357) - Fixed schedule_periods not forwarded if there is no schedule [#2331](https://github.com/greenbone/gsa/pull/2331) @@ -88,7 +109,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Removed "All SecInfo" section [#1685](https://github.com/greenbone/gsa/pull/1685) [#1695](https://github.com/greenbone/gsa/pull/1695) - Removed agents [#1903](https://github.com/greenbone/gsa/pull/1903) -[20.08]: https://github.com/greenbone/gsa/compare/gsa-9.0...gsa-20.08 +[20.8.0]: https://github.com/greenbone/gsa/compare/gsa-9.0...v20.8.0 ## [9.0.1] - 2020-05-13 diff --git a/CMakeLists.txt b/CMakeLists.txt index 96923dac09..9ce469aa9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ message ("-- Configuring Greenbone Security Assistant") # VERSION: Set patch version for stable releases, e.g. "9.0.1", # unset patch version for prereleases, e.g. "9.0" project (greenbone-security-assistant - VERSION 20.08) + VERSION 20.8.0) SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) @@ -32,7 +32,7 @@ endif (NOT CMAKE_BUILD_TYPE) # set if this is in prerelease status, starting at 0 before first beta release, # unset if this is a stable release series. -set (PROJECT_BETA_RELEASE 0) +# set (PROJECT_BETA_RELEASE 0) ## Retrieve git revision (at configure time) include (ProjectVersion) diff --git a/gsa/CMakeLists.txt b/gsa/CMakeLists.txt index db597d390b..7d99b67756 100644 --- a/gsa/CMakeLists.txt +++ b/gsa/CMakeLists.txt @@ -19,7 +19,7 @@ cmake_minimum_required (VERSION 3.0) message ("-- Configuring gsa") -project (gsa VERSION 20.08 LANGUAGES) +project (gsa VERSION 20.8.0 LANGUAGES) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) diff --git a/gsa/package.json b/gsa/package.json index 7bae11d848..629850467e 100644 --- a/gsa/package.json +++ b/gsa/package.json @@ -1,6 +1,6 @@ { "name": "gsa", - "version": "20.08", + "version": "20.08.0", "description": "Greenbone Security Assistant", "keywords": [ "openvas", @@ -14,7 +14,7 @@ "url": "https://github.com/greenbone/gsa/" }, "author": "Björn Ricks ", - "license": "GPL-2.0+", + "license": "AGPL-3.0+", "main": "src/index.js", "engines": { "node": ">=10.0" diff --git a/gsa/public/locales/gsa-de.json b/gsa/public/locales/gsa-de.json index b500ea5d53..83a8501b78 100644 --- a/gsa/public/locales/gsa-de.json +++ b/gsa/public/locales/gsa-de.json @@ -1659,6 +1659,7 @@ "The maximum of {{num}} hosts was exceeded. If there are more hosts associated with this process, they will not be taken into account.": "Das Maximum von {{num}} Hosts wurde überschritten. Sollten weitere Hosts mit diesem Prozess verknüpft sein, werden sie nicht mitberücksichtigt.", "The name must include at least one alphanumeric character or one of .,-/_# and space.": "Der Name muss mindestens ein alphanumerisches Zeichen oder eines von .,-/_# und Leerzeichen enthalten.", "The port range needs numerical values for start and end!": "Der Portbereich benötigt numerische Werte für Start und Ende!", + "The report cannot be displayed because no Greenbone Vulnerability Manager report format is available. This could be due to a missing gvmd data feed. Please update the gvmd data feed, check the \"feed import owner\" setting, or contact your system administrator.": "Der Bericht kann nicht angezeigt werden, weil dem Greenbone Vulnerability Manager kein Berichtformat zur Verfügung steht. Dies könnte an einem fehlenden gvmd Data Feed liegen. Bitte aktualisieren Sie den gvmd Data Feed, überprüfen die \"Feed Import Besitzer\"-Einstellungen, oder kontaktieren Ihren Systemadministrator.", "The report is empty. The filter does not match any of the {{all}} results.": "Der Bericht ist leer. Der Filter passt zu keinem der {{all}} Ergebnisse.", "The scan did not collect any results": "Der Scan hat keine Ergebnisse gesammelt", "The scan is still running and no results have arrived yet": "Der Scan läuft noch und es sind noch keine Ergebnisse eingetroffen", @@ -1758,6 +1759,7 @@ "Unreliable rem. banner": "Unzuverlässiger Banner", "Update": "Aktualisieren", "Update Filter": "Filter aktualisieren", + "Update in progress...": "Aktualisierung läuft...", "Updated": "Aktualisiert", "Updated {{secinfo_type}} arrived": "Aktualisierte {{secinfo_type}} eingetroffen", "Updated: ": "Aktualisiert: ", diff --git a/gsa/src/gmp/gmpsettings.js b/gsa/src/gmp/gmpsettings.js index 57ab7465f3..0d61bdc718 100644 --- a/gsa/src/gmp/gmpsettings.js +++ b/gsa/src/gmp/gmpsettings.js @@ -21,9 +21,10 @@ export const DEFAULT_GRAPHQL_API_LOCATION = 'selene/graphql/'; export const DEFAULT_RELOAD_INTERVAL = 15 * 1000; // fifteen seconds export const DEFAULT_RELOAD_INTERVAL_ACTIVE = 3 * 1000; // three seconds export const DEFAULT_RELOAD_INTERVAL_INACTIVE = 60 * 1000; // one minute -export const DEFAULT_MANUAL_URL = 'http://docs.greenbone.net/GSM-Manual/gos-6/'; +export const DEFAULT_MANUAL_URL = + 'http://docs.greenbone.net/GSM-Manual/gos-20.08/'; export const DEFAULT_PROTOCOLDOC_URL = - 'https://docs.greenbone.net/API/GMP/gmp-9.0.html'; + 'https://docs.greenbone.net/API/GMP/gmp-20.08.html'; export const DEFAULT_REPORT_RESULTS_THRESHOLD = 25000; export const DEFAULT_LOG_LEVEL = 'warn'; export const DEFAULT_TIMEOUT = 300000; // 5 minutes diff --git a/gsa/src/gmp/models/__tests__/policy.js b/gsa/src/gmp/models/__tests__/policy.js index 34aab9f38e..403f1cc08a 100644 --- a/gsa/src/gmp/models/__tests__/policy.js +++ b/gsa/src/gmp/models/__tests__/policy.js @@ -246,6 +246,14 @@ describe('Policy model tests', () => { expect(policy.audits).toEqual([]); }); + + test('should parse predefined as boolean correctly', () => { + const policy = Policy.fromElement({predefined: '0'}); + const policy2 = Policy.fromElement({predefined: '1'}); + + expect(policy.predefined).toEqual(false); + expect(policy2.predefined).toEqual(true); + }); }); // vim: set ts=2 sw=2 tw=80: diff --git a/gsa/src/gmp/models/__tests__/portlist.js b/gsa/src/gmp/models/__tests__/portlist.js index c5538e0149..07c7697652 100644 --- a/gsa/src/gmp/models/__tests__/portlist.js +++ b/gsa/src/gmp/models/__tests__/portlist.js @@ -108,6 +108,14 @@ describe('PortList model tests', () => { expect(portList.targets).toEqual([]); }); + + test('should parse predefined as boolean correctly', () => { + const portList = PortList.fromElement({predefined: '0'}); + const portList2 = PortList.fromElement({predefined: '1'}); + + expect(portList.predefined).toEqual(false); + expect(portList2.predefined).toEqual(true); + }); }); // vim: set ts=2 sw=2 tw=80: diff --git a/gsa/src/gmp/models/__tests__/reportformat.js b/gsa/src/gmp/models/__tests__/reportformat.js index 3361915397..47de91f4fe 100644 --- a/gsa/src/gmp/models/__tests__/reportformat.js +++ b/gsa/src/gmp/models/__tests__/reportformat.js @@ -64,6 +64,14 @@ describe('ReportFormat model tests', () => { expect(reportFormat2.active).toEqual(YES_VALUE); }); + test('should parse predefined as boolean correctly', () => { + const reportFormat = ReportFormat.fromElement({predefined: '0'}); + const reportFormat2 = ReportFormat.fromElement({predefined: '1'}); + + expect(reportFormat.predefined).toEqual(false); + expect(reportFormat2.predefined).toEqual(true); + }); + test('should parse alerts', () => { const elem = { alerts: { diff --git a/gsa/src/gmp/models/__tests__/scanconfig.js b/gsa/src/gmp/models/__tests__/scanconfig.js index c6c69d795c..bd638b0be0 100644 --- a/gsa/src/gmp/models/__tests__/scanconfig.js +++ b/gsa/src/gmp/models/__tests__/scanconfig.js @@ -252,6 +252,14 @@ describe('ScanConfig model tests', () => { expect(scanConfig.tasks).toEqual([]); }); + + test('should parse predefined as boolean correctly', () => { + const scanConfig = ScanConfig.fromElement({predefined: '0'}); + const scanConfig2 = ScanConfig.fromElement({predefined: '1'}); + + expect(scanConfig.predefined).toEqual(false); + expect(scanConfig2.predefined).toEqual(true); + }); }); describe('ScanConfigs model function test', () => { diff --git a/gsa/src/gmp/models/nvt.js b/gsa/src/gmp/models/nvt.js index 8e31f9a085..973cad4610 100644 --- a/gsa/src/gmp/models/nvt.js +++ b/gsa/src/gmp/models/nvt.js @@ -135,11 +135,11 @@ class Nvt extends Info { getFilteredRefs(refs, 'cert-bund'), ); - if (isDefined(element.solution)) { + if (isDefined(ret.solution)) { ret.solution = { - type: element.solution._type, - description: element.solution.__text, - method: element.solution._method, + type: ret.solution._type, + description: ret.solution.__text, + method: ret.solution._method, }; } diff --git a/gsa/src/gmp/models/ovaldef.js b/gsa/src/gmp/models/ovaldef.js index df1fc4d86b..54e4806542 100644 --- a/gsa/src/gmp/models/ovaldef.js +++ b/gsa/src/gmp/models/ovaldef.js @@ -74,10 +74,10 @@ class Ovaldef extends Info { static parseElement(element) { const ret = super.parseElement(element, 'ovaldef'); - ret.severity = parseSeverity(element.max_cvss); + ret.severity = parseSeverity(ret.max_cvss); delete ret.max_cvss; - const {raw_data} = element; + const {raw_data} = ret; if (isDefined(raw_data) && isDefined(raw_data.definition)) { const {definition} = raw_data; diff --git a/gsa/src/gmp/models/policy.js b/gsa/src/gmp/models/policy.js index ab2c3d6a41..5573b2ff9f 100644 --- a/gsa/src/gmp/models/policy.js +++ b/gsa/src/gmp/models/policy.js @@ -20,7 +20,7 @@ import {isDefined} from '../utils/identity'; import {forEach, map} from '../utils/array'; import {isEmpty} from '../utils/string'; -import {parseInt} from '../parser'; +import {parseInt, parseBoolean} from '../parser'; import Model, {parseModelFromElement} from '../model'; @@ -130,6 +130,8 @@ class Policy extends Model { ret.audits = []; } + ret.predefined = parseBoolean(element.predefined); + return ret; } } diff --git a/gsa/src/gmp/models/portlist.js b/gsa/src/gmp/models/portlist.js index 70c3080def..f480d4aaf8 100644 --- a/gsa/src/gmp/models/portlist.js +++ b/gsa/src/gmp/models/portlist.js @@ -20,7 +20,7 @@ import {map} from '../utils/array'; import Model, {parseModelFromElement} from '../model'; -import {parseInt} from '../parser'; +import {parseInt, parseBoolean} from '../parser'; class PortRange extends Model { static entityType = 'portrange'; @@ -71,6 +71,9 @@ class PortList extends Model { } else { ret.targets = []; } + + ret.predefined = parseBoolean(element.predefined); + return ret; } } diff --git a/gsa/src/gmp/models/reportformat.js b/gsa/src/gmp/models/reportformat.js index 7da2267fcd..809b0c014e 100644 --- a/gsa/src/gmp/models/reportformat.js +++ b/gsa/src/gmp/models/reportformat.js @@ -19,7 +19,7 @@ import {isDefined, isObject} from '../utils/identity'; import {map} from '../utils/array'; import {isEmpty} from '../utils/string'; -import {parseDate, parseYesNo, YES_VALUE} from '../parser'; +import {parseDate, parseYesNo, YES_VALUE, parseBoolean} from '../parser'; import Model, {parseModelFromElement} from '../model'; @@ -84,6 +84,7 @@ class ReportFormat extends Model { } ret.active = parseYesNo(element.active); + ret.predefined = parseBoolean(element.predefined); return ret; } diff --git a/gsa/src/gmp/models/scanconfig.js b/gsa/src/gmp/models/scanconfig.js index b97fae1733..4cc1433eab 100644 --- a/gsa/src/gmp/models/scanconfig.js +++ b/gsa/src/gmp/models/scanconfig.js @@ -20,7 +20,7 @@ import {isDefined} from '../utils/identity'; import {forEach, map} from '../utils/array'; import {isEmpty} from '../utils/string'; -import {parseInt} from '../parser'; +import {parseInt, parseBoolean} from '../parser'; import Model, {parseModelFromElement} from '../model'; @@ -167,6 +167,8 @@ class ScanConfig extends Model { ret.tasks = []; } + ret.predefined = parseBoolean(element.predefined); + return ret; } } diff --git a/gsa/src/web/components/error/errorpanel.js b/gsa/src/web/components/error/errorpanel.js index 366ebe57a5..4c80a61176 100644 --- a/gsa/src/web/components/error/errorpanel.js +++ b/gsa/src/web/components/error/errorpanel.js @@ -45,9 +45,7 @@ const ErrorDetails = styled.div` background-color: ${Theme.white}; padding: 5px; max-height: 200px; - overflow: auto; overflow-x: auto; - white-space: pre; `; const ErrorPanel = ({error, message, info}) => { diff --git a/gsa/src/web/pages/extras/__tests__/feedstatuspage.js b/gsa/src/web/pages/extras/__tests__/feedstatuspage.js index 60571289fa..10a4757a96 100644 --- a/gsa/src/web/pages/extras/__tests__/feedstatuspage.js +++ b/gsa/src/web/pages/extras/__tests__/feedstatuspage.js @@ -19,7 +19,7 @@ import React from 'react'; import {rendererWith, wait} from 'web/utils/testing'; -import FeedStatus, {composeObjFilter} from '../feedstatuspage'; +import FeedStatus from '../feedstatuspage'; import {Feed} from 'gmp/commands/feedstatus'; import Response from 'gmp/http/response'; @@ -47,13 +47,13 @@ const scapFeed = new Feed({ const certFeed = new Feed({ name: 'Greenbone Community CERT Feed', type: 'CERT', - version: 202007231003, + version: 202005231003, }); const gvmdDataFeed = new Feed({ - name: 'Greenbone Community GVMd Data Feed', + name: 'Greenbone Community gvmd Data Feed', type: 'GVMD_DATA', - version: 202007221009, + version: 202006221009, currently_syncing: {timestamp: 'foo'}, }); @@ -79,7 +79,7 @@ const gmp = { describe('Feed status page tests', () => { test('should render', async () => { const {render} = rendererWith({gmp, router: true}); - const {element, getAllByTestId, getByTestId} = render(); + const {element, getAllByTestId} = render(); await wait(); @@ -118,21 +118,18 @@ describe('Feed status page tests', () => { expect(links[4]).toHaveAttribute('href', '/ovaldefs'); expect(links[5]).toHaveAttribute('href', '/certbunds'); expect(links[6]).toHaveAttribute('href', '/dfncerts'); - expect(links[7]).toHaveAttribute( - 'href', - '/policies?filter=uuid%3Dc4b7c0cb-6502-4809-b034-8e635311b3e6%20', - ); + expect(links[7]).toHaveAttribute('href', '/policies?filter=predefined%3D1'); expect(links[8]).toHaveAttribute( 'href', - '/portlists?filter=uuid%3D33d0cd82-57c6-11e1-8ed1-406186ea4fc5%20uuid%3D4a4717fe-57d2-11e1-9a26-406186ea4fc5%20uuid%3D730ef368-57e2-11e1-a90f-406186ea4fc5%20', + '/portlists?filter=predefined%3D1', ); expect(links[9]).toHaveAttribute( 'href', - '/reportformats?filter=uuid%3D5057e5cc-b825-11e4-9d0e-28d24461215b%20uuid%3Dc1645568-627a-11e3-a660-406186ea4fc5%20uuid%3D77bd6c4a-1f62-11e1-abf0-406186ea4fc5%20uuid%3Dc402cc3e-b531-11e1-9163-406186ea4fc5%20uuid%3Da3810a62-1f62-11e1-9219-406186ea4fc5%20uuid%3Da994b278-1f62-11e1-96ac-406186ea4fc5%20', + '/reportformats?filter=predefined%3D1', ); expect(links[10]).toHaveAttribute( 'href', - '/scanconfigs?filter=uuid%3Dd21f6c81-2b88-4ac1-b7b4-a2a9f2ad4663%20uuid%3D8715c877-47a0-438d-98a3-27c7a6ab2196%20uuid%3D085569ce-73ed-11df-83c3-002264764cea%20uuid%3Ddaba56c8-73ec-11df-a475-002264764cea%20uuid%3D2d3f051c-55ba-11e3-bf43-406186ea4fc5%20uuid%3Dbbca7412-a950-11e3-9109-406186ea4fc5%20', + '/scanconfigs?filter=predefined%3D1', ); // Test headers @@ -156,45 +153,38 @@ describe('Feed status page tests', () => { expect(element).toHaveTextContent('Greenbone Community Feed'); expect(element).toHaveTextContent('Greenbone Community SCAP Feed'); expect(element).toHaveTextContent('Greenbone Community CERT Feed'); - expect(element).toHaveTextContent('Greenbone Community GVMd Data Feed'); + expect(element).toHaveTextContent('Greenbone Community gvmd Data Feed'); // Feed versions expect(element).toHaveTextContent('20200724T1005'); expect(element).toHaveTextContent('20200723T0130'); - expect(element).toHaveTextContent('20200723T1003'); - expect(element).toHaveTextContent('20200722T1009'); + expect(element).toHaveTextContent('20200523T1003'); + expect(element).toHaveTextContent('20200622T1009'); // Feed Status const ageText = element.querySelectorAll('strong'); + const updateMsgs = getAllByTestId('update-msg'); expect(ageText.length).toEqual(4); - expect(ageText[0]).toHaveTextContent('Current'); - expect(ageText[1]).toHaveTextContent('2 days old'); - expect(ageText[2]).toHaveTextContent('Current'); - - const loadingIndicator = getByTestId('loading-indicator'); + expect(updateMsgs.length).toEqual(4); - expect(loadingIndicator).toHaveAttribute('title', 'Update in progress'); - expect(loadingIndicator).toHaveAttribute('src', '/img/loading.gif'); - expect(loadingIndicator).toHaveAttribute('alt', 'Loading Indicator'); - }); -}); + // Not too old and not currently syncing + expect(ageText[0]).toHaveTextContent('Current'); + expect(updateMsgs[0]).toHaveTextContent(''); -describe('Test uuid filter composer', () => { - test('Should return empty string for empty array', () => { - const emptyFilter = composeObjFilter([]); - expect(emptyFilter).toEqual(''); - }); + expect(ageText[1]).toHaveTextContent('2 days old'); + expect(updateMsgs[1]).toHaveTextContent(''); - test('Should not crash on undefined input', () => { - const noFilter = composeObjFilter(); - expect(noFilter).toEqual(''); - }); + // CERT feed is too old but is not currently syncing + expect(ageText[2]).toHaveTextContent('Too old (62 days)'); + expect(updateMsgs[2]).toHaveTextContent( + 'Please check the automatic synchronization of your system.', + ); - test('Should return correct filter string', () => { - const filterString = composeObjFilter(['foo', 'bar', 'baz']); - expect(filterString).toEqual('uuid=foo uuid=bar uuid=baz '); + // GVMD_DATA feed is too old but IS currently syncing + expect(ageText[3]).toHaveTextContent('Update in progress...'); + expect(updateMsgs[3]).toHaveTextContent(''); }); }); diff --git a/gsa/src/web/pages/extras/feedstatuspage.js b/gsa/src/web/pages/extras/feedstatuspage.js index 9ade999e69..fe99886c01 100644 --- a/gsa/src/web/pages/extras/feedstatuspage.js +++ b/gsa/src/web/pages/extras/feedstatuspage.js @@ -78,28 +78,19 @@ const ToolBarIcons = () => ( const renderCheck = feed => { const age = feed.age.asDays(); - return age >= 10 + return age >= 30 && !hasValue(feed.currentlySyncing) ? _('Please check the automatic synchronization of your system.') : ''; }; const renderFeedStatus = feed => { if (hasValue(feed.currentlySyncing)) { - return ( - - {_('Loading - - ); + return _('Update in progress...'); } const age = parseInt(feed.age.asDays()); - if (age >= 10) { + if (age >= 30) { return _('Too old ({{age}} days)', {age}); } @@ -109,42 +100,6 @@ const renderFeedStatus = feed => { return _('Current'); }; -export const COMPLIANCE_POLICIES_FROM_FEED = [ - 'c4b7c0cb-6502-4809-b034-8e635311b3e6', // IT-Grundschutz -]; - -export const PORT_LISTS_FROM_FEED = [ - '33d0cd82-57c6-11e1-8ed1-406186ea4fc5', // All IANA assigned TCP - '4a4717fe-57d2-11e1-9a26-406186ea4fc5', // All IANA assigned TCP and UDP - '730ef368-57e2-11e1-a90f-406186ea4fc5', // All TCP and Nmap top 100 UDP -]; - -export const REPORT_FORMATS_FROM_FEED = [ - '5057e5cc-b825-11e4-9d0e-28d24461215b', // Anonymous XML - 'c1645568-627a-11e3-a660-406186ea4fc5', // CSV Results - '77bd6c4a-1f62-11e1-abf0-406186ea4fc5', // ITG - 'c402cc3e-b531-11e1-9163-406186ea4fc5', // PDF - 'a3810a62-1f62-11e1-9219-406186ea4fc5', // TXT - 'a994b278-1f62-11e1-96ac-406186ea4fc5', // XML -]; - -export const SCAN_CONFIGS_FROM_FEED = [ - 'd21f6c81-2b88-4ac1-b7b4-a2a9f2ad4663', // Base - '8715c877-47a0-438d-98a3-27c7a6ab2196', // Discovery - '085569ce-73ed-11df-83c3-002264764cea', // empty - 'daba56c8-73ec-11df-a475-002264764cea', // Full and fast - '2d3f051c-55ba-11e3-bf43-406186ea4fc5', // Host Discovery - 'bbca7412-a950-11e3-9109-406186ea4fc5', // System Discovery -]; - -export const composeObjFilter = (objectIds = []) => { - let filterString = ''; - - objectIds.forEach(id => (filterString += 'uuid=' + id + ' ')); - - return filterString; -}; - const FeedStatus = ({feeds}) => { return ( @@ -216,37 +171,25 @@ const FeedStatus = ({feeds}) => { )} {feed.feed_type === GVMD_DATA_FEED && ( - + {_('Compliance Policies')} - + {_('Port Lists')} - + {_('Report Formats')} - + {_('Scan Configs')} @@ -260,7 +203,7 @@ const FeedStatus = ({feeds}) => { {renderFeedStatus(feed)} - {renderCheck(feed)} + {renderCheck(feed)} diff --git a/gsa/src/web/pages/policies/detailspage.js b/gsa/src/web/pages/policies/detailspage.js index bc4f5963ab..d77b285a67 100644 --- a/gsa/src/web/pages/policies/detailspage.js +++ b/gsa/src/web/pages/policies/detailspage.js @@ -49,8 +49,6 @@ import CloneIcon from 'web/entity/icon/cloneicon'; import EditIcon from 'web/entity/icon/editicon'; import TrashIcon from 'web/entity/icon/trashicon'; -import {COMPLIANCE_POLICIES_FROM_FEED} from 'web/pages/extras/feedstatuspage'; - import {selector, loadEntity} from 'web/store/entities/policies'; import { @@ -95,7 +93,7 @@ export const ToolBarIcons = withCapabilities( onClick={onPolicyCloneClick} /> diff --git a/gsa/src/web/pages/portlists/row.js b/gsa/src/web/pages/portlists/row.js index 897d71597d..f8b91d3a18 100644 --- a/gsa/src/web/pages/portlists/row.js +++ b/gsa/src/web/pages/portlists/row.js @@ -36,8 +36,6 @@ import IconDivider from 'web/components/layout/icondivider'; import TableData from 'web/components/table/data'; import TableRow from 'web/components/table/row'; -import {PORT_LISTS_FROM_FEED} from 'web/pages/extras/feedstatuspage'; - const IconActions = ({ entity, onPortListDeleteClick, @@ -54,7 +52,7 @@ const IconActions = ({ /> diff --git a/gsa/src/web/pages/reportformats/row.js b/gsa/src/web/pages/reportformats/row.js index 0941e134b9..6b1ae04fb4 100644 --- a/gsa/src/web/pages/reportformats/row.js +++ b/gsa/src/web/pages/reportformats/row.js @@ -40,8 +40,6 @@ import {renderYesNo} from 'web/utils/render'; import withCapabilities from 'web/utils/withCapabilities'; import withEntitiesActions from 'web/entities/withEntitiesActions'; -import {REPORT_FORMATS_FROM_FEED} from 'web/pages/extras/feedstatuspage'; - const Actions = compose( withCapabilities, withEntitiesActions, @@ -62,7 +60,7 @@ const Actions = compose( /> ); - } else if (resultsCounts.all > 0) { + } else if (reportResultsCounts.all > 0) { return ( { resultsFilter, resultsError: selector.getEntitiesError(resultsFilter), results: selector.getEntities(resultsFilter), + resultsCounts: selector.getEntitiesCounts(resultsFilter), isLoading: selector.isLoadingEntities(resultsFilter), }; }; diff --git a/gsa/src/web/pages/reports/detailscontent.js b/gsa/src/web/pages/reports/detailscontent.js index 7af69011ba..ab303c803b 100644 --- a/gsa/src/web/pages/reports/detailscontent.js +++ b/gsa/src/web/pages/reports/detailscontent.js @@ -309,7 +309,7 @@ const PageContent = ({ reportFilter={reportFilter} reportId={reportId} results={results.entities} - resultsCounts={resultsCounts} + reportResultsCounts={resultsCounts} sortField={sorting.results.sortField} sortReverse={sorting.results.sortReverse} onFilterAddLogLevelClick={onFilterAddLogLevelClick} diff --git a/gsa/src/web/pages/reports/detailspage.js b/gsa/src/web/pages/reports/detailspage.js index 702da3a8d6..505320e604 100644 --- a/gsa/src/web/pages/reports/detailspage.js +++ b/gsa/src/web/pages/reports/detailspage.js @@ -688,6 +688,7 @@ const load = ({ reportId, // eslint-disable-next-line no-shadow loadReportWithThreshold, + pageFilter, reportFilter, updateFilter, }) => filter => { @@ -696,6 +697,16 @@ const load = ({ filter = reportFilter; } + if (!hasValue(filter)) { + // use filter from store + filter = pageFilter; + } + + if (!hasValue(filter)) { + // use filter from user setting + filter = defaultFilter; + } + if (!hasValue(filter)) { // use fallback filter filter = DEFAULT_FILTER; diff --git a/gsa/src/web/pages/scanconfigs/detailspage.js b/gsa/src/web/pages/scanconfigs/detailspage.js index 2a27a19962..4aa9b39a68 100644 --- a/gsa/src/web/pages/scanconfigs/detailspage.js +++ b/gsa/src/web/pages/scanconfigs/detailspage.js @@ -65,8 +65,6 @@ import CreateIcon from 'web/entity/icon/createicon'; import EditIcon from 'web/entity/icon/editicon'; import TrashIcon from 'web/entity/icon/trashicon'; -import {SCAN_CONFIGS_FROM_FEED} from 'web/pages/extras/feedstatuspage'; - import {selector, loadEntity} from 'web/store/entities/scanconfigs'; import { @@ -106,7 +104,7 @@ export const ToolBarIcons = withCapabilities( diff --git a/gsa/src/web/pages/scanconfigs/row.js b/gsa/src/web/pages/scanconfigs/row.js index c335031e7d..8010c21642 100644 --- a/gsa/src/web/pages/scanconfigs/row.js +++ b/gsa/src/web/pages/scanconfigs/row.js @@ -36,8 +36,6 @@ import CloneIcon from 'web/entity/icon/cloneicon'; import EditIcon from 'web/entity/icon/editicon'; import TrashIcon from 'web/entity/icon/trashicon'; -import {SCAN_CONFIGS_FROM_FEED} from 'web/pages/extras/feedstatuspage'; - import PropTypes from 'web/utils/proptypes'; import {na} from 'web/utils/render'; @@ -60,7 +58,7 @@ const ScanConfigActions = withEntitiesActions( />

+ +

- The places where you will find more information are: + The canonical places where you will find more information + about the Greenbone Vulnerability Manager are: - - (Official site) + + (Community Portal) - + (Development Platform) + + + (Greenbone Website)

diff --git a/gsad/doc/gsad.html b/gsad/doc/gsad.html index c41871788e..66fa6e9ca6 100644 --- a/gsad/doc/gsad.html +++ b/gsad/doc/gsad.html @@ -122,26 +122,27 @@

EXAMPLES

SEE ALSO

- openvassd (8) - openvasad (8) - omp (8) - openvasmd (8) - gsd (8) + openvas (8) + gvmd (8) + ospd-openvas (8)

-

MORE INFORMATION ABOUT THE OpenVAS PROJECT

+

MORE INFORMATION

The canonical places where you will find more information - about the OpenVAS project are: + about the Greenbone Vulnerability Manager are: - http://www.openvas.org/ - (Official site) + https://community.greenbone.net + (Community Portal) - http://wald.intevation.org/projects/openvas/ + https://github.com/greenbone (Development Platform) + + https://www.greenbone.net + (Greenbone Website)