summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/registry/components/collapsible_container.vue
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-12-04 13:20:43 +0000
committerFilipa Lacerda <filipa@gitlab.com>2018-12-07 12:09:22 +0000
commit7019b646c5a4a588b4018bdb8b8afdfd81a2ae60 (patch)
treeb37276a898e0c7a28781aa8244ea4fedf3cf156e /app/assets/javascripts/registry/components/collapsible_container.vue
parenta89a73c1cc8576d75afc947cec14f19e1ae8a30d (diff)
downloadgitlab-ce-7019b646c5a4a588b4018bdb8b8afdfd81a2ae60.tar.gz
Replaces vue-resource with axios for registry code
Diffstat (limited to 'app/assets/javascripts/registry/components/collapsible_container.vue')
-rw-r--r--app/assets/javascripts/registry/components/collapsible_container.vue17
1 files changed, 7 insertions, 10 deletions
diff --git a/app/assets/javascripts/registry/components/collapsible_container.vue b/app/assets/javascripts/registry/components/collapsible_container.vue
index 6514c05a9c7..72f0aceb534 100644
--- a/app/assets/javascripts/registry/components/collapsible_container.vue
+++ b/app/assets/javascripts/registry/components/collapsible_container.vue
@@ -1,18 +1,18 @@
<script>
import { mapActions } from 'vuex';
import { GlLoadingIcon } from '@gitlab/ui';
-import Flash from '../../flash';
-import clipboardButton from '../../vue_shared/components/clipboard_button.vue';
+import createFlash from '../../flash';
+import ClipboardButton from '../../vue_shared/components/clipboard_button.vue';
import tooltip from '../../vue_shared/directives/tooltip';
-import tableRegistry from './table_registry.vue';
+import TableRegistry from './table_registry.vue';
import { errorMessages, errorMessagesTypes } from '../constants';
import { __ } from '../../locale';
export default {
name: 'CollapsibeContainerRegisty',
components: {
- clipboardButton,
- tableRegistry,
+ ClipboardButton,
+ TableRegistry,
GlLoadingIcon,
},
directives: {
@@ -31,7 +31,6 @@ export default {
},
methods: {
...mapActions(['fetchRepos', 'fetchList', 'deleteRepo']),
-
toggleRepo() {
this.isOpen = !this.isOpen;
@@ -41,18 +40,16 @@ export default {
);
}
},
-
handleDeleteRepository() {
this.deleteRepo(this.repo)
.then(() => {
- Flash(__('This container registry has been scheduled for deletion.'), 'notice');
+ createFlash(__('This container registry has been scheduled for deletion.'), 'notice');
this.fetchRepos();
})
.catch(() => this.showError(errorMessagesTypes.DELETE_REPO));
},
-
showError(message) {
- Flash(errorMessages[message]);
+ createFlash(errorMessages[message]);
},
},
};