get all ip addresses
This commit is contained in:
parent
7a99fd6b0b
commit
7df05960b1
@ -124,12 +124,12 @@ def get_all_sysinfo():
|
|||||||
"sysinfo_os_version": get_os_version(),
|
"sysinfo_os_version": get_os_version(),
|
||||||
"sysinfo_install_directory": get_working_directory()
|
"sysinfo_install_directory": get_working_directory()
|
||||||
}
|
}
|
||||||
network_info = get_network_info()
|
network_info = get_network_info(all=True)
|
||||||
|
|
||||||
if isinstance(network_info, dict):
|
if isinstance(network_info, list) and len(network_info) > 0:
|
||||||
infos["sysinfo_network_interface"] = network_info['interface']
|
infos["sysinfo_network_interface"] = ", ".join([iface['interface'] for iface in network_info])
|
||||||
infos["sysinfo_mac_address"] = network_info['mac_address']
|
infos["sysinfo_mac_address"] = ", ".join([iface['mac_address'] for iface in network_info])
|
||||||
infos["sysinfo_ip_address"] = network_info['ip_address']
|
infos["sysinfo_ip_address"] = ", ".join([iface['ip_address'] for iface in network_info])
|
||||||
else:
|
else:
|
||||||
infos["sysinfo_ip_address"] = 'common_unknown_ipaddr'
|
infos["sysinfo_ip_address"] = 'common_unknown_ipaddr'
|
||||||
|
|
||||||
|
|||||||
@ -89,8 +89,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
const addIp = function(ip, $container) {
|
const addIp = function(ip, $container) {
|
||||||
const href = manage_url_template.replace('%ipaddr%', '<span>'+ip+'</span>');
|
const href_label = manage_url_template.replace('%ipaddr%', '<span>'+ip+'</span>');
|
||||||
const link = '<a href="' + href + '" target="_blank">' + href + '</a>';
|
const href = manage_url_template.replace('%ipaddr%', ip);
|
||||||
|
const link = '<a href="' + href + '" target="_blank">' + href_label + '</a>';
|
||||||
const $ipaddr = document.createElement('li');
|
const $ipaddr = document.createElement('li');
|
||||||
Object.assign($ipaddr, { className: 'ipaddr'});
|
Object.assign($ipaddr, { className: 'ipaddr'});
|
||||||
$ipaddr.innerHTML = link;
|
$ipaddr.innerHTML = link;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user