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