Finished wiring up the view

This commit is contained in:
Grant Limberg 2016-05-27 13:48:22 -07:00
parent 940c0f2b93
commit 1d27adb102
3 changed files with 129 additions and 18 deletions

View file

@ -49,6 +49,23 @@ class ShowNetworksViewController: NSViewController, NSTableViewDelegate, NSTable
cell.networkIdField.stringValue = String(network.nwid, radix: 16)
cell.networkNameField.stringValue = network.name
cell.statusField.stringValue = network.status.description
cell.typeField.stringValue = network.type.description
cell.macField.stringValue = network.mac
cell.mtuField.stringValue = String(network.mtu)
cell.broadcastField.stringValue = network.broadcastEnabled ? "ENABLED" : "DISABLED"
cell.bridgingField.stringValue = network.bridge ? "ENABLED" : "DISABLED"
cell.deviceField.stringValue = network.portDeviceName
cell.addressesField.stringValue = ""
for nw in network.assignedAddresses {
cell.addressesField.stringValue += nw
cell.addressesField.stringValue += "\n"
}
return cell
}