(endpoint, padding)
| 62 | |
| 63 | // pretty print endpoint |
| 64 | function decorateEndpoint(endpoint, padding) { |
| 65 | var msg = (endpoint.hostname.length ? (padding + "Hostname: " + endpoint.hostname + "\n") : '') + |
| 66 | (endpoint.ipv4.length ? (padding + "IPv4: " + endpoint.ipv4 + "\n") : '') + |
| 67 | (endpoint.ipv6.length ? (padding + "IPv6: " + endpoint.ipv6 + "\n") : '') + |
| 68 | padding + decorateMac("MAC", endpoint.mac, endpoint.vendor) + "\n"; |
| 69 | |
| 70 | if( endpoint.meta.values.length > 0 ) { |
| 71 | msg += "\n" + padding + "Info:\n"; |
| 72 | for( var name in endpoint.meta.values ) { |
| 73 | msg += padding + name + ' : ' + endpoint.meta.values[name] + "\n"; |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | return msg; |
| 78 | } |
| 79 | |
| 80 | // pretty print access point |
| 81 | function decorateAP(ap, padding) { |
no test coverage detected