From 63cd5dabbb4be490f57668bd433306ff84df70fc Mon Sep 17 00:00:00 2001 From: bergware Date: Thu, 10 Jan 2019 23:40:02 +0100 Subject: [PATCH] Dashboard: more updates and corrections + save money --- plugins/dynamix/DashStats.page | 10 +++------- plugins/dynamix/include/DashboardApps.php | 14 +++++++++----- plugins/dynamix/styles/default-azure.css | 10 +++++----- plugins/dynamix/styles/default-black.css | 14 +++++++------- plugins/dynamix/styles/default-gray.css | 10 +++++----- plugins/dynamix/styles/default-white.css | 14 +++++++------- 6 files changed, 36 insertions(+), 36 deletions(-) diff --git a/plugins/dynamix/DashStats.page b/plugins/dynamix/DashStats.page index 220354817..a30646ca4 100644 --- a/plugins/dynamix/DashStats.page +++ b/plugins/dynamix/DashStats.page @@ -141,11 +141,7 @@ if ($low) $memory_maximum = pow(2,ceil(log($memory_installed)/log(2))); .switch-button-label{float:left;cursor:pointer} .switch-button-background{float:left;position:relative;top:12px;background:#ccc;border:1px solid #aaa;margin:0 10px;border-radius:4px;cursor:pointer} .switch-button-button{position:absolute;left:-1px;top:-1px;background:#fafafa;border:1px solid #aaa;border-radius:4px} -img,i.img{width:32px;height:32px;margin-right:10px} -i.started{color:#009900} -i.stopped{color:#ef3d47} -i.paused{color:#f0dd33} -span.update{color:#3b5998} +img.img,i.img{width:32px;height:32px;margin-right:10px} span.outer{float:left;margin-bottom:20px;margin-right:20px;cursor:pointer} span.outer.started>img,span.outer.started>i.img{opacity:1.0} span.outer.stopped>img,span.outer.stopped>i.img{opacity:0.3} @@ -452,8 +448,8 @@ function noVMs() { } function loadlist(init) { if (init) { - $('#apps').switchButton({show_labels:false, checked:$.cookie('my_apps')=='startedOnly'}); - $('#vms').switchButton({show_labels:false, checked:$.cookie('my_vms')=='startedOnly'}); + $('#apps').switchButton({labels_placement:'left', off_label:'All Apps', on_label:'Started only', checked:$.cookie('my_apps')=='startedOnly'}); + $('#vms').switchButton({labels_placement:'left', off_label:'All VMs', on_label:'Started only', checked:$.cookie('my_vms')=='startedOnly'}); $('#apps').change(function(){ $('span.outer.apps.stopped').finish().toggle('fast',function(){noApps();}) $('#apps').is(':checked') ? $.cookie('my_apps','startedOnly',{expires:3650}) : $.removeCookie('my_apps'); diff --git a/plugins/dynamix/include/DashboardApps.php b/plugins/dynamix/include/DashboardApps.php index aa0e77683..07934cdeb 100644 --- a/plugins/dynamix/include/DashboardApps.php +++ b/plugins/dynamix/include/DashboardApps.php @@ -48,10 +48,11 @@ if ($display=='icons' || $display=='docker') { $menu[] = sprintf("addDockerContainerContext('%s','%s','%s',%s,%s,%s,%s,'%s','%s','%s','%s','%s');", addslashes($name), addslashes($ct['ImageId']), addslashes($template), $running, $paused, $updateStatus, $is_autostart, addslashes($webGui), $shell, $id, addslashes($support), addslashes($project)); $shape = $running ? ($paused ? 'pause' : 'play') : 'square'; $status = $running ? ($paused ? 'paused' : 'started') : 'stopped'; - $update = $updateStatus=='false' ? 'update' : ''; + $color = $status=='started' ? 'green-text' : ($status=='paused' ? 'orange-text' : 'red-text'); + $update = $updateStatus=='false' ? 'blue-text' : ''; $icon = $info['icon'] ?: '/plugins/dynamix.docker.manager/images/question.png'; - $image = substr($icon,-4)=='.png' ? "" : (substr($icon,0,5)=='icon-' ? "" : ""); - echo "$image$name
$status
"; + $image = substr($icon,-4)=='.png' ? "" : (substr($icon,0,5)=='icon-' ? "" : ""); + echo "$image$name
$status
"; } $none = count($containers) ? "No running docker containers" : "No docker containers defined"; echo ""; @@ -96,19 +97,22 @@ if ($display=='icons' || $display=='vms') { case 'running': $shape = 'play'; $status = 'started'; + $color = 'green-text'; break; case 'paused': case 'pmsuspended': $shape = 'pause'; $status = 'paused'; + $color = 'orange-text'; break; default: $shape = 'square'; $status = 'stopped'; + $color = 'red-text'; break; } - $image = substr($icon,-4)=='.png' ? "" : (substr($icon,0,5)=='icon-' ? "" : ""); - echo "$image$vm
$status
"; + $image = substr($icon,-4)=='.png' ? "" : (substr($icon,0,5)=='icon-' ? "" : ""); + echo "$image$vm
$status
"; } $none = count($vms) ? "No running virtual machines" : "No virtual machines defined"; echo ""; diff --git a/plugins/dynamix/styles/default-azure.css b/plugins/dynamix/styles/default-azure.css index 7a5126d40..e0cd26e25 100644 --- a/plugins/dynamix/styles/default-azure.css +++ b/plugins/dynamix/styles/default-azure.css @@ -1,8 +1,8 @@ html{font-family:clear-sans;font-size:62.5%;height:100%} body{font-size:1.3rem;color:#606e7f;background-color:#e4e2e4;padding:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale} -@media (max-width:1280px){#template{min-width:1280px;margin:0}} -@media (min-width:1281px){#template{min-width:1280px;margin:0}} -@media (min-width:1921px){#template{min-width:1280px;max-width:1920px;margin:0 auto}} +@media (max-width:1280px){#template{min-width:1260px;max-width:1260px;margin:0}} +@media (min-width:1281px){#template{min-width:1260px;margin:0}} +@media (min-width:1921px){#template{min-width:1260px;max-width:1920px;margin:0 auto}} img{border:none;text-decoration:none;vertical-align:middle} p{text-align:left} p.centered{text-align:left} @@ -173,8 +173,8 @@ table.share_status.dashboard td i[class^="icon-u-"]{font-size:inherit} table.share_status.dashboard td span[class^="fa "]{font-size:1.6rem;margin-right:8px} table.share_status.dashboard td i#mycase[class^="case-"]{font-size:128px} table.share_status.dashboard td i#mycase[class^="fa "]{font-size:96px} -table.share_status.dashboard td i.chevron{float:right;font-size:1.1rem!important;margin-top:-10px;margin-right:2px;cursor:pointer;color:#606e7f} -table.share_status.dashboard td i.chevron.mt0{margin-top:0} +table.share_status.dashboard td i.chevron{float:right;font-size:1.1rem!important;margin-top:0;margin-right:2px;cursor:pointer;color:#606e7f} +table.share_status.dashboard td i.chevron.mt0{margin-top:14px} table.share_status.dashboard td div.section{display:inline-block;vertical-align:top;margin-left:4px;font-size:1.2rem;font-weight:bold;text-transform:uppercase;letter-spacing:1px} table.share_status.dashboard td div.section span{font-weight:normal;text-transform:none;letter-spacing:0} table.share_status.dashboard td span.info{float:right;margin-right:20px;font-size:1.2rem;font-weight:normal;text-transform:none;letter-spacing:0} diff --git a/plugins/dynamix/styles/default-black.css b/plugins/dynamix/styles/default-black.css index 5a10d55a7..6247cb721 100644 --- a/plugins/dynamix/styles/default-black.css +++ b/plugins/dynamix/styles/default-black.css @@ -1,8 +1,8 @@ html{font-family:clear-sans;font-size:62.5%;height:100%} body{font-size:1.3rem;color:#f2f2f2;background-color:#1c1b1b;padding:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale} -@media (max-width:1280px){#template{min-width:1280px;margin:0}} -@media (min-width:1281px){#template{min-width:1280px;margin:0 10px}} -@media (min-width:1921px){#template{min-width:1280px;max-width:1920px;margin:0 auto}} +@media (max-width:1280px){#template{min-width:1260px;max-width:1260px;margin:0}} +@media (min-width:1281px){#template{min-width:1260px;margin:0 10px}} +@media (min-width:1921px){#template{min-width:1260px;max-width:1920px;margin:0 auto}} img{border:none;text-decoration:none;vertical-align:middle} p{text-align:justify} p.centered{text-align:left} @@ -44,7 +44,7 @@ select.slot{min-width:44rem;max-width:44rem} input.narrow{width:166px} input.trim{width:76px;min-width:76px} textarea{resize:none} -#header{position:absolute;top:0;left:0;width:100%;min-width:1280px;height:91px;z-index:100;margin:0;color:#1c1b1b;background-color:#f2f2f2;background-size:100% 90px;background-repeat:no-repeat} +#header{position:absolute;top:0;left:0;width:100%;min-width:1260px;height:91px;z-index:100;margin:0;color:#1c1b1b;background-color:#f2f2f2;background-size:100% 90px;background-repeat:no-repeat} #header .logo{float:left;margin-left:10px;color:#e22828;width:160px;text-align:center} #header .logo svg{width:160px;display:block;margin:25px 50px 8px 0} #header .block{margin:0;float:right;text-align:right;background-color:rgba(242,242,242,0.3);padding:10px 12px} @@ -57,7 +57,7 @@ textarea{resize:none} #title span.right{font-size:1.4rem;padding-top:2px;padding-right:10px;float:right} #title span img{padding-right:4px} #title.shift{margin-top:-30px} -#menu{position:absolute;top:90px;left:0;width:100%;min-width:1280px;height:4rem;line-height:4rem;padding:0;margin:0;font-size:1.2rem;background-color:#f2f2f2;z-index:101} +#menu{position:absolute;top:90px;left:0;width:100%;min-width:1260px;height:4rem;line-height:4rem;padding:0;margin:0;font-size:1.2rem;background-color:#f2f2f2;z-index:101} #nav-block{overflow:hidden;height:4rem;letter-spacing:1.8px} #nav-left{float:left} #nav-right{float:right} @@ -174,8 +174,8 @@ table.share_status.dashboard td i[class^="icon-u-"]{font-size:inherit} table.share_status.dashboard td span[class^="fa "]{font-size:1.6rem;margin-right:8px} table.share_status.dashboard td i#mycase[class^="case-"]{font-size:128px} table.share_status.dashboard td i#mycase[class^="fa "]{font-size:96px} -table.share_status.dashboard td i.chevron{float:right;font-size:1.1rem!important;margin-top:-10px;margin-right:2px;cursor:pointer;color:#f2f2f2} -table.share_status.dashboard td i.chevron.mt0{margin-top:0} +table.share_status.dashboard td i.chevron{float:right;font-size:1.1rem!important;margin-top:0;margin-right:2px;cursor:pointer;color:#f2f2f2} +table.share_status.dashboard td i.chevron.mt0{margin-top:14px} table.share_status.dashboard td div.section{display:inline-block;vertical-align:top;margin-left:4px;font-size:1.2rem;font-weight:bold;text-transform:uppercase;letter-spacing:1px} table.share_status.dashboard td div.section span{font-weight:normal;text-transform:none;letter-spacing:0} table.share_status.dashboard td span.info{float:right;margin-right:20px;font-size:1.2rem;font-weight:normal;text-transform:none;letter-spacing:0} diff --git a/plugins/dynamix/styles/default-gray.css b/plugins/dynamix/styles/default-gray.css index 58f16251d..d4bb5a7f7 100644 --- a/plugins/dynamix/styles/default-gray.css +++ b/plugins/dynamix/styles/default-gray.css @@ -1,8 +1,8 @@ html{font-family:clear-sans;font-size:62.5%;height:100%} body{font-size:1.3rem;color:#606e7f;background-color:#1b1d1b;padding:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale} -@media (max-width:1280px){#template{min-width:1280px;margin:0}} -@media (min-width:1281px){#template{min-width:1280px;margin:0}} -@media (min-width:1921px){#template{min-width:1280px;max-width:1920px;margin:0 auto}} +@media (max-width:1280px){#template{min-width:1260px;max-width:1260px;margin:0}} +@media (min-width:1281px){#template{min-width:1260px;margin:0}} +@media (min-width:1921px){#template{min-width:1260px;max-width:1920px;margin:0 auto}} img{border:none;text-decoration:none;vertical-align:middle} p{text-align:left} p.centered{text-align:left} @@ -173,8 +173,8 @@ table.share_status.dashboard td i[class^="icon-u-"]{font-size:inherit} table.share_status.dashboard td span[class^="fa "]{font-size:1.6rem;margin-right:8px} table.share_status.dashboard td i#mycase[class^="case-"]{font-size:128px} table.share_status.dashboard td i#mycase[class^="fa "]{font-size:96px} -table.share_status.dashboard td i.chevron{float:right;font-size:1.1rem!important;margin-top:-10px;margin-right:2px;cursor:pointer;color:#606e7f} -table.share_status.dashboard td i.chevron.mt0{margin-top:0} +table.share_status.dashboard td i.chevron{float:right;font-size:1.1rem!important;margin-top:0;margin-right:2px;cursor:pointer;color:#606e7f} +table.share_status.dashboard td i.chevron.mt0{margin-top:14px} table.share_status.dashboard td div.section{display:inline-block;vertical-align:top;margin-left:4px;font-size:1.2rem;font-weight:bold;text-transform:uppercase;letter-spacing:1px} table.share_status.dashboard td div.section span{font-weight:normal;text-transform:none;letter-spacing:0} table.share_status.dashboard td span.info{float:right;margin-right:20px;font-size:1.2rem;font-weight:normal;text-transform:none;letter-spacing:0} diff --git a/plugins/dynamix/styles/default-white.css b/plugins/dynamix/styles/default-white.css index 3320cc267..2242e0e27 100644 --- a/plugins/dynamix/styles/default-white.css +++ b/plugins/dynamix/styles/default-white.css @@ -1,8 +1,8 @@ html{font-family:clear-sans;font-size:62.5%;height:100%} body{font-size:1.3rem;color:#1c1b1b;background-color:#f2f2f2;padding:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale} -@media (max-width:1280px){#template{min-width:1280px;margin:0}} -@media (min-width:1281px){#template{min-width:1280px;margin:0 10px}} -@media (min-width:1921px){#template{min-width:1280px;max-width:1920px;margin:0 auto}} +@media (max-width:1280px){#template{min-width:1260px;max-width:1260px;margin:0}} +@media (min-width:1281px){#template{min-width:1260px;margin:0 10px}} +@media (min-width:1921px){#template{min-width:1260px;max-width:1920px;margin:0 auto}} img{border:none;text-decoration:none;vertical-align:middle} p{text-align:justify} p.centered{text-align:left} @@ -44,7 +44,7 @@ select.slot{min-width:44rem;max-width:44rem} input.narrow{width:166px} input.trim{width:76px;min-width:76px} textarea{resize:none} -#header{position:absolute;top:0;left:0;width:100%;min-width:1280px;height:91px;z-index:100;margin:0;color:#f2f2f2;background-color:#1c1b1b;background-size:100% 90px;background-repeat:no-repeat} +#header{position:absolute;top:0;left:0;width:100%;min-width:1260px;height:91px;z-index:100;margin:0;color:#f2f2f2;background-color:#1c1b1b;background-size:100% 90px;background-repeat:no-repeat} #header .logo{float:left;margin-left:10px;color:#e22828;width:160px;text-align:center} #header .logo svg{width:160px;display:block;margin:25px 50px 8px 0} #header .block{margin:0;float:right;text-align:right;background-color:rgba(28,27,27,0.3);padding:10px 12px} @@ -57,7 +57,7 @@ textarea{resize:none} #title span.right{font-size:1.4rem;padding-top:2px;padding-right:10px;float:right} #title span img{padding-right:4px} #title.shift{margin-top:-30px} -#menu{position:absolute;top:90px;left:0;width:100%;min-width:1280px;height:4rem;line-height:4rem;padding:0;margin:0;font-size:1.2rem;background-color:#1c1b1b;z-index:101} +#menu{position:absolute;top:90px;left:0;width:100%;min-width:1260px;height:4rem;line-height:4rem;padding:0;margin:0;font-size:1.2rem;background-color:#1c1b1b;z-index:101} #nav-block{overflow:hidden;height:4rem;letter-spacing:1.8px} #nav-left{float:left} #nav-right{float:right} @@ -174,8 +174,8 @@ table.share_status.dashboard td i[class^="icon-u-"]{font-size:inherit} table.share_status.dashboard td span[class^="fa "]{font-size:1.6rem;margin-right:8px} table.share_status.dashboard td i#mycase[class^="case-"]{font-size:128px} table.share_status.dashboard td i#mycase[class^="fa "]{font-size:96px} -table.share_status.dashboard td i.chevron{float:right;font-size:1.1rem!important;margin-top:-10px;margin-right:2px;cursor:pointer;color:#1c1b1b} -table.share_status.dashboard td i.chevron.mt0{margin-top:0} +table.share_status.dashboard td i.chevron{float:right;font-size:1.1rem!important;margin-top:0;margin-right:2px;cursor:pointer;color:#1c1b1b} +table.share_status.dashboard td i.chevron.mt0{margin-top:14px} table.share_status.dashboard td div.section{display:inline-block;vertical-align:top;margin-left:4px;font-size:1.2rem;font-weight:bold;text-transform:uppercase;letter-spacing:1px} table.share_status.dashboard td div.section span{font-weight:normal;text-transform:none;letter-spacing:0} table.share_status.dashboard td span.info{float:right;margin-right:20px;font-size:1.2rem;font-weight:normal;text-transform:none;letter-spacing:0}