diff --git a/plugins/dynamix/DashStats.page b/plugins/dynamix/DashStats.page index 9bf0eed22..26fc8bdcf 100644 --- a/plugins/dynamix/DashStats.page +++ b/plugins/dynamix/DashStats.page @@ -208,6 +208,7 @@ i.vpn{font-size:1.4rem!important;cursor:pointer} i.indent{display:inline-block;width:18px} i.f32{font-size:32px!important} i.f14{font-size:1.4rem!important} +i.fa.orb{margin-left:0} i[class^="icon-"]{font-size:1.6rem;margin-right:8px} i[class^="icon-u-"]{font-size:inherit} i#mycase[class^="case-"]{font-size:128px} @@ -827,9 +828,9 @@ function loadlist(init) { } $.post('/webGui/include/DashboardApps.php',{display:'',docker:'',vms:''},function(d) { var data = d.split('\0'); - $('#docker_view').find('tr.updated').remove(); + $('#docker_view tr.updated').remove(); $('#docker_view').append(data[0]); - $('#vm_view').find('tr.updated').remove(); + $('#vm_view tr.updated').remove(); $('#vm_view').append(data[1]); if ($.cookie('my_apps')!=null) $('span.apps.stopped').hide(0,noApps()); if ($.cookie('my_vms')!=null) $('span.vms.stopped').hide(0,noVMs()); @@ -1068,12 +1069,12 @@ function addProperties() { }); } function showContent() { - var count = {'db-box1':$('table#db-box1').find('tbody').length, 'db-box2':$('table#db-box2').find('tbody').length, 'db-box3':$('table#db-box3').find('tbody').length} + var count = {'db-box1':$('table#db-box1 tbody').length, 'db-box2':$('table#db-box2 tbody').length, 'db-box3':$('table#db-box3 tbody').length} var inactive = $.cookie('inactive_content'); if (inactive) { inactive = inactive.split(';'); for (var n=0,x; x=inactive[n]; n++) { - var tbody = $('table.dashboard').find('tbody[sort="'+x+'"]'); + var tbody = $('table.dashboard tbody[sort="'+x+'"]'); var id = tbody.parent().prop('id'); count[id]--; tbody.hide(); @@ -1150,10 +1151,10 @@ function LockButton() { if ($.cookie('lockbutton') == null) { $.cookie('lockbutton','lockbutton'); - $('div.nav-item.LockButton').find('a').prop('title',"_(Lock sortable items)_"); - $('div.nav-item.LockButton').find('b').removeClass('icon-u-lock red-text').addClass('icon-u-lock-open green-text'); + $('div.nav-item.LockButton a').prop('title',"_(Lock sortable items)_"); + $('div.nav-item.LockButton b').removeClass('icon-u-lock red-text').addClass('icon-u-lock-open green-text'); - $('div.nav-item.LockButton').find('span').text("_(Lock sortable items)_"); + $('div.nav-item.LockButton span').text("_(Lock sortable items)_"); $('#db-box1,#db-box2,#db-box3').sortable({connectWith:'#db-box1,#db-box2,#db-box3'}); $('table.dashboard').sortable({helper:sortableHelper,items:'.sortable',cursor:'grab',delay:100,opacity:0.5,zIndex:9999,forcePlaceholderSize:true, receive:function(e,ui){ @@ -1171,10 +1172,10 @@ function LockButton() { } else { $.removeCookie('lockbutton'); - $('div.nav-item.LockButton').find('a').prop('title',"_(Unlock sortable items)_"); - $('div.nav-item.LockButton').find('b').removeClass('icon-u-lock-open green-text').addClass('icon-u-lock red-text'); + $('div.nav-item.LockButton a').prop('title',"_(Unlock sortable items)_"); + $('div.nav-item.LockButton b').removeClass('icon-u-lock-open green-text').addClass('icon-u-lock red-text'); - $('div.nav-item.LockButton').find('span').text("_(Unlock sortable items)_"); + $('div.nav-item.LockButton span').text("_(Unlock sortable items)_"); $('table.dashboard').sortable('destroy'); } } @@ -1220,7 +1221,7 @@ dashboard.on('message',function(msg,meta) { var data = part[0].split('\0'); var info = moreInfo(data,"_(Array)_"); // array devices - $('#array_list').find('tr.updated').remove(); + $('#array_list tr.updated').remove(); $('#array_list').append(data[0]); $('#array_info').parent().css('display',info?'':'none'); $('#array_info').html(info); @@ -1230,7 +1231,7 @@ dashboard.on('message',function(msg,meta) { for (var i=0,t; t=text[i]; i++) { var data = t.split('\0'); var info = moreInfo(data,"_(Cache)_"); - $('#pool_list'+i).find('tr.updated').remove(); + $('#pool_list'+i+' tr.updated').remove(); $('#pool_list'+i).append(t); $('#pool_info'+i).parent().css('display',info?'':'none'); $('#pool_info'+i).html(info); @@ -1240,7 +1241,7 @@ dashboard.on('message',function(msg,meta) { // unassigned devices var data = part[2].split('\0'); var info = moreInfo(data,"_(Unassigned)_"); - $('#devs_list').find('tr.updated').remove(); + $('#devs_list tr.updated').remove(); $('#devs_list').append(data[0]); $('#devs_info').parent().css('display',info?'':'none'); $('#devs_info').html(info); diff --git a/plugins/dynamix/NotificationsArchive.page b/plugins/dynamix/NotificationsArchive.page index 285cf7250..f7227fac8 100644 --- a/plugins/dynamix/NotificationsArchive.page +++ b/plugins/dynamix/NotificationsArchive.page @@ -23,9 +23,14 @@ $filters = mk_option(0,'',_('No filter')).mk_option(0,'alert',_('Alerts')).mk_op + - +
_(Time)__(Event)__(Subject)__(Description)__(Importance)_
_(Time)__(Event)__(Subject)__(Description)__(Importance)_
diff --git a/plugins/dynamix/include/DefaultPageLayout.php b/plugins/dynamix/include/DefaultPageLayout.php index 4cf381564..7b2e4c4df 100644 --- a/plugins/dynamix/include/DefaultPageLayout.php +++ b/plugins/dynamix/include/DefaultPageLayout.php @@ -89,7 +89,7 @@ if ($themes2) { } $notes = '/var/tmp/unRAIDServer.txt'; if (!file_exists($notes)) file_put_contents($notes,shell_exec("$docroot/plugins/dynamix.plugin.manager/scripts/plugin changes $docroot/plugins/unRAIDServer/unRAIDServer.plg")); -$notes = " "; +$notes = " "; ?> diff --git a/plugins/dynamix/include/DeleteLogFile.php b/plugins/dynamix/include/DeleteLogFile.php index ab989c84c..99c2d0dd7 100644 --- a/plugins/dynamix/include/DeleteLogFile.php +++ b/plugins/dynamix/include/DeleteLogFile.php @@ -1,6 +1,6 @@ diff --git a/plugins/dynamix/include/NotificationsArchive.php b/plugins/dynamix/include/NotificationsArchive.php index add289f75..f77a345fb 100644 --- a/plugins/dynamix/include/NotificationsArchive.php +++ b/plugins/dynamix/include/NotificationsArchive.php @@ -1,6 +1,6 @@ 6) { + if ($extra = count($fields)>5) { $td_ = ""; $_td = ""; } else { $td_ = ""; $_td = ""; @@ -41,12 +42,13 @@ foreach ($files as $file) { $tag = ($c<4) ? "" : " data='".str_replace(['alert','warning','normal'],['0','1','2'],$text)."'"; echo (!$c++) ? "".str_replace('*',$text,$td_).date($dynamix['notify']['date'].' '.$dynamix['notify']['time'],$text)."$_td" : ""._($text).""; } - echo ""; + echo ""; if ($extra) { $text = explode('=',$field,2)[1]; echo "$text"; $row++; } } -if ($empty) echo ""._("No notifications present").""; +if ($rows==0) echo "
"._("No notifications present")."
"; +echo "\0$rows"; ?> diff --git a/plugins/dynamix/include/Notify.php b/plugins/dynamix/include/Notify.php index 01646b977..75e47260d 100644 --- a/plugins/dynamix/include/Notify.php +++ b/plugins/dynamix/include/Notify.php @@ -48,7 +48,7 @@ case 'get': break; case 'hide': $file = $_POST['file']??''; - if (file_exists($file) && $file==realpath($file) && pathinfo($file)['extension']=='notify') chmod($file,0000); + if (file_exists($file) && $file==realpath($file) && pathinfo($file)['extension']=='notify') chmod($file,0400); break; case 'archive': $file = $_POST['file']??''; diff --git a/plugins/dynamix/include/SmartInfo.php b/plugins/dynamix/include/SmartInfo.php index 6ad409735..cdb735832 100644 --- a/plugins/dynamix/include/SmartInfo.php +++ b/plugins/dynamix/include/SmartInfo.php @@ -206,7 +206,7 @@ case "identify": echo ""._('Manufacturing date').":"; echo ""._('Date of purchase').":"; echo ""._('Warranty period').":"; } break; diff --git a/plugins/dynamix/scripts/notify b/plugins/dynamix/scripts/notify index 9d23dca30..a2b28dd07 100755 --- a/plugins/dynamix/scripts/notify +++ b/plugins/dynamix/scripts/notify @@ -232,7 +232,7 @@ case 'get': $fields = file($file,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES); $time = true; $output[$i]['file'] = basename($file); - $output[$i]['show'] = fileperms($file)==32768 ? 0 : 1; + $output[$i]['show'] = (fileperms($file) & 0x0FFF)==0400 ? 0 : 1; foreach ($fields as $field) { if (!$field) continue; [$key,$val] = array_pad(explode('=', $field),2,''); @@ -246,9 +246,8 @@ case 'get': case 'archive': if ($argc != 3) exit(usage()); - if (strpos(realpath("$unread/{$argv[2]}"), $unread.'/') === 0) { - @unlink("$unread/{$argv[2]}"); - } + $file = $argv[2]; + if (strpos(realpath("$unread/$file"),$unread.'/')===0) @unlink("$unread/$file"); break; }