From 14027e02b00e475b052776fd94f08b2a45970741 Mon Sep 17 00:00:00 2001 From: Viktor Vorona Date: Wed, 10 Apr 2024 10:45:54 +0200 Subject: [PATCH] SONAR-22018 Add link to latest sonarqube versions if no upgrades available --- .../js/components/upgrade/SystemUpgradeButton.tsx | 11 ++++++++++- .../__snapshots__/SystemUpgradeButton-test.tsx.snap | 10 +++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeButton.tsx b/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeButton.tsx index cbd8ba2f1a5..2882202470b 100644 --- a/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeButton.tsx +++ b/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeButton.tsx @@ -20,6 +20,7 @@ import * as React from 'react'; import { translate } from '../../helpers/l10n'; import { SystemUpgrade } from '../../types/system'; +import Link from '../common/Link'; import { Button } from '../controls/buttons'; import SystemUpgradeForm from './SystemUpgradeForm'; import { groupUpgrades, sortUpgrades, UpdateUseCase } from './utils'; @@ -50,7 +51,15 @@ export default class SystemUpgradeButton extends React.PureComponent + {translate('learn_more')} + + ); } return ( diff --git a/server/sonar-web/src/main/js/components/upgrade/__tests__/__snapshots__/SystemUpgradeButton-test.tsx.snap b/server/sonar-web/src/main/js/components/upgrade/__tests__/__snapshots__/SystemUpgradeButton-test.tsx.snap index 1b581220ca7..44dc7e71965 100644 --- a/server/sonar-web/src/main/js/components/upgrade/__tests__/__snapshots__/SystemUpgradeButton-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/upgrade/__tests__/__snapshots__/SystemUpgradeButton-test.tsx.snap @@ -1,6 +1,14 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`should not show button if there are no upgrades 1`] = `""`; +exports[`should not show button if there are no upgrades 1`] = ` + + learn_more + +`; exports[`should open modal correctly 1`] = ` -- 2.39.5