mirror of
https://github.com/unraid/webgui.git
synced 2026-04-23 18:48:49 -05:00
Revert to original load model.
This commit is contained in:
@@ -23,8 +23,8 @@ Tag="server"
|
||||
?>
|
||||
|
||||
<style>
|
||||
table.pre{margin-top:0;background:transparent}
|
||||
table.pre td:first-child{width:144px}
|
||||
table.t1{margin-top:0;background:transparent}
|
||||
table.t1 td:first-child{width:144px}
|
||||
table tr td{padding:0 0 3px 0;margin:0}
|
||||
table tr td.thin{line-height:8px;height:8px}
|
||||
table.t1 tr>td+td{width:auto}
|
||||
@@ -46,7 +46,7 @@ table.t1 tr>td+td+td+td+td+td+td+td+td+td+td+td+td{text-align:left;}
|
||||
|
||||
|
||||
$(function(){
|
||||
$('#t1').tablesorter();
|
||||
$('#t1').tablesorter({sortList:[[1,0],[3,0]]});
|
||||
});
|
||||
|
||||
|
||||
@@ -57,9 +57,8 @@ function showDrivers(options, init = false) {
|
||||
$.post('/webGui/include/SysDrivers.php',{table:'t1',option:option},function(data){
|
||||
clearTimeout(timers.refresh);
|
||||
$('#t1').html(data);
|
||||
|
||||
$('div.spinner.fixed').hide('slow');
|
||||
showDriversupdate(options) ;
|
||||
//showDriversupdate(options) ;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -101,6 +100,6 @@ select = document.getElementById("select").value;
|
||||
showDrivers("inuse",true) ;
|
||||
</script>
|
||||
|
||||
<pre><form id="sysdrivers" class="js-confirm-leave" onsubmit="return false"><table id='t1' class="tablesorter disk_status wide t1 pre" ><tr><td><div class="spinner"></div></td></tr></table></form></pre><br>
|
||||
<pre><form id="sysdrivers" class="js-confirm-leave" onsubmit="return false"><table id='t1' class="t1 tablesorter disk_status" ><tr><td><div class="spinner"></div></td></tr></table></form></pre><br>
|
||||
<input type="button" value="_(Done)_" onclick="done()">
|
||||
|
||||
|
||||
@@ -70,6 +70,17 @@ if (strpos($lsmod, $modname,0)) $state = "Inuse" ; else $state = "Available";
|
||||
if (is_file("/boot/config/modprobe.d/$modname.conf")) {
|
||||
$modprobe = file_get_contents("/boot/config/modprobe.d/$modname.conf") ;
|
||||
$state = strpos($modprobe, "blacklist");
|
||||
$supportpos = strpos($modprobe, "#Plugin:");
|
||||
if ($supportpos !== false) {
|
||||
$support = true ;
|
||||
$supportendpos = strpos($modprobe,"\n",$supportpos) ;
|
||||
$pluginfileget = substr($modprobe,$supportpos + 8,$supportendpos ) ;
|
||||
$pluginfile = str_replace("\n","",$pluginfileget) ;
|
||||
#$modprobe = str_replace($pluginfileget,"",$modprobe) ;
|
||||
} else {
|
||||
$support = false ;
|
||||
$plugin = "" ;
|
||||
}
|
||||
$modprobe = explode(PHP_EOL,$modprobe) ;
|
||||
if($state !== false) {$state = "Disabled" ;}
|
||||
else $state="Custom" ;
|
||||
@@ -91,14 +102,16 @@ $arrModules[$modname] = [
|
||||
'parms' => $parms,
|
||||
'file' => $file,
|
||||
'modprobe' => $modprobe,
|
||||
'plugin' => $pluginfile ,
|
||||
'state' => $state,
|
||||
'type' => $dir,
|
||||
'support' => $support,
|
||||
'description' => substr($desc , 0 ,60) ,
|
||||
] ;
|
||||
}
|
||||
|
||||
switch ($_POST['table']) {
|
||||
case 't1':
|
||||
case 't1pre':
|
||||
$option = $_POST['option'] ;
|
||||
$select = $_POST['select'] ;
|
||||
$builtinmodules = file_get_contents("/lib/modules/$kernel/modules.builtin") ;
|
||||
@@ -120,7 +133,6 @@ case 't1':
|
||||
|
||||
|
||||
echo "<thead><tr><th><b>"._("Module/Driver")."</th><th><b>"._("Description")."</th><th><b>"._("State")."</hd><th><b>"._("Type")."</th><th><b>"._("Modeprobe.d config file")."</th></tr></thead>";
|
||||
# echo "<tr><td>Total Number of drivers the system:".count($arrModules)."</td></tr>" ;
|
||||
echo "<tbody>" ;
|
||||
if (is_array($arrModules)) ksort($arrModules) ;
|
||||
foreach($arrModules as $modname => $module)
|
||||
@@ -140,7 +152,12 @@ case 't1':
|
||||
}
|
||||
#echo "<div class='show-disks'><table class='disk_status >" ;
|
||||
$status = _('loading').'...';
|
||||
echo "<tr><td><span onclick=\"textedit('".$modname."')\" ><a><i title='"._("Edit Modprobe config")."' id=\"icon'.$modname.'\" class='fa fa-edit' ></i></a></span> $modname</td><td><span style='color:#267CA8'><i class='fa fa-refresh fa-spin fa-fw'></i> $status</span></td><td><span style='color:#267CA8'><i class='fa fa-refresh fa-spin fa-fw'></i> $status</span></td><td><span style='color:#267CA8'><i class='fa fa-refresh fa-spin fa-fw'></i> $status</span></td>";
|
||||
echo "<tr><td><span onclick=\"textedit('".$modname."')\" ><a><i title='"._("Edit Modprobe config")."' id=\"icon'.$modname.'\" class='fa fa-edit' ></i></a>" ;
|
||||
if ($module['support'] == true) $disabled = "" ; else $disabled = " disabled " ;
|
||||
$disabled = " disable " ;
|
||||
echo "<span><a><i title='"._("Support Page")."' id=\"support'.$modname.'\" class='fa fa-phone-square' $disabled></i></a></span> $modname</td>" ;
|
||||
echo "<td><span style='color:#267CA8'><i class='fa fa-refresh fa-spin fa-fw'></i> $status</span></td><td><span style='color:#267CA8'><i class='fa fa-refresh fa-spin fa-fw'></i> $status</span></td>" ;
|
||||
echo "<td><span style='color:#267CA8'><i class='fa fa-refresh fa-spin fa-fw'></i> $status</span></td>";
|
||||
$text = "" ;
|
||||
if (is_array($module["modprobe"])) {
|
||||
$text = implode("\n",$module["modprobe"]) ;
|
||||
@@ -151,7 +168,7 @@ case 't1':
|
||||
echo "</tbody>" ;
|
||||
break;
|
||||
|
||||
case 't1update':
|
||||
case 't1':
|
||||
$option = $_POST['option'] ;
|
||||
$select = $_POST['select'] ;
|
||||
$builtinmodules = file_get_contents("/lib/modules/$kernel/modules.builtin") ;
|
||||
@@ -172,7 +189,6 @@ case 't1':
|
||||
}
|
||||
|
||||
echo "<thead><tr><th><b>"._("Module/Driver")."</th><th><b>"._("Description")."</th><th><b>"._("State")."</hd><th><b>"._("Type")."</th><th><b>"._("Modeprobe.d config file")."</th></tr></thead>";
|
||||
# echo "<tr><td>Total Number of drivers the system:".count($arrModules)."</td></tr>" ;
|
||||
echo "<tbody>" ;
|
||||
if (is_array($arrModules)) ksort($arrModules) ;
|
||||
foreach($arrModules as $modname => $module)
|
||||
@@ -190,9 +206,14 @@ case 't1':
|
||||
case "all":
|
||||
break ;
|
||||
}
|
||||
#echo "<div class='show-disks'><table class='disk_status >" ;
|
||||
|
||||
echo "<tr><td><span onclick=\"textedit('".$modname."')\" ><a><i title='"._("Edit Modprobe config")."' id=\"icon'.$modname.'\" class='fa fa-edit' ></i></a></span> $modname</td><td>{$module['description']}</td><td id=\"status$modname\">{$module['state']}</td><td>{$module['type']}</td>";
|
||||
|
||||
echo "<tr><td><span onclick=\"textedit('".$modname."')\" ><a><i title='"._("Edit Modprobe config")."' id=\"icon'.$modname.'\" class='fa fa-edit' ></i></a></span>" ;
|
||||
|
||||
if ($module['support'] == true) $disabled = "" ; else $disabled = " disabled " ;
|
||||
$disabled = " disable hidden " ;
|
||||
echo "<span $disabled ><a $disabled><i title='"._("Support Page")."' id=\"support'.$modname.'\" class='fa fa-phone-square' $disabled></i></a></span> $modname</td>" ;
|
||||
echo "<td>{$module['description']}</td><td id=\"status$modname\">{$module['state']}</td><td>{$module['type']}</td>";
|
||||
|
||||
$text = "" ;
|
||||
if (is_array($module["modprobe"])) {
|
||||
$text = implode("\n",$module["modprobe"]) ;
|
||||
|
||||
Reference in New Issue
Block a user