From 70bf213a8ba21e2ef8b040ba78b7e91ccac69441 Mon Sep 17 00:00:00 2001 From: bergware Date: Mon, 6 Jun 2016 00:17:18 +0200 Subject: [PATCH 1/4] Fixed dropdown list may not open in tabbed view Also made width consistent with other pages --- plugins/dynamix/Eth0.page | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/dynamix/Eth0.page b/plugins/dynamix/Eth0.page index d2bcb8642..707399cb5 100644 --- a/plugins/dynamix/Eth0.page +++ b/plugins/dynamix/Eth0.page @@ -218,8 +218,15 @@ function exitCode(form,key) { $(function() { var ctrl = ""; var form = document.eth0_settings; - $('#bond0').dropdownchecklist({emptyText:'None', width:130}); - $('#bridge0').dropdownchecklist({emptyText:'None', width:130}); + + $('#tab1').bind({click:function(){ + $('#bond0').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:131}); + $('#bridge0').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:131}); + checkBondingSettings(form,0); + }}); + + $('#bond0').dropdownchecklist({emptyText:'None', width:131}); + $('#bridge0').dropdownchecklist({emptyText:'None', width:131}); checkBondingSettings(form,0); checkBridgingSettings(form,0); checkNetworkAccess(form,'eth0'); From fd04e71fb3465b7394d86a5a2603596b2d749b4d Mon Sep 17 00:00:00 2001 From: bergware Date: Mon, 6 Jun 2016 00:25:38 +0200 Subject: [PATCH 2/4] Fixed dropdown list may not open in tabbed view [2] --- plugins/dynamix/Eth0.page | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/dynamix/Eth0.page b/plugins/dynamix/Eth0.page index 707399cb5..32e8aac6a 100644 --- a/plugins/dynamix/Eth0.page +++ b/plugins/dynamix/Eth0.page @@ -222,7 +222,6 @@ $(function() { $('#tab1').bind({click:function(){ $('#bond0').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:131}); $('#bridge0').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:131}); - checkBondingSettings(form,0); }}); $('#bond0').dropdownchecklist({emptyText:'None', width:131}); From b6ab3677e2f47eaca790d1841ccd93a5bb2a8e51 Mon Sep 17 00:00:00 2001 From: bergware Date: Mon, 6 Jun 2016 08:44:22 +0200 Subject: [PATCH 3/4] Added "eth0 down" detection and notice Displays a message in the footer when eth0 is down --- plugins/dynamix/Eth0.page | 7 +++++++ plugins/dynamix/include/CheckPort.php | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 plugins/dynamix/include/CheckPort.php diff --git a/plugins/dynamix/Eth0.page b/plugins/dynamix/Eth0.page index 32e8aac6a..f0b1f6362 100644 --- a/plugins/dynamix/Eth0.page +++ b/plugins/dynamix/Eth0.page @@ -215,6 +215,12 @@ function exitCode(form,key) { stopEvent = true; } } +function checkPort() { + $.post('/webGui/include/CheckPort.php',{port:'eth0'},function(text) { + showNotice(text); + setTimeout(checkPort,15000); + }); +} $(function() { var ctrl = ""; var form = document.eth0_settings; @@ -242,6 +248,7 @@ $(function() { $('div[id=title]').append(ctrl); + checkPort(); });
diff --git a/plugins/dynamix/include/CheckPort.php b/plugins/dynamix/include/CheckPort.php new file mode 100644 index 000000000..7ef188642 --- /dev/null +++ b/plugins/dynamix/include/CheckPort.php @@ -0,0 +1,18 @@ + +Interface $port is down. Check cable!"; +} +?> From a00bad411c7eb39d310c557b38de6935b256b187 Mon Sep 17 00:00:00 2001 From: bergware Date: Mon, 6 Jun 2016 11:06:53 +0200 Subject: [PATCH 4/4] Fixed legacy support bonding and bridging --- plugins/dynamix/scripts/netconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dynamix/scripts/netconfig b/plugins/dynamix/scripts/netconfig index 9147ef91f..09e8e2ce4 100755 --- a/plugins/dynamix/scripts/netconfig +++ b/plugins/dynamix/scripts/netconfig @@ -33,7 +33,7 @@ if ($run && file_exists($cfg)) { $ifname = ifname($set); } else { // legacy syntax - if ($set=='eth0') $ifname = $old['BRIDGING']=='yes' ? $old['BRNAME'] : ($old['BONDING']=='yes' ? $old['BONDNAME'] : $set); + if ($set=='eth0') $ifname = $old['BRIDGING']=='yes' ? ($old['BRNAME'] ?: 'br0') : ($old['BONDING']=='yes' ? ($old['BONDNAME'] ?: 'bond0') : $set); } }