{{ $t('label.haenable') }}
diff --git a/ui/src/views/offering/AddDiskOffering.vue b/ui/src/views/offering/AddDiskOffering.vue
index 5cb1ff8bde9..f4e4d49c3dc 100644
--- a/ui/src/views/offering/AddDiskOffering.vue
+++ b/ui/src/views/offering/AddDiskOffering.vue
@@ -491,7 +491,6 @@ export default {
const formRaw = toRaw(this.form)
const values = this.handleRemoveFields(formRaw)
var params = {
- isMirrored: false,
name: values.name,
displaytext: values.displaytext,
storageType: values.storagetype,
diff --git a/ui/src/views/offering/AddNetworkOffering.vue b/ui/src/views/offering/AddNetworkOffering.vue
index 2ee2f61cf0d..55c3c39ebfc 100644
--- a/ui/src/views/offering/AddNetworkOffering.vue
+++ b/ui/src/views/offering/AddNetworkOffering.vue
@@ -312,11 +312,10 @@
-
+
-
-
+
@@ -331,8 +330,11 @@
}"
:loading="serviceOfferingLoading"
:placeholder="apiParams.serviceofferingid.description">
-
- {{ opt.name || opt.description }}
+
+ {{ offering.displaytext || offering.name }}
@@ -765,7 +767,6 @@ export default {
this.form.lbtype = 'publicLb'
this.isVirtualRouterForAtLeastOneService = false
this.isVpcVirtualRouterForAtLeastOneService = false
- this.serviceOfferings = []
this.serviceOfferingLoading = false
this.sourceNatServiceChecked = false
this.lbServiceChecked = false
@@ -853,9 +854,7 @@ export default {
params.systemvmtype = 'domainrouter'
this.serviceOfferingLoading = true
api('listServiceOfferings', params).then(json => {
- const listServiceOfferings = json.listserviceofferingsresponse.serviceoffering
- this.serviceOfferings = this.serviceOfferings.concat(listServiceOfferings)
- this.form.serviceofferingid = this.serviceOfferings.length > 0 ? this.serviceOfferings[0].id : ''
+ this.serviceOfferings = json?.listserviceofferingsresponse?.serviceoffering || []
}).finally(() => {
this.serviceOfferingLoading = false
})
diff --git a/ui/src/views/storage/CreateTemplate.vue b/ui/src/views/storage/CreateTemplate.vue
index 13ce75777fb..65941d39a9d 100644
--- a/ui/src/views/storage/CreateTemplate.vue
+++ b/ui/src/views/storage/CreateTemplate.vue
@@ -43,7 +43,7 @@
v-model:value="form.displaytext"
:placeholder="apiParams.displaytext.description" />
-
+
@@ -130,41 +130,40 @@
-
-
-
-
-
-
- {{ $t('label.passwordenabled') }}
-
-
-
-
- {{ $t('label.isdynamicallyscalable') }}
-
-
-
-
- {{ $t('label.requireshvm') }}
-
-
-
-
- {{ $t('label.isfeatured') }}
-
-
-
-
- {{ $t('label.ispublic') }}
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -234,7 +233,9 @@ export default {
},
fetchData () {
this.fetchOsTypes()
- this.fetchSnapshotZones()
+ if (this.resource.intervaltype) {
+ this.fetchSnapshotZones()
+ }
if ('listDomains' in this.$store.getters.apis) {
this.fetchDomains()
}
@@ -300,21 +301,24 @@ export default {
this.handleDomainChange(null)
})
},
- handleDomainChange (domain) {
+ async handleDomainChange (domain) {
this.domainid = domain
this.form.account = null
this.account = null
if ('listAccounts' in this.$store.getters.apis) {
- this.fetchAccounts()
+ await this.fetchAccounts()
}
},
fetchAccounts () {
- api('listAccounts', {
- domainid: this.domainid
- }).then(response => {
- this.accounts = response.listaccountsresponse.account || []
- }).catch(error => {
- this.$notifyError(error)
+ return new Promise((resolve, reject) => {
+ api('listAccounts', {
+ domainid: this.domainid
+ }).then(response => {
+ this.accounts = response?.listaccountsresponse?.account || []
+ resolve(this.accounts)
+ }).catch(error => {
+ this.$notifyError(error)
+ })
})
},
handleAccountChange (acc) {
@@ -329,17 +333,22 @@ export default {
this.formRef.value.validate().then(() => {
const formRaw = toRaw(this.form)
const values = this.handleRemoveFields(formRaw)
- values.snapshotid = this.resource.id
- if (values.groupenabled) {
- const input = values.groupenabled
- for (const index in input) {
- const name = input[index]
- values[name] = true
+ const params = {}
+ if (this.resource.intervaltype) {
+ params.snapshotid = this.resource.id
+ } else {
+ params.volumeid = this.resource.id
+ }
+
+ for (const key in values) {
+ const input = values[key]
+ if (input === undefined) {
+ continue
}
- delete values.groupenabled
+ params[key] = input
}
this.loading = true
- api('createTemplate', values).then(response => {
+ api('createTemplate', params).then(response => {
this.$pollJob({
jobId: response.createtemplateresponse.jobid,
title: this.$t('message.success.create.template'),