]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-19777 Lock project security reports page
authorDavid Cho-Lerat <david.cho-lerat@sonarsource.com>
Wed, 12 Jul 2023 18:30:42 +0000 (20:30 +0200)
committersonartech <sonartech@sonarsource.com>
Wed, 19 Jul 2023 20:03:05 +0000 (20:03 +0000)
server/sonar-web/src/main/js/app/components/indexation/PageUnavailableDueToIndexation.tsx
server/sonar-web/src/main/js/app/components/indexation/__tests__/__snapshots__/PageUnavailableDueToIndexation-test.tsx.snap
server/sonar-web/src/main/js/components/hoc/__tests__/withIndexationGuard-test.tsx

index eead7093fcc4e9f2277238d491dc9db3738ce017..6dfa918d7bc68415bd2a348c54b9cac79cc11204 100644 (file)
@@ -40,24 +40,24 @@ export class PageUnavailableDueToIndexation extends React.PureComponent<WithInde
     return (
       <div className="page-wrapper-simple">
         <FlagMessage className="sw-m-10" variant="info">
-          {translate('indexation.page_unavailable.description')}
-          <br />
-          <FormattedMessage
-            defaultMessage={translate(
-              'indexation.page_unavailable.description.additional_information'
-            )}
-            id="indexation.page_unavailable.description.additional_information"
-            values={{
-              link: (
-                <Link
-                  className="sw-ml-4"
-                  to="https://docs.sonarqube.org/latest/instance-administration/reindexing/"
-                >
-                  {translate('learn_more')}
-                </Link>
-              ),
-            }}
-          />
+          <span className="sw-w-[290px]">
+            {translate('indexation.page_unavailable.description')}
+            <span className="sw-ml-1">
+              <FormattedMessage
+                defaultMessage={translate(
+                  'indexation.page_unavailable.description.additional_information'
+                )}
+                id="indexation.page_unavailable.description.additional_information"
+                values={{
+                  link: (
+                    <Link to="https://docs.sonarqube.org/latest/instance-administration/reindexing/">
+                      {translate('learn_more')}
+                    </Link>
+                  ),
+                }}
+              />
+            </span>
+          </span>
         </FlagMessage>
       </div>
     );
index 43fa2200495a80503d8a904eb80b8f142ef2cc9d..539329001983548669dacccc82ca1e35f45de961 100644 (file)
@@ -8,22 +8,28 @@ exports[`should render correctly 1`] = `
     className="sw-m-10"
     variant="info"
   >
-    indexation.page_unavailable.description
-    <br />
-    <FormattedMessage
-      defaultMessage="indexation.page_unavailable.description.additional_information"
-      id="indexation.page_unavailable.description.additional_information"
-      values={
-        {
-          "link": <StandoutLink
-            className="sw-ml-4"
-            to="https://docs.sonarqube.org/latest/instance-administration/reindexing/"
-          >
-            learn_more
-          </StandoutLink>,
-        }
-      }
-    />
+    <span
+      className="sw-w-[290px]"
+    >
+      indexation.page_unavailable.description
+      <span
+        className="sw-ml-1"
+      >
+        <FormattedMessage
+          defaultMessage="indexation.page_unavailable.description.additional_information"
+          id="indexation.page_unavailable.description.additional_information"
+          values={
+            {
+              "link": <StandoutLink
+                to="https://docs.sonarqube.org/latest/instance-administration/reindexing/"
+              >
+                learn_more
+              </StandoutLink>,
+            }
+          }
+        />
+      </span>
+    </span>
   </FlagMessage>
 </div>
 `;
index 13683555887c11a7e2c58310313babd75a25900a..4884755b7ad7c6286c40ea3a5ca130138e34aa24 100644 (file)
@@ -26,7 +26,9 @@ import withIndexationGuard from '../withIndexationGuard';
 describe('withIndexationGuard', () => {
   it('should render indexation message when showIndexationMessage returns true', () => {
     renderComponentWithIndexationGuard(() => true);
-    expect(screen.getByText(/indexation\.page_unavailable\.description/)).toBeInTheDocument();
+    expect(
+      screen.getByText(/indexation\.page_unavailable\.description\.additional_information/)
+    ).toBeInTheDocument();
   });
 
   it('should render children when showIndexationMessage returns false', () => {