Menu="Shares:2"
Title="Disk Shares"
Tag="user-circle-o"
Cond="$var['fsState']=='Started' && $var['shareDisk']!='no'"
---
<?PHP
/* Copyright 2005-2017, Lime Technology
 * Copyright 2012-2017, 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 displayDisks(all) {
  if (all == 'yes') {
    $.cookie('ssz','ssz',{path:'/'});
    $('#disk_list').html("<tr><td colspan='8' style='text-align:center'><i class='fa fa-spinner fa-spin icon'></i>Please wait... computing disk shares!</td></tr>");
  }
  $.get('/webGui/include/DiskList.php',{compute:all,path:'<?=$path?>',scale:'<?=$display['scale']?>',number:'<?=$display['number']?>',fill:$.cookie('ssz')},function(data){
    $.removeCookie('ssz',{path:'/'})
    $('#disk_list').html(data);
    $('#compute-disks').prop('disabled',!data || data.indexOf('colspan=')!=-1);
  });
}
$(function() {
  displayDisks('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="disk_list"></tbody>
</table>
<p><input id="compute-disks" type="button" value="Compute All" onclick="$(this).prop('disabled',true);displayDisks('yes')"></p>

> **Colored Status Indicator** -- the significance of the color indicator at the beginning of each line in *Disk Shares* is as follows:
>
> <img src='/webGui/images/green-on.png' class='icon'>Mounted, underlying device has redundancy/protection.
>
> <img src='/webGui/images/yellow-on.png' class='icon'>Mounted, underlying device does not have redundancy/protection.
>
> **Security modes:**

> + '-' -- disk 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 disk shares.
> + AFP security mode displayed in *italics* indicates exported time-machine disk shares.
> + NFS does not have special modes for disk shares.
