diff --git a/CHANGELOG.md b/CHANGELOG.md index da7865df91..7543144cab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ 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 +- 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 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) diff --git a/gsa/public/locales/gsa-de.json b/gsa/public/locales/gsa-de.json index b59648ed2d..b71c6a76da 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 feed. Please update the 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 Feed liegen. Bitte aktualisieren Sie den 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", 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/reports/detailspage.js b/gsa/src/web/pages/reports/detailspage.js index 21be7f4450..b2f332340a 100644 --- a/gsa/src/web/pages/reports/detailspage.js +++ b/gsa/src/web/pages/reports/detailspage.js @@ -263,6 +263,17 @@ class ReportDetails extends React.Component { // if no report format id is available we would create an infinite // render loop here this.setState({reportFormatId}); + } else { + // if there is no report format at all, throw a proper error message + // instead of just showing x is undefined JS stacktrace + const noReportFormatError = _( + 'The report cannot be displayed because' + + ' no Greenbone Vulnerability Manager report format is available.' + + ' This could be due to a missing feed. Please update the feed, ' + + 'check the "feed import owner" setting, or contact your system ' + + 'administrator.', + ); + throw new Error(noReportFormatError); } }