summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-09-26 12:02:03 +0100
committerFilipa Lacerda <filipa@gitlab.com>2017-09-26 12:02:03 +0100
commitc34a47c39a687b2284f43fdf827d6fd2bf90e11d (patch)
tree80edaaafcfb3ef60dba96943a3030e5a9d64bec0 /app/assets
parent485cb91c2f1a092504fe0b9540308424e76c5c42 (diff)
downloadgitlab-ce-c34a47c39a687b2284f43fdf827d6fd2bf90e11d.tar.gz
Adds tests for new table component
Fixes eslint problems
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/registry/components/app.vue2
-rw-r--r--app/assets/javascripts/registry/components/collapsible_container.vue4
-rw-r--r--app/assets/javascripts/registry/components/table_registry.vue9
3 files changed, 10 insertions, 5 deletions
diff --git a/app/assets/javascripts/registry/components/app.vue b/app/assets/javascripts/registry/components/app.vue
index f1ca77a2694..2d8ca443ea7 100644
--- a/app/assets/javascripts/registry/components/app.vue
+++ b/app/assets/javascripts/registry/components/app.vue
@@ -37,7 +37,7 @@
},
mounted() {
this.fetchRepos()
- .catch(() => Flash(errorMessagesTypes.FETCH_REPOS));
+ .catch(() => Flash(errorMessages[errorMessagesTypes.FETCH_REPOS]));
},
};
</script>
diff --git a/app/assets/javascripts/registry/components/collapsible_container.vue b/app/assets/javascripts/registry/components/collapsible_container.vue
index 7c341b0e91b..170070ff92c 100644
--- a/app/assets/javascripts/registry/components/collapsible_container.vue
+++ b/app/assets/javascripts/registry/components/collapsible_container.vue
@@ -1,6 +1,7 @@
<script>
+ /* globals Flash */
import { mapActions } from 'vuex';
- import { n__, s__ } from '../../locale';
+ import '../../flash';
import clipboardButton from '../../vue_shared/components/clipboard_button.vue';
import loadingIcon from '../../vue_shared/components/loading_icon.vue';
import tooltip from '../../vue_shared/directives/tooltip';
@@ -37,6 +38,7 @@
toggleRepo() {
this.isOpen = !this.isOpen;
+
if (this.isOpen) {
this.fetchList({ repo: this.repo })
.catch(() => this.showError(errorMessagesTypes.FETCH_REGISTRY));
diff --git a/app/assets/javascripts/registry/components/table_registry.vue b/app/assets/javascripts/registry/components/table_registry.vue
index 491a90363db..ba2dd856e0c 100644
--- a/app/assets/javascripts/registry/components/table_registry.vue
+++ b/app/assets/javascripts/registry/components/table_registry.vue
@@ -1,6 +1,8 @@
<script>
+ /* globals Flash */
import { mapActions } from 'vuex';
- import { n__, s__ } from '../../locale';
+ import { n__ } from '../../locale';
+ import '../../flash';
import clipboardButton from '../../vue_shared/components/clipboard_button.vue';
import tablePagination from '../../vue_shared/components/table_pagination.vue';
import tooltip from '../../vue_shared/directives/tooltip';
@@ -39,14 +41,15 @@
const pluralize = n__('layer', 'layers', item.layers);
return `${item.layers} ${pluralize}`;
},
- handleDeleteRegistry(registry) {
+
+ handleDeleteRegistry(registry) {
this.deleteRegistry(registry)
.then(() => this.fetchList({ repo: this.repo }))
.catch(() => this.showError(errorMessagesTypes.DELETE_REGISTRY));
},
onPageChange(pageNumber) {
- this.fetchList({ repo: this.repo, page })
+ this.fetchList({ repo: this.repo, page: pageNumber })
.catch(() => this.showError(errorMessagesTypes.FETCH_REGISTRY));
},