Commit f3eb4750 authored by David O'Regan's avatar David O'Regan

Merge branch 'tr-update-issue-to-incident' into 'master'

Use incident instead of issue for operation settings

See merge request gitlab-org/gitlab!48406
parents 489d1c98 e1c65bfb
...@@ -86,7 +86,7 @@ export default { ...@@ -86,7 +86,7 @@ export default {
<form ref="settingsForm" @submit.prevent="updateAlertsIntegrationSettings"> <form ref="settingsForm" @submit.prevent="updateAlertsIntegrationSettings">
<gl-form-group class="gl-pl-0"> <gl-form-group class="gl-pl-0">
<gl-form-checkbox v-model="createIssueEnabled" data-qa-selector="create_issue_checkbox"> <gl-form-checkbox v-model="createIssueEnabled" data-qa-selector="create_issue_checkbox">
<span>{{ $options.i18n.createIssue.label }}</span> <span>{{ $options.i18n.createIncident.label }}</span>
</gl-form-checkbox> </gl-form-checkbox>
</gl-form-group> </gl-form-group>
...@@ -96,7 +96,7 @@ export default { ...@@ -96,7 +96,7 @@ export default {
class="col-8 col-md-9 gl-px-6" class="col-8 col-md-9 gl-px-6"
> >
<label class="gl-display-inline-flex" for="alert-integration-settings-issue-template"> <label class="gl-display-inline-flex" for="alert-integration-settings-issue-template">
{{ $options.i18n.issueTemplate.label }} {{ $options.i18n.incidentTemplate.label }}
<gl-link :href="$options.ISSUE_TEMPLATES_DOCS_LINK" target="_blank"> <gl-link :href="$options.ISSUE_TEMPLATES_DOCS_LINK" target="_blank">
<gl-icon name="question" :size="12" /> <gl-icon name="question" :size="12" />
</gl-link> </gl-link>
......
...@@ -109,7 +109,20 @@ export default { ...@@ -109,7 +109,20 @@ export default {
{{ webhookUpdateAlertMsg }} {{ webhookUpdateAlertMsg }}
</gl-alert> </gl-alert>
<p>{{ $options.i18n.introText }}</p> <p>
<gl-sprintf :message="$options.i18n.introText">
<template #link="{ content }">
<gl-link
:href="$options.CONFIGURE_PAGERDUTY_WEBHOOK_DOCS_LINK"
target="_blank"
class="gl-display-inline-flex"
>
<span>{{ content }}</span>
<gl-icon name="external-link" />
</gl-link>
</template>
</gl-sprintf>
</p>
<form ref="settingsForm" @submit.prevent="updatePagerDutyIntegrationSettings"> <form ref="settingsForm" @submit.prevent="updatePagerDutyIntegrationSettings">
<gl-form-group class="col-8 col-md-9 gl-p-0"> <gl-form-group class="col-8 col-md-9 gl-p-0">
<gl-toggle <gl-toggle
...@@ -134,23 +147,9 @@ export default { ...@@ -134,23 +147,9 @@ export default {
</template> </template>
</gl-form-input-group> </gl-form-input-group>
<div class="gl-text-gray-200 gl-pt-2">
<gl-sprintf :message="$options.i18n.webhookUrl.helpText">
<template #docsLink>
<gl-link
:href="$options.CONFIGURE_PAGERDUTY_WEBHOOK_DOCS_LINK"
target="_blank"
class="gl-display-inline-flex"
>
<span>{{ $options.i18n.webhookUrl.helpDocsLink }}</span>
<gl-icon name="external-link" />
</gl-link>
</template>
</gl-sprintf>
</div>
<gl-button <gl-button
v-gl-modal.resetWebhookModal v-gl-modal.resetWebhookModal
class="gl-mt-3" class="gl-mt-5"
:disabled="loading" :disabled="loading"
:loading="resettingWebhook" :loading="resettingWebhook"
data-testid="webhook-reset-btn" data-testid="webhook-reset-btn"
......
...@@ -33,17 +33,17 @@ export const I18N_ALERT_SETTINGS_FORM = { ...@@ -33,17 +33,17 @@ export const I18N_ALERT_SETTINGS_FORM = {
saveBtnLabel: __('Save changes'), saveBtnLabel: __('Save changes'),
introText: __('Action to take when receiving an alert. %{docsLink}'), introText: __('Action to take when receiving an alert. %{docsLink}'),
introLinkText: __('More information.'), introLinkText: __('More information.'),
createIssue: { createIncident: {
label: __('Create an issue. Issues are created for each alert triggered.'), label: __('Create an incident. Incidents are created for each alert triggered.'),
}, },
issueTemplate: { incidentTemplate: {
label: __('Issue template (optional)'), label: __('Incident template (optional)'),
}, },
sendEmail: { sendEmail: {
label: __('Send a separate email notification to Developers.'), label: __('Send a separate email notification to Developers.'),
}, },
autoCloseIncidents: { autoCloseIncidents: {
label: __('Automatically close incident issues when the associated Prometheus alert resolves.'), label: __('Automatically close incidents when the associated Prometheus alert resolves.'),
}, },
}; };
...@@ -57,17 +57,13 @@ export const ISSUE_TEMPLATES_DOCS_LINK = ...@@ -57,17 +57,13 @@ export const ISSUE_TEMPLATES_DOCS_LINK =
export const I18N_PAGERDUTY_SETTINGS_FORM = { export const I18N_PAGERDUTY_SETTINGS_FORM = {
introText: s__( introText: s__(
'PagerDutySettings|Setting up a webhook with PagerDuty will automatically create a GitLab issue for each PagerDuty incident.', 'PagerDutySettings|Create a GitLab incident for each PagerDuty incident by %{linkStart}configuring a webhook in PagerDuty%{linkEnd}',
), ),
activeToggle: { activeToggle: {
label: s__('PagerDutySettings|Active'), label: s__('PagerDutySettings|Active'),
}, },
webhookUrl: { webhookUrl: {
label: s__('PagerDutySettings|Webhook URL'), label: s__('PagerDutySettings|Webhook URL'),
helpText: s__(
'PagerDutySettings|Create a GitLab issue for each PagerDuty incident by %{docsLink}',
),
helpDocsLink: s__('PagerDutySettings|configuring a webhook in PagerDuty'),
resetWebhookUrl: s__('PagerDutySettings|Reset webhook URL'), resetWebhookUrl: s__('PagerDutySettings|Reset webhook URL'),
copyToClipboard: __('Copy'), copyToClipboard: __('Copy'),
updateErrMsg: s__('PagerDutySettings|Failed to update Webhook URL'), updateErrMsg: s__('PagerDutySettings|Failed to update Webhook URL'),
......
---
title: Use incident instead of issue for operation settings
merge_request: 48406
author:
type: fixed
...@@ -4169,7 +4169,7 @@ msgstr "" ...@@ -4169,7 +4169,7 @@ msgstr ""
msgid "Automatic deployment rollbacks" msgid "Automatic deployment rollbacks"
msgstr "" msgstr ""
msgid "Automatically close incident issues when the associated Prometheus alert resolves." msgid "Automatically close incidents when the associated Prometheus alert resolves."
msgstr "" msgstr ""
msgid "Automatically create merge requests for vulnerabilities that have fixes available." msgid "Automatically create merge requests for vulnerabilities that have fixes available."
...@@ -7919,7 +7919,7 @@ msgstr "" ...@@ -7919,7 +7919,7 @@ msgstr ""
msgid "Create an account using:" msgid "Create an account using:"
msgstr "" msgstr ""
msgid "Create an issue. Issues are created for each alert triggered." msgid "Create an incident. Incidents are created for each alert triggered."
msgstr "" msgstr ""
msgid "Create and provide your GitHub %{link_start}Personal Access Token%{link_end}. You will need to select the %{code_open}repo%{code_close} scope, so we can display a list of your public and private repositories which are available to import." msgid "Create and provide your GitHub %{link_start}Personal Access Token%{link_end}. You will need to select the %{code_open}repo%{code_close} scope, so we can display a list of your public and private repositories which are available to import."
...@@ -14377,6 +14377,9 @@ msgstr "" ...@@ -14377,6 +14377,9 @@ msgstr ""
msgid "Incident Management Limits" msgid "Incident Management Limits"
msgstr "" msgstr ""
msgid "Incident template (optional)"
msgstr ""
msgid "IncidentManagement|%{hours} hours, %{minutes} minutes remaining" msgid "IncidentManagement|%{hours} hours, %{minutes} minutes remaining"
msgstr "" msgstr ""
...@@ -15207,9 +15210,6 @@ msgstr "" ...@@ -15207,9 +15210,6 @@ msgstr ""
msgid "Issue published on status page." msgid "Issue published on status page."
msgstr "" msgstr ""
msgid "Issue template (optional)"
msgstr ""
msgid "Issue update failed" msgid "Issue update failed"
msgstr "" msgstr ""
...@@ -19729,7 +19729,7 @@ msgstr "" ...@@ -19729,7 +19729,7 @@ msgstr ""
msgid "PagerDutySettings|Active" msgid "PagerDutySettings|Active"
msgstr "" msgstr ""
msgid "PagerDutySettings|Create a GitLab issue for each PagerDuty incident by %{docsLink}" msgid "PagerDutySettings|Create a GitLab incident for each PagerDuty incident by %{linkStart}configuring a webhook in PagerDuty%{linkEnd}"
msgstr "" msgstr ""
msgid "PagerDutySettings|Failed to update Webhook URL" msgid "PagerDutySettings|Failed to update Webhook URL"
...@@ -19741,18 +19741,12 @@ msgstr "" ...@@ -19741,18 +19741,12 @@ msgstr ""
msgid "PagerDutySettings|Resetting the webhook URL for this project will require updating this integration's settings in PagerDuty." msgid "PagerDutySettings|Resetting the webhook URL for this project will require updating this integration's settings in PagerDuty."
msgstr "" msgstr ""
msgid "PagerDutySettings|Setting up a webhook with PagerDuty will automatically create a GitLab issue for each PagerDuty incident."
msgstr ""
msgid "PagerDutySettings|Webhook URL" msgid "PagerDutySettings|Webhook URL"
msgstr "" msgstr ""
msgid "PagerDutySettings|Webhook URL update was successful" msgid "PagerDutySettings|Webhook URL update was successful"
msgstr "" msgstr ""
msgid "PagerDutySettings|configuring a webhook in PagerDuty"
msgstr ""
msgid "Pages" msgid "Pages"
msgstr "" msgstr ""
......
...@@ -23,7 +23,7 @@ RSpec.describe 'Projects > Settings > For a forked project', :js do ...@@ -23,7 +23,7 @@ RSpec.describe 'Projects > Settings > For a forked project', :js do
describe 'Settings > Operations' do describe 'Settings > Operations' do
describe 'Incidents' do describe 'Incidents' do
let(:create_issue) { 'Create an issue. Issues are created for each alert triggered.' } let(:create_issue) { 'Create an incident. Incidents are created for each alert triggered.' }
let(:send_email) { 'Send a separate email notification to Developers.' } let(:send_email) { 'Send a separate email notification to Developers.' }
before do before do
......
...@@ -17,7 +17,7 @@ exports[`Alert integration settings form default state should match the default ...@@ -17,7 +17,7 @@ exports[`Alert integration settings form default state should match the default
data-qa-selector="create_issue_checkbox" data-qa-selector="create_issue_checkbox"
> >
<span> <span>
Create an issue. Issues are created for each alert triggered. Create an incident. Incidents are created for each alert triggered.
</span> </span>
</gl-form-checkbox-stub> </gl-form-checkbox-stub>
</gl-form-group-stub> </gl-form-group-stub>
...@@ -32,7 +32,7 @@ exports[`Alert integration settings form default state should match the default ...@@ -32,7 +32,7 @@ exports[`Alert integration settings form default state should match the default
for="alert-integration-settings-issue-template" for="alert-integration-settings-issue-template"
> >
Issue template (optional) Incident template (optional)
<gl-link-stub <gl-link-stub
href="/help/user/project/description_templates#creating-issue-templates" href="/help/user/project/description_templates#creating-issue-templates"
...@@ -89,7 +89,7 @@ exports[`Alert integration settings form default state should match the default ...@@ -89,7 +89,7 @@ exports[`Alert integration settings form default state should match the default
checked="true" checked="true"
> >
<span> <span>
Automatically close incident issues when the associated Prometheus alert resolves. Automatically close incidents when the associated Prometheus alert resolves.
</span> </span>
</gl-form-checkbox-stub> </gl-form-checkbox-stub>
</gl-form-group-stub> </gl-form-group-stub>
......
...@@ -5,7 +5,9 @@ exports[`Alert integration settings form should match the default snapshot 1`] = ...@@ -5,7 +5,9 @@ exports[`Alert integration settings form should match the default snapshot 1`] =
<!----> <!---->
<p> <p>
Setting up a webhook with PagerDuty will automatically create a GitLab issue for each PagerDuty incident. <gl-sprintf-stub
message="Create a GitLab incident for each PagerDuty incident by %{linkStart}configuring a webhook in PagerDuty%{linkEnd}"
/>
</p> </p>
<form> <form>
...@@ -33,18 +35,10 @@ exports[`Alert integration settings form should match the default snapshot 1`] = ...@@ -33,18 +35,10 @@ exports[`Alert integration settings form should match the default snapshot 1`] =
value="pagerduty.webhook.com" value="pagerduty.webhook.com"
/> />
<div
class="gl-text-gray-200 gl-pt-2"
>
<gl-sprintf-stub
message="Create a GitLab issue for each PagerDuty incident by %{docsLink}"
/>
</div>
<gl-button-stub <gl-button-stub
buttontextclasses="" buttontextclasses=""
category="primary" category="primary"
class="gl-mt-3" class="gl-mt-5"
data-testid="webhook-reset-btn" data-testid="webhook-reset-btn"
icon="" icon=""
role="button" role="button"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment