]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9937 Add cluster instruction link for datacenter installation
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Thu, 2 Nov 2017 08:02:02 +0000 (09:02 +0100)
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>
Fri, 3 Nov 2017 10:54:04 +0000 (11:54 +0100)
server/sonar-web/src/main/js/app/components/nav/settings/SettingsEditionsNotif.tsx
server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SettingsEditionsNotif-test.tsx
server/sonar-web/src/main/js/apps/marketplace/components/LicenseEditionSet.tsx
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 4e39bd190309246235b490a16a0d346a83d3ca39..81b04d738cc24a497f59cf2963edaf603aed8894 100644 (file)
@@ -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')}
index 9c16173bead3e517c3c2111c9cdd8f96979e62bd..46e6bee0deba93951dd1fc596051a090e4198ecd 100644 (file)
@@ -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();
+});
index 7ef5650c19f9b8739e3f7817906191950754469a..5b22e20f1e503287f0c50cbc92eec5b2fe154ebc 100644 (file)
@@ -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>
     );
   }
index ecf24dbf1ea50077be7774dab7079f101c521df5..26828625d3fc3b55248560cee99f6845dc1c895e 100644 (file)
@@ -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