This commit is contained in:
crusader 2018-09-12 14:25:32 +09:00
parent 832e1e34bf
commit 6796fd8216

View File

@ -37,7 +37,7 @@ export class NicDropdownComponent implements OnInit {
ifaces.forEach(iface => { ifaces.forEach(iface => {
console.log(iface); console.log(iface);
iface.addresses.forEach(address => { iface.addresses.forEach(address => {
if (address.metaIPType.key != toMetaIPType(MetaIPTypeEnum.V4).key) { if (address.metaIPType.key !== toMetaIPType(MetaIPTypeEnum.V4).key) {
return; return;
} }
this.nics.push({ this.nics.push({
@ -48,7 +48,7 @@ export class NicDropdownComponent implements OnInit {
mac: iface.mac, mac: iface.mac,
address: address.address, address: address.address,
}, },
disabled: address.metaIPType.key != toMetaIPType(MetaIPTypeEnum.V4).key ? true : false, disabled: address.metaIPType.key !== toMetaIPType(MetaIPTypeEnum.V4).key ? true : false,
}); });
}); });
}); });
@ -68,13 +68,13 @@ export class NicDropdownComponent implements OnInit {
nicSelected(nic: SelectItem) { nicSelected(nic: SelectItem) {
this.selected = nic; this.selected = nic;
var zone: Zone = { const zone: Zone = {
network: this.selected.address, network: this.selected.network,
iface: this.selected.name, iface: this.selected.name,
metaIPType: toMetaIPType(MetaIPTypeEnum.V4), metaIPType: toMetaIPType(MetaIPTypeEnum.V4),
address: this.selected.address.split('/')[0], address: this.selected.address,
mac: this.selected.mac, mac: this.selected.mac,
} };
this.select.emit(zone); this.select.emit(zone);
this.panel.hide(); this.panel.hide();