From 5e003af7d3bd15f7301e92d75a2cfff070795307 Mon Sep 17 00:00:00 2001 From: bergware Date: Sun, 12 Nov 2017 10:24:37 +0100 Subject: [PATCH 1/4] Fix next/prev buttons for emulated disks --- plugins/dynamix/DeviceInfo.page | 17 +++++++++++------ plugins/dynamix/Selftest.page | 7 ------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/plugins/dynamix/DeviceInfo.page b/plugins/dynamix/DeviceInfo.page index fb784d406..24548645e 100644 --- a/plugins/dynamix/DeviceInfo.page +++ b/plugins/dynamix/DeviceInfo.page @@ -41,7 +41,7 @@ if ($type=='New') { $dev = $disk['device']; $file = $disk['id']."-$date.txt"; foreach ($disks as $sheet) { - if ($sheet['name']=='flash' || strpos($sheet['status'],'_NP')) continue; + if ($sheet['type']=='Flash' || ($sheet['type']=='Parity' && $sheet['status']=='DISK_NP_DSBL')) continue; $sheets[] = $sheet['name']; if ($sheet['name']==$name) { $i = $n; $spindown = "diskSpindownDelay.{$sheet['idx']}"; $delay = $sheet['spindownDelay']; } $n++; @@ -149,12 +149,17 @@ function setGlue(form,reset) { $('#helptext').hide(); } } -1):?> -var ctrl = ""; - ctrl += ""; - ctrl += ""; - $(function() { +1):?> + var ctrl = ""; + ctrl += ""; + ctrl += ""; + + $('.tabs').append(ctrl); + + $('div[id=title]:first').append(ctrl); + + var form = document.smart_settings; form.smType.selectedIndex = 0; diff --git a/plugins/dynamix/Selftest.page b/plugins/dynamix/Selftest.page index c3e4821fd..91c9c495c 100644 --- a/plugins/dynamix/Selftest.page +++ b/plugins/dynamix/Selftest.page @@ -171,13 +171,6 @@ function startLongTest() { } } $(function() { -1):?> - - $('.tabs').append(ctrl); - - $('div[id=title]:first').append(ctrl); - - var smarttest = $.cookie('test.'); testUpdate(smarttest===undefined); if (smarttest !== undefined) $('#'+smarttest+'_test').val('Stop').removeAttr('disabled'); From 04b6b34474d2d5f823293a8a16bba1f519caa5bf Mon Sep 17 00:00:00 2001 From: bergware Date: Sun, 12 Nov 2017 10:25:13 +0100 Subject: [PATCH 2/4] Move DELETE button to separate section at end --- plugins/dynamix/ArrayOperation.page | 45 ++++++++++++++--------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/plugins/dynamix/ArrayOperation.page b/plugins/dynamix/ArrayOperation.page index 1e9c9475a..a7d4a8f62 100644 --- a/plugins/dynamix/ArrayOperation.page +++ b/plugins/dynamix/ArrayOperation.page @@ -16,22 +16,23 @@ Tag="snowflake-o" ?> - + diff --git a/plugins/dynamix/Eth0.page b/plugins/dynamix/Eth0.page index 369670963..8ce2a4753 100644 --- a/plugins/dynamix/Eth0.page +++ b/plugins/dynamix/Eth0.page @@ -70,11 +70,11 @@ $vlan_eth0 = [0]; if (isset($eth0)) foreach ($eth0 as $key => $val) if (strpos($key,$vlan_id)===0) $vlan_eth0[] = substr($key,strlen($vlan_id)); ?>