debian-mirror-gitlab/app/assets/javascripts/clusters/agents/index.js

32 lines
770 B
JavaScript
Raw Normal View History

2021-11-18 22:05:49 +05:30
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import createDefaultClient from '~/lib/graphql';
2021-12-11 22:18:48 +05:30
import AgentShowPage from 'ee_else_ce/clusters/agents/components/show.vue';
2021-11-18 22:05:49 +05:30
Vue.use(VueApollo);
export default () => {
const el = document.querySelector('#js-cluster-agent-details');
if (!el) {
return null;
}
const defaultClient = createDefaultClient();
2022-01-26 12:08:38 +05:30
const { agentName, projectPath, activityEmptyStateImage } = el.dataset;
2021-11-18 22:05:49 +05:30
return new Vue({
el,
apolloProvider: new VueApollo({ defaultClient }),
2022-01-26 12:08:38 +05:30
provide: { agentName, projectPath, activityEmptyStateImage },
2021-11-18 22:05:49 +05:30
render(createElement) {
return createElement(AgentShowPage, {
props: {
agentName,
projectPath,
},
});
},
});
};