mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-01 03:36:04 +08:00
extract network_type to config/types
Signed-off-by: andy.lee <andy.lee@suse.com>
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import SteveModel from '@shell/plugins/steve/steve-class';
|
||||
import { HCI } from '@shell/config/labels-annotations';
|
||||
import { NETWORK_TYPE } from '../config/types';
|
||||
|
||||
const { UNTAGGED } = NETWORK_TYPE;
|
||||
|
||||
export default class NetworkAttachmentDef extends SteveModel {
|
||||
applyDefaults() {
|
||||
@@ -42,7 +45,7 @@ export default class NetworkAttachmentDef extends SteveModel {
|
||||
}
|
||||
|
||||
get vlanId() {
|
||||
return this.vlanType === 'UntaggedNetwork' ? 'N/A' : this.parseConfig.vlan;
|
||||
return this.vlanType === UNTAGGED ? 'N/A' : this.parseConfig.vlan;
|
||||
}
|
||||
|
||||
get customValidationRules() {
|
||||
@@ -65,7 +68,7 @@ export default class NetworkAttachmentDef extends SteveModel {
|
||||
const route = annotations[HCI.NETWORK_ROUTE];
|
||||
let config = {};
|
||||
|
||||
if (this.vlanType === 'UntaggedNetwork') {
|
||||
if (this.vlanType === UNTAGGED) {
|
||||
return 'N/A';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user