aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main
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 /server/sonar-web/src/main
parent8bf1ad56841f7bdff94762b50937ffece1e2375b (diff)
downloadsonarqube-d983b4247683913a2d43b3e08ba87d5e388b256f.tar.gz
sonarqube-d983b4247683913a2d43b3e08ba87d5e388b256f.zip
SONAR-9937 Add cluster instruction link for datacenter installation
Diffstat (limited to 'server/sonar-web/src/main')
-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
3 files changed, 32 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>
);
}