From aaadd5ab5fb4c7c6ab0e37c6a7844b7e1533fe2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Thu, 28 Mar 2024 09:30:47 +0100 Subject: [PATCH] Change: Update link to GMP to 22.5 version Also update the link component to use hooks instead of the withGmp HOC. --- src/gmp/gmpsettings.js | 2 +- src/web/components/link/protocoldoclink.js | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/gmp/gmpsettings.js b/src/gmp/gmpsettings.js index 35704a8180..e2f6dc4d6d 100644 --- a/src/gmp/gmpsettings.js +++ b/src/gmp/gmpsettings.js @@ -22,7 +22,7 @@ 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 = `https://docs.greenbone.net/GSM-Manual/gos-22.04/`; -export const DEFAULT_PROTOCOLDOC_URL = `https://docs.greenbone.net/API/GMP/gmp-22.4.html`; +export const DEFAULT_PROTOCOLDOC_URL = `https://docs.greenbone.net/API/GMP/gmp-22.5.html`; export const DEFAULT_REPORT_RESULTS_THRESHOLD = 25000; export const DEFAULT_LOG_LEVEL = 'warn'; export const DEFAULT_TIMEOUT = 300000; // 5 minutes diff --git a/src/web/components/link/protocoldoclink.js b/src/web/components/link/protocoldoclink.js index 7953a4637f..0b6a17da8b 100644 --- a/src/web/components/link/protocoldoclink.js +++ b/src/web/components/link/protocoldoclink.js @@ -18,11 +18,13 @@ import React from 'react'; import PropTypes from 'web/utils/proptypes'; -import withGmp from 'web/utils/withGmp'; + +import useGmp from 'web/utils/useGmp'; import BlankLink from './blanklink'; -const ProtocolDocLink = ({gmp, title}) => { +const ProtocolDocLink = ({title}) => { + const gmp = useGmp(); const {protocolDocUrl} = gmp.settings; return ( @@ -33,10 +35,7 @@ const ProtocolDocLink = ({gmp, title}) => { }; ProtocolDocLink.propTypes = { - gmp: PropTypes.gmp.isRequired, title: PropTypes.string.isRequired, }; -export default withGmp(ProtocolDocLink); - -// vim: set ts=2 sw=2 tw=80: +export default ProtocolDocLink;