diff --git a/front/css/pialert.css b/front/css/pialert.css index bf6df553..2ad250f0 100755 --- a/front/css/pialert.css +++ b/front/css/pialert.css @@ -773,6 +773,12 @@ height: 50px; margin: 2px; position: absolute; } +#networkTree .netPort +{ + width: 8px;; + float:left; + display:inline; +} #networkTree { margin-left: 16px; diff --git a/front/devices.php b/front/devices.php index 7516f85d..83404ee9 100755 --- a/front/devices.php +++ b/front/devices.php @@ -192,8 +192,8 @@ var tableRows = 10; var tableOrder = [[3,'desc'], [0,'asc']]; - var columnsStr = '[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]'; - var tableColumnOrder = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17] ; + var columnsStr = '[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]'; + var tableColumnOrder = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]; var tableColumnVisible = tableColumnOrder; // Read parameters & Initialize components diff --git a/front/maintenance.php b/front/maintenance.php index 96592d1b..33999641 100755 --- a/front/maintenance.php +++ b/front/maintenance.php @@ -276,6 +276,7 @@ $db->close(); + diff --git a/front/network.php b/front/network.php index fb7d2ea3..61d31bf4 100755 --- a/front/network.php +++ b/front/network.php @@ -267,7 +267,7 @@ // / \ // Smart TV (leaf) Switch 2 (node (for the PC) and leaf (for Switch 1)) // \ - // PC (leaf) + // PC (leaf) <------- leafs are not included in this SQL query $sql = "SELECT node_name, node_mac, online, node_type, node_ports_count, parent_mac, node_icon FROM @@ -465,7 +465,8 @@ "parentMac":item[14], "rowid":item[13], "status":item[10], - "childrenQty":item[15] + "childrenQty":item[15], + "port":item[18] }}) setCache('devicesListNew', JSON.stringify(devicesListnew)) @@ -541,6 +542,7 @@ name: node.name, path: path, mac: node.mac, + port: node.port, id: node.mac, parentMac: node.parentMac, icon: node.icon, @@ -628,7 +630,9 @@ renderNode: nodeData => { var fontSize = "font-size:"+emSize+"em;"; + // Build HTML for individual nodes in the network diagram deviceIcon = (!emptyArr.includes(nodeData.data.icon )) ? "
" : ""; + devicePort = (!emptyArr.includes(nodeData.data.port )) ? "
"+nodeData.data.port +"
" : ""; collapseExpandIcon = nodeData.data.hiddenChildren ? "square-plus" :"square-minus"; collapseExpandHtml = (nodeData.data.hasChildren) ? "
" : ""; statusCss = " netStatus-" + nodeData.data.status; @@ -648,7 +652,7 @@ border-radius:5px;'\ >\
\ - " + deviceIcon + + " + devicePort + deviceIcon + ""+nodeData.data.name+"\ " +collapseExpandHtml+ diff --git a/front/php/server/devices.php b/front/php/server/devices.php index 542f07a6..1700a627 100755 --- a/front/php/server/devices.php +++ b/front/php/server/devices.php @@ -602,7 +602,8 @@ function getDevicesList() { array("dev_Network_Node_MAC_ADDR", 14, 14), array("connected_devices", 15, 15), array("dev_Location", 16, 16), - array("dev_Vendor", 17, 17) + array("dev_Vendor", 17, 17), + array("dev_Network_Node_port", 18, 18) ); if($forceDefaultOrder == FALSE) @@ -668,7 +669,8 @@ function getDevicesList() { handleNull($row['dev_Network_Node_MAC_ADDR']), handleNull($row['connected_devices']), handleNull($row['dev_Location']), - handleNull($row['dev_Vendor']) + handleNull($row['dev_Vendor']), + handleNull($row['dev_Network_Node_port']) ); $newOrder = array(); diff --git a/front/php/templates/language/en_us.php b/front/php/templates/language/en_us.php index de569f00..ccd5e31a 100755 --- a/front/php/templates/language/en_us.php +++ b/front/php/templates/language/en_us.php @@ -80,6 +80,7 @@ $lang['en_us'] = array( 'Device_TableHead_Connected_Devices' => 'Connected Devices', 'Device_TableHead_Location' => 'Location', 'Device_TableHead_Vendor' => 'Vendor', +'Device_TableHead_Port' => 'Port', 'Device_TableHead_Favorite' => 'Favorite', 'Device_TableHead_Group' => 'Group', 'Device_TableHead_FirstSession' => 'First Session',