2018-10-17 10:34:19 +00:00
|
|
|
import Vue from 'vue';
|
|
|
|
import JobApp from './components/job_app.vue';
|
2020-02-04 12:09:00 +00:00
|
|
|
import createStore from './store';
|
2018-10-17 10:34:19 +00:00
|
|
|
|
|
|
|
export default () => {
|
|
|
|
const element = document.getElementById('js-job-vue-app');
|
|
|
|
|
2020-02-04 12:09:00 +00:00
|
|
|
const store = createStore();
|
|
|
|
|
|
|
|
// Let's start initializing the store (i.e. fetching data) right away
|
|
|
|
store.dispatch('init', element.dataset);
|
|
|
|
|
2018-10-17 10:34:19 +00:00
|
|
|
return new Vue({
|
|
|
|
el: element,
|
2020-02-04 12:09:00 +00:00
|
|
|
store,
|
2018-10-17 10:34:19 +00:00
|
|
|
components: {
|
|
|
|
JobApp,
|
|
|
|
},
|
|
|
|
render(createElement) {
|
2019-08-05 12:12:47 +00:00
|
|
|
const {
|
|
|
|
deploymentHelpUrl,
|
|
|
|
runnerHelpUrl,
|
|
|
|
runnerSettingsUrl,
|
|
|
|
variablesSettingsUrl,
|
2019-09-04 20:48:58 +00:00
|
|
|
subscriptionsMoreMinutesUrl,
|
2019-08-05 12:12:47 +00:00
|
|
|
endpoint,
|
|
|
|
pagePath,
|
|
|
|
logState,
|
|
|
|
buildStatus,
|
|
|
|
projectPath,
|
|
|
|
} = element.dataset;
|
|
|
|
|
2018-10-17 10:34:19 +00:00
|
|
|
return createElement('job-app', {
|
|
|
|
props: {
|
2019-08-05 12:12:47 +00:00
|
|
|
deploymentHelpUrl,
|
|
|
|
runnerHelpUrl,
|
|
|
|
runnerSettingsUrl,
|
|
|
|
variablesSettingsUrl,
|
2019-09-04 20:48:58 +00:00
|
|
|
subscriptionsMoreMinutesUrl,
|
2019-08-05 12:12:47 +00:00
|
|
|
endpoint,
|
|
|
|
pagePath,
|
|
|
|
logState,
|
|
|
|
buildStatus,
|
|
|
|
projectPath,
|
2018-10-17 10:34:19 +00:00
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|