diff --git a/ui/src/components/header/ProjectMenu.vue b/ui/src/components/header/ProjectMenu.vue index 01ff1385ed7..dd5e614b4d9 100644 --- a/ui/src/components/header/ProjectMenu.vue +++ b/ui/src/components/header/ProjectMenu.vue @@ -58,7 +58,7 @@ export default { loading: false } }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/components/header/SamlDomainSwitcher.vue b/ui/src/components/header/SamlDomainSwitcher.vue index edce64a873b..c1931943835 100644 --- a/ui/src/components/header/SamlDomainSwitcher.vue +++ b/ui/src/components/header/SamlDomainSwitcher.vue @@ -57,7 +57,7 @@ export default { loading: false } }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/components/view/DedicateDomain.vue b/ui/src/components/view/DedicateDomain.vue index 555a55e14b8..8214922f823 100644 --- a/ui/src/components/view/DedicateDomain.vue +++ b/ui/src/components/view/DedicateDomain.vue @@ -64,7 +64,7 @@ export default { this.domainError = this.error } }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/components/view/DetailSettings.vue b/ui/src/components/view/DetailSettings.vue index 2817e1c2b5b..a657dd06890 100644 --- a/ui/src/components/view/DetailSettings.vue +++ b/ui/src/components/view/DetailSettings.vue @@ -150,7 +150,7 @@ export default { this.updateResource(newItem) } }, - mounted () { + created () { this.updateResource(this.resource) }, methods: { diff --git a/ui/src/components/view/ListResourceTable.vue b/ui/src/components/view/ListResourceTable.vue index dea774c63e5..31ba9cf72dc 100644 --- a/ui/src/components/view/ListResourceTable.vue +++ b/ui/src/components/view/ListResourceTable.vue @@ -143,7 +143,7 @@ export default { } } }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/components/view/ResourceLimitTab.vue b/ui/src/components/view/ResourceLimitTab.vue index 7a020f38af5..e12eb214b5c 100644 --- a/ui/src/components/view/ResourceLimitTab.vue +++ b/ui/src/components/view/ResourceLimitTab.vue @@ -73,7 +73,7 @@ export default { beforeCreate () { this.form = this.$form.createForm(this) }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/components/view/SettingsTab.vue b/ui/src/components/view/SettingsTab.vue index 5ee01997445..ec49d88b34a 100644 --- a/ui/src/components/view/SettingsTab.vue +++ b/ui/src/components/view/SettingsTab.vue @@ -120,7 +120,7 @@ export default { this.scopeKey = '' } }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue index 9a7cdc38155..7e14f9e609f 100644 --- a/ui/src/views/AutogenView.vue +++ b/ui/src/views/AutogenView.vue @@ -424,8 +424,7 @@ export default { eventBus.$on('exec-action', (action, isGroupAction) => { this.execAction(action, isGroupAction) }) - }, - mounted () { + if (this.device === 'desktop') { this.pageSize = 20 } diff --git a/ui/src/views/auth/Login.vue b/ui/src/views/auth/Login.vue index a3fdf3bb96a..42c713721c7 100644 --- a/ui/src/views/auth/Login.vue +++ b/ui/src/views/auth/Login.vue @@ -134,8 +134,6 @@ export default { } }, created () { - }, - mounted () { this.fetchData() }, methods: { diff --git a/ui/src/views/compute/AssignInstance.vue b/ui/src/views/compute/AssignInstance.vue index e77cfc4d0a1..e534bcb3abc 100644 --- a/ui/src/views/compute/AssignInstance.vue +++ b/ui/src/views/compute/AssignInstance.vue @@ -119,7 +119,7 @@ export default { loading: false } }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/compute/AttachIso.vue b/ui/src/views/compute/AttachIso.vue index 3c62c4cea21..efb591f341a 100644 --- a/ui/src/views/compute/AttachIso.vue +++ b/ui/src/views/compute/AttachIso.vue @@ -64,7 +64,7 @@ export default { beforeCreate () { this.form = this.$form.createForm(this) }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/compute/BackupScheduleWizard.vue b/ui/src/views/compute/BackupScheduleWizard.vue index eac8995c74d..76095b902f7 100644 --- a/ui/src/views/compute/BackupScheduleWizard.vue +++ b/ui/src/views/compute/BackupScheduleWizard.vue @@ -63,7 +63,7 @@ export default { closeSchedule: this.closeAction } }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/compute/ChangeAffinity.vue b/ui/src/views/compute/ChangeAffinity.vue index d6bdc1b9cd1..bcb75ae051c 100644 --- a/ui/src/views/compute/ChangeAffinity.vue +++ b/ui/src/views/compute/ChangeAffinity.vue @@ -99,7 +99,7 @@ export default { loading: false } }, - mounted () { + created () { for (const group of this.resource.affinitygroup) { this.selectedRowKeys.push(group.id) } diff --git a/ui/src/views/compute/CreateKubernetesCluster.vue b/ui/src/views/compute/CreateKubernetesCluster.vue index 660505f22b8..b824e8bf633 100644 --- a/ui/src/views/compute/CreateKubernetesCluster.vue +++ b/ui/src/views/compute/CreateKubernetesCluster.vue @@ -361,8 +361,6 @@ export default { name: '' } ] - }, - mounted () { this.fetchData() }, methods: { diff --git a/ui/src/views/compute/CreateSSHKeyPair.vue b/ui/src/views/compute/CreateSSHKeyPair.vue index 62a2bdf475c..cefac878f31 100644 --- a/ui/src/views/compute/CreateSSHKeyPair.vue +++ b/ui/src/views/compute/CreateSSHKeyPair.vue @@ -113,8 +113,6 @@ export default { name: '' } ] - }, - mounted () { this.fetchData() }, methods: { diff --git a/ui/src/views/compute/CreateSnapshotWizard.vue b/ui/src/views/compute/CreateSnapshotWizard.vue index b4121bc80ed..4fc39162479 100644 --- a/ui/src/views/compute/CreateSnapshotWizard.vue +++ b/ui/src/views/compute/CreateSnapshotWizard.vue @@ -109,7 +109,7 @@ export default { this.apiParams[param.name] = param }) }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue index ae8593a9ca3..8c0b81c5967 100644 --- a/ui/src/views/compute/DeployVM.vue +++ b/ui/src/views/compute/DeployVM.vue @@ -1109,8 +1109,7 @@ export default { this.form.getFieldDecorator('cpunumber', { initialValue: undefined, preserve: true }) this.form.getFieldDecorator('cpuSpeed', { initialValue: undefined, preserve: true }) this.form.getFieldDecorator('memory', { initialValue: undefined, preserve: true }) - }, - mounted () { + this.dataPreFill = this.preFillContent && Object.keys(this.preFillContent).length > 0 ? this.preFillContent : {} this.fetchData() }, diff --git a/ui/src/views/compute/DestroyVM.vue b/ui/src/views/compute/DestroyVM.vue index f0dedee059d..4c09b1282f7 100644 --- a/ui/src/views/compute/DestroyVM.vue +++ b/ui/src/views/compute/DestroyVM.vue @@ -88,7 +88,7 @@ export default { this.apiParams[param.name] = param }) }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/compute/KubernetesServiceTab.vue b/ui/src/views/compute/KubernetesServiceTab.vue index 91c8973d4ff..6e838cf5635 100644 --- a/ui/src/views/compute/KubernetesServiceTab.vue +++ b/ui/src/views/compute/KubernetesServiceTab.vue @@ -203,6 +203,7 @@ export default { if (!this.isAdmin()) { this.vmColumns = this.vmColumns.filter(x => x.dataIndex !== 'instancename') } + this.handleFetchData() }, watch: { resource (newData, oldData) { @@ -220,7 +221,6 @@ export default { } }, mounted () { - this.handleFetchData() this.setCurrentTab() }, methods: { diff --git a/ui/src/views/compute/MigrateWizard.vue b/ui/src/views/compute/MigrateWizard.vue index f0afac93c3b..93f337fc594 100644 --- a/ui/src/views/compute/MigrateWizard.vue +++ b/ui/src/views/compute/MigrateWizard.vue @@ -132,7 +132,7 @@ export default { ] } }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/compute/ScaleKubernetesCluster.vue b/ui/src/views/compute/ScaleKubernetesCluster.vue index e5983d51532..11dd4bf7f95 100644 --- a/ui/src/views/compute/ScaleKubernetesCluster.vue +++ b/ui/src/views/compute/ScaleKubernetesCluster.vue @@ -110,8 +110,6 @@ export default { }, created () { this.originalSize = !this.isObjectEmpty(this.resource) ? this.resource.size : 1 - }, - mounted () { this.fetchData() }, methods: { diff --git a/ui/src/views/compute/ScaleVM.vue b/ui/src/views/compute/ScaleVM.vue index 125e753b23a..f2653405151 100644 --- a/ui/src/views/compute/ScaleVM.vue +++ b/ui/src/views/compute/ScaleVM.vue @@ -84,7 +84,7 @@ export default { memoryKey: 'details[0].memory' } }, - mounted () { + created () { this.fetchData({ keyword: '', pageSize: 10, diff --git a/ui/src/views/compute/StartVirtualMachine.vue b/ui/src/views/compute/StartVirtualMachine.vue index 5be132ac808..beb82c74807 100644 --- a/ui/src/views/compute/StartVirtualMachine.vue +++ b/ui/src/views/compute/StartVirtualMachine.vue @@ -149,7 +149,7 @@ export default { this.apiParams[param.name] = param }) }, - mounted () { + created () { if (this.$store.getters.userInfo.roletype === 'Admin') { this.fetchPods() this.fetchClusters() diff --git a/ui/src/views/compute/UpgradeKubernetesCluster.vue b/ui/src/views/compute/UpgradeKubernetesCluster.vue index 9d94e59919a..e681b2f228d 100644 --- a/ui/src/views/compute/UpgradeKubernetesCluster.vue +++ b/ui/src/views/compute/UpgradeKubernetesCluster.vue @@ -90,8 +90,6 @@ export default { }) }, created () { - }, - mounted () { this.fetchData() }, methods: { diff --git a/ui/src/views/dashboard/CapacityDashboard.vue b/ui/src/views/dashboard/CapacityDashboard.vue index 9f382992b97..334e4ee6cc7 100644 --- a/ui/src/views/dashboard/CapacityDashboard.vue +++ b/ui/src/views/dashboard/CapacityDashboard.vue @@ -153,7 +153,7 @@ export default { } } }, - mounted () { + created () { this.fetchData() }, watch: { @@ -163,11 +163,6 @@ export default { } } }, - created () { - setTimeout(() => { - // to do after initial timeout - }, 1000) - }, methods: { getStatus (value) { if (value > 85) { diff --git a/ui/src/views/dashboard/Dashboard.vue b/ui/src/views/dashboard/Dashboard.vue index 946a1cc926f..4cfc4de6fb7 100644 --- a/ui/src/views/dashboard/Dashboard.vue +++ b/ui/src/views/dashboard/Dashboard.vue @@ -55,8 +55,10 @@ export default { showOnboarding: false } }, - mounted () { + created () { this.fetchData() + }, + mounted () { this.showCapacityDashboard = Object.prototype.hasOwnProperty.call(store.getters.apis, 'listCapacity') this.project = false if (store.getters.project && store.getters.project.id) { diff --git a/ui/src/views/dashboard/UsageDashboard.vue b/ui/src/views/dashboard/UsageDashboard.vue index ef4d96416d0..e1b3c828cf9 100644 --- a/ui/src/views/dashboard/UsageDashboard.vue +++ b/ui/src/views/dashboard/UsageDashboard.vue @@ -131,7 +131,7 @@ export default { beforeCreate () { this.form = this.$form.createForm(this) }, - mounted () { + created () { this.project = store.getters.project this.fetchData() this.$store.watch( diff --git a/ui/src/views/iam/AddAccount.vue b/ui/src/views/iam/AddAccount.vue index eab6ef37a02..db7e734a3a0 100644 --- a/ui/src/views/iam/AddAccount.vue +++ b/ui/src/views/iam/AddAccount.vue @@ -257,7 +257,7 @@ export default { }) } }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/iam/AddLdapAccount.vue b/ui/src/views/iam/AddLdapAccount.vue index 4152ebcb489..2190443a3ca 100644 --- a/ui/src/views/iam/AddLdapAccount.vue +++ b/ui/src/views/iam/AddLdapAccount.vue @@ -234,8 +234,6 @@ export default { } ] this.selectedFilter = this.filters[0].id - }, - mounted () { this.fetchData() }, methods: { diff --git a/ui/src/views/iam/AddUser.vue b/ui/src/views/iam/AddUser.vue index edffb4fb424..15eb2c1a3db 100644 --- a/ui/src/views/iam/AddUser.vue +++ b/ui/src/views/iam/AddUser.vue @@ -229,8 +229,6 @@ export default { this.apiConfig.params.forEach(param => { this.apiParams[param.name] = param }) - }, - mounted () { this.fetchData() }, methods: { diff --git a/ui/src/views/iam/ConfigureSamlSsoAuth.vue b/ui/src/views/iam/ConfigureSamlSsoAuth.vue index 79b0f8814d6..5ccd51f0a63 100644 --- a/ui/src/views/iam/ConfigureSamlSsoAuth.vue +++ b/ui/src/views/iam/ConfigureSamlSsoAuth.vue @@ -66,7 +66,7 @@ export default { beforeCreate () { this.form = this.$form.createForm(this) }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/iam/CreateRole.vue b/ui/src/views/iam/CreateRole.vue index fc034cbe696..7531f74b054 100644 --- a/ui/src/views/iam/CreateRole.vue +++ b/ui/src/views/iam/CreateRole.vue @@ -132,7 +132,7 @@ export default { loading: false } }, - mounted () { + created () { this.fetchRoles() }, beforeCreate () { diff --git a/ui/src/views/iam/DomainActionForm.vue b/ui/src/views/iam/DomainActionForm.vue index 54604992fe9..769da6ce6f9 100644 --- a/ui/src/views/iam/DomainActionForm.vue +++ b/ui/src/views/iam/DomainActionForm.vue @@ -165,8 +165,6 @@ export default { break } } - }, - mounted () { if (this.action.dataView && this.action.icon === 'edit') { this.fillEditFormFieldValues() } diff --git a/ui/src/views/iam/DomainView.vue b/ui/src/views/iam/DomainView.vue index 12ba40b61d8..c9f1311eddc 100644 --- a/ui/src/views/iam/DomainView.vue +++ b/ui/src/views/iam/DomainView.vue @@ -125,15 +125,15 @@ export default { beforeCreate () { this.form = this.$form.createForm(this) }, - mounted () { - this.fetchData() - }, beforeRouteUpdate (to, from, next) { next() }, beforeRouteLeave (to, from, next) { next() }, + created () { + this.fetchData() + }, watch: { '$route' (to, from) { if (to.fullPath !== from.fullPath && !to.fullPath.includes('action/')) { diff --git a/ui/src/views/iam/EditUser.vue b/ui/src/views/iam/EditUser.vue index 43c1b90d5f4..e9662b1cb4a 100644 --- a/ui/src/views/iam/EditUser.vue +++ b/ui/src/views/iam/EditUser.vue @@ -137,7 +137,7 @@ export default { this.apiParams[param.name] = param }) }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/iam/RolePermissionTab.vue b/ui/src/views/iam/RolePermissionTab.vue index 3e63daf30de..a10488cd0d9 100644 --- a/ui/src/views/iam/RolePermissionTab.vue +++ b/ui/src/views/iam/RolePermissionTab.vue @@ -144,7 +144,7 @@ export default { apis: [] } }, - mounted () { + created () { this.apis = Object.keys(this.$store.getters.apis).sort((a, b) => a.localeCompare(b)) this.fetchData() }, diff --git a/ui/src/views/iam/SSLCertificateTab.vue b/ui/src/views/iam/SSLCertificateTab.vue index 1524f743e51..a53c152ec6b 100644 --- a/ui/src/views/iam/SSLCertificateTab.vue +++ b/ui/src/views/iam/SSLCertificateTab.vue @@ -140,8 +140,6 @@ export default { } ] this.detailColumn = ['name', 'certificate', 'certchain'] - }, - mounted () { this.fetchData() }, methods: { diff --git a/ui/src/views/image/AddKubernetesSupportedVersion.vue b/ui/src/views/image/AddKubernetesSupportedVersion.vue index 58cf77fcb31..863be6328de 100644 --- a/ui/src/views/image/AddKubernetesSupportedVersion.vue +++ b/ui/src/views/image/AddKubernetesSupportedVersion.vue @@ -190,8 +190,6 @@ export default { name: this.$t('label.all.zone') } ] - }, - mounted () { this.fetchData() }, methods: { diff --git a/ui/src/views/image/IsoZones.vue b/ui/src/views/image/IsoZones.vue index d95a9a73e2c..3899ffbfa24 100644 --- a/ui/src/views/image/IsoZones.vue +++ b/ui/src/views/image/IsoZones.vue @@ -191,8 +191,6 @@ export default { (userInfo.account !== this.resource.account || userInfo.domain !== this.resource.domain)) { this.columns = this.columns.filter(col => { return col.dataIndex !== 'status' }) } - }, - mounted () { this.fetchData() }, watch: { diff --git a/ui/src/views/image/RegisterOrUploadTemplate.vue b/ui/src/views/image/RegisterOrUploadTemplate.vue index cb60116893f..13001230758 100644 --- a/ui/src/views/image/RegisterOrUploadTemplate.vue +++ b/ui/src/views/image/RegisterOrUploadTemplate.vue @@ -411,8 +411,6 @@ export default { this.$set(this.format, 'opts', []) this.$set(this.osTypes, 'loading', false) this.$set(this.osTypes, 'opts', []) - }, - mounted () { this.fetchData() }, computed: { diff --git a/ui/src/views/image/TemplateZones.vue b/ui/src/views/image/TemplateZones.vue index e0abd029a84..c64dd2e4ae9 100644 --- a/ui/src/views/image/TemplateZones.vue +++ b/ui/src/views/image/TemplateZones.vue @@ -204,8 +204,6 @@ export default { (userInfo.account !== this.resource.account || userInfo.domain !== this.resource.domain)) { this.columns = this.columns.filter(col => { return col.dataIndex !== 'status' }) } - }, - mounted () { this.fetchData() }, watch: { diff --git a/ui/src/views/image/UpdateKubernetesSupportedVersion.vue b/ui/src/views/image/UpdateKubernetesSupportedVersion.vue index 77d5a1892c9..93e4d459842 100644 --- a/ui/src/views/image/UpdateKubernetesSupportedVersion.vue +++ b/ui/src/views/image/UpdateKubernetesSupportedVersion.vue @@ -88,8 +88,6 @@ export default { name: this.$t('state.disabled') } ] - }, - mounted () { this.fetchData() }, methods: { diff --git a/ui/src/views/image/UpdateTemplateIsoPermissions.vue b/ui/src/views/image/UpdateTemplateIsoPermissions.vue index 4b98e42b27f..0f93c13d57d 100644 --- a/ui/src/views/image/UpdateTemplateIsoPermissions.vue +++ b/ui/src/views/image/UpdateTemplateIsoPermissions.vue @@ -145,7 +145,7 @@ export default { ) : this.projects } }, - mounted () { + created () { this.isImageTypeIso = this.$route.meta.name === 'iso' this.fetchData() }, diff --git a/ui/src/views/infra/AddPrimaryStorage.vue b/ui/src/views/infra/AddPrimaryStorage.vue index 126159c8581..061f84ce5f9 100644 --- a/ui/src/views/infra/AddPrimaryStorage.vue +++ b/ui/src/views/infra/AddPrimaryStorage.vue @@ -343,7 +343,7 @@ export default { this.apiParams[param.name] = param }) }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/infra/AddSecondaryStorage.vue b/ui/src/views/infra/AddSecondaryStorage.vue index 9a69cc5e41b..1152e0cd6ed 100644 --- a/ui/src/views/infra/AddSecondaryStorage.vue +++ b/ui/src/views/infra/AddSecondaryStorage.vue @@ -181,7 +181,7 @@ export default { beforeCreate () { this.form = this.$form.createForm(this) }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/infra/ClusterAdd.vue b/ui/src/views/infra/ClusterAdd.vue index 02a4f321c9f..249a35ff640 100644 --- a/ui/src/views/infra/ClusterAdd.vue +++ b/ui/src/views/infra/ClusterAdd.vue @@ -150,7 +150,7 @@ export default { } } }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/infra/CpuSockets.vue b/ui/src/views/infra/CpuSockets.vue index e04f8b013f7..798071ea541 100644 --- a/ui/src/views/infra/CpuSockets.vue +++ b/ui/src/views/infra/CpuSockets.vue @@ -73,7 +73,7 @@ export default { columns: [] } }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/infra/HostAdd.vue b/ui/src/views/infra/HostAdd.vue index 1c7131cb83c..9e4e3f6177e 100644 --- a/ui/src/views/infra/HostAdd.vue +++ b/ui/src/views/infra/HostAdd.vue @@ -171,7 +171,7 @@ export default { } } }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/infra/HostInfo.vue b/ui/src/views/infra/HostInfo.vue index a28a808b992..2c9814307d7 100644 --- a/ui/src/views/infra/HostInfo.vue +++ b/ui/src/views/infra/HostInfo.vue @@ -125,7 +125,7 @@ export default { fetchLoading: false } }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/infra/InfraSummary.vue b/ui/src/views/infra/InfraSummary.vue index bf47aa2f2dc..46707a40021 100644 --- a/ui/src/views/infra/InfraSummary.vue +++ b/ui/src/views/infra/InfraSummary.vue @@ -221,7 +221,7 @@ export default { this.apiParams[param.name] = param }) }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/infra/MigrateData.vue b/ui/src/views/infra/MigrateData.vue index 73979d780ee..814369fd43f 100644 --- a/ui/src/views/infra/MigrateData.vue +++ b/ui/src/views/infra/MigrateData.vue @@ -99,7 +99,7 @@ export default { beforeCreate () { this.form = this.$form.createForm(this) }, - mounted () { + created () { this.fetchImageStores() }, methods: { diff --git a/ui/src/views/infra/PodAdd.vue b/ui/src/views/infra/PodAdd.vue index 72f1d37d7af..7850ba65f89 100644 --- a/ui/src/views/infra/PodAdd.vue +++ b/ui/src/views/infra/PodAdd.vue @@ -147,7 +147,7 @@ export default { beforeCreate () { this.form = this.$form.createForm(this) }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/infra/Resources.vue b/ui/src/views/infra/Resources.vue index aba42ef2a0f..0eff0b3c57f 100644 --- a/ui/src/views/infra/Resources.vue +++ b/ui/src/views/infra/Resources.vue @@ -61,7 +61,7 @@ export default { resourcesList: [] } }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/infra/network/DedicatedVLANTab.vue b/ui/src/views/infra/network/DedicatedVLANTab.vue index e52846bbeaf..444e9f6d17f 100644 --- a/ui/src/views/infra/network/DedicatedVLANTab.vue +++ b/ui/src/views/infra/network/DedicatedVLANTab.vue @@ -184,7 +184,7 @@ export default { beforeCreate () { this.form = this.$form.createForm(this) }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/infra/network/EditTrafficLabel.vue b/ui/src/views/infra/network/EditTrafficLabel.vue index 6b614e3a7f0..559e85756f5 100644 --- a/ui/src/views/infra/network/EditTrafficLabel.vue +++ b/ui/src/views/infra/network/EditTrafficLabel.vue @@ -145,7 +145,7 @@ export default { } }, inject: ['parentFetchData'], - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/infra/network/IpRangesTab.vue b/ui/src/views/infra/network/IpRangesTab.vue index 41257f12833..b64ddc4f833 100644 --- a/ui/src/views/infra/network/IpRangesTab.vue +++ b/ui/src/views/infra/network/IpRangesTab.vue @@ -40,7 +40,7 @@ export default { fetchLoading: false } }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/infra/network/IpRangesTabGuest.vue b/ui/src/views/infra/network/IpRangesTabGuest.vue index 49d63f7cbf1..2cf51d3ce41 100644 --- a/ui/src/views/infra/network/IpRangesTabGuest.vue +++ b/ui/src/views/infra/network/IpRangesTabGuest.vue @@ -129,7 +129,7 @@ export default { ] } }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/infra/network/IpRangesTabManagement.vue b/ui/src/views/infra/network/IpRangesTabManagement.vue index 76827ca7baa..7f08e74cb3d 100644 --- a/ui/src/views/infra/network/IpRangesTabManagement.vue +++ b/ui/src/views/infra/network/IpRangesTabManagement.vue @@ -192,7 +192,7 @@ export default { beforeCreate () { this.form = this.$form.createForm(this) }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/infra/network/IpRangesTabPublic.vue b/ui/src/views/infra/network/IpRangesTabPublic.vue index 53251241e87..924f5938bec 100644 --- a/ui/src/views/infra/network/IpRangesTabPublic.vue +++ b/ui/src/views/infra/network/IpRangesTabPublic.vue @@ -271,7 +271,7 @@ export default { beforeCreate () { this.form = this.$form.createForm(this) }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/infra/network/IpRangesTabStorage.vue b/ui/src/views/infra/network/IpRangesTabStorage.vue index d31a526771f..4b766a1d7bd 100644 --- a/ui/src/views/infra/network/IpRangesTabStorage.vue +++ b/ui/src/views/infra/network/IpRangesTabStorage.vue @@ -180,7 +180,7 @@ export default { beforeCreate () { this.form = this.$form.createForm(this) }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/infra/network/ServiceProvidersTab.vue b/ui/src/views/infra/network/ServiceProvidersTab.vue index 272eadd7443..6a1740e68d7 100644 --- a/ui/src/views/infra/network/ServiceProvidersTab.vue +++ b/ui/src/views/infra/network/ServiceProvidersTab.vue @@ -35,7 +35,8 @@ :itemNsp="item" :nsp="nsps[item.title]" :resourceId="resource.id" - :zoneId="resource.zoneid"/> + :zoneId="resource.zoneid" + :tabKey="tabKey"/> @@ -1107,7 +1108,7 @@ export default { beforeCreate () { this.form = this.$form.createForm(this) }, - mounted () { + created () { this.fetchData() }, watch: { @@ -1128,6 +1129,9 @@ export default { }, methods: { fetchData () { + if (!this.resource || !('id' in this.resource)) { + return + } this.fetchServiceProvider() }, fetchServiceProvider (name) { diff --git a/ui/src/views/infra/network/TrafficTypesTab.vue b/ui/src/views/infra/network/TrafficTypesTab.vue index 3b14f9cf2ee..24858abe068 100644 --- a/ui/src/views/infra/network/TrafficTypesTab.vue +++ b/ui/src/views/infra/network/TrafficTypesTab.vue @@ -89,7 +89,7 @@ export default { fetchLoading: false } }, - mounted () { + created () { if (this.resource.id) { this.fetchData() } diff --git a/ui/src/views/infra/network/providers/ProviderItem.vue b/ui/src/views/infra/network/providers/ProviderItem.vue index 458fa892544..73931bd071c 100644 --- a/ui/src/views/infra/network/providers/ProviderItem.vue +++ b/ui/src/views/infra/network/providers/ProviderItem.vue @@ -103,45 +103,38 @@ export default { }, inject: ['provideSetNsp', 'provideExecuteAction'], watch: { - loading (newValue, oldValue) { - if (newValue !== oldValue && !newValue) { - this.fetchData() - } - }, - nsp (newData, oldData) { - if (newData && Object.keys(newData).length > 0) { - this.nsp = newData - this.resource = this.nsp - this.$set(this.resource, 'zoneid', this.zoneId) - this.provideSetNsp(this.resource) - this.fetchData() - } - } - }, - mounted () { - if (!this.nsp || Object.keys(this.nsp).length === 0) { - this.resource = { - name: this.itemNsp.title, - state: 'Disabled', - physicalnetworkid: this.resourceId, - zoneid: this.zoneId - } - } else { - this.resource = this.nsp - this.$set(this.resource, 'zoneid', this.zoneId) - } - if (this.itemNsp && Object.keys(this.itemNsp).length > 0) { - this.provider = this.itemNsp - this.provideSetNsp(this.resource) + nsp () { this.fetchData() } }, + created () { + if (!this.resourceId || !this.zoneId) { + return + } + this.fetchData() + }, methods: { async fetchData () { - if (!this.provider.lists || this.provider.lists.length === 0) { - return + if (!this.nsp || Object.keys(this.nsp).length === 0) { + this.resource = { + name: this.itemNsp.title, + state: 'Disabled', + physicalnetworkid: this.resourceId, + zoneid: this.zoneId + } + } else { + this.resource = this.nsp + this.$set(this.resource, 'zoneid', this.zoneId) + } + if (this.itemNsp && Object.keys(this.itemNsp).length > 0) { + this.provider = this.itemNsp + this.provideSetNsp(this.resource) + + if (!this.provider.lists || this.provider.lists.length === 0) { + return + } + this.provider.lists.map(this.fetchOptions) } - this.provider.lists.map(this.fetchOptions) }, async fetchOptions (args) { if (!args || Object.keys(args).length === 0) { diff --git a/ui/src/views/infra/routers/RouterHealthCheck.vue b/ui/src/views/infra/routers/RouterHealthCheck.vue index 8b79fd11efd..86ff8e4d1af 100644 --- a/ui/src/views/infra/routers/RouterHealthCheck.vue +++ b/ui/src/views/infra/routers/RouterHealthCheck.vue @@ -131,7 +131,7 @@ export default { this.updateResource(newItem) } }, - mounted () { + created () { this.updateResource(this.resource) }, methods: { diff --git a/ui/src/views/infra/zone/PhysicalNetworksTab.vue b/ui/src/views/infra/zone/PhysicalNetworksTab.vue index 66e8e5c123f..8312b6954cf 100644 --- a/ui/src/views/infra/zone/PhysicalNetworksTab.vue +++ b/ui/src/views/infra/zone/PhysicalNetworksTab.vue @@ -85,7 +85,7 @@ export default { fetchLoading: false } }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/infra/zone/SystemVmsTab.vue b/ui/src/views/infra/zone/SystemVmsTab.vue index c453042ec78..c6b48b1e5f4 100644 --- a/ui/src/views/infra/zone/SystemVmsTab.vue +++ b/ui/src/views/infra/zone/SystemVmsTab.vue @@ -93,7 +93,7 @@ export default { fetchLoading: false } }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/infra/zone/ZoneWizardAddResources.vue b/ui/src/views/infra/zone/ZoneWizardAddResources.vue index e2b566646e1..9be315bcc60 100644 --- a/ui/src/views/infra/zone/ZoneWizardAddResources.vue +++ b/ui/src/views/infra/zone/ZoneWizardAddResources.vue @@ -699,7 +699,7 @@ export default { options: ['primaryStorageScope', 'primaryStorageProtocol', 'provider'] } }, - mounted () { + created () { this.currentStep = this.prefillContent.resourceStep ? this.prefillContent.resourceStep : 0 if (this.stepChild && this.stepChild !== '') { this.currentStep = this.steps.findIndex(item => item.fromKey === this.stepChild) diff --git a/ui/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue b/ui/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue index d1c317229e3..4addd94fca6 100644 --- a/ui/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue +++ b/ui/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue @@ -369,7 +369,7 @@ export default { ] } }, - mounted () { + created () { this.physicalNetworks = this.prefillContent.physicalNetworks this.steps = this.filteredSteps() this.currentStep = this.prefillContent.networkStep ? this.prefillContent.networkStep : 0 diff --git a/ui/src/views/infra/zone/ZoneWizardZoneDetailsStep.vue b/ui/src/views/infra/zone/ZoneWizardZoneDetailsStep.vue index 7ef6719fea0..59a8586ab6a 100644 --- a/ui/src/views/infra/zone/ZoneWizardZoneDetailsStep.vue +++ b/ui/src/views/infra/zone/ZoneWizardZoneDetailsStep.vue @@ -394,6 +394,8 @@ export default { this.$emit('fieldsChanged', changedFields) } }) + + this.fetchData() }, mounted () { this.form.setFieldsValue({ @@ -414,41 +416,6 @@ export default { localstorageenabled: this.localstorageenabled, localstorageenabledforsystemvm: this.localstorageenabledforsystemvm }) - - const cForm = this.form - api('listHypervisors', { listAll: true }).then(json => { - this.hypervisors = json.listhypervisorsresponse.hypervisor - if ('listSimulatorHAStateTransitions' in this.$store.getters.apis) { - this.hypervisors.push({ name: 'Simulator' }) - } - cForm.setFieldsValue({ - hypervisor: this.currentHypervisor - }) - }) - - if (!this.isAdvancedZone || this.securityGroupsEnabled) { - api('listNetworkOfferings', { state: 'Enabled', guestiptype: 'Shared' }).then(json => { - this.networkOfferings = {} - json.listnetworkofferingsresponse.networkoffering.forEach(offering => { - this.setupNetworkOfferingAdditionalFlags(offering) - this.networkOfferings[offering.id] = offering - }) - this.availableNetworkOfferings = this.getAvailableNetworkOfferings(this.currentHypervisor) - cForm.setFieldsValue({ - networkOfferingId: this.currentNetworkOfferingId - }) - }) - } - - api('listDomains', { listAll: true }).then(json => { - this.domains = {} - json.listdomainsresponse.domain.forEach(dom => { - this.domains[dom.id] = dom - }) - cForm.setFieldsValue({ - domain: this.domain - }) - }) }, computed: { isAdvancedZone () { @@ -532,6 +499,42 @@ export default { } }, methods: { + fetchData () { + const cForm = this.form + api('listHypervisors', { listAll: true }).then(json => { + this.hypervisors = json.listhypervisorsresponse.hypervisor + if ('listSimulatorHAStateTransitions' in this.$store.getters.apis) { + this.hypervisors.push({ name: 'Simulator' }) + } + cForm.setFieldsValue({ + hypervisor: this.currentHypervisor + }) + }) + + if (!this.isAdvancedZone || this.securityGroupsEnabled) { + api('listNetworkOfferings', { state: 'Enabled', guestiptype: 'Shared' }).then(json => { + this.networkOfferings = {} + json.listnetworkofferingsresponse.networkoffering.forEach(offering => { + this.setupNetworkOfferingAdditionalFlags(offering) + this.networkOfferings[offering.id] = offering + }) + this.availableNetworkOfferings = this.getAvailableNetworkOfferings(this.currentHypervisor) + cForm.setFieldsValue({ + networkOfferingId: this.currentNetworkOfferingId + }) + }) + } + + api('listDomains', { listAll: true }).then(json => { + this.domains = {} + json.listdomainsresponse.domain.forEach(dom => { + this.domains[dom.id] = dom + }) + cForm.setFieldsValue({ + domain: this.domain + }) + }) + }, handleSubmit (e) { e.preventDefault() this.form.validateFields((err, values) => { diff --git a/ui/src/views/network/AclListRulesTab.vue b/ui/src/views/network/AclListRulesTab.vue index 167343e1523..03d4f568633 100644 --- a/ui/src/views/network/AclListRulesTab.vue +++ b/ui/src/views/network/AclListRulesTab.vue @@ -229,7 +229,7 @@ export default { ruleFormMode: 'edit' } }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/network/CreateIsolatedNetworkForm.vue b/ui/src/views/network/CreateIsolatedNetworkForm.vue index 6610203e4b8..fb2c9f45cf9 100644 --- a/ui/src/views/network/CreateIsolatedNetworkForm.vue +++ b/ui/src/views/network/CreateIsolatedNetworkForm.vue @@ -303,8 +303,6 @@ export default { name: ' ' } ] - }, - mounted () { this.fetchData() }, methods: { diff --git a/ui/src/views/network/CreateL2NetworkForm.vue b/ui/src/views/network/CreateL2NetworkForm.vue index 60ab96c8431..f55b4acd1ec 100644 --- a/ui/src/views/network/CreateL2NetworkForm.vue +++ b/ui/src/views/network/CreateL2NetworkForm.vue @@ -275,8 +275,6 @@ export default { name: ' ' } ] - }, - mounted () { this.fetchData() }, methods: { diff --git a/ui/src/views/network/CreateSharedNetworkForm.vue b/ui/src/views/network/CreateSharedNetworkForm.vue index 64301410574..c37f9c65342 100644 --- a/ui/src/views/network/CreateSharedNetworkForm.vue +++ b/ui/src/views/network/CreateSharedNetworkForm.vue @@ -475,8 +475,6 @@ export default { }) }, created () { - }, - mounted () { this.fetchData() }, methods: { diff --git a/ui/src/views/network/CreateVpc.vue b/ui/src/views/network/CreateVpc.vue index 577848443e9..4d3ebffd03a 100644 --- a/ui/src/views/network/CreateVpc.vue +++ b/ui/src/views/network/CreateVpc.vue @@ -147,7 +147,7 @@ export default { this.apiParams[param.name] = param }) }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/network/EgressRulesTab.vue b/ui/src/views/network/EgressRulesTab.vue index d08b9472fdc..9634c489f4e 100644 --- a/ui/src/views/network/EgressRulesTab.vue +++ b/ui/src/views/network/EgressRulesTab.vue @@ -156,7 +156,7 @@ export default { ] } }, - mounted () { + created () { this.fetchData() }, filters: { diff --git a/ui/src/views/network/EnableStaticNat.vue b/ui/src/views/network/EnableStaticNat.vue index fe90ca9169c..598c19c1246 100644 --- a/ui/src/views/network/EnableStaticNat.vue +++ b/ui/src/views/network/EnableStaticNat.vue @@ -155,7 +155,7 @@ export default { pageSize: 10 } }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/network/FirewallRules.vue b/ui/src/views/network/FirewallRules.vue index 781d81f7a63..385be4e0405 100644 --- a/ui/src/views/network/FirewallRules.vue +++ b/ui/src/views/network/FirewallRules.vue @@ -198,7 +198,7 @@ export default { ] } }, - mounted () { + created () { this.fetchData() }, filters: { diff --git a/ui/src/views/network/GuestIpRanges.vue b/ui/src/views/network/GuestIpRanges.vue index a2e364af7a6..87a62e01a78 100644 --- a/ui/src/views/network/GuestIpRanges.vue +++ b/ui/src/views/network/GuestIpRanges.vue @@ -147,7 +147,7 @@ export default { ] } }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/network/IngressEgressRuleConfigure.vue b/ui/src/views/network/IngressEgressRuleConfigure.vue index 34adc2e6192..3965e99f42f 100644 --- a/ui/src/views/network/IngressEgressRuleConfigure.vue +++ b/ui/src/views/network/IngressEgressRuleConfigure.vue @@ -256,7 +256,7 @@ export default { return val.toUpperCase() } }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/network/InternalLBAssignVmForm.vue b/ui/src/views/network/InternalLBAssignVmForm.vue index 47ed716da5a..1969a9c5f3b 100644 --- a/ui/src/views/network/InternalLBAssignVmForm.vue +++ b/ui/src/views/network/InternalLBAssignVmForm.vue @@ -119,7 +119,7 @@ export default { fetchLoading: false } }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/network/InternalLBAssignedVmTab.vue b/ui/src/views/network/InternalLBAssignedVmTab.vue index 9971a40ae99..22e6b58ffbf 100644 --- a/ui/src/views/network/InternalLBAssignedVmTab.vue +++ b/ui/src/views/network/InternalLBAssignedVmTab.vue @@ -97,7 +97,7 @@ export default { ] } }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/network/IpAddressesTab.vue b/ui/src/views/network/IpAddressesTab.vue index 111fbee9563..83df009d72b 100644 --- a/ui/src/views/network/IpAddressesTab.vue +++ b/ui/src/views/network/IpAddressesTab.vue @@ -189,7 +189,7 @@ export default { listPublicIpAddress: [] } }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/network/LoadBalancing.vue b/ui/src/views/network/LoadBalancing.vue index 77ace808d98..6856251c3c9 100644 --- a/ui/src/views/network/LoadBalancing.vue +++ b/ui/src/views/network/LoadBalancing.vue @@ -521,7 +521,7 @@ export default { searchQuery: null } }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/network/PortForwarding.vue b/ui/src/views/network/PortForwarding.vue index 1651efecfa7..d71672e73b7 100644 --- a/ui/src/views/network/PortForwarding.vue +++ b/ui/src/views/network/PortForwarding.vue @@ -367,7 +367,7 @@ export default { searchQuery: null } }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/network/PublicIpResource.vue b/ui/src/views/network/PublicIpResource.vue index 84c62eb4c45..2c97f93bde0 100644 --- a/ui/src/views/network/PublicIpResource.vue +++ b/ui/src/views/network/PublicIpResource.vue @@ -85,7 +85,7 @@ export default { } } }, - mounted () { + created () { if ('id' in this.resource) { this.fetchData() } diff --git a/ui/src/views/network/RoutersTab.vue b/ui/src/views/network/RoutersTab.vue index 876a77af8bb..24dac4ea215 100644 --- a/ui/src/views/network/RoutersTab.vue +++ b/ui/src/views/network/RoutersTab.vue @@ -103,7 +103,7 @@ export default { ] } }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/network/StaticRoutesTab.vue b/ui/src/views/network/StaticRoutesTab.vue index 8256859bff8..3de2c729013 100644 --- a/ui/src/views/network/StaticRoutesTab.vue +++ b/ui/src/views/network/StaticRoutesTab.vue @@ -101,7 +101,7 @@ export default { newRoute: null } }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/network/VpcTab.vue b/ui/src/views/network/VpcTab.vue index 33d67a5ea22..a4ecb49e36b 100644 --- a/ui/src/views/network/VpcTab.vue +++ b/ui/src/views/network/VpcTab.vue @@ -408,7 +408,7 @@ export default { this.setCurrentTab() } }, - mounted () { + created () { this.handleFetchData() this.setCurrentTab() }, diff --git a/ui/src/views/network/VpcTiersTab.vue b/ui/src/views/network/VpcTiersTab.vue index 73b94462c8c..87ceec5d46f 100644 --- a/ui/src/views/network/VpcTiersTab.vue +++ b/ui/src/views/network/VpcTiersTab.vue @@ -373,7 +373,7 @@ export default { } } }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/network/VpnDetails.vue b/ui/src/views/network/VpnDetails.vue index 0159f6ec4bb..a200aa66b5a 100644 --- a/ui/src/views/network/VpnDetails.vue +++ b/ui/src/views/network/VpnDetails.vue @@ -86,7 +86,7 @@ export default { } }, inject: ['parentFetchData', 'parentToggleLoading'], - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/offering/AddComputeOffering.vue b/ui/src/views/offering/AddComputeOffering.vue index fc34e1698f0..3c09c6598f5 100644 --- a/ui/src/views/offering/AddComputeOffering.vue +++ b/ui/src/views/offering/AddComputeOffering.vue @@ -819,8 +819,6 @@ export default { name: this.$t('label.all.zone') } ] - }, - mounted () { if (this.$route.meta.name === 'systemoffering') { this.isSystem = true } diff --git a/ui/src/views/offering/AddDiskOffering.vue b/ui/src/views/offering/AddDiskOffering.vue index 71b44e0e4d9..a392e8ebc0a 100644 --- a/ui/src/views/offering/AddDiskOffering.vue +++ b/ui/src/views/offering/AddDiskOffering.vue @@ -484,8 +484,6 @@ export default { name: this.$t('label.all.zone') } ] - }, - mounted () { this.fetchData() this.isPublic = this.isAdmin() }, diff --git a/ui/src/views/offering/AddNetworkOffering.vue b/ui/src/views/offering/AddNetworkOffering.vue index 82ff7c426f8..4cafaebb9ea 100644 --- a/ui/src/views/offering/AddNetworkOffering.vue +++ b/ui/src/views/offering/AddNetworkOffering.vue @@ -525,8 +525,6 @@ export default { name: this.$t('label.all.zone') } ] - }, - mounted () { this.fetchData() }, methods: { diff --git a/ui/src/views/offering/AddVpcOffering.vue b/ui/src/views/offering/AddVpcOffering.vue index 5362e0227d5..6921ddae025 100644 --- a/ui/src/views/offering/AddVpcOffering.vue +++ b/ui/src/views/offering/AddVpcOffering.vue @@ -205,8 +205,6 @@ export default { name: this.$t('label.all.zone') } ] - }, - mounted () { this.fetchData() }, methods: { diff --git a/ui/src/views/offering/ImportBackupOffering.vue b/ui/src/views/offering/ImportBackupOffering.vue index 6a533474463..370b908798b 100644 --- a/ui/src/views/offering/ImportBackupOffering.vue +++ b/ui/src/views/offering/ImportBackupOffering.vue @@ -129,7 +129,7 @@ export default { this.apiParams[param.name] = param }) }, - mounted () { + created () { this.fetchData() }, inject: ['parentFetchData'], diff --git a/ui/src/views/offering/UpdateOfferingAccess.vue b/ui/src/views/offering/UpdateOfferingAccess.vue index 456bfe271a2..3fb1cdb4cc1 100644 --- a/ui/src/views/offering/UpdateOfferingAccess.vue +++ b/ui/src/views/offering/UpdateOfferingAccess.vue @@ -148,8 +148,6 @@ export default { name: this.$t('label.all.zone') } ] - }, - mounted () { this.fetchData() }, methods: { diff --git a/ui/src/views/plugins/CloudianPlugin.vue b/ui/src/views/plugins/CloudianPlugin.vue index f5a37cea284..29a51264a76 100644 --- a/ui/src/views/plugins/CloudianPlugin.vue +++ b/ui/src/views/plugins/CloudianPlugin.vue @@ -34,7 +34,7 @@ import { api } from '@/api' export default { name: 'CloudianPlugin', - mounted () { + created () { this.doSso() }, data () { diff --git a/ui/src/views/plugins/quota/EmailTemplateDetails.vue b/ui/src/views/plugins/quota/EmailTemplateDetails.vue index 1d05ccd336c..dad536e8d51 100644 --- a/ui/src/views/plugins/quota/EmailTemplateDetails.vue +++ b/ui/src/views/plugins/quota/EmailTemplateDetails.vue @@ -75,7 +75,7 @@ export default { loading: false } }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/plugins/quota/QuotaBalance.vue b/ui/src/views/plugins/quota/QuotaBalance.vue index 10a4621a0aa..e8c5eb366d4 100644 --- a/ui/src/views/plugins/quota/QuotaBalance.vue +++ b/ui/src/views/plugins/quota/QuotaBalance.vue @@ -93,7 +93,7 @@ export default { } } }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/plugins/quota/QuotaSummaryResource.vue b/ui/src/views/plugins/quota/QuotaSummaryResource.vue index 1a41780f007..381f94e0928 100644 --- a/ui/src/views/plugins/quota/QuotaSummaryResource.vue +++ b/ui/src/views/plugins/quota/QuotaSummaryResource.vue @@ -51,7 +51,7 @@ export default { pattern: 'YYYY-MM-DD' } }, - mounted () { + created () { this.fetchData() }, watch: { diff --git a/ui/src/views/plugins/quota/QuotaUsage.vue b/ui/src/views/plugins/quota/QuotaUsage.vue index a42bc8cdfc7..3136a897428 100644 --- a/ui/src/views/plugins/quota/QuotaUsage.vue +++ b/ui/src/views/plugins/quota/QuotaUsage.vue @@ -91,7 +91,7 @@ export default { } } }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/project/AccountsTab.vue b/ui/src/views/project/AccountsTab.vue index 8c986c5f393..ed757354b3a 100644 --- a/ui/src/views/project/AccountsTab.vue +++ b/ui/src/views/project/AccountsTab.vue @@ -156,11 +156,9 @@ export default { this.page = 1 this.pageSize = 10 this.itemCount = 0 - }, - inject: ['parentFetchData'], - mounted () { this.fetchData() }, + inject: ['parentFetchData'], watch: { resource (newItem, oldItem) { if (!newItem || !newItem.id) { diff --git a/ui/src/views/project/AddAccountOrUserToProject.vue b/ui/src/views/project/AddAccountOrUserToProject.vue index 78b57ee2854..f65cdc6ae04 100644 --- a/ui/src/views/project/AddAccountOrUserToProject.vue +++ b/ui/src/views/project/AddAccountOrUserToProject.vue @@ -182,7 +182,7 @@ export default { } } }, - mounted () { + created () { this.fetchData() }, beforeCreate () { diff --git a/ui/src/views/project/InvitationsTemplate.vue b/ui/src/views/project/InvitationsTemplate.vue index 8c8f52fa026..6aa05ecdd96 100644 --- a/ui/src/views/project/InvitationsTemplate.vue +++ b/ui/src/views/project/InvitationsTemplate.vue @@ -174,8 +174,6 @@ export default { scopedSlots: { customRender: 'user' } }) } - }, - mounted () { this.fetchData() }, methods: { diff --git a/ui/src/views/storage/AttachVolume.vue b/ui/src/views/storage/AttachVolume.vue index 4e0bedb4d0b..fd859d3daef 100644 --- a/ui/src/views/storage/AttachVolume.vue +++ b/ui/src/views/storage/AttachVolume.vue @@ -68,7 +68,7 @@ export default { this.apiParams[param.name] = param }) }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/storage/CreateSnapshotFromVMSnapshot.vue b/ui/src/views/storage/CreateSnapshotFromVMSnapshot.vue index bd91cfb405a..2e3080b2af2 100644 --- a/ui/src/views/storage/CreateSnapshotFromVMSnapshot.vue +++ b/ui/src/views/storage/CreateSnapshotFromVMSnapshot.vue @@ -71,7 +71,7 @@ export default { beforeCreate () { this.form = this.$form.createForm(this) }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/storage/CreateVolume.vue b/ui/src/views/storage/CreateVolume.vue index 8ecc3a992f9..a27ca6332b1 100644 --- a/ui/src/views/storage/CreateVolume.vue +++ b/ui/src/views/storage/CreateVolume.vue @@ -120,7 +120,7 @@ export default { this.apiParams[param.name] = param }) }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/storage/FormSchedule.vue b/ui/src/views/storage/FormSchedule.vue index d677273034d..edf6a64320c 100644 --- a/ui/src/views/storage/FormSchedule.vue +++ b/ui/src/views/storage/FormSchedule.vue @@ -238,7 +238,7 @@ export default { beforeCreate () { this.form = this.$form.createForm(this) }, - mounted () { + created () { this.volumeId = this.resource.id this.fetchTimeZone() }, diff --git a/ui/src/views/storage/MigrateVolume.vue b/ui/src/views/storage/MigrateVolume.vue index 5d4e5a966b7..379ec14a4e1 100644 --- a/ui/src/views/storage/MigrateVolume.vue +++ b/ui/src/views/storage/MigrateVolume.vue @@ -87,7 +87,7 @@ export default { selectedDiskOffering: null } }, - mounted () { + created () { this.fetchStoragePools() this.resource.virtualmachineid && this.fetchDiskOfferings() }, diff --git a/ui/src/views/storage/RecurringSnapshotVolume.vue b/ui/src/views/storage/RecurringSnapshotVolume.vue index 113cc351849..7f4bd5de029 100644 --- a/ui/src/views/storage/RecurringSnapshotVolume.vue +++ b/ui/src/views/storage/RecurringSnapshotVolume.vue @@ -61,7 +61,7 @@ export default { dataSource: [] } }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/storage/ResizeVolume.vue b/ui/src/views/storage/ResizeVolume.vue index cadfb299994..0da54348d9e 100644 --- a/ui/src/views/storage/ResizeVolume.vue +++ b/ui/src/views/storage/ResizeVolume.vue @@ -76,7 +76,7 @@ export default { beforeCreate () { this.form = this.$form.createForm(this) }, - mounted () { + created () { this.fetchData() }, methods: { diff --git a/ui/src/views/storage/RestoreAttachBackupVolume.vue b/ui/src/views/storage/RestoreAttachBackupVolume.vue index 8deb433f187..72af60151e0 100644 --- a/ui/src/views/storage/RestoreAttachBackupVolume.vue +++ b/ui/src/views/storage/RestoreAttachBackupVolume.vue @@ -87,7 +87,7 @@ export default { beforeCreate () { this.form = this.$form.createForm(this) }, - mounted () { + created () { this.fetchData() }, inject: ['parentFetchData'], diff --git a/ui/src/views/storage/UploadLocalVolume.vue b/ui/src/views/storage/UploadLocalVolume.vue index 15c27d3bc88..7a37182bbec 100644 --- a/ui/src/views/storage/UploadLocalVolume.vue +++ b/ui/src/views/storage/UploadLocalVolume.vue @@ -148,7 +148,7 @@ export default { this.apiParams[param.name] = param }) }, - mounted () { + created () { this.listZones() }, methods: {