Multi cache support

This commit is contained in:
bergware
2020-03-25 07:04:31 +01:00
parent c1b8a15334
commit db0dfa5566
2 changed files with 6 additions and 1 deletions

View File

@@ -20,7 +20,7 @@ function sharename($share) {
return substr($share,0,-4);
}
$bgcolor = strstr('white,azure',$display['theme']) ? '#f2f2f2' : '#1c1c1c';
$shares2 = implode(',',array_map('escapeshellarg',array_filter(array_map('sharename',scandir('boot/config/shares')))));
if ($var['fsState']=='Stopped') $shares2 = implode(',',array_map('escapeshellarg',array_filter(array_map('sharename',scandir('boot/config/shares')))));
?>
<link type="text/css" rel="stylesheet" href="<?autov("/webGui/styles/jquery.ui.css")?>">
<link type="text/css" rel="stylesheet" href="<?autov("/plugins/dynamix.docker.manager/styles/style-{$display['theme']}.css")?>">

View File

@@ -381,6 +381,11 @@ function prepareEdit(form) {
swal({title:'_(Invalid share name)_',text:'_(Do not use reserved names)_',type:'error',confirmButtonText:'_(Ok)_'});
return false;
}
var pools = [<?=implode(',',array_map('escapeshellarg',$pools))?>];
if (pools.includes(share)) {
swal({title:'_(Invalid share name)_',text:'_(Do not use pool names)_',type:'error',confirmButtonText:'_(Ok)_'});
return false;
}
if (share.match('[:\\\/*<>|"]')) {
swal({title:'_(Invalid Characters)_',text:'_(You cannot use the following within share names)_ : \\ / * < > | "',type:'error',confirmButtonText:'_(Ok)_'});
return false;