From 4bd1c3e7260994db4f3ab36cc6bbc3b4ad49cc41 Mon Sep 17 00:00:00 2001 From: Alexandre <146840804+alex001x@users.noreply.github.com> Date: Wed, 29 Oct 2025 12:02:59 +0100 Subject: [PATCH 1/4] =?UTF-8?q?Add=20feature:=20filtre=20du=20tableau=20?= =?UTF-8?q?=C3=A9lectrique=20par=20salle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- devices.php | 191 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 139 insertions(+), 52 deletions(-) diff --git a/devices.php b/devices.php index 26d2e822d..c1f69d2e5 100644 --- a/devices.php +++ b/devices.php @@ -2174,25 +2174,65 @@ function setPreferredLayout() {
*'.__("Polling is disabled after three consecutive failures.").' -
- '.__("Power Specifications").' -
-
-
-
- -
'; +
+ '.__("Power Specifications").' +
+
+
+
+ +
+
+
+
+
+ +
'; if($pdu->PanelID >0){ print "\n"; } @@ -2264,39 +2304,86 @@ function setPreferredLayout() {',$LastRead,'
'; } - echo ' -
-
- ',__("Automatic Transfer Switch"),' -
-
-
-
FailSafe)?" checked":""),'>
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
+ echo ' +
+
+ ',__("Automatic Transfer Switch"),' +
+
+
+
FailSafe)?" checked":""),'>
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ + + +
+ + +
'.__("Switch SNMP").'

'.__("Use these buttons to set the first port for the switch, check the status of the ports again, or attempt to load the Port Name Labels from the switch device.").'

From f17fa8831a5c8986eb3cb289ee763430e2ecaf34 Mon Sep 17 00:00:00 2001 From: Alexandre <146840804+alex001x@users.noreply.github.com> Date: Wed, 29 Oct 2025 16:13:55 +0100 Subject: [PATCH 2/4] =?UTF-8?q?Add=20feature:=20filtre=20du=20tableau=20?= =?UTF-8?q?=C3=A9lectrique=20par=20salle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- before_block.txt | 27 +++++++++++++++++++++++++++ devices.php | 28 ++++++++++++++-------------- temp_snippet.txt | 19 +++++++++++++++++++ 3 files changed, 60 insertions(+), 14 deletions(-) create mode 100644 before_block.txt create mode 100644 temp_snippet.txt diff --git a/before_block.txt b/before_block.txt new file mode 100644 index 000000000..6b822775a --- /dev/null +++ b/before_block.txt @@ -0,0 +1,27 @@ + jQuery(function($){ + function refillSelect(sel, tpl){ + var current=$(sel).val(); + var $tmpl=$(tpl); + var $sel=$(sel); + var defaultText=$('#PanelID option:first').text() || 'Select Panel'; + $sel.empty(); + $sel.append($('\n"; - } + foreach($PanelList as $key=>$value){ + $label=trim($value->PanelLabel); + if(intval($value->PanelID)>0 && $label!=''){ + $selected=($value->PanelID == $pdu->PanelID)?' selected':""; + print "\n\t\t\t\t\t\n"; + } + } echo ' @@ -2320,8 +2323,11 @@ function setPreferredLayout() {',__("Select Panel"),''; foreach($PanelList as $key=>$value){ - if($value->PanelID==$pdu->PanelID2){$selected=" selected";}else{$selected="";} - print "\n\t\t\t\t\t\t"; + $label=trim($value->PanelLabel); + if(intval($value->PanelID)>0 && $label!=''){ + if($value->PanelID==$pdu->PanelID2){$selected=" selected";}else{$selected="";} + print "\n\t\t\t\t\t\t"; + } } echo ' @@ -2338,19 +2344,28 @@ function setPreferredLayout() {