Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/prometheus_alerts/index.js')
-rw-r--r--app/assets/javascripts/prometheus_alerts/index.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/app/assets/javascripts/prometheus_alerts/index.js b/app/assets/javascripts/prometheus_alerts/index.js
new file mode 100644
index 00000000000..a42f19e5245
--- /dev/null
+++ b/app/assets/javascripts/prometheus_alerts/index.js
@@ -0,0 +1,27 @@
+import Vue from 'vue';
+import ResetKey from './components/reset_key.vue';
+
+export default () => {
+ const el = document.querySelector('#js-settings-prometheus-alerts');
+
+ if (!el) {
+ return;
+ }
+
+ const { authorizationKey, changeKeyUrl, notifyUrl, learnMoreUrl } = el.dataset;
+
+ // eslint-disable-next-line no-new
+ new Vue({
+ el,
+ render(createElement) {
+ return createElement(ResetKey, {
+ props: {
+ initialAuthorizationKey: authorizationKey,
+ changeKeyUrl,
+ notifyUrl,
+ learnMoreUrl,
+ },
+ });
+ },
+ });
+};