mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Deduplication in meshctrl netif2
This commit is contained in:
		
							parent
							
								
									3e0fb41524
								
							
						
					
					
						commit
						f98e5fcefb
					
				
					 1 changed files with 4 additions and 16 deletions
				
			
		
							
								
								
									
										20
									
								
								meshctrl.js
									
										
									
									
									
								
							
							
						
						
									
										20
									
								
								meshctrl.js
									
										
									
									
									
								
							|  | @ -2349,8 +2349,7 @@ function displayDeviceInfo(sysinfo, lastconnect, network, nodes) { | |||
|             ) | ||||
|                 continue; | ||||
| 
 | ||||
|             var ifTitle = ''; | ||||
|             if (i != null) ifTitle += i; | ||||
|             var ifTitle = '' + i; | ||||
|             if (m[0].fqdn != null && m[0].fqdn != '') ifTitle += ', ' + m[0].fqdn; | ||||
| 
 | ||||
|             if (typeof m[0].mac == 'string') { | ||||
|  | @ -2366,24 +2365,13 @@ function displayDeviceInfo(sysinfo, lastconnect, network, nodes) { | |||
|             moutput['IPv6 Layer'] = ''; | ||||
|             for (var j = 0; j < m.length; j++) { | ||||
|                 var iplayer = m[j]; | ||||
|                 if (iplayer.family == 'IPv4') { | ||||
|                 if (iplayer.family == 'IPv4' || iplayer.family == 'IPv6') { | ||||
|                     if (iplayer.gateway && iplayer.netmask) { | ||||
|                         moutput['IPv4 Layer'] += format("IP: {0}, Mask: {1}, Gateway: {2}  ", iplayer.address, iplayer.netmask, iplayer.gateway); | ||||
|                         moutput[iplayer.family + ' Layer'] += format("IP: {0}, Mask: {1}, Gateway: {2}  ", iplayer.address, iplayer.netmask, iplayer.gateway); | ||||
|                         moutputCount++; | ||||
|                     } else { | ||||
|                         if (iplayer.address) { | ||||
|                             moutput['IPv4 Layer'] += format("IP: {0}  ", iplayer.address); | ||||
|                             moutputCount++; | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|                 if (iplayer.family == 'IPv6') { | ||||
|                     if (iplayer.gateway && iplayer.netmask) { | ||||
|                         moutput['IPv6 Layer'] += format("IP: {0}, Mask: {1}, Gateway: {2}  ", iplayer.address, iplayer.netmask, iplayer.gateway); | ||||
|                         moutputCount++; | ||||
|                     } else { | ||||
|                         if (iplayer.address) { | ||||
|                             moutput['IPv6 Layer'] += format("IP: {0}  ", iplayer.address); | ||||
|                             moutput[iplayer.family + ' Layer'] += format("IP: {0}  ", iplayer.address); | ||||
|                             moutputCount++; | ||||
|                         } | ||||
|                     } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue