diff --git a/ui/src/components/view/DedicateData.vue b/ui/src/components/view/DedicateData.vue index 2d6e3a7e3c5..28ff13e3fd6 100644 --- a/ui/src/components/view/DedicateData.vue +++ b/ui/src/components/view/DedicateData.vue @@ -116,7 +116,7 @@ export default { zoneid: this.resource.id }).then(response => { if (response.listdedicatedzonesresponse.dedicatedzone && - response.listdedicatedzonesresponse.dedicatedzone.length > 0) { + response.listdedicatedzonesresponse.dedicatedzone.length > 0) { this.dedicatedDomainId = response.listdedicatedzonesresponse.dedicatedzone[0].domainid this.dedicatedAccountId = response.listdedicatedzonesresponse.dedicatedzone[0].accountid } @@ -132,7 +132,7 @@ export default { podid: this.resource.id }).then(response => { if (response.listdedicatedpodsresponse.dedicatedpod && - response.listdedicatedpodsresponse.dedicatedpod.length > 0) { + response.listdedicatedpodsresponse.dedicatedpod.length > 0) { this.dedicatedDomainId = response.listdedicatedpodsresponse.dedicatedpod[0].domainid this.dedicatedAccountId = response.listdedicatedpodsresponse.dedicatedpod[0].accountid } @@ -148,7 +148,7 @@ export default { clusterid: this.resource.id }).then(response => { if (response.listdedicatedclustersresponse.dedicatedcluster && - response.listdedicatedclustersresponse.dedicatedcluster.length > 0) { + response.listdedicatedclustersresponse.dedicatedcluster.length > 0) { this.dedicatedDomainId = response.listdedicatedclustersresponse.dedicatedcluster[0].domainid this.dedicatedAccountId = response.listdedicatedclustersresponse.dedicatedcluster[0].accountid } @@ -164,7 +164,7 @@ export default { hostid: this.resource.id }).then(response => { if (response.listdedicatedhostsresponse.dedicatedhost && - response.listdedicatedhostsresponse.dedicatedhost.length > 0) { + response.listdedicatedhostsresponse.dedicatedhost.length > 0) { this.dedicatedDomainId = response.listdedicatedhostsresponse.dedicatedhost[0].domainid this.dedicatedAccountId = response.listdedicatedhostsresponse.dedicatedhost[0].accountid } diff --git a/ui/src/components/view/DetailsTab.vue b/ui/src/components/view/DetailsTab.vue index abca482ef98..641b671d454 100644 --- a/ui/src/components/view/DetailsTab.vue +++ b/ui/src/components/view/DetailsTab.vue @@ -55,15 +55,19 @@ export default { }, data () { return { + dedicatedRoutes: ['zone', 'pod', 'cluster', 'host'], dedicatedSectionActive: false } }, + mounted () { + this.dedicatedSectionActive = this.dedicatedRoutes.includes(this.$route.meta.name) + }, created () { - this.dedicatedSectionActive = ['zone', 'pod', 'cluster', 'host'].includes(this.$route.meta.name) + this.dedicatedSectionActive = this.dedicatedRoutes.includes(this.$route.meta.name) }, watch: { $route () { - this.dedicatedSectionActive = ['zone', 'pod', 'cluster', 'host'].includes(this.$route.meta.name) + this.dedicatedSectionActive = this.dedicatedRoutes.includes(this.$route.meta.name) } } } diff --git a/ui/src/config/section/infra/clusters.js b/ui/src/config/section/infra/clusters.js index 2c3216a4bbc..6ea959c7b2b 100644 --- a/ui/src/config/section/infra/clusters.js +++ b/ui/src/config/section/infra/clusters.js @@ -40,7 +40,8 @@ export default { icon: 'plus', label: 'label.add.cluster', listView: true, - args: ['zoneid', 'hypervisor', 'podid', 'clustername'] + popup: true, + component: () => import('@/views/infra/ClusterAdd.vue') }, { api: 'updateCluster', diff --git a/ui/src/locales/en.json b/ui/src/locales/en.json index 82988b6e474..8e8352d7a65 100644 --- a/ui/src/locales/en.json +++ b/ui/src/locales/en.json @@ -57,7 +57,6 @@ "Virtual Routers": "Virtual Routers", "Volumes": "Volumes", "Zones": "Zones", -"add": "Add", "accesskey": "Access Key", "account": "Account", "accountId": "Account", @@ -120,6 +119,7 @@ "clusterId": "Cluster", "clusterid": "Cluster", "clustername": "Cluster", +"clusternamelabel": "Cluster Name", "clusters": "Clusters", "clustertype": "Cluster Type", "connectiontimeout": "Connection Timeout", @@ -1066,6 +1066,8 @@ "newInstance": "New instance", "defaultNetwork": "Default network", "cpu": "CPU", +"ram": "RAM", +"ok": "OK", "minMaxIops": "Min IOPS / Max IOPS", "isSelf": "Self", "isShared": "Shared", diff --git a/ui/src/views/infra/ClusterAdd.vue b/ui/src/views/infra/ClusterAdd.vue new file mode 100644 index 00000000000..c2cc465cdb2 --- /dev/null +++ b/ui/src/views/infra/ClusterAdd.vue @@ -0,0 +1,365 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + + + + + + diff --git a/ui/src/views/infra/PodAdd.vue b/ui/src/views/infra/PodAdd.vue index 0f78f0b3b25..1e82f6436a7 100644 --- a/ui/src/views/infra/PodAdd.vue +++ b/ui/src/views/infra/PodAdd.vue @@ -101,7 +101,7 @@
{{ $t('cancel') }} - {{ $t('OK') }} + {{ $t('ok') }}
@@ -170,9 +170,9 @@ export default { }) }, toggleDedicate () { - this.showDedicated = !this.showDedicated this.dedicatedDomainId = null this.dedicatedAccount = null + this.showDedicated = !this.showDedicated }, handleSubmit (e) { e.preventDefault() @@ -189,7 +189,7 @@ export default { endip: values.endip }).then(response => { const pod = response.createpodresponse.pod || {} - if (pod && pod.id && this.showDedicated) { + if (pod.id && this.showDedicated) { this.dedicatePod(pod.id) } this.loading = false