瀏覽代碼

Added the display of the switch model to the block diagram

root 1 年之前
父節點
當前提交
ee9266c

+ 3 - 2
html/admin/devices/index-tree-simple.php

@@ -15,19 +15,20 @@ foreach ($hash as $device) {
     if (!isset($device['parent_id'])) { continue; }
     if ($device['parent_id'] !== $device_id) { continue; }
     print '<ul><li>';
-    print_url($device['name'],'/admin/devices/editdevice.php?id='.$device['id']);
+    print_url($device['parent_port'].'->'.$device['uplink'].'&nbsp'.$device['name'].'&nbsp::&nbsp<small><i>['.$device['model_name'].']</i></small>','/admin/devices/editdevice.php?id='.$device['id']);
     print_child($device['id'],$hash);
     print '</li></ul>';
     }
 }
 
-$dSQL = 'SELECT * FROM devices WHERE deleted=0 and device_type<=2';
+$dSQL = 'SELECT D.*,DM.model_name FROM devices as D,device_models as DM WHERE D.device_model_id=DM.id AND (deleted=0 and device_type<=2)';
 $switches = get_records_sql($db_link,$dSQL);
 $dev_hash = NULL;
 foreach ($switches as $row) {
 $dev_id=$row['id'];
 $dev_hash[$dev_id]['id']=$dev_id;
 $dev_hash[$dev_id]['name']=$row['device_name'];
+$dev_hash[$dev_id]['model_name']=$row['model_name'];
 $pSQL = 'SELECT * FROM device_ports WHERE uplink = 1 and device_id='.$dev_id;
 $uplink = get_record_sql($db_link,$pSQL);
 if (empty($uplink)) { continue; }

+ 3 - 2
html/admin/devices/index-tree.php

@@ -28,13 +28,13 @@ foreach ($hash as $device) {
     if ($device['type'] == 2) { $dev_icon = '/img/gateway.png'; }
     if ($device['type'] == 3) { $dev_icon = '/img/server.png'; }
     if ($device['type'] == 4) { $dev_icon = '/img/ap.png'; }
-    print '{ "text" : "'; print $device['parent_port'].'->'.$device['uplink'].'&nbsp'.$device['name']; print '", "icon" : "'.$dev_icon.'", "id" : "'.$device['id'].'","state" : { "opened" : true },';
+    print '{ "text" : "'; print $device['parent_port'].'->'.$device['uplink'].'&nbsp'.$device['name'].'&nbsp::&nbsp<small><i>['.$device['model_name'].']</i></small>'; print '", "icon" : "'.$dev_icon.'", "id" : "'.$device['id'].'","state" : { "opened" : true },';
     print '"a_attr" : { "href": "'.reencodeurl('/admin/devices/editdevice.php?id='.$device['id']).'"},';
     print '"children" : ['; print_child($device['id'],$hash); print ']';print "},\n";
     }
 }
 
-$dSQL = 'SELECT * FROM devices WHERE deleted=0 and device_type<=2';
+$dSQL = 'SELECT D.*,DM.model_name FROM devices as D,device_models as DM WHERE D.device_model_id=DM.id AND (deleted=0 and device_type<=2)';
 $switches = get_records_sql($db_link,$dSQL);
 $dev_hash = NULL;
 foreach ($switches as $row) {
@@ -42,6 +42,7 @@ $dev_id=$row['id'];
 $dev_hash[$dev_id]['id']=$dev_id;
 $dev_hash[$dev_id]['name']=$row['device_name'];
 $dev_hash[$dev_id]['type']=$row['device_type'];
+$dev_hash[$dev_id]['model_name']=$row['model_name'];
 $pSQL = 'SELECT * FROM device_ports WHERE uplink = 1 and device_id='.$dev_id;
 $uplink = get_record_sql($db_link,$pSQL);
 if (empty($uplink)) { continue; }

+ 18 - 1
html/cfg/.htaccess

@@ -1 +1,18 @@
-deny from all
+<IfModule mod_version.c>
+	<IfVersion < 2.4>
+		Order Deny,Allow
+		Deny from All
+	</IfVersion>
+	<IfVersion >= 2.4>
+		Require all denied
+	</IfVersion>
+</IfModule>
+<IfModule !mod_version.c>
+	<IfModule !mod_authz_core.c>
+		Order Deny,Allow
+		Deny from All
+	</IfModule>
+	<IfModule mod_authz_core.c>
+		Require all denied
+	</IfModule>
+</IfModule>

+ 18 - 1
html/inc/.htaccess

@@ -1 +1,18 @@
-deny from all
+<IfModule mod_version.c>
+	<IfVersion < 2.4>
+		Order Deny,Allow
+		Deny from All
+	</IfVersion>
+	<IfVersion >= 2.4>
+		Require all denied
+	</IfVersion>
+</IfModule>
+<IfModule !mod_version.c>
+	<IfModule !mod_authz_core.c>
+		Order Deny,Allow
+		Deny from All
+	</IfModule>
+	<IfModule mod_authz_core.c>
+		Require all denied
+	</IfModule>
+</IfModule>

+ 18 - 1
html/inc/languages/.htaccess

@@ -1 +1,18 @@
-deny from all
+<IfModule mod_version.c>
+	<IfVersion < 2.4>
+		Order Deny,Allow
+		Deny from All
+	</IfVersion>
+	<IfVersion >= 2.4>
+		Require all denied
+	</IfVersion>
+</IfModule>
+<IfModule !mod_version.c>
+	<IfModule !mod_authz_core.c>
+		Order Deny,Allow
+		Deny from All
+	</IfModule>
+	<IfModule mod_authz_core.c>
+		Require all denied
+	</IfModule>
+</IfModule>

+ 18 - 0
html/log/.htaccess

@@ -0,0 +1,18 @@
+<IfModule mod_version.c>
+	<IfVersion < 2.4>
+		Order Deny,Allow
+		Deny from All
+	</IfVersion>
+	<IfVersion >= 2.4>
+		Require all denied
+	</IfVersion>
+</IfModule>
+<IfModule !mod_version.c>
+	<IfModule !mod_authz_core.c>
+		Order Deny,Allow
+		Deny from All
+	</IfModule>
+	<IfModule mod_authz_core.c>
+		Require all denied
+	</IfModule>
+</IfModule>

+ 18 - 0
html/sessions/.htaccess

@@ -0,0 +1,18 @@
+<IfModule mod_version.c>
+	<IfVersion < 2.4>
+		Order Deny,Allow
+		Deny from All
+	</IfVersion>
+	<IfVersion >= 2.4>
+		Require all denied
+	</IfVersion>
+</IfModule>
+<IfModule !mod_version.c>
+	<IfModule !mod_authz_core.c>
+		Order Deny,Allow
+		Deny from All
+	</IfModule>
+	<IfModule mod_authz_core.c>
+		Require all denied
+	</IfModule>
+</IfModule>

+ 18 - 0
html/tmp/.htaccess

@@ -0,0 +1,18 @@
+<IfModule mod_version.c>
+	<IfVersion < 2.4>
+		Order Deny,Allow
+		Deny from All
+	</IfVersion>
+	<IfVersion >= 2.4>
+		Require all denied
+	</IfVersion>
+</IfModule>
+<IfModule !mod_version.c>
+	<IfModule !mod_authz_core.c>
+		Order Deny,Allow
+		Deny from All
+	</IfModule>
+	<IfModule mod_authz_core.c>
+		Require all denied
+	</IfModule>
+</IfModule>