]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-21227 Add link to download Deprecation Logs
authorantoine.vinot <antoine.vinot@sonarsource.com>
Mon, 18 Dec 2023 13:03:54 +0000 (14:03 +0100)
committersonartech <sonartech@sonarsource.com>
Tue, 19 Dec 2023 20:02:55 +0000 (20:02 +0000)
server/sonar-web/src/main/js/apps/system/components/PageActions.tsx
server/sonar-web/src/main/js/apps/system/components/__tests__/SystemApp-it.tsx

index 07d9d6b0ccdc27cbead15baff11d0b52effb755c..cc83ee65d08da65d24e6432b9078fc3854e322f5 100644 (file)
@@ -89,7 +89,7 @@ export default class PageActions extends React.PureComponent<Props, State> {
                 <li>
                   <a
                     download="sonarqube_app.log"
-                    href={logsUrl + '?process=app'}
+                    href={logsUrl + '?name=app'}
                     id="logs-link"
                     rel="noopener noreferrer"
                     target="_blank"
@@ -100,7 +100,7 @@ export default class PageActions extends React.PureComponent<Props, State> {
                 <li>
                   <a
                     download="sonarqube_ce.log"
-                    href={logsUrl + '?process=ce'}
+                    href={logsUrl + '?name=ce'}
                     id="ce-logs-link"
                     rel="noopener noreferrer"
                     target="_blank"
@@ -111,7 +111,7 @@ export default class PageActions extends React.PureComponent<Props, State> {
                 <li>
                   <a
                     download="sonarqube_es.log"
-                    href={logsUrl + '?process=es'}
+                    href={logsUrl + '?name=es'}
                     id="es-logs-link"
                     rel="noopener noreferrer"
                     target="_blank"
@@ -122,7 +122,7 @@ export default class PageActions extends React.PureComponent<Props, State> {
                 <li>
                   <a
                     download="sonarqube_web.log"
-                    href={logsUrl + '?process=web'}
+                    href={logsUrl + '?name=web'}
                     id="web-logs-link"
                     rel="noopener noreferrer"
                     target="_blank"
@@ -133,7 +133,7 @@ export default class PageActions extends React.PureComponent<Props, State> {
                 <li>
                   <a
                     download="sonarqube_access.log"
-                    href={logsUrl + '?process=access'}
+                    href={logsUrl + '?name=access'}
                     id="access-logs-link"
                     rel="noopener noreferrer"
                     target="_blank"
@@ -141,6 +141,16 @@ export default class PageActions extends React.PureComponent<Props, State> {
                     Access Logs
                   </a>
                 </li>
+                <li>
+                  <a
+                    download="sonarqube_deprecation.log"
+                    href={logsUrl + '?name=deprecation'}
+                    rel="noopener noreferrer"
+                    target="_blank"
+                  >
+                    Deprecation Logs
+                  </a>
+                </li>
               </ul>
             }
           >
index 5954e26fe541ed01b912e32e5634249d3347b21b..fa490d5a79ba17e180b6a8e95d383b401db7dc3f 100644 (file)
@@ -69,11 +69,16 @@ describe('System Info Standalone', () => {
     expect(await ui.pageHeading.find()).toBeInTheDocument();
 
     await user.click(ui.downloadLogsButton.get());
-    ['Main Process', 'Compute Engine', 'Search Engine', 'Web Server', 'Access Logs'].forEach(
-      (link) => {
-        expect(screen.getByRole('link', { name: link })).toBeInTheDocument();
-      },
-    );
+    [
+      'Main Process',
+      'Compute Engine',
+      'Search Engine',
+      'Web Server',
+      'Access Logs',
+      'Deprecation Logs',
+    ].forEach((link) => {
+      expect(screen.getByRole('link', { name: link })).toBeInTheDocument();
+    });
     expect(ui.downloadSystemInfoButton.get()).toBeInTheDocument();
   });
 });