2021-11-18 22:05:49 +05:30
|
|
|
import Vue from 'vue';
|
2022-05-07 20:08:51 +05:30
|
|
|
import { parseBoolean } from '~/lib/utils/common_utils';
|
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,
|
2022-05-07 20:08:51 +05:30
|
|
|
kasAddress,
|
2022-07-16 23:28:13 +05:30
|
|
|
kasVersion,
|
2022-05-07 20:08:51 +05:30
|
|
|
canAdminCluster,
|
2022-04-04 11:22:00 +05:30
|
|
|
} = 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,
|
2022-05-07 20:08:51 +05:30
|
|
|
kasAddress,
|
2022-07-16 23:28:13 +05:30
|
|
|
kasVersion,
|
2022-05-07 20:08:51 +05:30
|
|
|
canAdminCluster: parseBoolean(canAdminCluster),
|
2022-03-02 08:16:31 +05:30
|
|
|
},
|
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
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|