From 96b0044ec9fdbddd2cd2370b19920f604bc43679 Mon Sep 17 00:00:00 2001 From: bergware Date: Sun, 4 Sep 2016 08:45:31 +0200 Subject: [PATCH 01/12] Removed anchor symbol from archived notifications --- plugins/dynamix/include/NotificationsArchive.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/dynamix/include/NotificationsArchive.php b/plugins/dynamix/include/NotificationsArchive.php index 559eeefc1..45f5b9eb2 100644 --- a/plugins/dynamix/include/NotificationsArchive.php +++ b/plugins/dynamix/include/NotificationsArchive.php @@ -22,9 +22,9 @@ foreach ($files as $file) { $fields = explode(PHP_EOL, file_get_contents($file)); $archive = basename($file); if ($extra = count($fields)>6) { - $td_ = ""; $_td = ""; + $td_ = ""; $_td = ""; } else { - $td_ = ""; $_td = ""; + $td_ = ""; $_td = ""; } $c = 0; foreach ($fields as $field) { From deacba4b9ca3f7ddf452a6b7d75961945678fd54 Mon Sep 17 00:00:00 2001 From: bergware Date: Tue, 6 Sep 2016 22:12:35 +0200 Subject: [PATCH 02/12] Fix possible 'race condition' when populating slots after a "new array" execution It might happen that an array reset occurs before the "retain" list is created, resulting in an empty list. There is one open point: When the form is submitted and the page returns then $var['mdState'] variable isn't updated yet by emhttp, this only occurs after a full page reload or page switch. As a result the GUI doesn't show the correct message after pressing Apply. Is there a way to let emhttp update the $var variable before returning the page? --- plugins/dynamix/NewConfig.page | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/dynamix/NewConfig.page b/plugins/dynamix/NewConfig.page index 4348e67b0..9bef74e1b 100644 --- a/plugins/dynamix/NewConfig.page +++ b/plugins/dynamix/NewConfig.page @@ -33,7 +33,7 @@ function prepareNewConfig(form) { } } // set preset filter to populate slots - $.post('/webGui/include/PrepareDisks.php',{preset:preset}); + $.post('/webGui/include/PrepareDisks.php',{preset:preset},function(){form.submit();}); } function assign(id,disk) { @@ -67,7 +67,8 @@ Use the *'Retain current configuration'* selection to populate the desired disk effect of making it ***impossible*** to rebuild an existing failed drive - you have been warned!
-
+ + Retain current configuration:
- + RESET (please configure)' : 'Array must be STOPPED'?> -Yes I want to do this +Yes I want to do this
From e15810b08c32fd435c014de192ae025af3a63138 Mon Sep 17 00:00:00 2001 From: bergware Date: Thu, 8 Sep 2016 21:05:24 +0200 Subject: [PATCH 03/12] Fixed: show history button after new config and array start --- plugins/dynamix/ArrayOperation.page | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dynamix/ArrayOperation.page b/plugins/dynamix/ArrayOperation.page index fd6b2cb50..cdeea0d61 100644 --- a/plugins/dynamix/ArrayOperation.page +++ b/plugins/dynamix/ArrayOperation.page @@ -163,7 +163,7 @@ $('.tabs').append(" - + From bba9f5e862747092e603622dc1f00c3aad6947a4 Mon Sep 17 00:00:00 2001 From: bergware Date: Thu, 8 Sep 2016 21:23:09 +0200 Subject: [PATCH 04/12] Fixed: parity display in Main page when not set (yet) --- plugins/dynamix/ArrayOperation.page | 19 +++++++++++++------ plugins/dynamix/include/Helpers.php | 5 +++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/plugins/dynamix/ArrayOperation.page b/plugins/dynamix/ArrayOperation.page index cdeea0d61..6f7e56a85 100644 --- a/plugins/dynamix/ArrayOperation.page +++ b/plugins/dynamix/ArrayOperation.page @@ -157,25 +157,32 @@ $('.tabs').append(" - Last check incomplete on , finding error. + Last check incomplete on , finding error.
Error code: - - + + Last checked on , finding error. +
Duration: + + Last check incomplete on , finding error. +
Error code: + + - Last checked on , finding error. + Last checked on , finding error.
Duration: - Last check incomplete on , finding error. + Last check incomplete on , finding error.
Error code: @@ -185,7 +192,7 @@ $('.tabs').append(" - Last check completed on , finding error. + Last check completed on , finding error.
Duration: getOffset($date); @@ -136,7 +137,7 @@ function day_count($time) { $days = date_diff($last,$now)->format('%a'); switch (true) { case ($days<0): - return ""; + return; case ($days==0): return " (today)"; case ($days==1): From 355b59df9cfdbd02fc71f3d467766b49b9a5df58 Mon Sep 17 00:00:00 2001 From: bergware Date: Thu, 8 Sep 2016 21:29:20 +0200 Subject: [PATCH 05/12] Revert "Fixed: parity display in Main page when not set (yet)" This reverts commit bba9f5e862747092e603622dc1f00c3aad6947a4. --- plugins/dynamix/ArrayOperation.page | 19 ++++++------------- plugins/dynamix/include/Helpers.php | 5 ++--- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/plugins/dynamix/ArrayOperation.page b/plugins/dynamix/ArrayOperation.page index 6f7e56a85..cdeea0d61 100644 --- a/plugins/dynamix/ArrayOperation.page +++ b/plugins/dynamix/ArrayOperation.page @@ -157,32 +157,25 @@ $('.tabs').append(" - Last check incomplete on , finding error. + Last check incomplete on , finding error.
Error code: - - Last checked on , finding error. -
Duration: - - Last check incomplete on , finding error. -
Error code: - - + + - Last checked on , finding error. + Last checked on , finding error.
Duration: - Last check incomplete on , finding error. + Last check incomplete on , finding error.
Error code: @@ -192,7 +185,7 @@ $('.tabs').append(" - Last check completed on , finding error. + Last check completed on , finding error.
Duration: getOffset($date); @@ -137,7 +136,7 @@ function day_count($time) { $days = date_diff($last,$now)->format('%a'); switch (true) { case ($days<0): - return; + return ""; case ($days==0): return " (today)"; case ($days==1): From 9ab3ba1510ecb4ef460724480282320051280432 Mon Sep 17 00:00:00 2001 From: bergware Date: Thu, 8 Sep 2016 21:34:45 +0200 Subject: [PATCH 06/12] Fixed: parity display in Main page when not set (yet) --- plugins/dynamix/ArrayOperation.page | 19 +++++++++++++------ plugins/dynamix/include/Helpers.php | 5 +++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/plugins/dynamix/ArrayOperation.page b/plugins/dynamix/ArrayOperation.page index cdeea0d61..6f7e56a85 100644 --- a/plugins/dynamix/ArrayOperation.page +++ b/plugins/dynamix/ArrayOperation.page @@ -157,25 +157,32 @@ $('.tabs').append(" - Last check incomplete on , finding error. + Last check incomplete on , finding error.
Error code: - - + + Last checked on , finding error. +
Duration: + + Last check incomplete on , finding error. +
Error code: + + - Last checked on , finding error. + Last checked on , finding error.
Duration: - Last check incomplete on , finding error. + Last check incomplete on , finding error.
Error code: @@ -185,7 +192,7 @@ $('.tabs').append(" - Last check completed on , finding error. + Last check completed on , finding error.
Duration: getOffset($date); @@ -136,7 +137,7 @@ function day_count($time) { $days = date_diff($last,$now)->format('%a'); switch (true) { case ($days<0): - return ""; + return; case ($days==0): return " (today)"; case ($days==1): From 843df76158629c21dd47643b11e832e6f46b489b Mon Sep 17 00:00:00 2001 From: bergware Date: Sat, 10 Sep 2016 09:49:00 +0200 Subject: [PATCH 07/12] Fixed: parity display in Main page when not set (yet) --- plugins/dynamix/ArrayOperation.page | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/plugins/dynamix/ArrayOperation.page b/plugins/dynamix/ArrayOperation.page index 6f7e56a85..69889d1c2 100644 --- a/plugins/dynamix/ArrayOperation.page +++ b/plugins/dynamix/ArrayOperation.page @@ -164,25 +164,19 @@ $('.tabs').append(" - - Last checked on , finding error. -
Duration: - - Last check incomplete on , finding error. -
Error code: - - + Last checked on +
Duration: + - Last checked on , finding error. + Last checked on , finding error.
Duration: - Last check incomplete on , finding error. + Last check incomplete on , finding error.
Error code: @@ -192,7 +186,7 @@ $('.tabs').append(" - Last check completed on , finding error. + Last check completed on , finding error.
Duration: Date: Sun, 11 Sep 2016 12:58:55 +0200 Subject: [PATCH 08/12] Enhanced Clone functionality for User and Disk shares --- plugins/dynamix/SecuritySMB.page | 50 ++++++++++++----- plugins/dynamix/ShareEdit.page | 80 ++++++++++++++++++++------- plugins/dynamix/include/CheckPort.php | 4 +- plugins/dynamix/include/ShareData.php | 16 ++++++ 4 files changed, 113 insertions(+), 37 deletions(-) create mode 100644 plugins/dynamix/include/ShareData.php diff --git a/plugins/dynamix/SecuritySMB.page b/plugins/dynamix/SecuritySMB.page index 983b8d0a4..ea54dfd73 100644 --- a/plugins/dynamix/SecuritySMB.page +++ b/plugins/dynamix/SecuritySMB.page @@ -23,9 +23,15 @@ function clone_list($disk) { table.settings{width:83.3%;} table.settings tr td:first-child{width:40%;} + +> *Clone destinations* is used to copy the SMB security settings of the current selected share to one or more other existing shares. +> +> Select the desired destinations and press **Clone** to copy the SMB security settings to those shares. +
Clone destinations +
-
+ Share name: @@ -70,14 +77,20 @@ Security: > read-only access.   -: +:
User Access
Guests have read-only access.
+ +> *Clone destinations* is used to copy the User access settings of the current share to one or more other existing shares. +> +> Select the desired destinations and press **Clone** to copy the User access settings to those shares. +
Clone destinations +
-
+ +   -: +:
User Access
Guests have no access.
+ +> *Clone destinations* is used to copy the User access settings of the current share to one or more other existing shares. +> +> Select the desired destinations and press **Clone** to copy the User access settings to those shares. +
Clone destinations +
-
+   -: +:
@@ -133,17 +155,17 @@ function initDropdown2(reset) { $('#s4').dropdownchecklist('destroy'); $('#s5').dropdownchecklist('destroy'); } - $("#s4").dropdownchecklist({emptyText:'None', width:150, explicitClose:'...close'}); - $("#s5").dropdownchecklist({emptyText:'None', width:150, explicitClose:'...close'}); + $("#s4").dropdownchecklist({firstItemChecksAll:true, emptyText:'please select...', width:150, explicitClose:'...close'}); + $("#s5").dropdownchecklist({firstItemChecksAll:true, emptyText:'please select...', width:150, explicitClose:'...close'}); } function cloneSMB() { var data = {}, copied = false; - data['shareExport'] = ''; - data['shareSecurity'] = ''; - data['changeShareSecurity'] = 'Apply'; + data.shareExport = ''; + data.shareSecurity = ''; + data.changeShareSecurity = 'Apply'; $('select#s4 option').map(function() { if ($(this).prop('selected')==true) { - data['shareName'] = $(this).val(); + data.shareName = $(this).val(); $.post('/update.htm', data); copied = true; } @@ -168,10 +190,10 @@ function cloneUser() { if ($userAccess) echo " data['userAccess.$idx'] = '$userAccess';\n"; } ?> - data['changeShareAccess'] = 'Apply'; + data.changeShareAccess = 'Apply'; $('select#s5 option').map(function() { if ($(this).prop('selected')==true) { - data['shareName'] = $(this).val(); + data.shareName = $(this).val(); $.post('/update.htm', data); copied = true; } diff --git a/plugins/dynamix/ShareEdit.page b/plugins/dynamix/ShareEdit.page index 5cc5d95b4..ba97b36f6 100644 --- a/plugins/dynamix/ShareEdit.page +++ b/plugins/dynamix/ShareEdit.page @@ -54,29 +54,39 @@ $myDisks = array_filter(array_diff(array_keys($disks), explode(',',$var['shareUs > A *Share*, also called a *User Share*, is simply the name of a top-level directory that exists on one or more of your > storage devices (array and cache). Each share can be exported for network access. When browsing a share, we return the > composite view of all files and subdirectories for which that top-level directory exists on each storage device. +> + +> *Clone source* is used to preset the settings of the new share with the settings of an existing share. +> Select the desired share name and press **Clone** to copy the settings from that source. + +> *Clone destinations* is used to copy the settings of the current share to one or more other existing shares. +> Select the desired destinations and press **Clone** to copy the settings to those shares. + -
+ Clone destinations -
+
+ +Clone source + +
+ -
+ Share name: @@ -321,7 +359,7 @@ Share status: > Share does *not* contain any data and may be deleted if not needed any longer. Delete -: +: Share status: : Share contains data @@ -329,6 +367,6 @@ Share status: > Share can *not* be deleted as long as it contains data. Be aware that some data can be hidden. See also [SMB Settings](/Settings/SMB) -> Hide "dot" files.   -: +:
diff --git a/plugins/dynamix/include/CheckPort.php b/plugins/dynamix/include/CheckPort.php index 7ef188642..08b1b5fc5 100644 --- a/plugins/dynamix/include/CheckPort.php +++ b/plugins/dynamix/include/CheckPort.php @@ -1,6 +1,6 @@ + From 59f409925069fb63778ad83e6e0e38a8501d6171 Mon Sep 17 00:00:00 2001 From: bergware Date: Tue, 13 Sep 2016 16:26:13 +0200 Subject: [PATCH 09/12] Add SATA as controller type --- plugins/dynamix/DeviceInfo.page | 1 + plugins/dynamix/DiskSettings.page | 1 + 2 files changed, 2 insertions(+) diff --git a/plugins/dynamix/DeviceInfo.page b/plugins/dynamix/DeviceInfo.page index 44c8d5357..336c81195 100644 --- a/plugins/dynamix/DeviceInfo.page +++ b/plugins/dynamix/DeviceInfo.page @@ -437,6 +437,7 @@ SMART controller type: + diff --git a/plugins/dynamix/DiskSettings.page b/plugins/dynamix/DiskSettings.page index 1bdffc4b4..72d17b58d 100644 --- a/plugins/dynamix/DiskSettings.page +++ b/plugins/dynamix/DiskSettings.page @@ -241,6 +241,7 @@ Default SMART controller type: : "; $empty = ($disk['idSb']!='' ? 'no device' : 'unassigned'); if ($disk['id']!='') { - $out .= ""; + $out .= ""; $out .= ""; } else $out .= ""; - foreach ($devs as $dev) {$out .= "";} + foreach ($devs as $dev) {$out .= "";} return "$out"; } function fs_info(&$disk) {