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="=_("Apply")?>"],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) {
-