mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Allow enabling network/vpc offering at creation (#911)
Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com> Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
e9df682021
commit
fbb3a7aed5
@ -447,6 +447,15 @@
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<span slot="label">
|
||||
{{ $t('label.enable.network.offering') }}
|
||||
<a-tooltip :title="apiParams.enable.description">
|
||||
<a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
|
||||
</a-tooltip>
|
||||
</span>
|
||||
<a-switch v-decorator="['enable', {initialValue: false}]" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<div :span="24" class="action-button">
|
||||
<a-button @click="closeAction">{{ this.$t('label.cancel') }}</a-button>
|
||||
@ -929,6 +938,9 @@ export default {
|
||||
if (zoneId) {
|
||||
params.zoneid = zoneId
|
||||
}
|
||||
if (values.enable) {
|
||||
params.enable = values.enable
|
||||
}
|
||||
params.traffictype = 'GUEST' // traffic type dropdown has been removed since it has only one option ('Guest'). Hardcode traffic type value here.
|
||||
api('createNetworkOffering', params).then(json => {
|
||||
this.$message.success('Network offering created: ' + values.name)
|
||||
|
||||
@ -145,6 +145,15 @@
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<span slot="label">
|
||||
{{ $t('label.enable.vpc.offering') }}
|
||||
<a-tooltip :title="apiParams.enable.description">
|
||||
<a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
|
||||
</a-tooltip>
|
||||
</span>
|
||||
<a-switch v-decorator="['enable', {initialValue: false}]" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<div :span="24" class="action-button">
|
||||
<a-button @click="closeAction">{{ this.$t('label.cancel') }}</a-button>
|
||||
@ -400,6 +409,9 @@ export default {
|
||||
} else {
|
||||
params.supportedservices = ''
|
||||
}
|
||||
if (values.enable) {
|
||||
params.enable = values.enable
|
||||
}
|
||||
api('createVPCOffering', params).then(json => {
|
||||
this.$message.success(`${this.$t('message.create.vpc.offering')}: ` + values.name)
|
||||
this.$emit('refresh-data')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user