mirror of
https://github.com/unraid/webgui.git
synced 2026-04-26 04:11:12 -05:00
136 lines
4.9 KiB
Plaintext
136 lines
4.9 KiB
Plaintext
Menu="UNRAID-OS"
|
|
Title="System Drivers"
|
|
Icon="fa-sitemap"
|
|
Tag="server"
|
|
---
|
|
<?PHP
|
|
/* Copyright 2005-2023, Lime Technology
|
|
* Copyright 2012-2023, Bergware International.
|
|
*
|
|
* 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.
|
|
*/
|
|
|
|
$select = [];
|
|
$select[] = mk_option(1,"conf",'Modprobe.d conf only');
|
|
$select[] = mk_option(0,"inuse",'Inuse');
|
|
$select[] = mk_option(0,"all",'All');
|
|
$newmodel = version_compare($version['version'],'6.12.0-beta5', '>') ? "true" : "false" ;
|
|
|
|
?>
|
|
|
|
<style>
|
|
table.t1{margin-top:0;background:transparent; border-collapse: collapse; border-spacing: 0;}
|
|
//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{width: 1%; ; text-align:centre ;white-space: nowrap;}
|
|
table.t1 tr>td+td{width: 1%; white-space: nowrap; }
|
|
table.t1 tr>td+td+td{width:auto ; text-align:left;}
|
|
table.t1 tr>td+td+td+td{text-align:left;}
|
|
table.t1 tr>td+td+td+td+td{text-align:left;}
|
|
table.t1 tr>td+td+td+td+td+td{text-align:left;}
|
|
table.t1 tr>td+td+td+td+td+td{text-align:left;}
|
|
table.t1 tr>td+td+td+td+td+td+td{text-align:left;}
|
|
table.t1 tr>td+td+td+td+td+td+td+td{text-align:left;}
|
|
table.t1 tr>td+td+td+td+td+td+td+td+td{text-align:left;}
|
|
table.t1 tr>td+td+td+td+td+td+td+td+td+td{text-align:left;}
|
|
table.t1 tr>td+td+td+td+td+td+td+td+td+td+td{text-align:left;}
|
|
table.t1 tr>td+td+td+td+td+td+td+td+td+td+td+td{text-align:left;}
|
|
table.t1 tr>td+td+td+td+td+td+td+td+td+td+td+td+td{text-align:left;}
|
|
.tablesorter .filtered {
|
|
display: none;
|
|
}
|
|
|
|
</style>
|
|
<script type="text/javascript" src="/webGui/javascript/jquery.tablesorter.widgets.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
function showDrivers(options, init = false) {
|
|
option = options ;
|
|
if (init) {
|
|
$.post('/webGui/include/SysDrivers.php',{table:'t1load',option:"all"},function(data){
|
|
clearTimeout(timers.refresh);
|
|
filter = [];
|
|
filter[3] = "Inuse|Custom|Disabled";
|
|
$("#t1").trigger("destroy");
|
|
$('#t1').html(data);
|
|
$('#t1').tablesorter({
|
|
sortList:[[1,0]],
|
|
sortAppend:[[1,0]],
|
|
headers:{
|
|
0:{sorter:false}
|
|
},
|
|
widgets: ['stickyHeaders','filter'],
|
|
widgetOptions: {
|
|
// on black and white, offset is height of #menu
|
|
// on azure and gray, offset is height of #header
|
|
stickyHeaders_offset: ( $('#menu').height() < 50 ) ? $('#menu').height() : $('#header').height(),
|
|
filter_columnFilters: false,
|
|
}
|
|
|
|
});
|
|
$('div.spinner.fixed').hide('slow');
|
|
});
|
|
} else {
|
|
|
|
filter = [];
|
|
if (option === "inuse") filter[3] = "Inuse|Custom|Disabled";
|
|
if (option === "all") filter[3] = "";
|
|
$('#t1').trigger('search', [ filter ]);
|
|
}
|
|
}
|
|
|
|
function showDriversupdate() {
|
|
$.post('/webGui/include/SysDrivers.php',{table:'t1create',option:"all"}) ;
|
|
}
|
|
|
|
function textedit(module) {
|
|
var i=module ;
|
|
$('#text'+module).prop('disabled', false);
|
|
$('#save'+module).attr('hidden', false);
|
|
$('#text'+module).attr('hidden', false);
|
|
|
|
}
|
|
|
|
function textsave(module) {
|
|
var i=module ;
|
|
$('#text'+module).prop('disabled', true);
|
|
$('#save'+module).attr('hidden', true);
|
|
var x = document.getElementById("text" + module).value;
|
|
$.post('/webGui/include/SysDrivers.php',{table:'update',module:module,conf:x},function(data){
|
|
if(data) {
|
|
formHasUnsavedChanges=false;
|
|
$('#text'+module).val(data.modprobe) ;
|
|
$('#status'+module).html(data.state) ;
|
|
if (data.modprobe == "") $('#text'+module).attr('hidden', true); else $('#text'+module).attr('rows', 3)
|
|
if (data.supportpage == true) {
|
|
if (data.support == true) {
|
|
document.getElementById("link" + module).innerHTML = "<a href='" + data.supporturl + "'target='_blank'><i title='" + _("Support page")_ + "' class='fa fa-phone-square'></i></a>" ;
|
|
} else {
|
|
document.getElementById("link" + module).innerHTML = "<i title='" + _("No support page avaialable")_ + "' class='fa fa-phone-square' ></i>" ;
|
|
}
|
|
}
|
|
}
|
|
//showDriversupdate() ;
|
|
var message = "_(System Drivers)_: _(A reboot is required to apply changes)_";
|
|
addRebootNotice(message);
|
|
},"json");
|
|
}
|
|
|
|
$('.tabs').append("<span class='status'><span class='lite label'>_(Select View)_:</span><select id='select' onchange='showDrivers(this.value)'><option value='all' >All Drivers</option><option value='inuse' selected >Inuse Drivers</option></select>");
|
|
|
|
showDrivers("all",true) ;
|
|
showDriversupdate() ;
|
|
|
|
</script>
|
|
|
|
<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()">
|
|
|