aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-11-02 09:02:02 +0100
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-11-03 11:54:04 +0100
commitd983b4247683913a2d43b3e08ba87d5e388b256f (patch)
tree5ef759422f1b75ad363c93a89a183578ea8c4790
parent8bf1ad56841f7bdff94762b50937ffece1e2375b (diff)
downloadsonarqube-d983b4247683913a2d43b3e08ba87d5e388b256f.tar.gz
sonarqube-d983b4247683913a2d43b3e08ba87d5e388b256f.zip
SONAR-9937 Add cluster instruction link for datacenter installation
-rw-r--r--server/sonar-web/src/main/js/app/components/nav/settings/SettingsEditionsNotif.tsx9
-rw-r--r--server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SettingsEditionsNotif-test.tsx13
-rw-r--r--server/sonar-web/src/main/js/apps/marketplace/components/LicenseEditionSet.tsx10
-rw-r--r--sonar-core/src/main/resources/org/sonar/l10n/core.properties1
4 files changed, 33 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsEditionsNotif.tsx b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsEditionsNotif.tsx
index 4e39bd19030..81b04d738cc 100644
--- a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsEditionsNotif.tsx
+++ b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsEditionsNotif.tsx
@@ -79,6 +79,15 @@ export default class SettingsEditionsNotif extends React.PureComponent<Props, St
translate('marketplace.status', editionStatus.installationStatus)
)}
</span>
+ {edition &&
+ edition.key === 'datacenter' && (
+ <a
+ className="spacer-left"
+ href="https://redirect.sonarsource.com/doc/how-to-install-an-edition.html"
+ target="_blank">
+ {translate('marketplace.how_to_configure_cluster')}
+ </a>
+ )}
{!preventRestart && (
<button className="js-restart spacer-left" onClick={this.handleOpenRestart}>
{translate('marketplace.restart')}
diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SettingsEditionsNotif-test.tsx b/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SettingsEditionsNotif-test.tsx
index 9c16173bead..46e6bee0deb 100644
--- a/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SettingsEditionsNotif-test.tsx
+++ b/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SettingsEditionsNotif-test.tsx
@@ -114,3 +114,16 @@ it('should not display the restart button', () => {
);
expect(wrapper.find('button.js-restart').exists()).toBeFalsy();
});
+
+it('should a link to cluster documentation for datacenter edition', () => {
+ const editions = [{ key: 'datacenter' }] as any;
+ const wrapper = shallow(
+ <SettingsEditionsNotif
+ editions={editions}
+ editionStatus={{ installationStatus: 'AUTOMATIC_READY', nextEditionKey: 'datacenter' }}
+ preventRestart={false}
+ setEditionStatus={jest.fn()}
+ />
+ );
+ expect(wrapper.find('a').exists()).toBeTruthy();
+});
diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/LicenseEditionSet.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/LicenseEditionSet.tsx
index 7ef5650c19f..5b22e20f1e5 100644
--- a/server/sonar-web/src/main/js/apps/marketplace/components/LicenseEditionSet.tsx
+++ b/server/sonar-web/src/main/js/apps/marketplace/components/LicenseEditionSet.tsx
@@ -146,6 +146,16 @@ export default class LicenseEditionSet extends React.PureComponent<Props, State>
'marketplace.license_preview_status.' + previewStatus,
licenseEdition ? licenseEdition.name : translate('marketplace.commercial_edition')
)}
+ {licenseEdition &&
+ licenseEdition.key === 'datacenter' &&
+ previewStatus !== 'NO_INSTALL' && (
+ <a
+ className="spacer-left"
+ href="https://redirect.sonarsource.com/doc/how-to-install-an-edition.html"
+ target="_blank">
+ {translate('marketplace.how_to_configure_cluster')}
+ </a>
+ )}
</p>
);
}
diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
index ecf24dbf1ea..26828625d3f 100644
--- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties
+++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
@@ -2116,6 +2116,7 @@ marketplace.status_x.AUTOMATIC_READY={0} successfully installed. Please restart
marketplace.status_x.UNINSTALL_IN_PROGRESS=Successfully downgraded to {0}. Please restart the server to remove the features.
marketplace.status_x.MANUAL_IN_PROGRESS={0} can't automatically be installed because of internet access issues. Please manually install the package in your SonarQube's plugins folder.
marketplace.how_to_install=How to install it?
+marketplace.how_to_configure_cluster=How to configure a cluster?
marketplace.enter_license_for_x=Enter your license key for {0}
marketplace.wrong_license_type_x=Your license is not compatible with the selected edition. Please provide a valid license for {0}.
marketplace.i_need_a_license=I need a license key