diff options
author | Viktor Vorona <viktor.vorona@sonarsource.com> | 2024-04-10 10:45:54 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-04-10 20:02:53 +0000 |
commit | 14027e02b00e475b052776fd94f08b2a45970741 (patch) | |
tree | d38afd677a9b947b46ef8482ec5fa99466fdb7fe /server | |
parent | 03dac47b7871900ee88f0e8584b6f1b98c4738cb (diff) | |
download | sonarqube-14027e02b00e475b052776fd94f08b2a45970741.tar.gz sonarqube-14027e02b00e475b052776fd94f08b2a45970741.zip |
SONAR-22018 Add link to latest sonarqube versions if no upgrades available
Diffstat (limited to 'server')
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<Props, Stat const { openSystemUpgradeForm } = this.state; if (systemUpgrades.length === 0) { - return null; + return ( + <Link + className="spacer-left" + to="https://www.sonarqube.org/downloads/?referrer=sonarqube" + target="_blank" + > + {translate('learn_more')} + </Link> + ); } 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`] = ` +<ForwardRef(Link) + className="spacer-left" + target="_blank" + to="https://www.sonarqube.org/downloads/?referrer=sonarqube" +> + learn_more +</ForwardRef(Link)> +`; exports[`should open modal correctly 1`] = ` <Fragment> |