From 489b73d104e8f6273dbbadf0ac73375aa677c522 Mon Sep 17 00:00:00 2001 From: bergware Date: Mon, 25 Dec 2023 06:15:33 +0100 Subject: [PATCH] Dashboard: fix display error --- emhttp/plugins/dynamix/DashStats.page | 4 ++-- emhttp/plugins/dynamix/nchan/update_2 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/emhttp/plugins/dynamix/DashStats.page b/emhttp/plugins/dynamix/DashStats.page index 0b675d1af..cfdd0bad8 100644 --- a/emhttp/plugins/dynamix/DashStats.page +++ b/emhttp/plugins/dynamix/DashStats.page @@ -1537,7 +1537,7 @@ dashboard.on('message',function(msg,meta) { case 2: if (!update2) break; var get = JSON.parse(msg); - var data = get.disk.split('\n'); + var data = get.disk.split('\r'); var info = moreInfo(data,"_(Array)_"); // array devices $('#array_list tr.updated').remove(); @@ -1547,7 +1547,7 @@ dashboard.on('message',function(msg,meta) { smartMenu('#array_list'); // pool devices for (var i=0,pool; pool=get.pool[i]; i++) { - var data = pool.split('\n'); + var data = pool.split('\r'); var info = moreInfo(data,"_(Pool)_"); $('#pool_list'+i+' tr.updated').remove(); $('#pool_list'+i).append(pool).hideMe(); diff --git a/emhttp/plugins/dynamix/nchan/update_2 b/emhttp/plugins/dynamix/nchan/update_2 index 5f757913e..727ed18ef 100755 --- a/emhttp/plugins/dynamix/nchan/update_2 +++ b/emhttp/plugins/dynamix/nchan/update_2 @@ -309,7 +309,7 @@ while (true) { $error = $warning = $red = $orange = $fail = $smart = $full = $high = 0; $echo[$a][] = array_group('Parity'); $echo[$a][] = array_group('Data'); - $echo[$a][] = "\n".($error+$warning)."\n".($red+$orange)."\n".($fail+$smart)."\n".($full+$high); + $echo[$a][] = "\r".($error+$warning)."\r".($red+$orange)."\r".($fail+$smart)."\r".($full+$high); $echo[$a] = implode($echo[$a]); //pool devices @@ -320,7 +320,7 @@ while (true) { $error = $warning = $red = $orange = $fail = $smart = $full = $high = 0; $echo[$a][$p] = []; $echo[$a][$p][] = array_group('Cache',$pool); - $echo[$a][$p][] = "\n".($error+$warning)."\n".($red+$orange)."\n".($fail+$smart)."\n".($full+$high); + $echo[$a][$p][] = "\r".($error+$warning)."\r".($red+$orange)."\r".($fail+$smart)."\r".($full+$high); $echo[$a][$p] = implode($echo[$a][$p]); $p++; }