Skip to content

Commit

Permalink
Change: Update link to GMP to 22.5 version
Browse files Browse the repository at this point in the history
Also update the link component to use hooks instead of the withGmp HOC.
  • Loading branch information
bjoernricks committed Mar 28, 2024
1 parent 50c01d5 commit aaadd5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/gmp/gmpsettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 5 additions & 6 deletions src/web/components/link/protocoldoclink.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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;

0 comments on commit aaadd5a

Please sign in to comment.