mirror of
https://github.com/unraid/webgui.git
synced 2026-01-14 13:39:58 -06:00
Merge pull request #25 from bergware/master
Fixed dropdown list may not open in tabbed view
This commit is contained in:
@@ -215,11 +215,23 @@ 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 = "<span id='wait_eth0' class='status red' style='display:none;font-size:small;font-style:italic'>Please wait... configuring interfaces</span>";
|
||||
var form = document.eth0_settings;
|
||||
$('#bond0').dropdownchecklist({emptyText:'None', width:130});
|
||||
$('#bridge0').dropdownchecklist({emptyText:'None', width:130});
|
||||
<?if ($tabbed && !$disabled):?>
|
||||
$('#tab1').bind({click:function(){
|
||||
$('#bond0').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:131});
|
||||
$('#bridge0').dropdownchecklist('destroy').dropdownchecklist({emptyText:'None', width:131});
|
||||
}});
|
||||
<?endif;?>
|
||||
$('#bond0').dropdownchecklist({emptyText:'None', width:131});
|
||||
$('#bridge0').dropdownchecklist({emptyText:'None', width:131});
|
||||
checkBondingSettings(form,0);
|
||||
checkBridgingSettings(form,0);
|
||||
checkNetworkAccess(form,'eth0');
|
||||
@@ -236,6 +248,7 @@ $(function() {
|
||||
<?else:?>
|
||||
$('div[id=title]').append(ctrl);
|
||||
<?endif;?>
|
||||
checkPort();
|
||||
});
|
||||
</script>
|
||||
<form markdown="1" name="eth0_settings" method="POST" action="/update.php" target="progressFrame" onchange="exitCode(this,false)" onsubmit="return prepareSettings(this)">
|
||||
|
||||
18
plugins/dynamix/include/CheckPort.php
Normal file
18
plugins/dynamix/include/CheckPort.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?PHP
|
||||
/* Copyright 2016, Bergware International.
|
||||
* Copyright 2016, Lime Technology
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
$port = $_POST['port'] ?: 'eth0';
|
||||
if (exec("ip link show $port|grep -om1 'NO-CARRIER'")) {
|
||||
echo "<b>Interface $port is down. Check cable!</b>";
|
||||
}
|
||||
?>
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user