summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/alerts_service_settings/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/alerts_service_settings/index.js')
-rw-r--r--app/assets/javascripts/alerts_service_settings/index.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/app/assets/javascripts/alerts_service_settings/index.js b/app/assets/javascripts/alerts_service_settings/index.js
new file mode 100644
index 00000000000..d49725c6a4d
--- /dev/null
+++ b/app/assets/javascripts/alerts_service_settings/index.js
@@ -0,0 +1,27 @@
+import Vue from 'vue';
+import { parseBoolean } from '~/lib/utils/common_utils';
+import AlertsServiceForm from './components/alerts_service_form.vue';
+
+export default el => {
+ if (!el) {
+ return null;
+ }
+
+ const { activated: activatedStr, formPath, authorizationKey, url, learnMoreUrl } = el.dataset;
+ const activated = parseBoolean(activatedStr);
+
+ return new Vue({
+ el,
+ render(createElement) {
+ return createElement(AlertsServiceForm, {
+ props: {
+ initialActivated: activated,
+ formPath,
+ learnMoreUrl,
+ initialAuthorizationKey: authorizationKey,
+ url,
+ },
+ });
+ },
+ });
+};