Merge branch 'winh-job-list-dynamic-timer' into 'master'
Add dynamic timer for delayed jobs in job list See merge request gitlab-org/gitlab-ce!22656
This commit is contained in:
commit
7f43b65fe5
3 changed files with 24 additions and 3 deletions
16
app/assets/javascripts/pages/projects/jobs/index/index.js
Normal file
16
app/assets/javascripts/pages/projects/jobs/index/index.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
import Vue from 'vue';
|
||||
import GlCountdown from '~/vue_shared/components/gl_countdown.vue';
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const remainingTimeElements = document.querySelectorAll('.js-remaining-time');
|
||||
remainingTimeElements.forEach(
|
||||
el =>
|
||||
new Vue({
|
||||
...GlCountdown,
|
||||
el,
|
||||
propsData: {
|
||||
endDateString: el.dateTime,
|
||||
},
|
||||
}),
|
||||
);
|
||||
});
|
|
@ -105,10 +105,10 @@
|
|||
= icon('remove', class: 'cred')
|
||||
- elsif job.scheduled?
|
||||
.btn-group
|
||||
.btn.btn-default.has-tooltip{ disabled: true,
|
||||
title: job.scheduled_at }
|
||||
.btn.btn-default{ disabled: true }
|
||||
= sprite_icon('planning')
|
||||
= duration_in_numbers(job.execute_in)
|
||||
%time.js-remaining-time{ datetime: job.scheduled_at.utc.iso8601 }
|
||||
= duration_in_numbers(job.execute_in)
|
||||
- confirmation_message = s_("DelayedJobs|Are you sure you want to run %{job_name} immediately? This job will run automatically after it's timer finishes.") % { job_name: job.name }
|
||||
= link_to play_project_job_path(job.project, job, return_to: request.original_url),
|
||||
method: :post,
|
||||
|
|
5
changelogs/unreleased/winh-job-list-dynamic-timer.yml
Normal file
5
changelogs/unreleased/winh-job-list-dynamic-timer.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Add dynamic timer for delayed jobs in job list
|
||||
merge_request: 22656
|
||||
author:
|
||||
type: changed
|
Loading…
Reference in a new issue