Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.js « index « jobs « admin « pages « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 31d58eabaafeac43ea7d0f397efb223a47f989f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import Vue from 'vue';

import Translate from '~/vue_shared/translate';

import stopJobsModal from './components/stop_jobs_modal.vue';

Vue.use(Translate);

export default () => {
  const stopJobsButton = document.getElementById('stop-jobs-button');
  if (stopJobsButton) {
    // eslint-disable-next-line no-new
    new Vue({
      el: '#stop-jobs-modal',
      components: {
        stopJobsModal,
      },
      mounted() {
        stopJobsButton.classList.remove('disabled');
      },
      render(createElement) {
        return createElement('stop-jobs-modal', {
          props: {
            url: stopJobsButton.dataset.url,
          },
        });
      },
    });
  }
};