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/alerts_settings/index.js')
-rw-r--r--app/assets/javascripts/alerts_settings/index.js26
1 files changed, 25 insertions, 1 deletions
diff --git a/app/assets/javascripts/alerts_settings/index.js b/app/assets/javascripts/alerts_settings/index.js
index 953a867b2b7..19cdf1d7a19 100644
--- a/app/assets/javascripts/alerts_settings/index.js
+++ b/app/assets/javascripts/alerts_settings/index.js
@@ -1,5 +1,6 @@
import { GlToast } from '@gitlab/ui';
import Vue from 'vue';
+import IncidentsSettingsService from '~/incidents_settings/incidents_settings_service';
import { parseBoolean } from '~/lib/utils/common_utils';
import AlertSettingsWrapper from './components/alerts_settings_wrapper.vue';
import apolloProvider from './graphql';
@@ -19,14 +20,37 @@ export default (el) => {
return null;
}
- const { alertsUsageUrl, projectPath, multiIntegrations, alertFields } = el.dataset;
+ const {
+ alertsUsageUrl,
+ projectPath,
+ multiIntegrations,
+ alertFields,
+ templates,
+ createIssue,
+ issueTemplateKey,
+ sendEmail,
+ autoCloseIncident,
+ pagerdutyResetKeyPath,
+ operationsSettingsEndpoint,
+ } = el.dataset;
+ const service = new IncidentsSettingsService(operationsSettingsEndpoint, pagerdutyResetKeyPath);
return new Vue({
el,
components: {
AlertSettingsWrapper,
},
provide: {
+ service,
+ alertSettings: {
+ templates: JSON.parse(templates),
+ createIssue: parseBoolean(createIssue),
+ issueTemplateKey,
+ sendEmail: parseBoolean(sendEmail),
+ autoCloseIncident: parseBoolean(autoCloseIncident),
+ pagerdutyResetKeyPath,
+ operationsSettingsEndpoint,
+ },
alertsUsageUrl,
projectPath,
multiIntegrations: parseBoolean(multiIntegrations),