diff options
author | Vitaliy Filippov <vitalif@mail.ru> | 2023-06-29 05:58:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-29 10:58:56 +0800 |
commit | f0b773e0ced9110f34326398e5b6c55ad6e25201 (patch) | |
tree | 6780cd1292474dbd7ecd4667430acdb299f1d80d /web_src | |
parent | b08647f0b9d73db0f0c23dfddadad2a245cb198e (diff) | |
download | gitea-f0b773e0ced9110f34326398e5b6c55ad6e25201.tar.gz gitea-f0b773e0ced9110f34326398e5b6c55ad6e25201.zip |
Support downloading raw task logs (#24451)
Hi!
This pull request adds support for downloading raw task logs for Gitea
Actions, similar to Github Actions
It looks like the following:
![image](https://user-images.githubusercontent.com/945339/235376746-405d5019-710b-468b-8113-9e82eab8e752.png)
Diffstat (limited to 'web_src')
-rw-r--r-- | web_src/js/components/RepoActionView.vue | 5 | ||||
-rw-r--r-- | web_src/js/svg.js | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/web_src/js/components/RepoActionView.vue b/web_src/js/components/RepoActionView.vue index dcbb598052..7c65d5a131 100644 --- a/web_src/js/components/RepoActionView.vue +++ b/web_src/js/components/RepoActionView.vue @@ -74,6 +74,10 @@ <SvgIcon name="octicon-gear" :size="18"/> </button> <div class="menu transition action-job-menu" :class="{visible: menuVisible}" v-if="menuVisible" v-cloak> + <a class="item" :href="run.link+'/jobs/'+jobIndex+'/logs'" target="_blank"> + <i class="icon"><SvgIcon name="octicon-download"/></i> + {{ locale.downloadLogs }} + </a> <a class="item" @click="toggleTimeDisplay('seconds')"> <i class="icon"><SvgIcon v-show="timeVisible['log-time-seconds']" name="octicon-check"/></i> {{ locale.showLogSeconds }} @@ -453,6 +457,7 @@ export function initRepositoryActionView() { showTimeStamps: el.getAttribute('data-locale-show-timestamps'), showLogSeconds: el.getAttribute('data-locale-show-log-seconds'), showFullScreen: el.getAttribute('data-locale-show-full-screen'), + downloadLogs: el.getAttribute('data-locale-download-logs'), status: { unknown: el.getAttribute('data-locale-status-unknown'), waiting: el.getAttribute('data-locale-status-waiting'), diff --git a/web_src/js/svg.js b/web_src/js/svg.js index 1ea0eb8347..0a6292850a 100644 --- a/web_src/js/svg.js +++ b/web_src/js/svg.js @@ -22,6 +22,7 @@ import octiconDiffModified from '../../public/img/svg/octicon-diff-modified.svg' import octiconDiffRemoved from '../../public/img/svg/octicon-diff-removed.svg'; import octiconDiffRenamed from '../../public/img/svg/octicon-diff-renamed.svg'; import octiconDotFill from '../../public/img/svg/octicon-dot-fill.svg'; +import octiconDownload from '../../public/img/svg/octicon-download.svg'; import octiconEye from '../../public/img/svg/octicon-eye.svg'; import octiconFile from '../../public/img/svg/octicon-file.svg'; import octiconFileDirectoryFill from '../../public/img/svg/octicon-file-directory-fill.svg'; @@ -91,6 +92,7 @@ const svgs = { 'octicon-diff-removed': octiconDiffRemoved, 'octicon-diff-renamed': octiconDiffRenamed, 'octicon-dot-fill': octiconDotFill, + 'octicon-download': octiconDownload, 'octicon-eye': octiconEye, 'octicon-file': octiconFile, 'octicon-file-directory-fill': octiconFileDirectoryFill, |