summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/deploy_keys
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 09:55:51 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 09:55:51 +0000
commite8d2c2579383897a1dd7f9debd359abe8ae8373d (patch)
treec42be41678c2586d49a75cabce89322082698334 /app/assets/javascripts/deploy_keys
parentfc845b37ec3a90aaa719975f607740c22ba6a113 (diff)
downloadgitlab-ce-e8d2c2579383897a1dd7f9debd359abe8ae8373d.tar.gz
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'app/assets/javascripts/deploy_keys')
-rw-r--r--app/assets/javascripts/deploy_keys/components/app.vue18
1 files changed, 14 insertions, 4 deletions
diff --git a/app/assets/javascripts/deploy_keys/components/app.vue b/app/assets/javascripts/deploy_keys/components/app.vue
index 02c57164f47..36d54f586f1 100644
--- a/app/assets/javascripts/deploy_keys/components/app.vue
+++ b/app/assets/javascripts/deploy_keys/components/app.vue
@@ -1,6 +1,6 @@
<script>
import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
-import { deprecatedCreateFlash as Flash } from '~/flash';
+import createFlash from '~/flash';
import { s__ } from '~/locale';
import NavigationTabs from '~/vue_shared/components/navigation_tabs.vue';
import eventHub from '../eventhub';
@@ -93,14 +93,20 @@ export default {
.catch(() => {
this.isLoading = false;
this.store.keys = {};
- return new Flash(s__('DeployKeys|Error getting deploy keys'));
+ return createFlash({
+ message: s__('DeployKeys|Error getting deploy keys'),
+ });
});
},
enableKey(deployKey) {
this.service
.enableKey(deployKey.id)
.then(this.fetchKeys)
- .catch(() => new Flash(s__('DeployKeys|Error enabling deploy key')));
+ .catch(() =>
+ createFlash({
+ message: s__('DeployKeys|Error enabling deploy key'),
+ }),
+ );
},
confirmRemoveKey(deployKey, callback) {
const hideModal = () => {
@@ -112,7 +118,11 @@ export default {
.disableKey(deployKey.id)
.then(this.fetchKeys)
.then(hideModal)
- .catch(() => new Flash(s__('DeployKeys|Error removing deploy key')));
+ .catch(() =>
+ createFlash({
+ message: s__('DeployKeys|Error removing deploy key'),
+ }),
+ );
};
this.cancel = hideModal;
this.confirmModalVisible = true;