From ea30e7f7164bcd357e2fc7190a84960ee373fc64 Mon Sep 17 00:00:00 2001 From: Jaspar S Date: Thu, 9 Jun 2022 12:42:11 +0200 Subject: [PATCH 1/5] Fix: Introduce new function to remove leading zero fron version for correct links to GSM-Manual (#3460) (cherry picked from commit 7cb61dcceb72ebba3e2145a60d399c88ce060217) # Conflicts: # src/gmp/gmpsettings.js # src/version.js --- src/gmp/gmpsettings.js | 11 +++++++++++ src/version.js | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/gmp/gmpsettings.js b/src/gmp/gmpsettings.js index 9b597915d6..0557d6b54e 100644 --- a/src/gmp/gmpsettings.js +++ b/src/gmp/gmpsettings.js @@ -15,15 +15,26 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ +<<<<<<< HEAD +======= + +import {RELEASE_VERSION, REMOVED_ZERO_RELEASE_VERSION} from '../version'; + +>>>>>>> 7cb61dcce (Fix: Introduce new function to remove leading zero fron version for correct links to GSM-Manual (#3460)) import {isDefined} from './utils/identity'; 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 +<<<<<<< HEAD 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-20.08.html'; +======= +export const DEFAULT_MANUAL_URL = `http://docs.greenbone.net/GSM-Manual/gos-${REMOVED_ZERO_RELEASE_VERSION}/`; +export const DEFAULT_PROTOCOLDOC_URL = `https://docs.greenbone.net/API/GMP/gmp-${RELEASE_VERSION}.html`; +>>>>>>> 7cb61dcce (Fix: Introduce new function to remove leading zero fron version for correct links to GSM-Manual (#3460)) export const DEFAULT_REPORT_RESULTS_THRESHOLD = 25000; export const DEFAULT_LOG_LEVEL = 'warn'; export const DEFAULT_TIMEOUT = 300000; // 5 minutes diff --git a/src/version.js b/src/version.js index f6dfa98c5a..75fbcb9691 100644 --- a/src/version.js +++ b/src/version.js @@ -16,6 +16,25 @@ * along with this program. If not, see . */ +<<<<<<< HEAD const VERSION = '20.8.4'; +======= +const getMajorMinorVersion = () => { + // eslint-disable-next-line no-unused-vars + const [major, minor, ...rest] = VERSION.split('.'); + return `${major}.${minor}`; +}; + +const getCleanedMajorMinorVersion = () => { + // eslint-disable-next-line no-unused-vars + const [major, minor, ...rest] = VERSION.split('.'); + return `${major}.${parseInt(minor)}`; +}; + +export const VERSION = '22.04.0.dev1'; + +export const RELEASE_VERSION = getMajorMinorVersion(); +export const REMOVED_ZERO_RELEASE_VERSION = getCleanedMajorMinorVersion(); +>>>>>>> 7cb61dcce (Fix: Introduce new function to remove leading zero fron version for correct links to GSM-Manual (#3460)) export default VERSION; From 99adab4c6c777ae19366eaa416a8836e8ba3bd89 Mon Sep 17 00:00:00 2001 From: Jaspar S Date: Thu, 9 Jun 2022 13:02:00 +0200 Subject: [PATCH 2/5] Resolve version.js --- src/version.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/version.js b/src/version.js index 75fbcb9691..6556847299 100644 --- a/src/version.js +++ b/src/version.js @@ -16,9 +16,6 @@ * along with this program. If not, see . */ -<<<<<<< HEAD -const VERSION = '20.8.4'; -======= const getMajorMinorVersion = () => { // eslint-disable-next-line no-unused-vars const [major, minor, ...rest] = VERSION.split('.'); @@ -31,10 +28,9 @@ const getCleanedMajorMinorVersion = () => { return `${major}.${parseInt(minor)}`; }; -export const VERSION = '22.04.0.dev1'; +const VERSION = '20.8.4'; export const RELEASE_VERSION = getMajorMinorVersion(); export const REMOVED_ZERO_RELEASE_VERSION = getCleanedMajorMinorVersion(); ->>>>>>> 7cb61dcce (Fix: Introduce new function to remove leading zero fron version for correct links to GSM-Manual (#3460)) export default VERSION; From bc9ab3d2f0b40ed6df2e585bc6ccdec125c24a9c Mon Sep 17 00:00:00 2001 From: Jaspar S Date: Thu, 9 Jun 2022 13:02:50 +0200 Subject: [PATCH 3/5] resolve gmpsettings --- src/gmp/gmpsettings.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/gmp/gmpsettings.js b/src/gmp/gmpsettings.js index 0557d6b54e..a3e3793b92 100644 --- a/src/gmp/gmpsettings.js +++ b/src/gmp/gmpsettings.js @@ -15,26 +15,17 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -<<<<<<< HEAD -======= import {RELEASE_VERSION, REMOVED_ZERO_RELEASE_VERSION} from '../version'; - ->>>>>>> 7cb61dcce (Fix: Introduce new function to remove leading zero fron version for correct links to GSM-Manual (#3460)) import {isDefined} from './utils/identity'; 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 -<<<<<<< HEAD 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-20.08.html'; -======= -export const DEFAULT_MANUAL_URL = `http://docs.greenbone.net/GSM-Manual/gos-${REMOVED_ZERO_RELEASE_VERSION}/`; -export const DEFAULT_PROTOCOLDOC_URL = `https://docs.greenbone.net/API/GMP/gmp-${RELEASE_VERSION}.html`; ->>>>>>> 7cb61dcce (Fix: Introduce new function to remove leading zero fron version for correct links to GSM-Manual (#3460)) export const DEFAULT_REPORT_RESULTS_THRESHOLD = 25000; export const DEFAULT_LOG_LEVEL = 'warn'; export const DEFAULT_TIMEOUT = 300000; // 5 minutes From 11b91e72e0f19e4b26d193a9351ad5eb2eb17bba Mon Sep 17 00:00:00 2001 From: Jaspar S Date: Thu, 9 Jun 2022 13:04:03 +0200 Subject: [PATCH 4/5] Update gmpsettings.js --- src/gmp/gmpsettings.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gmp/gmpsettings.js b/src/gmp/gmpsettings.js index a3e3793b92..d14fa2967e 100644 --- a/src/gmp/gmpsettings.js +++ b/src/gmp/gmpsettings.js @@ -22,10 +22,8 @@ import {isDefined} from './utils/identity'; 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-20.08/'; -export const DEFAULT_PROTOCOLDOC_URL = - 'https://docs.greenbone.net/API/GMP/gmp-20.08.html'; +export const DEFAULT_MANUAL_URL = `http://docs.greenbone.net/GSM-Manual/gos-${REMOVED_ZERO_RELEASE_VERSION}/`; + export const DEFAULT_PROTOCOLDOC_URL = `https://docs.greenbone.net/API/GMP/gmp-${RELEASE_VERSION}.html`; export const DEFAULT_REPORT_RESULTS_THRESHOLD = 25000; export const DEFAULT_LOG_LEVEL = 'warn'; export const DEFAULT_TIMEOUT = 300000; // 5 minutes From 436be4ae2e7a067d4428d6bda3024ff901eafb09 Mon Sep 17 00:00:00 2001 From: Jaspar S Date: Thu, 9 Jun 2022 13:04:23 +0200 Subject: [PATCH 5/5] Update gmpsettings.js --- src/gmp/gmpsettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gmp/gmpsettings.js b/src/gmp/gmpsettings.js index d14fa2967e..a8ffd291e2 100644 --- a/src/gmp/gmpsettings.js +++ b/src/gmp/gmpsettings.js @@ -23,7 +23,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 = `http://docs.greenbone.net/GSM-Manual/gos-${REMOVED_ZERO_RELEASE_VERSION}/`; - export const DEFAULT_PROTOCOLDOC_URL = `https://docs.greenbone.net/API/GMP/gmp-${RELEASE_VERSION}.html`; +export const DEFAULT_PROTOCOLDOC_URL = `https://docs.greenbone.net/API/GMP/gmp-${RELEASE_VERSION}.html`; export const DEFAULT_REPORT_RESULTS_THRESHOLD = 25000; export const DEFAULT_LOG_LEVEL = 'warn'; export const DEFAULT_TIMEOUT = 300000; // 5 minutes