diff options
author | Zipeng WU <zipeng.wu@sonarsource.com> | 2021-11-02 12:11:00 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-11-03 20:03:31 +0000 |
commit | 9b05c5200ec98fb1e49edc55584e9284437095e0 (patch) | |
tree | 3d861084f6a5c05778ac8fe63100e27c18b811c2 /server/sonar-web/src/main/js | |
parent | c56999b63d53ef960aa4233f75c7814da1e24b5f (diff) | |
download | sonarqube-9b05c5200ec98fb1e49edc55584e9284437095e0.tar.gz sonarqube-9b05c5200ec98fb1e49edc55584e9284437095e0.zip |
SONAR-15423 Download access.log in system administration page
Diffstat (limited to 'server/sonar-web/src/main/js')
-rw-r--r-- | server/sonar-web/src/main/js/apps/system/components/PageActions.tsx | 10 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageActions-test.tsx.snap | 22 |
2 files changed, 32 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx b/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx index 8554c67f874..3604e87eaa3 100644 --- a/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx @@ -137,6 +137,16 @@ export default class PageActions extends React.PureComponent<Props, State> { Web Server </a> </li> + <li> + <a + download="sonarqube_access.log" + href={logsUrl + '?process=access'} + id="access-logs-link" + rel="noopener noreferrer" + target="_blank"> + Access Logs + </a> + </li> </ul> }> <Button> diff --git a/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageActions-test.tsx.snap b/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageActions-test.tsx.snap index 6750da1de55..01cd2d0dee6 100644 --- a/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageActions-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageActions-test.tsx.snap @@ -72,6 +72,17 @@ exports[`should render correctly 1`] = ` Web Server </a> </li> + <li> + <a + download="sonarqube_access.log" + href="/api/system/logs?process=access" + id="access-logs-link" + rel="noopener noreferrer" + target="_blank" + > + Access Logs + </a> + </li> </ul> } > @@ -150,6 +161,17 @@ exports[`should render correctly 2`] = ` Web Server </a> </li> + <li> + <a + download="sonarqube_access.log" + href="/api/system/logs?process=access" + id="access-logs-link" + rel="noopener noreferrer" + target="_blank" + > + Access Logs + </a> + </li> </ul> } > |