debian-mirror-gitlab/app/assets/javascripts/prometheus_alerts/index.js

29 lines
613 B
JavaScript
Raw Normal View History

2020-04-22 19:07:51 +05:30
import Vue from 'vue';
import ResetKey from './components/reset_key.vue';
export default () => {
const el = document.querySelector('#js-settings-prometheus-alerts');
if (!el) {
return;
}
2020-07-28 23:09:34 +05:30
const { authorizationKey, changeKeyUrl, notifyUrl, learnMoreUrl, disabled } = el.dataset;
2020-04-22 19:07:51 +05:30
// eslint-disable-next-line no-new
new Vue({
el,
render(createElement) {
return createElement(ResetKey, {
props: {
initialAuthorizationKey: authorizationKey,
changeKeyUrl,
notifyUrl,
learnMoreUrl,
2020-07-28 23:09:34 +05:30
disabled,
2020-04-22 19:07:51 +05:30
},
});
},
});
};