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 {
iface: string;
friendlyName: string;
mac: string;
addresses: InterfaceAddress[] | null;
}

View File

@ -6,7 +6,7 @@
</svg> -->
<div _ngcontent-c1="" class="text">
<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>
<svg _ngcontent-c1="" aria-hidden="true" class="octicon dropdownArrow" version="1.1" viewBox="0 0 12 16" width="16px"
height="16px">

View File

@ -35,15 +35,15 @@ export class NicDropdownComponent implements OnInit {
this.probeService.call<Interface>('MachineService.Interfaces').pipe(
map((ifaces: Interface[]) => {
ifaces.forEach(iface => {
console.log(iface);
iface.addresses.forEach(address => {
if (address.metaIPType.key !== toMetaIPType(MetaIPTypeEnum.V4).key) {
return;
}
this.nics.push({
label: iface.iface + ' (' + address.network + ')',
label: iface.friendlyName + ' (' + address.network + ')',
value: {
name: iface.iface,
iface: iface.iface,
friendlyName: iface.friendlyName,
metaIPType: address.metaIPType,
mac: iface.mac,
address: address.address,
@ -71,7 +71,7 @@ export class NicDropdownComponent implements OnInit {
const zone: Zone = {
network: this.selected.network,
iface: this.selected.name,
iface: this.selected.iface,
metaIPType: toMetaIPType(MetaIPTypeEnum.V4),
address: this.selected.address,
mac: this.selected.mac,