mirror of https://github.com/apache/cloudstack.git
UI: Fixes removing undesired API parameters on form submit (#6196)
* fixes removing undesired api parameters * remove comment
This commit is contained in:
parent
68fa9a1061
commit
676fe31ca9
|
|
@ -948,6 +948,7 @@
|
||||||
"label.expunge": "Expunge",
|
"label.expunge": "Expunge",
|
||||||
"label.expunged": "Expunged",
|
"label.expunged": "Expunged",
|
||||||
"label.expunging": "Expunging",
|
"label.expunging": "Expunging",
|
||||||
|
"label.export.rules": "Export Rules",
|
||||||
"label.external.link": "External link",
|
"label.external.link": "External link",
|
||||||
"label.externalid": "External Id",
|
"label.externalid": "External Id",
|
||||||
"label.externalloadbalanceripaddress": "External load balancer IP address",
|
"label.externalloadbalanceripaddress": "External load balancer IP address",
|
||||||
|
|
|
||||||
|
|
@ -90,4 +90,20 @@ const AppDeviceEnquire = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export { mixin, AppDeviceEnquire, mixinDevice }
|
const mixinForm = {
|
||||||
|
methods: {
|
||||||
|
handleRemoveFields (form) {
|
||||||
|
const formResult = {}
|
||||||
|
Object.keys(form).forEach(field => {
|
||||||
|
if (field in this.$refs && this.$refs[field] === null || this.$refs[field] === undefined) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
formResult[field] = form[field]
|
||||||
|
})
|
||||||
|
|
||||||
|
return formResult
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export { mixin, AppDeviceEnquire, mixinDevice, mixinForm }
|
||||||
|
|
|
||||||
|
|
@ -226,11 +226,13 @@
|
||||||
<script>
|
<script>
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import ResourceIcon from '@/components/view/ResourceIcon'
|
import ResourceIcon from '@/components/view/ResourceIcon'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CreateKubernetesCluster',
|
name: 'CreateKubernetesCluster',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
TooltipLabel,
|
TooltipLabel,
|
||||||
ResourceIcon
|
ResourceIcon
|
||||||
|
|
@ -446,7 +448,8 @@ export default {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const params = {
|
const params = {
|
||||||
name: values.name,
|
name: values.name,
|
||||||
|
|
|
||||||
|
|
@ -104,9 +104,11 @@
|
||||||
<script>
|
<script>
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CreateSSHKeyPair',
|
name: 'CreateSSHKeyPair',
|
||||||
|
mixins: [mixinForm],
|
||||||
props: {},
|
props: {},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
|
@ -177,7 +179,8 @@ export default {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const params = {
|
const params = {
|
||||||
name: values.name
|
name: values.name
|
||||||
|
|
|
||||||
|
|
@ -78,10 +78,12 @@
|
||||||
<script>
|
<script>
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CreateSnapshotWizard',
|
name: 'CreateSnapshotWizard',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
TooltipLabel
|
TooltipLabel
|
||||||
},
|
},
|
||||||
|
|
@ -129,7 +131,8 @@ export default {
|
||||||
|
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
const params = {}
|
const params = {}
|
||||||
params.volumeid = values.volumeid
|
params.volumeid = values.volumeid
|
||||||
params.name = values.name
|
params.name = values.name
|
||||||
|
|
|
||||||
|
|
@ -93,10 +93,12 @@
|
||||||
<script>
|
<script>
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ScaleKubernetesCluster',
|
name: 'ScaleKubernetesCluster',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
TooltipLabel
|
TooltipLabel
|
||||||
},
|
},
|
||||||
|
|
@ -206,7 +208,8 @@ export default {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const params = {
|
const params = {
|
||||||
id: this.resource.id
|
id: this.resource.id
|
||||||
|
|
|
||||||
|
|
@ -144,10 +144,12 @@
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
import { timeZone } from '@/utils/timezone'
|
import { timeZone } from '@/utils/timezone'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import debounce from 'lodash/debounce'
|
import debounce from 'lodash/debounce'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'FormSchedule',
|
name: 'FormSchedule',
|
||||||
|
mixins: [mixinForm],
|
||||||
props: {
|
props: {
|
||||||
loading: {
|
loading: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
@ -242,7 +244,8 @@ export default {
|
||||||
handleSubmit (e) {
|
handleSubmit (e) {
|
||||||
if (this.actionLoading) return
|
if (this.actionLoading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
const params = {}
|
const params = {}
|
||||||
params.virtualmachineid = this.resource.id
|
params.virtualmachineid = this.resource.id
|
||||||
params.intervaltype = values.intervaltype
|
params.intervaltype = values.intervaltype
|
||||||
|
|
|
||||||
|
|
@ -110,10 +110,12 @@
|
||||||
<script>
|
<script>
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CreateRole',
|
name: 'CreateRole',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
TooltipLabel
|
TooltipLabel
|
||||||
},
|
},
|
||||||
|
|
@ -159,7 +161,8 @@ export default {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
const params = {}
|
const params = {}
|
||||||
for (const key in values) {
|
for (const key in values) {
|
||||||
if (key === 'using') {
|
if (key === 'using') {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
<div style="width: 100%; display: flex; margin-bottom: 10px">
|
<div style="width: 100%; display: flex; margin-bottom: 10px">
|
||||||
<a-button type="dashed" @click="exportRolePermissions" style="width: 100%">
|
<a-button type="dashed" @click="exportRolePermissions" style="width: 100%">
|
||||||
<template #icon><download-outlined /></template>
|
<template #icon><download-outlined /></template>
|
||||||
Export Rules
|
{{ $t('label.export.rules') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="updateTable" class="loading-overlay">
|
<div v-if="updateTable" class="loading-overlay">
|
||||||
|
|
|
||||||
|
|
@ -151,10 +151,12 @@ import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { axios } from '../../utils/request'
|
import { axios } from '../../utils/request'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import ResourceIcon from '@/components/view/ResourceIcon'
|
import ResourceIcon from '@/components/view/ResourceIcon'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RegisterIso',
|
name: 'RegisterIso',
|
||||||
|
mixins: [mixinForm],
|
||||||
props: {
|
props: {
|
||||||
resource: {
|
resource: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
@ -308,7 +310,8 @@ export default {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
const params = {}
|
const params = {}
|
||||||
for (const key in values) {
|
for (const key in values) {
|
||||||
const input = values[key]
|
const input = values[key]
|
||||||
|
|
|
||||||
|
|
@ -316,10 +316,12 @@ import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { axios } from '../../utils/request'
|
import { axios } from '../../utils/request'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import ResourceIcon from '@/components/view/ResourceIcon'
|
import ResourceIcon from '@/components/view/ResourceIcon'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RegisterOrUploadTemplate',
|
name: 'RegisterOrUploadTemplate',
|
||||||
|
mixins: [mixinForm],
|
||||||
props: {
|
props: {
|
||||||
resource: {
|
resource: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
@ -755,6 +757,10 @@ export default {
|
||||||
this.hyperKVMShow = false
|
this.hyperKVMShow = false
|
||||||
this.deployasis = false
|
this.deployasis = false
|
||||||
this.allowDirectDownload = false
|
this.allowDirectDownload = false
|
||||||
|
this.selectedFormat = null
|
||||||
|
this.form.deployasis = false
|
||||||
|
this.form.directdownload = false
|
||||||
|
this.form.xenserverToolsVersion61plus = false
|
||||||
|
|
||||||
this.resetSelect(arrSelectReset)
|
this.resetSelect(arrSelectReset)
|
||||||
this.fetchFormat(hyperVisor)
|
this.fetchFormat(hyperVisor)
|
||||||
|
|
@ -773,7 +779,8 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
delete this.form.zoneids
|
delete this.form.zoneids
|
||||||
}
|
}
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
let params = {}
|
let params = {}
|
||||||
for (const key in values) {
|
for (const key in values) {
|
||||||
const input = values[key]
|
const input = values[key]
|
||||||
|
|
|
||||||
|
|
@ -343,11 +343,13 @@
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import ResourceIcon from '@/components/view/ResourceIcon'
|
import ResourceIcon from '@/components/view/ResourceIcon'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddPrimaryStorage',
|
name: 'AddPrimaryStorage',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
TooltipLabel,
|
TooltipLabel,
|
||||||
ResourceIcon
|
ResourceIcon
|
||||||
|
|
@ -660,7 +662,8 @@ export default {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
var params = {
|
var params = {
|
||||||
scope: values.scope,
|
scope: values.scope,
|
||||||
zoneid: values.zone,
|
zoneid: values.zone,
|
||||||
|
|
|
||||||
|
|
@ -170,10 +170,12 @@
|
||||||
<script>
|
<script>
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import ResourceIcon from '@/components/view/ResourceIcon'
|
import ResourceIcon from '@/components/view/ResourceIcon'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddSecondryStorage',
|
name: 'AddSecondryStorage',
|
||||||
|
mixins: [mixinForm],
|
||||||
props: {
|
props: {
|
||||||
resource: {
|
resource: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
@ -264,7 +266,8 @@ export default {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(async () => {
|
this.formRef.value.validate().then(async () => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
name: values.name
|
name: values.name
|
||||||
|
|
|
||||||
|
|
@ -244,12 +244,14 @@
|
||||||
<script>
|
<script>
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import DedicateDomain from '../../components/view/DedicateDomain'
|
import DedicateDomain from '../../components/view/DedicateDomain'
|
||||||
import ResourceIcon from '@/components/view/ResourceIcon'
|
import ResourceIcon from '@/components/view/ResourceIcon'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'HostAdd',
|
name: 'HostAdd',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
DedicateDomain,
|
DedicateDomain,
|
||||||
ResourceIcon,
|
ResourceIcon,
|
||||||
|
|
@ -416,7 +418,8 @@ export default {
|
||||||
handleSubmitForm () {
|
handleSubmitForm () {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
|
|
||||||
if (values.hostname.indexOf('http://') === -1) {
|
if (values.hostname.indexOf('http://') === -1) {
|
||||||
this.url = `http://${values.hostname}`
|
this.url = `http://${values.hostname}`
|
||||||
|
|
|
||||||
|
|
@ -262,10 +262,12 @@
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
import draggable from 'vuedraggable'
|
import draggable from 'vuedraggable'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import TooltipButton from '@/components/widgets/TooltipButton'
|
import TooltipButton from '@/components/widgets/TooltipButton'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AclListRulesTab',
|
name: 'AclListRulesTab',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
draggable,
|
draggable,
|
||||||
TooltipButton
|
TooltipButton
|
||||||
|
|
@ -499,7 +501,8 @@ export default {
|
||||||
},
|
},
|
||||||
handleEditRule () {
|
handleEditRule () {
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
this.fetchLoading = true
|
this.fetchLoading = true
|
||||||
this.ruleModalVisible = false
|
this.ruleModalVisible = false
|
||||||
|
|
||||||
|
|
@ -588,7 +591,8 @@ export default {
|
||||||
},
|
},
|
||||||
handleAddRule (e) {
|
handleAddRule (e) {
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
this.fetchLoading = true
|
this.fetchLoading = true
|
||||||
this.ruleModalVisible = false
|
this.ruleModalVisible = false
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -214,11 +214,13 @@
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
import { isAdmin, isAdminOrDomainAdmin } from '@/role'
|
import { isAdmin, isAdminOrDomainAdmin } from '@/role'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import ResourceIcon from '@/components/view/ResourceIcon'
|
import ResourceIcon from '@/components/view/ResourceIcon'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CreateIsolatedNetworkForm',
|
name: 'CreateIsolatedNetworkForm',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
TooltipLabel,
|
TooltipLabel,
|
||||||
ResourceIcon
|
ResourceIcon
|
||||||
|
|
@ -427,7 +429,8 @@ export default {
|
||||||
handleSubmit () {
|
handleSubmit () {
|
||||||
if (this.actionLoading) return
|
if (this.actionLoading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
this.actionLoading = true
|
this.actionLoading = true
|
||||||
var params = {
|
var params = {
|
||||||
zoneId: this.selectedZone.id,
|
zoneId: this.selectedZone.id,
|
||||||
|
|
|
||||||
|
|
@ -196,11 +196,13 @@
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
import { isAdmin, isAdminOrDomainAdmin } from '@/role'
|
import { isAdmin, isAdminOrDomainAdmin } from '@/role'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import ResourceIcon from '@/components/view/ResourceIcon'
|
import ResourceIcon from '@/components/view/ResourceIcon'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CreateL2NetworkForm',
|
name: 'CreateL2NetworkForm',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
TooltipLabel,
|
TooltipLabel,
|
||||||
ResourceIcon
|
ResourceIcon
|
||||||
|
|
@ -389,7 +391,8 @@ export default {
|
||||||
handleSubmit (e) {
|
handleSubmit (e) {
|
||||||
if (this.actionLoading) return
|
if (this.actionLoading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
this.actionLoading = true
|
this.actionLoading = true
|
||||||
var params = {
|
var params = {
|
||||||
zoneId: this.selectedZone.id,
|
zoneId: this.selectedZone.id,
|
||||||
|
|
|
||||||
|
|
@ -338,11 +338,13 @@
|
||||||
<script>
|
<script>
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import ResourceIcon from '@/components/view/ResourceIcon'
|
import ResourceIcon from '@/components/view/ResourceIcon'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CreateGuestNetworkForm',
|
name: 'CreateGuestNetworkForm',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
TooltipLabel,
|
TooltipLabel,
|
||||||
ResourceIcon
|
ResourceIcon
|
||||||
|
|
@ -676,7 +678,8 @@ export default {
|
||||||
handleSubmit (e) {
|
handleSubmit (e) {
|
||||||
if (this.actionLoading) return
|
if (this.actionLoading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
if (
|
if (
|
||||||
(!this.isValidTextValueForKey(values, 'ip4gateway') && !this.isValidTextValueForKey(values, 'netmask') &&
|
(!this.isValidTextValueForKey(values, 'ip4gateway') && !this.isValidTextValueForKey(values, 'netmask') &&
|
||||||
!this.isValidTextValueForKey(values, 'startipv4') && !this.isValidTextValueForKey(values, 'endipv4') &&
|
!this.isValidTextValueForKey(values, 'startipv4') && !this.isValidTextValueForKey(values, 'endipv4') &&
|
||||||
|
|
|
||||||
|
|
@ -207,10 +207,12 @@
|
||||||
<script>
|
<script>
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CreateVpnCustomerGateway',
|
name: 'CreateVpnCustomerGateway',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
TooltipLabel
|
TooltipLabel
|
||||||
},
|
},
|
||||||
|
|
@ -292,7 +294,8 @@ export default {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (this.isSubmitted) return
|
if (this.isSubmitted) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
let ikepolicy = values.ikeEncryption + '-' + values.ikeHash + ';'
|
let ikepolicy = values.ikeEncryption + '-' + values.ikeHash + ';'
|
||||||
ikepolicy += (values.ikeDh !== this.ikeDhGroupInitialValue) ? values.ikeDh : (values.ikeDh.split('(')[1]).split(')')[0]
|
ikepolicy += (values.ikeDh !== this.ikeDhGroupInitialValue) ? values.ikeDh : (values.ikeDh.split('(')[1]).split(')')[0]
|
||||||
let esppolicy = values.espEncryption + '-' + values.espHash
|
let esppolicy = values.espEncryption + '-' + values.espHash
|
||||||
|
|
|
||||||
|
|
@ -495,6 +495,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { ref, reactive, toRaw, nextTick } from 'vue'
|
import { ref, reactive, toRaw, nextTick } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import Status from '@/components/widgets/Status'
|
import Status from '@/components/widgets/Status'
|
||||||
import TooltipButton from '@/components/widgets/TooltipButton'
|
import TooltipButton from '@/components/widgets/TooltipButton'
|
||||||
import BulkActionView from '@/components/view/BulkActionView'
|
import BulkActionView from '@/components/view/BulkActionView'
|
||||||
|
|
@ -502,6 +503,7 @@ import eventBus from '@/config/eventBus'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'LoadBalancing',
|
name: 'LoadBalancing',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
Status,
|
Status,
|
||||||
TooltipButton,
|
TooltipButton,
|
||||||
|
|
@ -798,7 +800,8 @@ export default {
|
||||||
|
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
|
|
||||||
api('createTags', {
|
api('createTags', {
|
||||||
'tags[0].key': values.key,
|
'tags[0].key': values.key,
|
||||||
|
|
@ -962,7 +965,8 @@ export default {
|
||||||
this.stickinessModalLoading = true
|
this.stickinessModalLoading = true
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
if (values.methodname === 'none') {
|
if (values.methodname === 'none') {
|
||||||
this.handleDeleteStickinessPolicy()
|
this.handleDeleteStickinessPolicy()
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -127,10 +127,12 @@
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
import { isAdmin } from '@/role'
|
import { isAdmin } from '@/role'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UpdateNetwork',
|
name: 'UpdateNetwork',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
TooltipLabel
|
TooltipLabel
|
||||||
},
|
},
|
||||||
|
|
@ -225,7 +227,8 @@ export default {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
this.loading = true
|
this.loading = true
|
||||||
var manualFields = ['name', 'networkofferingid']
|
var manualFields = ['name', 'networkofferingid']
|
||||||
const params = {
|
const params = {
|
||||||
|
|
|
||||||
|
|
@ -323,11 +323,13 @@
|
||||||
<script>
|
<script>
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import Status from '@/components/widgets/Status'
|
import Status from '@/components/widgets/Status'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'VpcTiersTab',
|
name: 'VpcTiersTab',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
Status,
|
Status,
|
||||||
TooltipLabel
|
TooltipLabel
|
||||||
|
|
@ -635,7 +637,8 @@ export default {
|
||||||
this.modalLoading = true
|
this.modalLoading = true
|
||||||
|
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
|
|
||||||
this.showCreateNetworkModal = false
|
this.showCreateNetworkModal = false
|
||||||
var params = {
|
var params = {
|
||||||
|
|
@ -679,7 +682,8 @@ export default {
|
||||||
this.fetchLoading = true
|
this.fetchLoading = true
|
||||||
this.modalLoading = true
|
this.modalLoading = true
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
|
|
||||||
api('createLoadBalancer', {
|
api('createLoadBalancer', {
|
||||||
name: values.name,
|
name: values.name,
|
||||||
|
|
|
||||||
|
|
@ -601,11 +601,13 @@ import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
import AddDiskOffering from '@/views/offering/AddDiskOffering'
|
import AddDiskOffering from '@/views/offering/AddDiskOffering'
|
||||||
import { isAdmin } from '@/role'
|
import { isAdmin } from '@/role'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import ResourceIcon from '@/components/view/ResourceIcon'
|
import ResourceIcon from '@/components/view/ResourceIcon'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddServiceOffering',
|
name: 'AddServiceOffering',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
AddDiskOffering,
|
AddDiskOffering,
|
||||||
ResourceIcon,
|
ResourceIcon,
|
||||||
|
|
@ -916,7 +918,8 @@ export default {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
var params = {
|
var params = {
|
||||||
issystem: this.isSystem,
|
issystem: this.isSystem,
|
||||||
name: values.name,
|
name: values.name,
|
||||||
|
|
|
||||||
|
|
@ -295,11 +295,13 @@
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
import { reactive, ref, toRaw } from 'vue'
|
import { reactive, ref, toRaw } from 'vue'
|
||||||
import { isAdmin } from '@/role'
|
import { isAdmin } from '@/role'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import ResourceIcon from '@/components/view/ResourceIcon'
|
import ResourceIcon from '@/components/view/ResourceIcon'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddDiskOffering',
|
name: 'AddDiskOffering',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
ResourceIcon,
|
ResourceIcon,
|
||||||
TooltipLabel
|
TooltipLabel
|
||||||
|
|
@ -446,7 +448,8 @@ export default {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
var params = {
|
var params = {
|
||||||
isMirrored: false,
|
isMirrored: false,
|
||||||
name: values.name,
|
name: values.name,
|
||||||
|
|
|
||||||
|
|
@ -452,12 +452,14 @@
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
import { isAdmin } from '@/role'
|
import { isAdmin } from '@/role'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import CheckBoxSelectPair from '@/components/CheckBoxSelectPair'
|
import CheckBoxSelectPair from '@/components/CheckBoxSelectPair'
|
||||||
import ResourceIcon from '@/components/view/ResourceIcon'
|
import ResourceIcon from '@/components/view/ResourceIcon'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddNetworkOffering',
|
name: 'AddNetworkOffering',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
CheckBoxSelectPair,
|
CheckBoxSelectPair,
|
||||||
ResourceIcon,
|
ResourceIcon,
|
||||||
|
|
@ -800,7 +802,8 @@ export default {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
var params = {}
|
var params = {}
|
||||||
|
|
||||||
var keys = Object.keys(values)
|
var keys = Object.keys(values)
|
||||||
|
|
|
||||||
|
|
@ -138,12 +138,14 @@
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
import { isAdmin } from '@/role'
|
import { isAdmin } from '@/role'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import CheckBoxSelectPair from '@/components/CheckBoxSelectPair'
|
import CheckBoxSelectPair from '@/components/CheckBoxSelectPair'
|
||||||
import ResourceIcon from '@/components/view/ResourceIcon'
|
import ResourceIcon from '@/components/view/ResourceIcon'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddVpcOffering',
|
name: 'AddVpcOffering',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
CheckBoxSelectPair,
|
CheckBoxSelectPair,
|
||||||
ResourceIcon,
|
ResourceIcon,
|
||||||
|
|
@ -333,7 +335,8 @@ export default {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
var params = {}
|
var params = {}
|
||||||
params.name = values.name
|
params.name = values.name
|
||||||
params.displaytext = values.displaytext
|
params.displaytext = values.displaytext
|
||||||
|
|
|
||||||
|
|
@ -89,10 +89,12 @@
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
import { isAdmin } from '@/role'
|
import { isAdmin } from '@/role'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import ResourceIcon from '@/components/view/ResourceIcon'
|
import ResourceIcon from '@/components/view/ResourceIcon'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UpdateOfferingAccess',
|
name: 'UpdateOfferingAccess',
|
||||||
|
mixins: [mixinForm],
|
||||||
props: {
|
props: {
|
||||||
resource: {
|
resource: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
@ -257,7 +259,8 @@ export default {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
|
|
||||||
const params = {}
|
const params = {}
|
||||||
params.id = this.resource.id
|
params.id = this.resource.id
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
layout="vertical"
|
layout="vertical"
|
||||||
>
|
>
|
||||||
<a-form-item name="" ref="">
|
<a-form-item name="account" ref="account">
|
||||||
<template #label>
|
<template #label>
|
||||||
<tooltip-label :title="$t('label.account')" :tooltip="apiParams.addAccountToProject.account.description"/>
|
<tooltip-label :title="$t('label.account')" :tooltip="apiParams.addAccountToProject.account.description"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
:placeholder="apiParams.addAccountToProject.account.description"
|
:placeholder="apiParams.addAccountToProject.account.description"
|
||||||
v-focus="true" />
|
v-focus="true" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item name="" ref="">
|
<a-form-item name="email" ref="email">
|
||||||
<template #label>
|
<template #label>
|
||||||
<tooltip-label :title="$t('label.email')" :tooltip="apiParams.addAccountToProject.email.description"/>
|
<tooltip-label :title="$t('label.email')" :tooltip="apiParams.addAccountToProject.email.description"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
v-model:value="form.email"
|
v-model:value="form.email"
|
||||||
:placeholder="apiParams.addAccountToProject.email.description"></a-input>
|
:placeholder="apiParams.addAccountToProject.email.description"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item v-if="apiParams.addAccountToProject.projectroleid">
|
<a-form-item name="projectroleid" ref="projectroleid" v-if="apiParams.addAccountToProject.projectroleid">
|
||||||
<template #label>
|
<template #label>
|
||||||
<tooltip-label :title="$t('label.project.role')" :tooltip="apiParams.addAccountToProject.projectroleid.description"/>
|
<tooltip-label :title="$t('label.project.role')" :tooltip="apiParams.addAccountToProject.projectroleid.description"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -62,9 +62,9 @@
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item v-if="apiParams.addAccountToProject.roletype">
|
<a-form-item name="roletype" ref="roletype" v-if="apiParams.addAccountToProject.roletype">
|
||||||
<template #label>
|
<template #label>
|
||||||
<tooltip-label :title="$t('label.name')" :tooltip="apiParams.addAccountToProject.roletype.description"/>
|
<tooltip-label :title="$t('label.roletype')" :tooltip="apiParams.addAccountToProject.roletype.description"/>
|
||||||
</template>
|
</template>
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="form.roletype"
|
v-model:value="form.roletype"
|
||||||
|
|
|
||||||
|
|
@ -110,10 +110,12 @@
|
||||||
<script>
|
<script>
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ChangeOfferingForVolume',
|
name: 'ChangeOfferingForVolume',
|
||||||
|
mixins: [mixinForm],
|
||||||
props: {
|
props: {
|
||||||
resource: {
|
resource: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
@ -194,7 +196,8 @@ export default {
|
||||||
submitChangeOfferingForVolume () {
|
submitChangeOfferingForVolume () {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const params = {}
|
const params = {}
|
||||||
params.diskofferingid = values.diskofferingid
|
params.diskofferingid = values.diskofferingid
|
||||||
|
|
|
||||||
|
|
@ -123,11 +123,13 @@
|
||||||
<script>
|
<script>
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import ResourceIcon from '@/components/view/ResourceIcon'
|
import ResourceIcon from '@/components/view/ResourceIcon'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CreateVolume',
|
name: 'CreateVolume',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
ResourceIcon,
|
ResourceIcon,
|
||||||
TooltipLabel
|
TooltipLabel
|
||||||
|
|
@ -202,7 +204,8 @@ export default {
|
||||||
handleSubmit (e) {
|
handleSubmit (e) {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
this.loading = true
|
this.loading = true
|
||||||
api('createVolume', values).then(response => {
|
api('createVolume', values).then(response => {
|
||||||
this.$pollJob({
|
this.$pollJob({
|
||||||
|
|
|
||||||
|
|
@ -195,10 +195,12 @@ import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
import TooltipButton from '@/components/widgets/TooltipButton'
|
import TooltipButton from '@/components/widgets/TooltipButton'
|
||||||
import { timeZone } from '@/utils/timezone'
|
import { timeZone } from '@/utils/timezone'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import debounce from 'lodash/debounce'
|
import debounce from 'lodash/debounce'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'FormSchedule',
|
name: 'FormSchedule',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
TooltipButton
|
TooltipButton
|
||||||
},
|
},
|
||||||
|
|
@ -349,7 +351,8 @@ export default {
|
||||||
handleSubmit (e) {
|
handleSubmit (e) {
|
||||||
if (this.actionLoading) return
|
if (this.actionLoading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
|
|
||||||
let params = {}
|
let params = {}
|
||||||
params.volumeid = this.volumeId
|
params.volumeid = this.volumeId
|
||||||
|
|
|
||||||
|
|
@ -57,9 +57,11 @@
|
||||||
<script>
|
<script>
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ResizeVolume',
|
name: 'ResizeVolume',
|
||||||
|
mixins: [mixinForm],
|
||||||
props: {
|
props: {
|
||||||
resource: {
|
resource: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
@ -103,7 +105,8 @@ export default {
|
||||||
handleSubmit (e) {
|
handleSubmit (e) {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
this.loading = true
|
this.loading = true
|
||||||
values.id = this.resource.id
|
values.id = this.resource.id
|
||||||
api('resizeVolume', values).then(response => {
|
api('resizeVolume', values).then(response => {
|
||||||
|
|
|
||||||
|
|
@ -104,10 +104,12 @@
|
||||||
<script>
|
<script>
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import TooltipButton from '@/components/widgets/TooltipButton'
|
import TooltipButton from '@/components/widgets/TooltipButton'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TakeSnapshot',
|
name: 'TakeSnapshot',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
TooltipButton
|
TooltipButton
|
||||||
},
|
},
|
||||||
|
|
@ -155,7 +157,8 @@ export default {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (this.actionLoading) return
|
if (this.actionLoading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
|
|
||||||
let params = {}
|
let params = {}
|
||||||
params.volumeId = this.resource.id
|
params.volumeId = this.resource.id
|
||||||
|
|
|
||||||
|
|
@ -166,11 +166,13 @@
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
import { axios } from '../../utils/request'
|
import { axios } from '../../utils/request'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import ResourceIcon from '@/components/view/ResourceIcon'
|
import ResourceIcon from '@/components/view/ResourceIcon'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UploadLocalVolume',
|
name: 'UploadLocalVolume',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
ResourceIcon,
|
ResourceIcon,
|
||||||
TooltipLabel
|
TooltipLabel
|
||||||
|
|
@ -311,7 +313,8 @@ export default {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
const params = {}
|
const params = {}
|
||||||
for (const key in values) {
|
for (const key in values) {
|
||||||
const input = values[key]
|
const input = values[key]
|
||||||
|
|
|
||||||
|
|
@ -158,11 +158,13 @@
|
||||||
<script>
|
<script>
|
||||||
import { ref, reactive, toRaw } from 'vue'
|
import { ref, reactive, toRaw } from 'vue'
|
||||||
import { api } from '@/api'
|
import { api } from '@/api'
|
||||||
|
import { mixinForm } from '@/utils/mixin'
|
||||||
import ResourceIcon from '@/components/view/ResourceIcon'
|
import ResourceIcon from '@/components/view/ResourceIcon'
|
||||||
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
import TooltipLabel from '@/components/widgets/TooltipLabel'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UploadVolume',
|
name: 'UploadVolume',
|
||||||
|
mixins: [mixinForm],
|
||||||
components: {
|
components: {
|
||||||
ResourceIcon,
|
ResourceIcon,
|
||||||
TooltipLabel
|
TooltipLabel
|
||||||
|
|
@ -279,7 +281,8 @@ export default {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.formRef.value.validate().then(() => {
|
this.formRef.value.validate().then(() => {
|
||||||
const values = toRaw(this.form)
|
const formRaw = toRaw(this.form)
|
||||||
|
const values = this.handleRemoveFields(formRaw)
|
||||||
const params = {}
|
const params = {}
|
||||||
for (const key in values) {
|
for (const key in values) {
|
||||||
const input = values[key]
|
const input = values[key]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue