2020-04-01 20:08:11 -04:00
|
|
|
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-02 17:09:14 -04:00
|
|
|
const { authorizationKey, changeKeyUrl, notifyUrl, learnMoreUrl, disabled } = el.dataset;
|
2020-04-01 20:08:11 -04:00
|
|
|
|
|
|
|
// eslint-disable-next-line no-new
|
|
|
|
new Vue({
|
|
|
|
el,
|
|
|
|
render(createElement) {
|
|
|
|
return createElement(ResetKey, {
|
|
|
|
props: {
|
|
|
|
initialAuthorizationKey: authorizationKey,
|
|
|
|
changeKeyUrl,
|
|
|
|
notifyUrl,
|
|
|
|
learnMoreUrl,
|
2020-07-02 17:09:14 -04:00
|
|
|
disabled,
|
2020-04-01 20:08:11 -04:00
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|