From a09983ae35713f5a2bbb100981116d31ce99826e Mon Sep 17 00:00:00 2001
From: GitLab Bot <gitlab-bot@gitlab.com>
Date: Mon, 20 Jul 2020 12:26:25 +0000
Subject: Add latest changes from gitlab-org/gitlab@13-2-stable-ee

---
 .../components/alerts_service_form.vue             | 23 ++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

(limited to 'app/assets/javascripts/alerts_service_settings/components/alerts_service_form.vue')

diff --git a/app/assets/javascripts/alerts_service_settings/components/alerts_service_form.vue b/app/assets/javascripts/alerts_service_settings/components/alerts_service_form.vue
index ac30b086875..a2d94fb8083 100644
--- a/app/assets/javascripts/alerts_service_settings/components/alerts_service_form.vue
+++ b/app/assets/javascripts/alerts_service_settings/components/alerts_service_form.vue
@@ -64,6 +64,11 @@ export default {
       type: Boolean,
       required: true,
     },
+    isDisabled: {
+      type: Boolean,
+      required: false,
+      default: false,
+    },
   },
   data() {
     return {
@@ -142,7 +147,7 @@ export default {
     <gl-form-group :label="__('Active')" label-for="activated" label-class="label-bold">
       <toggle-button
         id="activated"
-        :disabled-input="loadingActivated"
+        :disabled-input="loadingActivated || isDisabled"
         :is-loading="loadingActivated"
         :value="activated"
         @change="toggleActivated"
@@ -152,7 +157,11 @@ export default {
       <div class="input-group">
         <gl-form-input id="url" :readonly="true" :value="url" />
         <span class="input-group-append">
-          <clipboard-button :text="url" :title="$options.COPY_TO_CLIPBOARD" />
+          <clipboard-button
+            :text="url"
+            :title="$options.COPY_TO_CLIPBOARD"
+            :disabled="isDisabled"
+          />
         </span>
       </div>
     </gl-form-group>
@@ -164,10 +173,16 @@ export default {
       <div class="input-group">
         <gl-form-input id="authorization-key" :readonly="true" :value="authorizationKey" />
         <span class="input-group-append">
-          <clipboard-button :text="authorizationKey" :title="$options.COPY_TO_CLIPBOARD" />
+          <clipboard-button
+            :text="authorizationKey"
+            :title="$options.COPY_TO_CLIPBOARD"
+            :disabled="isDisabled"
+          />
         </span>
       </div>
-      <gl-button v-gl-modal.authKeyModal class="mt-2">{{ $options.RESET_KEY }}</gl-button>
+      <gl-button v-gl-modal.authKeyModal class="mt-2" :disabled="isDisabled">{{
+        $options.RESET_KEY
+      }}</gl-button>
       <gl-modal
         modal-id="authKeyModal"
         :title="$options.RESET_KEY"
-- 
cgit v1.2.3

