diff --git a/plugins/dynamix/DeviceInfo.page b/plugins/dynamix/DeviceInfo.page index 22d43dc0a..b69ef986e 100644 --- a/plugins/dynamix/DeviceInfo.page +++ b/plugins/dynamix/DeviceInfo.page @@ -48,6 +48,7 @@ if ($type=='New') { $n++; } } +$tag = $disk['name']; $end = count($sheets)-1; $prev = $i>0 ? $sheets[$i-1] : $sheets[$end]; $next = $i<$end ? $sheets[$i+1] : $sheets[0]; @@ -157,7 +158,7 @@ function btrfsBalance(path) { $('#btrfs-balance').text(data); setTimeout(function(){btrfsBalance(path);},1000); } else { - $.removeCookie('btrfs-balance-'); + $.removeCookie('btrfs-balance-'); refresh(); } }); @@ -168,7 +169,7 @@ function btrfsScrub(path) { $('#btrfs-scrub').text(data); setTimeout(function(){btrfsScrub(path);},1000); } else { - $.removeCookie('btrfs-scrub-'); + $.removeCookie('btrfs-scrub-'); refresh(); } }); @@ -179,7 +180,7 @@ function btrfsCheck(path) { if (data.slice(-1)!='\0') { setTimeout(function(){btrfsCheck(path);},1000); } else { - $.removeCookie('btrfs-check-'); + $.removeCookie('btrfs-check-'); refresh(); } }); @@ -190,7 +191,7 @@ function rfsCheck(path) { if (data.slice(-1)!='\0') { setTimeout(function(){rfsCheck(path);},1000); } else { - $.removeCookie('rfs-check-'); + $.removeCookie('rfs-check-'); refresh(); } }); @@ -201,7 +202,7 @@ function xfsCheck(path) { if (data.slice(-1)!='\0') { setTimeout(function(){xfsCheck(path);},1000); } else { - $.removeCookie('xfs-check-'); + $.removeCookie('xfs-check-'); refresh(); } }); @@ -209,9 +210,6 @@ function xfsCheck(path) { function updateMode(form,mode) { $(form).find('input[name="#arg[3]"]').val(mode); } -$.get('/webGui/include/ReloadPage.php',{btrfs:'btrfs'},function(btrfs) { - if (btrfs=='disable' && !$.cookie('btrfs-balance-')) btrfsBalance($.cookie('btrfs-balance-')); -}); $(function() { 1):?> var ctrl = "'>"; @@ -228,11 +226,12 @@ $(function() { form.smType.selectedIndex = 0; setGlue(form,false); - if ($.cookie('btrfs-balance-')) btrfsBalance($.cookie('btrfs-balance-')); - if ($.cookie('btrfs-scrub-')) btrfsScrub($.cookie('btrfs-scrub-')); - if ($.cookie('btrfs-check-')) btrfsCheck($.cookie('btrfs-check-')); - if ($.cookie('rfs-check-')) rfsCheck($.cookie('rfs-check-')); - if ($.cookie('xfs-check-')) xfsCheck($.cookie('xfs-check-')); + if ($.cookie('btrfs-balance-')) btrfsBalance($.cookie('btrfs-balance-')); + else $.get('/webGui/include/ReloadPage.php',{btrfs:'btrfs'},function(btrfs){if(btrfs=='disable'){$.cookie('btrfs-balance-','/mnt/');btrfsBalance($.cookie('btrfs-balance-'));}}); + if ($.cookie('btrfs-scrub-')) btrfsScrub($.cookie('btrfs-scrub-')); + if ($.cookie('btrfs-check-')) btrfsCheck($.cookie('btrfs-check-')); + if ($.cookie('rfs-check-')) rfsCheck($.cookie('rfs-check-')); + if ($.cookie('xfs-check-')) xfsCheck($.cookie('xfs-check-')); }); @@ -287,7 +286,7 @@ _(Critical disk temperature threshold)_ (°): > A value of zero will disable the critical threshold (including notifications). :end - + _(File system status)_: :   @@ -359,12 +358,12 @@ _(Critical disk utilization threshold)_ (%):
_(Balance Status)_
-
+ - + _(btrfs filesystem df)_: -: ".shell_exec("/sbin/btrfs filesystem df /mnt/{$disk['name']}").""?> +: ".shell_exec("/sbin/btrfs filesystem df /mnt/$tag").""?> _(btrfs balance status)_: : ".implode("\n", $balance_status).""?> @@ -372,7 +371,7 @@ _(btrfs balance status)_: - +   @@ -413,7 +412,7 @@ _(btrfs balance status)_: - +   : @@ -426,16 +425,16 @@ _(btrfs balance status)_:   -: "._('Balance')." "._('is only available when array is Started') : sprintf(_('See %s Settings'),ucfirst(prefix($disk['name'])))?> +: "._('Balance')." "._('is only available when array is Started') : sprintf(_('See %s Settings'),ucfirst(prefix($tag)))?>
_(Scrub Status)_
-
+ - + _(btrfs scrub status)_: : ".implode("\n", $scrub_status).""?> @@ -443,7 +442,7 @@ _(btrfs scrub status)_: - +   @@ -459,7 +458,7 @@ _(btrfs scrub status)_: - +   : @@ -472,14 +471,14 @@ _(btrfs scrub status)_:   -: "._('Scrub')." "._('is only available when array is Started') : sprintf(_('See %s Settings'),ucfirst(prefix($disk['name'])))?> +: "._('Scrub')." "._('is only available when array is Started') : sprintf(_('See %s Settings'),ucfirst(prefix($tag)))?>
_(Check Filesystem Status)_
-
+ @@ -523,13 +522,13 @@ _(btrfs check status)_: - +   : **_(Check)_** _(is only available when array is Started in **Maintenance** mode)_.   -: . +: . @@ -537,7 +536,7 @@ _(btrfs check status)_:
_(Check Filesystem Status)_
- + @@ -590,7 +589,7 @@ _(reiserfsck status)_:
_(Check Filesystem Status)_
- +