diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 15:26:25 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 15:26:25 +0300 |
commit | a09983ae35713f5a2bbb100981116d31ce99826e (patch) | |
tree | 2ee2af7bd104d57086db360a7e6d8c9d5d43667a /app/assets/javascripts/prometheus_alerts/components/reset_key.vue | |
parent | 18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff) |
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'app/assets/javascripts/prometheus_alerts/components/reset_key.vue')
-rw-r--r-- | app/assets/javascripts/prometheus_alerts/components/reset_key.vue | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/app/assets/javascripts/prometheus_alerts/components/reset_key.vue b/app/assets/javascripts/prometheus_alerts/components/reset_key.vue index 15b6a29e5cf..941a05583ad 100644 --- a/app/assets/javascripts/prometheus_alerts/components/reset_key.vue +++ b/app/assets/javascripts/prometheus_alerts/components/reset_key.vue @@ -41,6 +41,11 @@ export default { type: String, required: true, }, + disabled: { + type: Boolean, + required: false, + default: false, + }, }, data() { return { @@ -88,7 +93,11 @@ export default { <div class="input-group"> <gl-form-input id="notify-url" :readonly="true" :value="notifyUrl" /> <span class="input-group-append"> - <clipboard-button :text="notifyUrl" :title="$options.copyToClipboard" /> + <clipboard-button + :text="notifyUrl" + :title="$options.copyToClipboard" + :disabled="disabled" + /> </span> </div> </gl-form-group> @@ -100,7 +109,11 @@ 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.copyToClipboard" /> + <clipboard-button + :text="authorizationKey" + :title="$options.copyToClipboard" + :disabled="disabled" + /> </span> </div> </gl-form-group> @@ -118,13 +131,20 @@ export default { ) }} </gl-modal> - <gl-deprecated-button v-gl-modal.authKeyModal class="js-reset-auth-key">{{ - __('Reset key') - }}</gl-deprecated-button> + <gl-deprecated-button + v-gl-modal.authKeyModal + class="js-reset-auth-key" + :disabled="disabled" + >{{ __('Reset key') }}</gl-deprecated-button + > </template> - <gl-deprecated-button v-else class="js-reset-auth-key" @click="resetKey">{{ - __('Generate key') - }}</gl-deprecated-button> + <gl-deprecated-button + v-else + :disabled="disabled" + class="js-reset-auth-key" + @click="resetKey" + >{{ __('Generate key') }}</gl-deprecated-button + > </div> </div> </template> |