mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-01 03:36:04 +08:00
feat: add access / trunk mode in create VM network page (#510)
* feat: add l2VlanTrunkMode feature Signed-off-by: Andy Lee <andy.lee@suse.com> * refactor: remove unneeded code Signed-off-by: Andy Lee <andy.lee@suse.com> * refactor: fix edit l2vlan trunk mode edit page Signed-off-by: Andy Lee <andy.lee@suse.com> * fix: hide Route tab when trunk mode Signed-off-by: Andy Lee <andy.lee@suse.com> --------- Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import SteveModel from '@shell/plugins/steve/steve-class';
|
||||
import { HCI } from '@shell/config/labels-annotations';
|
||||
import { NETWORK_TYPE } from '../config/types';
|
||||
|
||||
const { UNTAGGED, OVERLAY } = NETWORK_TYPE;
|
||||
const { UNTAGGED, OVERLAY, L2TRUNK_VLAN } = NETWORK_TYPE;
|
||||
|
||||
export default class NetworkAttachmentDef extends SteveModel {
|
||||
applyDefaults() {
|
||||
@@ -45,7 +45,7 @@ export default class NetworkAttachmentDef extends SteveModel {
|
||||
}
|
||||
|
||||
get vlanId() {
|
||||
return this.vlanType === UNTAGGED || this.vlanType === OVERLAY ? 'N/A' : this.parseConfig.vlan;
|
||||
return this.vlanType === UNTAGGED || this.vlanType === OVERLAY || this.vlanType === L2TRUNK_VLAN ? 'N/A' : this.parseConfig.vlan;
|
||||
}
|
||||
|
||||
get customValidationRules() {
|
||||
@@ -68,7 +68,7 @@ export default class NetworkAttachmentDef extends SteveModel {
|
||||
const route = annotations[HCI.NETWORK_ROUTE];
|
||||
let config = {};
|
||||
|
||||
if (this.vlanType === UNTAGGED || this.vlanType === OVERLAY) {
|
||||
if (this.vlanType === UNTAGGED || this.vlanType === OVERLAY || this.vlanType === L2TRUNK_VLAN) {
|
||||
return 'N/A';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user