Multi cache pool support

This commit is contained in:
bergware
2020-04-03 08:28:47 +02:00
parent b5f1acdbf3
commit 77ecb38de6
2 changed files with 10 additions and 2 deletions
+5 -1
View File
@@ -27,6 +27,9 @@ $bgcolor = strstr('white,azure',$display['theme']) ? '#f2f2f2' : '#1c1c1c';
table.divider{margin-top:30px}
</style>
<script>
var button = false;
function buttonOnly(){return button;}
function addPoolPopup() {
var popup = $('#dialogAddPool');
// Load popup with the template info
@@ -56,6 +59,7 @@ function addPoolPopup() {
} else if (!valid.test(poolname)) {
swal({title:'_(Invalid pool name)_',text:'_(Use lowercase characters only and no ending digits)_',type:'error',confirmButtonText:'_(Ok)_'});
} else {
button = true;
$(this).find('form').submit();
$(this).dialog('close');
}
@@ -107,7 +111,7 @@ pool_status();
<div id="dialogAddPool" style="display:none"></div>
<div id="templatePopupPool" style="display:none">
<form markdown="1" method="POST" action="/update.htm" target="progressFrame">
<form markdown="1" method="POST" action="/update.htm" target="progressFrame" onsubmit="return buttonOnly()">
<input type="hidden" name="changeSlots" value="apply">
_(Name)_:
: <input type="text" name="poolName" maxlength="40" value="<?=count($pools)==0?'cache':''?>">
+5 -1
View File
@@ -66,6 +66,9 @@ span.helptext{display:none;font-style:italic}
span.code{display:inline-block;width:186px}
</style>
<script>
var button = false;
function buttonOnly(){return button;}
function doDispatch(form) {
var fields = {};
<?if ($display['unit']=='F'):?>
@@ -250,6 +253,7 @@ function renamePoolPopup() {
} else if (!valid.test(poolname)) {
swal({title:'_(Invalid pool name)_',text:'_(Use lowercase characters only and no ending digits)_',type:'error',confirmButtonText:'_(Ok)_'});
} else {
button = true;
$(this).find('form').submit();
$(this).dialog('close');
}
@@ -812,7 +816,7 @@ _(SMART attribute notifications)_:
<div id="dialogRenamePool" style="display:none"></div>
<div id="templatePopupPool" style="display:none">
<form markdown="1" method="POST" action="/update.htm" target="progressFrame">
<form markdown="1" method="POST" action="/update.htm" target="progressFrame" onsubmit="return buttonOnly()">
<input type="hidden" name="poolNameOrig" value="<?=$name?>">
<input type="hidden" name="changeSlots" value="apply">
_(Name)_: