2021-11-18 22:05:49 +05:30
|
|
|
import Vue from 'vue';
|
2021-12-11 22:18:48 +05:30
|
|
|
import AgentShowPage from 'ee_else_ce/clusters/agents/components/show.vue';
|
2022-03-02 08:16:31 +05:30
|
|
|
import apolloProvider from './graphql/provider';
|
2022-04-04 11:22:00 +05:30
|
|
|
import createRouter from './router';
|
2021-11-18 22:05:49 +05:30
|
|
|
|
|
|
|
export default () => {
|
|
|
|
const el = document.querySelector('#js-cluster-agent-details');
|
|
|
|
|
|
|
|
if (!el) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2022-04-04 11:22:00 +05:30
|
|
|
const {
|
|
|
|
activityEmptyStateImage,
|
|
|
|
agentName,
|
|
|
|
canAdminVulnerability,
|
|
|
|
emptyStateSvgPath,
|
|
|
|
projectPath,
|
|
|
|
} = el.dataset;
|
2021-11-18 22:05:49 +05:30
|
|
|
|
|
|
|
return new Vue({
|
|
|
|
el,
|
2022-03-02 08:16:31 +05:30
|
|
|
apolloProvider,
|
2022-04-04 11:22:00 +05:30
|
|
|
router: createRouter(),
|
2022-03-02 08:16:31 +05:30
|
|
|
provide: {
|
|
|
|
activityEmptyStateImage,
|
|
|
|
agentName,
|
2022-04-04 11:22:00 +05:30
|
|
|
canAdminVulnerability,
|
2022-03-02 08:16:31 +05:30
|
|
|
emptyStateSvgPath,
|
|
|
|
projectPath,
|
|
|
|
},
|
2021-11-18 22:05:49 +05:30
|
|
|
render(createElement) {
|
2022-03-02 08:16:31 +05:30
|
|
|
return createElement(AgentShowPage);
|
2021-11-18 22:05:49 +05:30
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|