diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 11:43:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 11:43:02 +0300 |
commit | d9ab72d6080f594d0b3cae15f14b3ef2c6c638cb (patch) | |
tree | 2341ef426af70ad1e289c38036737e04b0aa5007 /app/assets/javascripts/error_tracking_settings | |
parent | d6e514dd13db8947884cd58fe2a9c2a063400a9b (diff) |
Add latest changes from gitlab-org/gitlab@14-4-stable-eev14.4.0-rc42
Diffstat (limited to 'app/assets/javascripts/error_tracking_settings')
-rw-r--r-- | app/assets/javascripts/error_tracking_settings/components/app.vue | 31 | ||||
-rw-r--r-- | app/assets/javascripts/error_tracking_settings/index.js | 2 |
2 files changed, 32 insertions, 1 deletions
diff --git a/app/assets/javascripts/error_tracking_settings/components/app.vue b/app/assets/javascripts/error_tracking_settings/components/app.vue index e12d9cc2b07..4808cd1d1c0 100644 --- a/app/assets/javascripts/error_tracking_settings/components/app.vue +++ b/app/assets/javascripts/error_tracking_settings/components/app.vue @@ -1,6 +1,14 @@ <script> -import { GlButton, GlFormGroup, GlFormCheckbox, GlFormRadioGroup, GlFormRadio } from '@gitlab/ui'; +import { + GlButton, + GlFormGroup, + GlFormCheckbox, + GlFormRadioGroup, + GlFormRadio, + GlFormInputGroup, +} from '@gitlab/ui'; import { mapActions, mapGetters, mapState } from 'vuex'; +import ClipboardButton from '~/vue_shared/components/clipboard_button.vue'; import ErrorTrackingForm from './error_tracking_form.vue'; import ProjectDropdown from './project_dropdown.vue'; @@ -12,7 +20,9 @@ export default { GlFormGroup, GlFormRadioGroup, GlFormRadio, + GlFormInputGroup, ProjectDropdown, + ClipboardButton, }, props: { initialApiHost: { @@ -46,6 +56,11 @@ export default { type: String, required: true, }, + gitlabDsn: { + type: String, + required: false, + default: null, + }, }, computed: { ...mapGetters([ @@ -63,6 +78,9 @@ export default { 'settingsLoading', 'token', ]), + showGitlabDsnSetting() { + return this.integrated && this.enabled && this.gitlabDsn; + }, }, created() { this.setInitialState({ @@ -119,6 +137,17 @@ export default { </gl-form-radio> </gl-form-radio-group> </gl-form-group> + <gl-form-group + v-if="showGitlabDsnSetting" + :label="__('Paste this DSN into your Sentry SDK')" + data-testid="gitlab-dsn-setting-form" + > + <gl-form-input-group readonly :value="gitlabDsn"> + <template #append> + <clipboard-button :text="gitlabDsn" :title="__('Copy')" /> + </template> + </gl-form-input-group> + </gl-form-group> <div v-if="!integrated" class="js-sentry-setting-form" data-testid="sentry-setting-form"> <error-tracking-form /> <div class="form-group"> diff --git a/app/assets/javascripts/error_tracking_settings/index.js b/app/assets/javascripts/error_tracking_settings/index.js index 324b3292834..69388329e1c 100644 --- a/app/assets/javascripts/error_tracking_settings/index.js +++ b/app/assets/javascripts/error_tracking_settings/index.js @@ -13,6 +13,7 @@ export default () => { token, listProjectsEndpoint, operationsSettingsEndpoint, + gitlabDsn, }, } = formContainerEl; @@ -29,6 +30,7 @@ export default () => { initialToken: token, listProjectsEndpoint, operationsSettingsEndpoint, + gitlabDsn, }, }); }, |