Files
webgui/emhttp/plugins/dynamix/DiskList.page
Tom Mortensen f9ec00b488 repo reorg
2023-06-02 12:49:33 -07:00

48 lines
1.6 KiB
Plaintext

Menu="Shares:2"
Title="Disk Shares"
Tag="user-circle-o"
Cond="_var($var,'fsState')!='Stopped' && _var($var,'shareDisk')!='no'"
---
<?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.
*/
?>
<style>
table.share_status thead tr td:first-child{width:15%}
table.share_status thead tr td:nth-child(n+3){width:10%}
</style>
<table class="share_status">
<thead><tr><td>_(Name)_</td><td>_(Comment)_</td><td>_(SMB)_</td><td>_(NFS)_</td><td>_(Type)_</td><td>_(Size)_</td><td>_(Free)_</td></tr></thead>
<tbody id="disk_list"></tbody>
</table>
<input id="compute-disks" type="button" value="_(Compute All)_" onclick="$(this).prop('disabled',true);diskList('',-1)">
:disk_list_help:
<script>
function diskList(name,all) {
timers.diskList = setTimeout(function(){$('div.spinner.fixed').show();},500);
$.post('/webGui/include/DiskList.php',{compute:name,path:"<?=rawurlencode($path)?>",all:all},function(data){
clearTimeout(timers.diskList);
$('div.spinner.fixed').hide();
$('#disk_list').html(data);
if (all!=1) $('#compute-disks').prop('disabled',!data||data.indexOf('colspan=')!=-1);
});
}
function computeDisk(name,status) {
status.html("<i class='fa fa-circle-o-notch fa-spin'></i> _(Please wait)_...");
diskList(name,1);
}
$(diskList('',0));
</script>