diff --git a/.vscode/settings.json b/.vscode/settings.json index c92ef75ac..8bb0df453 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -81,6 +81,7 @@ "libvirt-php" ], "search.exclude": { - "emhttp/webGui/**/*": true, - } + "emhttp/webGui/**/*": true + }, + "php-cs-fixer.executablePath": "${extensionPath}/php-cs-fixer.phar" } diff --git a/emhttp/plugins/dynamix.docker.manager/sheets/AddContainer.css b/emhttp/plugins/dynamix.docker.manager/sheets/AddContainer.css index 18095486f..21d425290 100644 --- a/emhttp/plugins/dynamix.docker.manager/sheets/AddContainer.css +++ b/emhttp/plugins/dynamix.docker.manager/sheets/AddContainer.css @@ -66,12 +66,7 @@ div#configLocation dt { --add-container-file-tree-background: var(--gray-100); } -.fileTree { +/* .fileTree { width: 240px; max-height: 200px; - overflow-y: scroll; - overflow-x: hidden; - position: absolute; - display: none; - background: var(--add-container-file-tree-background); -} +} */ diff --git a/emhttp/plugins/dynamix.docker.manager/sheets/DockerSettings.css b/emhttp/plugins/dynamix.docker.manager/sheets/DockerSettings.css index 636329602..e9b30701f 100644 --- a/emhttp/plugins/dynamix.docker.manager/sheets/DockerSettings.css +++ b/emhttp/plugins/dynamix.docker.manager/sheets/DockerSettings.css @@ -75,16 +75,10 @@ span.nonexist { margin-left: 20px; } -.fileTree { - background: var(--docker-settings-file-tree-background); +/* .fileTree { width: 300px; max-height: 150px; - overflow-y: scroll; - overflow-x: hidden; - position: absolute; - z-index: 100; - display: none; -} +} */ span.disabled { color: var(--docker-settings-span-disabled-color); } diff --git a/emhttp/plugins/dynamix.docker.manager/sheets/UpdateContainer.css b/emhttp/plugins/dynamix.docker.manager/sheets/UpdateContainer.css index 3e7a8efdf..836c822bb 100644 --- a/emhttp/plugins/dynamix.docker.manager/sheets/UpdateContainer.css +++ b/emhttp/plugins/dynamix.docker.manager/sheets/UpdateContainer.css @@ -66,12 +66,7 @@ div#configLocation dt { margin-top: -0.18rem !important; } -.fileTree { +/* .fileTree { width: 240px; max-height: 200px; - overflow-y: scroll; - overflow-x: hidden; - position: absolute; - display: none; - background: var(--update-container-file-tree-background); -} +} */ diff --git a/emhttp/plugins/dynamix.vm.manager/VMTemplates.page b/emhttp/plugins/dynamix.vm.manager/VMTemplates.page index e1e44ceac..011266462 100644 --- a/emhttp/plugins/dynamix.vm.manager/VMTemplates.page +++ b/emhttp/plugins/dynamix.vm.manager/VMTemplates.page @@ -16,6 +16,14 @@ Markdown="false" * all copies or substantial portions of the Software. */ ?> + +"> +"> + + + + + - - -"> -"> - - - - - -
> diff --git a/emhttp/plugins/dynamix.vm.manager/include/VMedit.php b/emhttp/plugins/dynamix.vm.manager/include/VMedit.php index cd0768870..c9f98d653 100644 --- a/emhttp/plugins/dynamix.vm.manager/include/VMedit.php +++ b/emhttp/plugins/dynamix.vm.manager/include/VMedit.php @@ -100,9 +100,10 @@ if (strpos($strSelectedTemplate,"User-") !== false) { $usertemplate = 1; } ?> - + +
diff --git a/emhttp/plugins/dynamix.vm.manager/sheets/UpdateVM.css b/emhttp/plugins/dynamix.vm.manager/sheets/UpdateVM.css deleted file mode 100644 index b86c887c1..000000000 --- a/emhttp/plugins/dynamix.vm.manager/sheets/UpdateVM.css +++ /dev/null @@ -1,296 +0,0 @@ -:root { - --add-vm-background: var(--black); -} - -.Theme--azure:root, -.Theme--white:root { - --add-vm-background: var(--gray-100); -} - -body { - -webkit-overflow-scrolling: touch; -} -#vmform table { - margin-top: 0; - table-layout: fixed; -} -#vmform div.title + table { - margin-top: 0; -} -#vmform table tr { - vertical-align: top; - line-height: 4rem; - height: 4rem; -} -#vmform table tr td:nth-child(1) { - width: 25%; - text-align: right; - padding-right: 10px; -} -#vmform table tr td:nth-child(2) { - width: 800px; -} -@media (max-width: 1280px) { - #vmform table tr td:first-child { - width: 35%; - padding-right: 4rem; - } -} -@media (min-width: 1281px) { - #vmform table tr td:first-child { - width: 30%; - padding-right: 4rem; - } -} -@media (min-width: 1921px) { - #vmform table tr td:first-child { - width: 25%; - padding-right: 4rem; - } -} -#vmform table tr td:last-child { - width: inherit; -} - -#vmform textarea{ - max-width:500px; - scrollbar-width:4px; -} - -#vmform textarea::-webkit-scrollbar{ - height:4px; - width:4px; -} - -#vmform .multiple { - position: relative; -} -#vmform .sectionbutton { - position: absolute; - left: 2px; - cursor: pointer; - opacity: 0.4; - font-size: 1.4rem; - line-height: 17px; - z-index: 10; - transition-property: opacity, left; - transition-duration: 0.1s; - transition-timing-function: linear; -} -#vmform .sectionbutton.remove { - top: 0; - opacity: 0.3; -} -#vmform .sectionbutton.add { - bottom: 0; -} -#vmform .sectionbutton:hover { - opacity: 1; -} -#vmform .sectiontab { - position: absolute; - top: 2px; - bottom: 2px; - left: 0; - width: 6px; - border-radius: 3px; - background-color: var(--gray-200); /* Condensed from: #dddddd */ - transition-property: background, width; - transition-duration: 0.1s; - transition-timing-function: linear; -} -#vmform .multiple:hover .sectionbutton { - opacity: 0.7; - left: 4px; -} -#vmform .multiple:hover .sectionbutton.remove { - opacity: 0.6; -} -#vmform .multiple:hover .sectiontab { - background-color: var(--gray-300); - width: 8px; -} -#vmform table.multiple:hover { - background-position: 0 0; -} -#vmform table.multiple td { - padding: 5px 0; -} -span.advancedview_panel { - display: none; - line-height: 16px; - margin-top: 1px; -} -.basic { - display: none; -} -.advanced { - /*Empty placeholder*/ -} -.switch-button-label.off { - color: inherit; -} -#template_img { - cursor: pointer; -} -#template_img:hover { - opacity: 0.5; -} -#template_img:hover i { - opacity: 1; -} -.template_img_chooser_inner { - display: inline-block; - width: 80px; - margin-bottom: 15px; - margin-right: 10px; - text-align: center; -} -.template_img_chooser_inner img { - width: 48px; - height: 48px; -} -.template_img_chooser_inner p { - text-align: center; - line-height: 8px; -} -#template_img_chooser { - width: 560px; - height: 300px; - overflow-y: scroll; - position: relative; - display:grid; - grid-template-columns: repeat(6, minmax(0, 1fr)); -} -#template_img_chooser div:hover { - background-color: var(--gray-150); /* Condensed from: #eee */ - cursor: pointer; -} -#form_content { - display: none; -} -#vmform .four { - overflow: hidden; -} -#vmform .four label { - float: left; - display: table-cell; - width: 15%; -} -#vmform .four label:nth-child(4n + 4) { -} -#vmform .four label.cpu1 { - width: 28%; - height: 16px; - line-height: 16px; -} -#vmform .four label.cpu2 { - width: 3%; - height: 16px; - line-height: 16px; -} -#vmform .mac_generate { - cursor: pointer; - margin-left: -5px; - color: var(--blue-700); /* Condensed from: #08c */ - font-size: 1.3rem; - transform: translate(0px, 2px); -} -#vmform .disk { - display: none; -} -#vmform .disk_preview { - display: inline-block; - color: var(--gray-300); /* Condensed from: #bbb */ - transform: translate(0px, 1px); -} -i.fa-plus-circle, -i.fa-minus-circle { - margin-left: 8px; -} -input[type="checkbox"] { - margin-left: 0; -} - -span.width { - display: inline-block; - width: 280px; -} - -span.column1 { - display: inline-block; - width: 140px; -} - -span.column2 { - display: inline-block; - width: 220px; -} - -input#btnvCPUSelect, -input.wlan0_info { - font-size: 1rem; - padding: 5px 10px; - margin: 0 0 0 10px; -} - -span.space { - display: inline-block; - width: 60px; -} - -span.label { - display: inline-block; - width: 110px; - text-align: right; - overflow: hidden; - text-overflow: ellipsis; -} - -span.ipvtap { - margin-left: 25px; - font-family: bitstream; -} - -select.narrow { - min-width: 90px !important; -} - -select.second { - margin-left: 12px; - max-width: 90px; - margin-right: 0; -} - -div.wlan0 { - text-align: left; -} - -input.trim { - width: 98px; - min-width: 98px; -} - -input.second { - margin-left: 8px; -} - -.autostart ~ .switch-button-background { - margin-top: 8px !important; - margin-left: 0 !important; -} - -.hidden { - display: none !important; -} - -.CodeMirror { - border: 1px solid var(--gray-150); - cursor: text; - margin-top: 15px; - margin-bottom: 10px; -} - -.CodeMirror pre.CodeMirror-placeholder { - color: var(--gray-400); -} diff --git a/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css b/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css index 045a4cedb..5d107af86 100644 --- a/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css +++ b/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css @@ -128,13 +128,7 @@ span.vmgraphics { text-align: left; } -.fileTree { - background: var(--vm-machines-file-tree-background); +/* .fileTree { width: 500px; max-height: 320px; - overflow-y: scroll; - overflow-x: hidden; - position: absolute; - z-index: 100; - display: none; -} +} */ diff --git a/emhttp/plugins/dynamix.vm.manager/sheets/VMSettings.css b/emhttp/plugins/dynamix.vm.manager/sheets/VMSettings.css index f02419b9a..a3d717f8e 100644 --- a/emhttp/plugins/dynamix.vm.manager/sheets/VMSettings.css +++ b/emhttp/plugins/dynamix.vm.manager/sheets/VMSettings.css @@ -57,13 +57,7 @@ body { font-family: clear-sans; } -.fileTree { - background: var(--vm-machines-file-tree-background); +/* .fileTree { width: 300px; max-height: 150px; - overflow-y: scroll; - overflow-x: hidden; - position: absolute; - z-index: 100; - display: none; -} +} */ diff --git a/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates.css b/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates.css index 1c300ed3d..886d03883 100644 --- a/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates.css +++ b/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates.css @@ -33,7 +33,6 @@ .vmtemplate p { text-align: center; margin-top: 8px; - line-height: 12px; } div.template, @@ -42,13 +41,7 @@ input#upload { display: none; } -.fileTree { - background: var(--filetree-background); +/* .fileTree { width: 300px; max-height: 150px; - overflow-y: scroll; - overflow-x: hidden; - position: absolute; - z-index: 100; - display: none; -} +} */ diff --git a/emhttp/plugins/dynamix.vm.manager/sheets/AddVM.css b/emhttp/plugins/dynamix.vm.manager/styles/edit.css similarity index 89% rename from emhttp/plugins/dynamix.vm.manager/sheets/AddVM.css rename to emhttp/plugins/dynamix.vm.manager/styles/edit.css index b86c887c1..2e942b58d 100644 --- a/emhttp/plugins/dynamix.vm.manager/sheets/AddVM.css +++ b/emhttp/plugins/dynamix.vm.manager/styles/edit.css @@ -1,5 +1,6 @@ :root { --add-vm-background: var(--black); + --add-vm-border: var(--gray-150); } .Theme--azure:root, @@ -52,14 +53,14 @@ body { width: inherit; } -#vmform textarea{ - max-width:500px; - scrollbar-width:4px; +#vmform textarea { + max-width: 500px; + scrollbar-width: 4px; } -#vmform textarea::-webkit-scrollbar{ - height:4px; - width:4px; +#vmform textarea::-webkit-scrollbar { + height: 4px; + width: 4px; } #vmform .multiple { @@ -142,29 +143,39 @@ span.advancedview_panel { .template_img_chooser_inner { display: inline-block; width: 80px; - margin-bottom: 15px; - margin-right: 10px; text-align: center; } +.template_img_chooser_inner:hover { + color: var(--orange-400); + cursor: pointer; +} .template_img_chooser_inner img { width: 48px; height: 48px; } .template_img_chooser_inner p { text-align: center; - line-height: 8px; + margin: 0; +} +.template_img_parent { + position: relative; +} +#template_img_chooser_outer { + position: absolute; + display: none; + border-radius: 5px; + border: 1px solid var(--add-vm-border); + background: var(--add-vm-background); + z-index: 10; } #template_img_chooser { width: 560px; height: 300px; overflow-y: scroll; position: relative; - display:grid; + display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); -} -#template_img_chooser div:hover { - background-color: var(--gray-150); /* Condensed from: #eee */ - cursor: pointer; + gap: 1rem; } #form_content { display: none; @@ -294,3 +305,7 @@ input.second { .CodeMirror pre.CodeMirror-placeholder { color: var(--gray-400); } + +.fileTree { + position: relative; +} diff --git a/emhttp/plugins/dynamix/Eth0.page b/emhttp/plugins/dynamix/Eth0.page index 445930af7..7b4858ea9 100644 --- a/emhttp/plugins/dynamix/Eth0.page +++ b/emhttp/plugins/dynamix/Eth0.page @@ -162,13 +162,6 @@ function prepareSettings(form) { if (brnics.length > 1) form.BRSTP.value = 'yes'; if ($(form).find('input[name="#arg[1]"]').val() == 'none') return true; - var metrics = [], metrics6 = []; - $(form).find('input[name^="METRIC:"]').each(function(){if($(this).val() > 0) metrics.push($(this).val());}); - $(form).find('input[name^="METRIC6:"]').each(function(){if($(this).val() > 0) metrics6.push($(this).val());}); - if (metrics.same() || metrics6.same()) { - swal({title:'Duplicate metrics', text:'List of default gateways contains duplicate metric values', animation:'none', type:'error', html:true, confirmButtonText:"_(Ok)_"}); - return false; - } // enable form items for submission $(form).find('input,select').prop('disabled',false); if (form.TYPE.value == 'access') { @@ -213,7 +206,6 @@ function prepareSettings(form) { $(form).find('select[name^="USE_DHCP:"]').each(function() { var i = $(this).prop('name').split(':')[1]; var protocol = $(form).find('select[name="PROTOCOL:'+i+'"]').val() || 'ipv4'; - var metric = $(form).find('input[name="METRIC:'+i+'"]').val(); var gw4 = (port == 'eth0') ? true : $(form).find('input[name="USE_GW4:'+i+'"]').prop('checked'); if (protocol != 'ipv6' && $(this).val() != 'no') { $(form).find('input[name="IPADDR:'+i+'"]').val(''); @@ -224,7 +216,6 @@ function prepareSettings(form) { $(form).find('select[name^="USE_DHCP6:"]').each(function() { var i = $(this).prop('name').split(':')[1]; var protocol = $(form).find('select[name="PROTOCOL:'+i+'"]').val() || 'ipv4'; - var metric = $(form).find('input[name="METRIC6:'+i+'"]').val(); var gw6 = (port == 'eth0') ? true : $(form).find('input[name="USE_GW6:'+i+'"]').prop('checked'); if (protocol != 'ipv4' && $(this).val() != 'no') { $(form).find('input[name="IPADDR6:'+i+'"]').val(''); @@ -240,6 +231,13 @@ function prepareSettings(form) { $(form).find('input[name="'+name+'"]').val(data); }); } + var metrics = [], metrics6 = []; + $(form).find('input[name^="METRIC:"]').each(function(){if($(this).val() > 0) metrics.push($(this).val());}); + $(form).find('input[name^="METRIC6:"]').each(function(){if($(this).val() > 0) metrics6.push($(this).val());}); + if (metrics.same() || metrics6.same()) { + swal({title:"_(Duplicate metrics)_", text:"_(List of default gateways contains duplicate metric values)_", animation:'none', type:'error', html:true, confirmButtonText:"_(Ok)_"}); + return false; + } // force default MTU if jumbo frames are not enabled if ($(form).find('input[name="USE_MTU"]').prop('checked') == false) $(form).find('input[name="MTU"]').val(''); $(form).find('input[name="#arg[1]"]').val(arg1[port]); @@ -468,6 +466,7 @@ function checkNetworkAccess(form) { } function addVLAN(port) { + $('input[value=""],input[value="Apply"]').prop('disabled',false); var index = 1; while ($('#index-'+port+'-'+index).length) index++; var template = $($('
').loadTemplate($('#network-template-'+port)).html().replace(/INDEX/g,index)); @@ -558,7 +557,7 @@ function networkInfo(port, vlan) {
 
-
+
_(IPv4 DNS server assignment)_: @@ -787,7 +786,7 @@ _(Enable VLANs)_:
-
+
_(Interface description)_: : "> )"> @@ -889,7 +888,7 @@ _(IPv6 privacy extensions)_: @@ -65,7 +87,7 @@ boot.on('message', function(msg) { default : var status = ""+_('Array '+ini['fsState'])+""; } status += ini['fsProgress'] ? "
"+_(ini['fsProgress'])+"" : "
 "; - $('.sub1').html(status); + $('.js-arrayStatus').html(status); }); function parseINI(msg) { @@ -102,19 +124,19 @@ function timer() { return Math.round((now.getTime()-start.getTime())/1000); } function reboot_now() { - $('.notice').html(" - "); + $('.js-bootTitle').html(" - "); boot.start(); reboot_online(); } function shutdown_now() { - $('.notice').html(" - "); + $('.js-bootTitle').html(" - "); boot.start(); shutdown_online(); } function reboot_online() { $.ajax({url:'/webGui/include/ProcessStatus.php',type:'POST',data:{name:'emhttpd',update:true},timeout:500}) .done(function(){ - $('.sub2').html("... "+timer()); + $('.js-powerStatus').html("... "+timer()); setTimeout(reboot_online,500); }) .fail(function(){start=new Date(); setTimeout(reboot_offline,500);}); @@ -123,14 +145,14 @@ function reboot_offline() { $.ajax({url:'/webGui/include/ProcessStatus.php',type:'POST',data:{name:'emhttpd',update:true},timeout:500}) .done(function(){location = '/Main';}) .fail(function(){ - $('.sub2').html("... "+timer()); + $('.js-powerStatus').html("... "+timer()); setTimeout(reboot_offline,500); }); } function shutdown_online() { $.ajax({url:'/webGui/include/ProcessStatus.php',type:'POST',data:{name:'emhttpd',update:true},timeout:500}) .done(function(){ - $('.sub2').html("... "+timer()); + $('.js-powerStatus').html("... "+timer()); setTimeout(shutdown_online,500); }) .fail(function(){start=new Date(); setTimeout(shutdown_offline,500);}); @@ -138,10 +160,10 @@ function shutdown_online() { function shutdown_offline() { var time = timer(); if (time < 30) { - $('.sub2').html("... "+time); + $('.js-powerStatus').html("... "+time); setTimeout(shutdown_offline,500); } else { - $('.sub2').html("..."); + $('.js-powerStatus').html("..."); setTimeout(power_on,500); } } @@ -177,8 +199,8 @@ case 'shutdown': exec('/sbin/poweroff -n'); break; } -echo '
'; -echo '
'; +echo '
'; +echo '
'; switch (_var($var,'fsState')) { case 'Stopped': echo "",_('Array Stopped'),"$progress"; break; @@ -190,7 +212,7 @@ default: echo "",_('Array Started'),"$progress"; break; } echo '
'; -echo '
'; +echo '
'; echo ''; }else{ ?> diff --git a/emhttp/plugins/dynamix/include/DefaultPageLayout.php b/emhttp/plugins/dynamix/include/DefaultPageLayout.php index 27e0151e1..e71f307c1 100644 --- a/emhttp/plugins/dynamix/include/DefaultPageLayout.php +++ b/emhttp/plugins/dynamix/include/DefaultPageLayout.php @@ -858,28 +858,9 @@ unset($pages,$page,$pgs,$pg,$icon,$nchan,$running,$start,$stop,$row,$script,$opt
-'; -$progress = (_var($var,'fsProgress')!='') ? "•{$var['fsProgress']}" : ""; -switch (_var($var,'fsState')) { -case 'Stopped': - echo " ",_('Array Stopped'),"$progress"; break; -case 'Starting': - echo " ",_('Array Starting'),"$progress"; break; -case 'Stopping': - echo " ",_('Array Stopping'),"$progress"; break; -default: - echo " ",_('Array Started'),"$progress"; break; -} -echo ""; -if ($wlan0) echo ""; -echo "Unraid® webGui ©2024, Lime Technology, Inc."; -echo " "._('manual').""; -echo ""; -echo "
"; -?> + + +