diff --git a/emhttp/plugins/dynamix.apcupsd/include/UPSstatus.php b/emhttp/plugins/dynamix.apcupsd/include/UPSstatus.php index 0c8a7e56f..381f70969 100644 --- a/emhttp/plugins/dynamix.apcupsd/include/UPSstatus.php +++ b/emhttp/plugins/dynamix.apcupsd/include/UPSstatus.php @@ -88,7 +88,7 @@ if (file_exists("/var/run/apcupsd.pid")) { if (count($rows)%2==1) $result[] = ""; if ($power && isset($load)) $status[5] = ($load<90 ? "" : "").round($power*$load/100)." W (".$status[5].")"; elseif (isset($load)) $status[5] = ($load<90 ? "" : "").$status[5].""; - $status[6] = isset($output) ? ((!$volt || ($minv<$output && $output<$maxv) ? "" : "").$status[6].($freq ? " ~ $freq Hz" : "")."") : $status[6]; + $status[6] = isset($output) ? ((!$volt || ($minv<$output && $output<$maxv) ? "" : "").$status[6].(isset($freq) ? " ~ $freq Hz" : "")."") : $status[6]; } if (empty($rows)) $result[] = ""._('No information available').""; diff --git a/emhttp/plugins/dynamix.vm.manager/include/VMMachines.php b/emhttp/plugins/dynamix.vm.manager/include/VMMachines.php index fdaa51e82..b1715e787 100644 --- a/emhttp/plugins/dynamix.vm.manager/include/VMMachines.php +++ b/emhttp/plugins/dynamix.vm.manager/include/VMMachines.php @@ -185,7 +185,7 @@ foreach ($vms as $vm) { $changemedia = "getisoimageboth(\"{$uuid}\",\"hda\",\"{$cdbus}\",\"{$cdfile}\",\"hdb\",\"{$cdbus2}\",\"{$cdfile2}\")"; $title = _('Select ISO image'); - $cdstr = $cdromcount." / 2 "; + $cdstr = $cdromcount." / 2"; echo ""; echo "$image$vm
"._($status)." $snapshotstcount
"; echo "$desc"; @@ -248,7 +248,7 @@ foreach ($vms as $vm) { $title = _('Insert CD'); $changemedia = "changemedia(\"{$uuid}\",\"{$dev}\",\"{$bus}\",\"--select\")"; $disk = _("No CD image inserted into drive"); - echo "$disk $bus$capacity$allocation$boot"; + echo "$disk$bus$capacity$allocation$boot"; } } echo ""; diff --git a/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css b/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css index 705cc8381..cd6cb2c06 100644 --- a/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css +++ b/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css @@ -15,7 +15,7 @@ table.domdisk tbody tr:nth-child(even){background-color:transparent!important} table.domdisk tbody tr:nth-child(4n-1){background-color:transparent!important} table.snapshot{margin-top:0} i.mover{margin-right:8px;display:none} -i.fa-floppy-o{padding-left:12px} +i.fa-dot-circle-o{padding-left:12px} #resetsort{margin-left:12px;display:inline-block;width:32px} .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button[disabled]{cursor:default;color:#808080;background:-webkit-gradient(linear,left top,right top,from(#404040),to(#808080)) 0 0 no-repeat,-webkit-gradient(linear,left top,right top,from(#404040),to(#808080)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#404040),to(#404040)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#808080),to(#808080)) 100% 100% no-repeat;background:linear-gradient(90deg,#404040 0,#808080) 0 0 no-repeat,linear-gradient(90deg,#404040 0,#808080) 0 100% no-repeat,linear-gradient(0deg,#404040 0,#404040) 0 100% no-repeat,linear-gradient(0deg,#808080 0,#808080) 100% 100% no-repeat;background-size:100% 2px,100% 2px,2px 100%,2px 100%} .dropdown-menu{z-index:10001} diff --git a/emhttp/plugins/dynamix/include/DefaultPageLayout.php b/emhttp/plugins/dynamix/include/DefaultPageLayout.php index 095ed437b..133ebdab6 100644 --- a/emhttp/plugins/dynamix/include/DefaultPageLayout.php +++ b/emhttp/plugins/dynamix/include/DefaultPageLayout.php @@ -546,34 +546,32 @@ function digits(number) { if (number < 100) return 'two'; return 'three'; } -function openNotifier(filter) { +function openNotifier() { $.post('/webGui/include/Notify.php',{cmd:'get',csrf_token:csrf_token},function(msg) { - $.each($.parseJSON(msg), function(i, notify) { - if (notify.importance==filter) { - $.jGrowl(notify.subject+'
'+notify.description, { - group: notify.importance, - header: notify.event+': '+notify.timestamp, - theme: notify.file, - sticky: true, - beforeOpen: function(e,m,o){if ($('div.jGrowl-notification').hasClass(notify.file)) return(false);}, - afterOpen: function(e,m,o){if (notify.link) $(e).css('cursor','pointer');}, - click: function(e,m,o){if (notify.link) location.replace(notify.link);}, - close: function(e,m,o){$.post('/webGui/include/Notify.php',{cmd:'archive',file:notify.file,csrf_token:csrf_token});} - }); - } + $.each($.parseJSON(msg), function(i, notify){ + $.jGrowl(notify.subject+'
'+notify.description,{ + group: notify.importance, + header: notify.event+': '+notify.timestamp, + theme: notify.file, + sticky: true, + beforeOpen: function(e,m,o){if ($('div.jGrowl-notification').hasClass(notify.file)) return(false);}, + afterOpen: function(e,m,o){if (notify.link) $(e).css('cursor','pointer');}, + click: function(e,m,o){if (notify.link) location.replace(notify.link);}, + close: function(e,m,o){$.post('/webGui/include/Notify.php',{cmd:'archive',file:notify.file,csrf_token:csrf_token});} + }); }); }); } -function closeNotifier(filter) { +function closeNotifier() { $.post('/webGui/include/Notify.php',{cmd:'get',csrf_token:csrf_token},function(msg) { - $.each($.parseJSON(msg), function(i, notify) { - if (notify.importance==filter) $.post('/webGui/include/Notify.php',{cmd:'archive',file:notify.file,csrf_token:csrf_token}); + $.each($.parseJSON(msg), function(i, notify){ + $.post('/webGui/include/Notify.php',{cmd:'archive',file:notify.file,csrf_token:csrf_token}); }); - $('div.jGrowl').find('.'+filter).find('div.jGrowl-close').trigger('click'); + $('div.jGrowl').find('div.jGrowl-close').trigger('click'); }); } -function viewHistory(filter) { - location.replace('/Tools/NotificationsArchive?filter='+filter); +function viewHistory() { + location.replace('/Tools/NotificationsArchive'); } function flashReport() { $.post('/webGui/include/Report.php',{cmd:'config'},function(check){ @@ -873,7 +871,7 @@ defaultPage.on('message', function(msg,meta) { case 2: // notifications var bell1 = 0, bell2 = 0, bell3 = 0; - $.each($.parseJSON(msg), function(i, notify) { + $.each($.parseJSON(msg), function(i, notify){ switch (notify.importance) { case 'alert' : bell1++; break; case 'warning': bell2++; break; @@ -881,7 +879,7 @@ defaultPage.on('message', function(msg,meta) { } if (notify.show) { - $.jGrowl(notify.subject+'
'+notify.description, { + $.jGrowl(notify.subject+'
'+notify.description,{ group: notify.importance, header: notify.event+': '+notify.timestamp, theme: notify.file, @@ -893,14 +891,10 @@ defaultPage.on('message', function(msg,meta) { } }); - $('#bell').removeClass('red-orb yellow-orb green-orb').prop('title'," ["+bell1+']\n'+" ["+bell2+']\n'+" ["+bell3+']');; + $('#bell').removeClass('red-orb yellow-orb green-orb').prop('title'," ["+bell1+']\n'+" ["+bell2+']\n'+" ["+bell3+']'); if (bell1) $('#bell').addClass('red-orb'); else if (bell2) $('#bell').addClass('yellow-orb'); else if (bell3) $('#bell').addClass('green-orb'); - - if (bell1) $('#dropdown-board li.dropdown-submenu:eq(0)').removeClass('disabled'); else $('#dropdown-board li.dropdown-submenu:eq(0)').addClass('disabled').find('.dropdown-menu').hide(); - if (bell2) $('#dropdown-board li.dropdown-submenu:eq(1)').removeClass('disabled'); else $('#dropdown-board li.dropdown-submenu:eq(1)').addClass('disabled').find('.dropdown-menu').hide(); - if (bell3) $('#dropdown-board li.dropdown-submenu:eq(2)').removeClass('disabled'); else $('#dropdown-board li.dropdown-submenu:eq(2)').addClass('disabled').find('.dropdown-menu').hide(); break; } }); @@ -1081,9 +1075,9 @@ $(function() { var opts = []; context.settings({above:false}); opts.push({header:""}); - opts.push({text:"",icon:'fa-bell-o',subMenu:[{text:"",icon:'fa-folder-open-o',action:function(e){e.preventDefault();openNotifier('alert');}},{text:"",icon:'fa-file-text-o',action:function(e){e.preventDefault();viewHistory('alert');}},{text:"",icon:'fa-check-square-o',action:function(e){e.preventDefault();closeNotifier('alert');}}]}); - opts.push({text:"",icon:'fa-star-o',subMenu:[{text:"",icon:'fa-folder-open-o',action:function(e){e.preventDefault();openNotifier('warning');}},{text:"",icon:'fa-file-text-o',action:function(e){e.preventDefault();viewHistory('warning');}},{text:"",icon:'fa-check-square-o',action:function(e){e.preventDefault();closeNotifier('warning');}}]}); - opts.push({text:"",icon:'fa-sun-o',subMenu:[{text:"",icon:'fa-folder-open-o',action:function(e){e.preventDefault();openNotifier('normal');}},{text:"",icon:'fa-file-text-o',action:function(e){e.preventDefault();viewHistory('normal');}},{text:"",icon:'fa-check-square-o',action:function(e){e.preventDefault();closeNotifier('normal');}}]}); + opts.push({text:"",icon:'fa-folder-open-o',action:function(e){e.preventDefault();openNotifier();}}); + opts.push({text:"",icon:'fa-file-text-o',action:function(e){e.preventDefault();viewHistory();}}); + opts.push({text:"",icon:'fa-check-square-o',action:function(e){e.preventDefault();closeNotifier();}}); context.attach('#board',opts); if (location.pathname.search(/\/(AddVM|UpdateVM|AddContainer|UpdateContainer)/)==-1) { $('blockquote.inline_help').each(function(i) {