]> source.dussan.org Git - sonarqube.git/commitdiff
Update wording and links for datacenter edition
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Fri, 3 Nov 2017 09:35:37 +0000 (10:35 +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/app/components/nav/settings/__tests__/__snapshots__/SettingsEditionsNotif-test.tsx.snap
server/sonar-web/src/main/js/apps/marketplace/components/LicenseEditionSet.tsx
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 81b04d738cc24a497f59cf2963edaf603aed8894..d2e8548ff72b63400d8d9150e321a135a0254aad 100644 (file)
@@ -18,6 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
+import { FormattedMessage } from 'react-intl';
 import NavBarNotif from '../../../../components/nav/NavBarNotif';
 import RestartForm from '../../../../components/common/RestartForm';
 import { dismissErrorMessage, Edition, EditionStatus } from '../../../../api/marketplace';
@@ -81,12 +82,21 @@ export default class SettingsEditionsNotif extends React.PureComponent<Props, St
         </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>
+          <span className="little-spacer-left">
+            <FormattedMessage
+              defaultMessage={translate('marketplace.see_documentation_to_enable_cluster')}
+              id="marketplace.see_documentation_to_enable_cluster"
+              values={{
+                url: (
+                  <a
+                    href="https://redirect.sonarsource.com/doc/data-center-edition.html"
+                    target="_blank">
+                    {edition.name}
+                  </a>
+                )
+              }}
+            />
+          </span>
         )}
         {!preventRestart && (
           <button className="js-restart spacer-left" onClick={this.handleOpenRestart}>
@@ -111,6 +121,18 @@ export default class SettingsEditionsNotif extends React.PureComponent<Props, St
         ) : (
           translate('marketplace.status', editionStatus.installationStatus)
         )}
+        <a
+          className="spacer-left"
+          href={
+            edition && edition.key === 'datacenter' ? (
+              'https://redirect.sonarsource.com/doc/data-center-edition.html'
+            ) : (
+              'https://redirect.sonarsource.com/doc/how-to-install-an-edition.html'
+            )
+          }
+          target="_blank">
+          {translate('marketplace.how_to_install')}
+        </a>
         {edition && (
           <a
             className="button spacer-left"
@@ -120,19 +142,12 @@ export default class SettingsEditionsNotif extends React.PureComponent<Props, St
             {translate('marketplace.download_package')}
           </a>
         )}
-        <a
-          className="spacer-left"
-          href="https://redirect.sonarsource.com/doc/how-to-install-an-edition.html"
-          target="_blank">
-          {translate('marketplace.how_to_install')}
-        </a>
       </NavBarNotif>
     );
   }
 
   renderStatusAlert() {
-    const { editionStatus } = this.props;
-    const { currentEditionKey, installationStatus, nextEditionKey } = editionStatus;
+    const { currentEditionKey, installationStatus, nextEditionKey } = this.props.editionStatus;
     const nextEdition =
       this.props.editions && this.props.editions.find(edition => edition.key === nextEditionKey);
     const currentEdition =
index 46e6bee0deba93951dd1fc596051a090e4198ecd..0ace0c6ee3cd5114e8cc1e33bd0eb181318310df 100644 (file)
@@ -115,7 +115,7 @@ 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', () => {
+it('should have a link to cluster documentation for datacenter edition', () => {
   const editions = [{ key: 'datacenter' }] as any;
   const wrapper = shallow(
     <SettingsEditionsNotif
@@ -125,5 +125,5 @@ it('should a link to cluster documentation for datacenter edition', () => {
       setEditionStatus={jest.fn()}
     />
   );
-  expect(wrapper.find('a').exists()).toBeTruthy();
+  expect(wrapper.find('FormattedMessage').exists()).toBeTruthy();
 });
index 51ab67171a538c11cb27246a08006afe6f92c7d2..dcef4f6806f233b321e8d9dd45a9047661f4ab97 100644 (file)
@@ -6,19 +6,19 @@ exports[`should display a manual installation notification 1`] = `
 >
   marketplace.status_x.MANUAL_IN_PROGRESS.Foo
   <a
-    className="button spacer-left"
-    download="sonarqube-Foo.zip"
-    href="download_url"
+    className="spacer-left"
+    href="https://redirect.sonarsource.com/doc/how-to-install-an-edition.html"
     target="_blank"
   >
-    marketplace.download_package
+    marketplace.how_to_install
   </a>
   <a
-    className="spacer-left"
-    href="https://redirect.sonarsource.com/doc/how-to-install-an-edition.html"
+    className="button spacer-left"
+    download="sonarqube-Foo.zip"
+    href="download_url"
     target="_blank"
   >
-    marketplace.how_to_install
+    marketplace.download_package
   </a>
 </NavBarNotif>
 `;
index 5b22e20f1e503287f0c50cbc92eec5b2fe154ebc..edcd13a3d037f2b1ce3406e8b7d40f686205e60a 100644 (file)
@@ -19,6 +19,7 @@
  */
 import * as React from 'react';
 import * as classNames from 'classnames';
+import { FormattedMessage } from 'react-intl';
 import { stringify } from 'querystring';
 import { debounce } from 'lodash';
 import DeferredSpinner from '../../../components/common/DeferredSpinner';
@@ -149,12 +150,21 @@ export default class LicenseEditionSet extends React.PureComponent<Props, State>
         {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>
+          <span className="little-spacer-left">
+            <FormattedMessage
+              defaultMessage={translate('marketplace.how_to_setup_cluster_url')}
+              id="marketplace.how_to_setup_cluster_url"
+              values={{
+                url: (
+                  <a
+                    href="https://redirect.sonarsource.com/doc/data-center-edition.html"
+                    target="_blank">
+                    {licenseEdition.name}
+                  </a>
+                )
+              }}
+            />
+          </span>
         )}
       </p>
     );
index 26828625d3fc3b55248560cee99f6845dc1c895e..877f42ead299cad3d2bd29409cedcf1647e1b0f4 100644 (file)
@@ -2110,13 +2110,14 @@ marketplace.release_notes=Release Notes
 marketplace.status.AUTOMATIC_IN_PROGRESS=Installing your new Commercial Edition... Please wait...
 marketplace.status.AUTOMATIC_READY=Commercial Edition successfully installed. Please restart the server to activate your new edition.
 marketplace.status.UNINSTALL_IN_PROGRESS=Commercial Edition successfully downgraded. Please restart the server to remove the features.
-marketplace.status.MANUAL_IN_PROGRESS=Commercial Edition can't automatically be installed because of internet access issues. Please manually install the package in your SonarQube's plugins folder.
+marketplace.status.MANUAL_IN_PROGRESS=Commercial Edition can't automatically be installed because of internet access issues. Please manually install the package.
 marketplace.status_x.AUTOMATIC_IN_PROGRESS=Installing your new {0}... Please wait...
 marketplace.status_x.AUTOMATIC_READY={0} successfully installed. Please restart the server to activate your new edition.
 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.status_x.MANUAL_IN_PROGRESS={0} can't automatically be installed because of internet access issues. Please manually install the package.
 marketplace.how_to_install=How to install it?
-marketplace.how_to_configure_cluster=How to configure a cluster?
+marketplace.see_documentation_to_enable_cluster=See {url} documentation to set up a cluster.
+marketplace.how_to_setup_cluster_url=Further setup and configuration are required to get a cluster. See {url} documentation.
 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