diff --git a/layout-webapp/src/main/webapp/vue-app/site-management/components/SiteManagement.vue b/layout-webapp/src/main/webapp/vue-app/site-management/components/SiteManagement.vue index 1b7eb2cd..52780fea 100644 --- a/layout-webapp/src/main/webapp/vue-app/site-management/components/SiteManagement.vue +++ b/layout-webapp/src/main/webapp/vue-app/site-management/components/SiteManagement.vue @@ -44,6 +44,7 @@ export default { data() { return { sites: [], + loading: 0, siteToDelete: null, deleteConfirmMessage: '', }; @@ -55,12 +56,10 @@ export default { }, methods: { getSites() { - this.loading = true; - return this.$siteService.getSites(null, 'USER', null, true, true, false, false, false, null, true) - .then(sites => { - this.sites = sites || []; - }) - .finally(() => this.loading = false); + this.loading++; + return this.$siteService.getSites('PORTAL', null, 'public', true, true, false, false, false, null, true) + .then(sites => this.sites = sites?.filter(s => !s?.properties?.IS_SPACE_PUBLIC_SITE) || []) + .finally(() => this.loading--); }, confirmDelete(siteToDelete) { this.siteToDelete = siteToDelete; @@ -68,10 +67,11 @@ export default { this.$refs.deleteSiteConfirmDialog.open(); }, deleteSite() { + this.loading++; return this.$siteLayoutService.deleteSite(this.siteToDelete.siteType, this.siteToDelete.name) - .then(() => { - this.$root.$emit('refresh-sites'); - });} + .then(() => this.$root.$emit('refresh-sites')) + .finally(() => this.loading--); + }, } }; diff --git a/layout-webapp/src/main/webapp/vue-app/site-management/components/SitesList.vue b/layout-webapp/src/main/webapp/vue-app/site-management/components/SitesList.vue index f3415190..7f9fbf1e 100644 --- a/layout-webapp/src/main/webapp/vue-app/site-management/components/SitesList.vue +++ b/layout-webapp/src/main/webapp/vue-app/site-management/components/SitesList.vue @@ -33,7 +33,6 @@ -