2020-10-28 15:08:49 +00:00
|
|
|
import Vue from 'vue';
|
2021-07-13 09:09:42 +00:00
|
|
|
import { parseBoolean } from '~/lib/utils/common_utils';
|
2020-10-28 15:08:49 +00:00
|
|
|
import UserCallout from '~/user_callout';
|
2021-07-13 09:09:42 +00:00
|
|
|
import ServicePingDisabled from './components/service_ping_disabled.vue';
|
2020-10-28 15:08:49 +00:00
|
|
|
|
|
|
|
export default () => {
|
|
|
|
// eslint-disable-next-line no-new
|
|
|
|
new UserCallout();
|
|
|
|
|
2021-07-13 09:09:42 +00:00
|
|
|
const emptyStateContainer = document.getElementById('js-devops-service-ping-disabled');
|
2020-10-28 15:08:49 +00:00
|
|
|
|
|
|
|
if (!emptyStateContainer) return false;
|
|
|
|
|
2021-08-07 00:09:01 +00:00
|
|
|
const { isAdmin, emptyStateSvgPath, enableServicePingPath } = emptyStateContainer.dataset;
|
2020-10-28 15:08:49 +00:00
|
|
|
|
|
|
|
return new Vue({
|
|
|
|
el: emptyStateContainer,
|
|
|
|
provide: {
|
2021-07-13 09:09:42 +00:00
|
|
|
isAdmin: parseBoolean(isAdmin),
|
2020-10-28 15:08:49 +00:00
|
|
|
svgPath: emptyStateSvgPath,
|
2021-07-13 09:09:42 +00:00
|
|
|
primaryButtonPath: enableServicePingPath,
|
2020-10-28 15:08:49 +00:00
|
|
|
},
|
|
|
|
render(h) {
|
2021-07-13 09:09:42 +00:00
|
|
|
return h(ServicePingDisabled);
|
2020-10-28 15:08:49 +00:00
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|