debian-mirror-gitlab/app/assets/javascripts/pages/projects/jobs/index/index.js

24 lines
536 B
JavaScript
Raw Normal View History

2018-12-13 13:39:08 +05:30
import Vue from 'vue';
2021-04-29 21:17:54 +05:30
import initJobsTable from '~/jobs/components/table';
2018-12-13 13:39:08 +05:30
import GlCountdown from '~/vue_shared/components/gl_countdown.vue';
2021-04-29 21:17:54 +05:30
if (gon.features?.jobsTableVue) {
initJobsTable();
} else {
const remainingTimeElements = document.querySelectorAll('.js-remaining-time');
remainingTimeElements.forEach(
(el) =>
new Vue({
el,
render(h) {
return h(GlCountdown, {
props: {
endDateString: el.dateTime,
},
});
},
}),
);
}