]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-14632 Update EE promo on Background Tasks page
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Tue, 30 Mar 2021 07:17:37 +0000 (09:17 +0200)
committersonartech <sonartech@sonarsource.com>
Thu, 1 Apr 2021 20:03:45 +0000 (20:03 +0000)
server/sonar-web/src/main/js/apps/background-tasks/components/NoWorkersSupportPopup.tsx
server/sonar-web/src/main/js/apps/background-tasks/components/Workers.tsx
server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/NoWorkersSupportPopup-test.tsx [new file with mode: 0644]
server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/NoWorkersSupportPopup-test.tsx.snap [new file with mode: 0644]
server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/Workers-test.tsx.snap
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 68b0f1e89cba8c83fa4bb7c7630d18e0e270b3b5..8f6b72bd919210b43e1649dcb769f5fa7e844087 100644 (file)
@@ -31,7 +31,7 @@ export default function NoWorkersSupportPopup() {
       </p>
       <p>
         <a
-          href="https://redirect.sonarsource.com/editions/enterprise.html"
+          href="https://www.sonarqube.org/trial-request/enterprise-edition/?referrer=sonarqube-background-tasks"
           rel="noopener noreferrer"
           target="_blank">
           {translate('learn_more')}
index 98775f5bd48411f82afdf776533f7cad1e468a55..cf586076bd15426cabd4e019570524701444c81e 100644 (file)
@@ -22,8 +22,10 @@ import { EditButton } from 'sonar-ui-common/components/controls/buttons';
 import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip';
 import Tooltip from 'sonar-ui-common/components/controls/Tooltip';
 import AlertWarnIcon from 'sonar-ui-common/components/icons/AlertWarnIcon';
+import PlusCircleIcon from 'sonar-ui-common/components/icons/PlusCircleIcon';
 import { translate } from 'sonar-ui-common/helpers/l10n';
 import { getWorkers } from '../../../api/ce';
+import { colors } from '../../../app/theme';
 import NoWorkersSupportPopup from './NoWorkersSupportPopup';
 import WorkersForm from './WorkersForm';
 
@@ -130,7 +132,9 @@ export default class Workers extends React.PureComponent<{}, State> {
         )}
 
         {!loading && !canSetWorkerCount && (
-          <HelpTooltip className="spacer-left" overlay={<NoWorkersSupportPopup />} />
+          <HelpTooltip className="spacer-left" overlay={<NoWorkersSupportPopup />}>
+            <PlusCircleIcon fill={colors.blue} size={12} />
+          </HelpTooltip>
         )}
 
         {formOpen && <WorkersForm onClose={this.closeForm} workerCount={this.state.workerCount} />}
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/NoWorkersSupportPopup-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/NoWorkersSupportPopup-test.tsx
new file mode 100644 (file)
index 0000000..7e41b91
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2021 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+import { shallow } from 'enzyme';
+import * as React from 'react';
+import NoWorkersSupportPopup from '../NoWorkersSupportPopup';
+
+it('should render correctly', () => {
+  expect(shallow(<NoWorkersSupportPopup />)).toMatchSnapshot();
+});
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/NoWorkersSupportPopup-test.tsx.snap b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/NoWorkersSupportPopup-test.tsx.snap
new file mode 100644 (file)
index 0000000..eecf3ca
--- /dev/null
@@ -0,0 +1,27 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`should render correctly 1`] = `
+<Fragment>
+  <p
+    className="spacer-bottom"
+  >
+    <strong>
+      background_tasks.add_more_workers
+    </strong>
+  </p>
+  <p
+    className="big-spacer-bottom markdown"
+  >
+    background_tasks.add_more_workers.text
+  </p>
+  <p>
+    <a
+      href="https://www.sonarqube.org/trial-request/enterprise-edition/?referrer=sonarqube-background-tasks"
+      rel="noopener noreferrer"
+      target="_blank"
+    >
+      learn_more
+    </a>
+  </p>
+</Fragment>
+`;
index a579c08668066291d5b852af96dd8064a90fd5ab..503841e58e26a8564d95c391b6584adcbd06b405 100644 (file)
@@ -158,7 +158,12 @@ exports[`renders 4`] = `
   <HelpTooltip
     className="spacer-left"
     overlay={<NoWorkersSupportPopup />}
-  />
+  >
+    <PlusCircleIcon
+      fill="#4b9fd5"
+      size={12}
+    />
+  </HelpTooltip>
 </div>
 `;
 
index b7010c61c67c276fd0e43d02149206bcfcfc3046..2db3d247d11dcf9436e6b5315e36f4fbe3482e48 100644 (file)
@@ -2831,8 +2831,8 @@ background_tasks.number_of_workers=Number of Workers:
 background_tasks.number_of_workers.warning=Configuring additional workers without first vertically scaling your server could have negative performance impacts.
 background_tasks.change_number_of_workers=Edit CE Workers
 background_tasks.change_number_of_workers.hint=If your queue backs up behind the analysis reports from large projects, increasing the number of Compute Engine workers will allow you to take full advantage of having configured increased Compute Engine memory on a multi-core server (vertical scaling).
-background_tasks.add_more_workers=Speed up your analysis by adding more Workers
-background_tasks.add_more_workers.text=Increase the number of Compute Engine Workers with the Enterprise Edition.
+background_tasks.add_more_workers=Speed up analysis with parallel processing
+background_tasks.add_more_workers.text=Configure multiple workers for parallel processing of analysis reports in Enterprise Edition.
 background_tasks.search_by_task_or_component=Search by Task or Component
 background_tasks.failing_count=Count of projects where processing of most recent analysis report failed