webGui: Fix regression assigning slots and devices

This commit is contained in:
Tom Mortensen
2017-03-11 12:55:01 -08:00
parent d4a485ac9a
commit 026455a3c8

View File

@@ -76,7 +76,9 @@ function device_desc(&$disk) {
}
function assignment(&$disk) {
global $var, $devs;
$out = "<form method='POST' name=\"{$disk['name']}Form\" action='/update.htm' target='progressFrame'><input type='hidden' name='changeDevice' value='Apply'>";
$out = "<form method='POST' name=\"{$disk['name']}Form\" action='/update.htm' target='progressFrame'>";
$out .= "<input type='hidden' name='csrf_token' value='{$var['csrf_token']}'>";
$out .= "<input type='hidden' name='changeDevice' value='Apply'>";
$out .= "<select class=\"slot\" name=\"slotId.{$disk['idx']}\" onChange=\"{$disk['name']}Form.submit()\">";
$empty = ($disk['idSb']!='' ? 'no device' : 'unassigned');
if ($disk['id']!='') {
@@ -267,6 +269,7 @@ function array_slots() {
$min = max($var['sbNumDisks'], 3);
$max = $var['MAX_ARRAYSZ'];
$out = "<form method='POST' action='/update.htm' target='progressFrame'>";
$out .= "<input type='hidden' name='csrf_token' value='{$var['csrf_token']}'>";
$out .= "<input type='hidden' name='changeSlots' value='Apply'>";
$out .= "<select class='auto' name='SYS_ARRAY_SLOTS' onChange='this.form.submit()'>";
for ($n=$min; $n<=$max; $n++) {
@@ -281,6 +284,7 @@ function cache_slots() {
$min = $var['cacheSbNumDisks'];
$max = $var['MAX_CACHESZ'];
$out = "<form method='POST' action='/update.htm' target='progressFrame'>";
$out .= "<input type='hidden' name='csrf_token' value='{$var['csrf_token']}'>";
$out .= "<input type='hidden' name='changeSlots' value='Apply'>";
$out .= "<select class='auto' name='SYS_CACHE_SLOTS' onChange='this.form.submit()'>";
for ($n=$min; $n<=$max; $n++) {