nic windows bug fix

This commit is contained in:
insanity 2018-09-13 12:29:12 +09:00
parent d5c33499a3
commit efc9a0cfc4
3 changed files with 6 additions and 5 deletions

View File

@ -2,6 +2,7 @@ import { MetaIPType } from '../meta';
export interface Interface { export interface Interface {
iface: string; iface: string;
friendlyName: string;
mac: string; mac: string;
addresses: InterfaceAddress[] | null; addresses: InterfaceAddress[] | null;
} }

View File

@ -6,7 +6,7 @@
</svg> --> </svg> -->
<div _ngcontent-c1="" class="text"> <div _ngcontent-c1="" class="text">
<div _ngcontent-c1="" class="description" *ngIf="selected">{{selected.network || ''}}</div> <div _ngcontent-c1="" class="description" *ngIf="selected">{{selected.network || ''}}</div>
<div _ngcontent-c1="" class="title" *ngIf="selected">{{selected.name || ''}}</div> <div _ngcontent-c1="" class="title" *ngIf="selected">{{selected.friendlyName || ''}}</div>
</div> </div>
<svg _ngcontent-c1="" aria-hidden="true" class="octicon dropdownArrow" version="1.1" viewBox="0 0 12 16" width="16px" <svg _ngcontent-c1="" aria-hidden="true" class="octicon dropdownArrow" version="1.1" viewBox="0 0 12 16" width="16px"
height="16px"> height="16px">

View File

@ -35,15 +35,15 @@ export class NicDropdownComponent implements OnInit {
this.probeService.call<Interface>('MachineService.Interfaces').pipe( this.probeService.call<Interface>('MachineService.Interfaces').pipe(
map((ifaces: Interface[]) => { map((ifaces: Interface[]) => {
ifaces.forEach(iface => { ifaces.forEach(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({
label: iface.iface + ' (' + address.network + ')', label: iface.friendlyName + ' (' + address.network + ')',
value: { value: {
name: iface.iface, iface: iface.iface,
friendlyName: iface.friendlyName,
metaIPType: address.metaIPType, metaIPType: address.metaIPType,
mac: iface.mac, mac: iface.mac,
address: address.address, address: address.address,
@ -71,7 +71,7 @@ export class NicDropdownComponent implements OnInit {
const zone: Zone = { const zone: Zone = {
network: this.selected.network, network: this.selected.network,
iface: this.selected.name, iface: this.selected.iface,
metaIPType: toMetaIPType(MetaIPTypeEnum.V4), metaIPType: toMetaIPType(MetaIPTypeEnum.V4),
address: this.selected.address, address: this.selected.address,
mac: this.selected.mac, mac: this.selected.mac,