Files
webgui/plugins/dynamix/ShareList.page

67 lines
2.8 KiB
Plaintext

Menu="Shares:1"
Title="User Shares"
Tag="user-circle"
Cond="$var['fsState']!='Stopped' && $var['shareUser']=='e'"
---
<?PHP
/* Copyright 2005-2018, Lime Technology
* Copyright 2012-2018, 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.
*/
?>
<script>
function displayShares(all) {
if (all == 'yes') {
$.cookie('ssz','ssz',{path:'/'});
$('#share_list').html("<tr><td colspan='8'><div class='spinner'></div></td></tr>");
$('div.spinner').html(unraid_logo);
}
$.get('/webGui/include/ShareList.php',{compute:all,path:'<?=addslashes(htmlspecialchars($path))?>',scale:'<?=$display['scale']?>',number:'<?=$display['number']?>',fill:$.cookie('ssz')},function(data){
$.removeCookie('ssz',{path:'/'})
$('#share_list').html(data);
$('#compute-shares').prop('disabled',!data || data.indexOf('colspan=')!=-1);
});
}
$(function() {
displayShares('no');
});
</script>
<table class="share_status share wide">
<thead><tr><td style="width:15%">Name</td><td style="width:33%">Comment</td><td>SMB</td><td>NFS</td><td>AFP</td><td>Size</td><td>Free</td><td>View</td></tr></thead>
<tbody id="share_list"></tbody>
</table>
<p><form name="share_form" method="POST" action="<?=htmlspecialchars($path)?>/Share?name=">
<input id="compute-shares" type="button" value="Compute All" onclick="$(this).prop('disabled',true);displayShares('yes')">
<?if ($var['startMode']=='Normal'):?>
<input type="submit" value="Add Share"<?=$var['shareUser']=='e'?'>':' disabled>User shares must be <strong>enabled</strong> to add shares.'?>
<?else:?>
<input type="submit" value="Add Share" disabled>
<?endif;?>
</form></p>
> **Colored Status Indicator** -- the significance of the color indicator at the beginning of each line in *User Shares* is as follows:
>
> <img src="/webGui/images/green-on.png" class="icon">All files are on protected storage.
>
> <img src="/webGui/images/yellow-on.png" class="icon">Some or all files are on unprotected storage.
>
> **Security modes:**
> + '-' -- user share is not exported and unavailable on the network
> + *Public* -- all users including guests have full read/write access (open access)
> + *Secure* -- all users including guests have read access, write access is set per user (limited access)
> + *Private* -- no guest access at all, read/write or read-only access is set per user (closed access)
>
> **Special modes:**
> + SMB security mode displayed in *italics* indicates exported hidden user shares.
> + AFP security mode displayed in *italics* indicates exported time-machine user shares.
> + NFS does not have special modes for user shares.