summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/admin/users/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/admin/users/index.js')
-rw-r--r--app/assets/javascripts/admin/users/index.js25
1 files changed, 23 insertions, 2 deletions
diff --git a/app/assets/javascripts/admin/users/index.js b/app/assets/javascripts/admin/users/index.js
index f35b57c4e1a..0365d054fc9 100644
--- a/app/assets/javascripts/admin/users/index.js
+++ b/app/assets/javascripts/admin/users/index.js
@@ -1,8 +1,9 @@
import Vue from 'vue';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import AdminUsersApp from './components/app.vue';
+import UsagePingDisabled from './components/usage_ping_disabled.vue';
-export default function (el = document.querySelector('#js-admin-users-app')) {
+export const initAdminUsersApp = (el = document.querySelector('#js-admin-users-app')) => {
if (!el) {
return false;
}
@@ -19,4 +20,24 @@ export default function (el = document.querySelector('#js-admin-users-app')) {
},
}),
});
-}
+};
+
+export const initCohortsEmptyState = (el = document.querySelector('#js-cohorts-empty-state')) => {
+ if (!el) {
+ return false;
+ }
+
+ const { emptyStateSvgPath, enableUsagePingLink, docsLink } = el.dataset;
+
+ return new Vue({
+ el,
+ provide: {
+ svgPath: emptyStateSvgPath,
+ primaryButtonPath: enableUsagePingLink,
+ docsLink,
+ },
+ render(h) {
+ return h(UsagePingDisabled);
+ },
+ });
+};