diff options
Diffstat (limited to 'web_src/js/components/RepoActionView.vue')
-rw-r--r-- | web_src/js/components/RepoActionView.vue | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/web_src/js/components/RepoActionView.vue b/web_src/js/components/RepoActionView.vue index 90823b986c..8b899ac2fe 100644 --- a/web_src/js/components/RepoActionView.vue +++ b/web_src/js/components/RepoActionView.vue @@ -14,7 +14,7 @@ <button class="ui basic small compact button red" @click="cancelRun()" v-else-if="run.canCancel"> {{ locale.cancel }} </button> - <button class="ui basic small compact button gt-mr-0" @click="rerun()" v-else-if="run.canRerun"> + <button class="ui basic small compact button gt-mr-0 link-action" :data-url="`${run.link}/rerun`" v-else-if="run.canRerun"> {{ locale.rerun_all }} </button> </div> @@ -38,7 +38,7 @@ <span class="job-brief-name gt-mx-3 gt-ellipsis">{{ job.name }}</span> </div> <span class="job-brief-item-right"> - <SvgIcon name="octicon-sync" role="button" :data-tooltip-content="locale.rerun" class="job-brief-rerun gt-mx-3" @click="rerunJob(index)" v-if="job.canRerun && onHoverRerunIndex === job.id"/> + <SvgIcon name="octicon-sync" role="button" :data-tooltip-content="locale.rerun" class="job-brief-rerun gt-mx-3 link-action" :data-url="`${run.link}/jobs/${index}/rerun`" v-if="job.canRerun && onHoverRerunIndex === job.id"/> <span class="step-summary-duration">{{ job.duration }}</span> </span> </a> @@ -264,17 +264,6 @@ const sfc = { this.loadJob(); // try to load the data immediately instead of waiting for next timer interval } }, - // rerun a job - async rerunJob(idx) { - const jobLink = `${this.run.link}/jobs/${idx}`; - await this.fetchPost(`${jobLink}/rerun`); - window.location.href = jobLink; - }, - // rerun workflow - async rerun() { - await this.fetchPost(`${this.run.link}/rerun`); - window.location.href = this.run.link; - }, // cancel a run cancelRun() { this.fetchPost(`${this.run.link}/cancel`); |