From a948173f155ea161cfb330d3e4ac46618f841e6e Mon Sep 17 00:00:00 2001 From: bergware Date: Thu, 12 Oct 2023 10:28:54 +0200 Subject: [PATCH 001/266] rc.inet1: add "status" command --- etc/rc.d/rc.inet1 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/etc/rc.d/rc.inet1 b/etc/rc.d/rc.inet1 index c9ec02a2e..66df9647a 100755 --- a/etc/rc.d/rc.inet1 +++ b/etc/rc.d/rc.inet1 @@ -634,6 +634,12 @@ stop(){ lo_down } +status(){ + echo "INTERFACE STATE INFORMATION" + echo "========================================================================" + [[ $1 == ip ]] && ip -brief addr || ip -brief link +} + ########################## # STATIC ROUTE FUNCTIONS # ########################## @@ -721,6 +727,9 @@ restart) route_down $INTERFACE $ROUTE $METRIC ;; # default is to bring up the entire network +status) + status $2 + ;; *) start esac @@ -739,3 +748,5 @@ exit 0 # rc.inet1 10.0.0.1_default_add add default route to gateway 10.0.0.1 with metric 1 # rc.inet1 eth0_10.0.0.0/24_1_del delete specific route & metric from interface eth0 # rc.inet1 10.0.0.1_default_del delete default route from gateway 10.0.0.1 +# rc.inet1 status show link status +# rc.inet1 status ip show ip status From 20e29bcf7593e26a94e1d311fa9fa973c4647f36 Mon Sep 17 00:00:00 2001 From: bergware Date: Thu, 12 Oct 2023 10:32:27 +0200 Subject: [PATCH 002/266] rc.inet1: add "status" command --- etc/rc.d/rc.inet1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/rc.d/rc.inet1 b/etc/rc.d/rc.inet1 index 66df9647a..b2e2d4bf6 100755 --- a/etc/rc.d/rc.inet1 +++ b/etc/rc.d/rc.inet1 @@ -62,8 +62,9 @@ # - added error logging to syslog # - replace logging for generic add-in module -# Adapted by Bergware for use in Unraid OS - August 2023 +# Adapted by Bergware for use in Unraid OS - October 2023 # - added interface carrier check when polling for DHCP server +# - added "status" command # Bergware - modified for Unraid OS, October 2023 From 5543f8c2e9ce70fb44490bcf62f4494ab2f37f28 Mon Sep 17 00:00:00 2001 From: bergware Date: Thu, 12 Oct 2023 10:40:49 +0200 Subject: [PATCH 003/266] rc.inet1: minor code update --- etc/rc.d/rc.inet1 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/etc/rc.d/rc.inet1 b/etc/rc.d/rc.inet1 index b2e2d4bf6..344bb135c 100755 --- a/etc/rc.d/rc.inet1 +++ b/etc/rc.d/rc.inet1 @@ -63,7 +63,7 @@ # - replace logging for generic add-in module # Adapted by Bergware for use in Unraid OS - October 2023 -# - added interface carrier check when polling for DHCP server +# - added interface carrier check before assigning IP address (DHCP or static) # - added "status" command # Bergware - modified for Unraid OS, October 2023 @@ -370,11 +370,8 @@ ipaddr_up(){ fi elif [[ $DHCP == no ]]; then # bring up interface using static IP address - if carrier_up $IFACE; then - log "interface $IFACE is UP, setting static $IP address" - else - log "interface $IFACE is DOWN, setting static $IP address" - fi + if carrier_up $IFACE; then STATE="UP"; else STATE="DOWN"; fi + log "interface $IFACE is $STATE, setting static $IP address" ipv6_addr 0 1 if [[ $IP != ipv6 ]]; then [[ $j -eq 0 ]] && ADDR=${IPADDR[$i]} || ADDR=${IPADDR[$i,$j]} From ab914472f056186056e56d758decef3bd7b81c77 Mon Sep 17 00:00:00 2001 From: bergware Date: Thu, 12 Oct 2023 10:55:11 +0200 Subject: [PATCH 004/266] rc.inet1: minor code update --- etc/rc.d/rc.inet1 | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/rc.d/rc.inet1 b/etc/rc.d/rc.inet1 index 344bb135c..fe73721a1 100755 --- a/etc/rc.d/rc.inet1 +++ b/etc/rc.d/rc.inet1 @@ -632,6 +632,7 @@ stop(){ lo_down } +# function to show network status status(){ echo "INTERFACE STATE INFORMATION" echo "========================================================================" From 454d8196349a405aac77782ea41ec846fc546cd3 Mon Sep 17 00:00:00 2001 From: bergware Date: Thu, 12 Oct 2023 17:42:29 +0200 Subject: [PATCH 005/266] dashboard: display separate tiles without borders --- emhttp/plugins/dynamix/DashStats.page | 87 +++++++------------ .../plugins/dynamix/styles/default-azure.css | 16 ++-- .../plugins/dynamix/styles/default-black.css | 14 +-- .../plugins/dynamix/styles/default-gray.css | 18 ++-- .../plugins/dynamix/styles/default-white.css | 14 +-- 5 files changed, 65 insertions(+), 84 deletions(-) diff --git a/emhttp/plugins/dynamix/DashStats.page b/emhttp/plugins/dynamix/DashStats.page index 046f7fc3d..a3f856317 100644 --- a/emhttp/plugins/dynamix/DashStats.page +++ b/emhttp/plugins/dynamix/DashStats.page @@ -700,6 +700,27 @@ function hideShow() { !--> +
+
+ + + + + + + +
_(VM Being Cloned)_:
_(New VM)_:
_(Overwrite)_:
_(Check Free Space)_:
+
+ +
+
+ + + + +
_(VM Name)_:
_(Snapshot Name)_:_(Check free space)_:
_(Description)_:
+
+ - -
-
-lang=""> - - - - - - - -"> - - -
- - - - - - - - - - - - - - - - - - -
_(VM Being Cloned)_:
_(New VM)_:
_(Overwrite)_:
_(Check Free Space)_:
- - -
- -
-
- -

- - - -
_(VM Name)_: -
_(Snapshot Name)_: - -_(Check free space)_: -
_(Description )_: -
-
\ No newline at end of file diff --git a/emhttp/plugins/dynamix/styles/default-azure.css b/emhttp/plugins/dynamix/styles/default-azure.css index cedca49eb..a0d51ddd0 100644 --- a/emhttp/plugins/dynamix/styles/default-azure.css +++ b/emhttp/plugins/dynamix/styles/default-azure.css @@ -154,14 +154,15 @@ table.share_status tbody tr.warn{color:#e68a00} table.share_status.fixed tr>td+td{min-width:39px;font-size:1.1rem;text-align:center;padding:0} table.share_status.table{margin-top:36px} table.share_status.table tr>td{width:50%} -table.share_status.dashboard{margin:0;border:1px solid #606e7f} -table.share_status.dashboard tbody{border:1px solid #606e7f} -table.share_status.dashboard tr:first-child>td{height:3.6rem;padding-top:12px;font-size:1.6rem;font-weight:bold;letter-spacing:1.8px;text-transform:none;vertical-align:top} -table.share_status.dashboard tr:last-child>td{padding-bottom:20px} -table.share_status.dashboard tr.last>td{padding-bottom:20px} +table.share_status.dashboard{margin:0;border:none;background-color:#D7DBDD} +table.share_status.dashboard tbody{border:none} +table.share_status.dashboard tr:first-child td{height:3.6rem;padding-top:12px;font-size:1.6rem;font-weight:bold;letter-spacing:1.8px;text-transform:none;vertical-align:top} +table.share_status.dashboard tr:last-child td{padding-bottom:20px} +table.share_status.dashboard tr.last td{padding-bottom:20px} table.share_status.dashboard tr.header td{padding-bottom:10px;color:#9794a0} table.share_status.dashboard tr{border:none} -table.share_status.dashboard td{line-height:normal;padding:3px 10px} +table.share_status.dashboard td{line-height:normal;padding:3px 10px;border:none!important} +table.share_status.dashboard td.stopgap{height:10px!important;line-height:10px!important;padding:0!important;background-color:#e4e2e4} table.share_status.dashboard td.vpn{font-size:1.1rem;font-weight:bold;text-transform:uppercase;letter-spacing:1px} 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;white-space:normal} @@ -171,6 +172,7 @@ table.share_status.dashboard td span.load{display:inline-block;width:38px;text-a table.share_status.dashboard td span.finish{float:right;margin-right:24px} table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;background-color:rgba(0,0,0,0.1);padding:2px} table.share_status.dashboard .usage-disk.sys{height:auto} +.dashboard-sortable{background-color:#e4e2e4} tr.alert{color:#f0000c;background-color:#ff9e9e} tr.warn{color:#e68a00;background-color:#feefb3} tr.past{color:#d63301;background-color:#ffddd1} @@ -197,7 +199,7 @@ span.small{font-size:1.1rem} span.score{font-size:1.1rem;color:#ffffff;position:absolute} span#dropbox{background:none;line-height:6rem;margin-right:20px} span.outer{margin-bottom:20px;margin-right:0} -span.outer.solid{background-color:#e4e2e4} +span.outer.solid{background-color:#D7DBDD} span.hand{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} diff --git a/emhttp/plugins/dynamix/styles/default-black.css b/emhttp/plugins/dynamix/styles/default-black.css index 5f680bdbe..eafa6e203 100644 --- a/emhttp/plugins/dynamix/styles/default-black.css +++ b/emhttp/plugins/dynamix/styles/default-black.css @@ -154,14 +154,15 @@ table.share_status tbody tr.warn{color:#e68a00} table.share_status.fixed tr>td+td{min-width:39px;font-size:1.1rem;text-align:center;padding:0} table.share_status.table{margin-top:36px} table.share_status.table tr>td{width:50%} -table.share_status.dashboard{margin:0;border:1px solid #2b2b2b} -table.share_status.dashboard tbody{border:1px solid #2b2b2b} -table.share_status.dashboard tr:first-child>td{height:3.6rem;padding-top:12px;font-size:1.6rem;font-weight:bold;letter-spacing:1.8px;text-transform:none;vertical-align:top} +table.share_status.dashboard{margin:0;border:none;background-color:#262626} +table.share_status.dashboard tbody{border:none} +table.share_status.dashboard tr:first-child td{height:3.6rem;padding-top:12px;font-size:1.6rem;font-weight:bold;letter-spacing:1.8px;text-transform:none;vertical-align:top} table.share_status.dashboard tr:nth-child(even){background-color:transparent} -table.share_status.dashboard tr:last-child>td{padding-bottom:20px} -table.share_status.dashboard tr.last>td{padding-bottom:20px} +table.share_status.dashboard tr:last-child td{padding-bottom:20px} +table.share_status.dashboard tr.last td{padding-bottom:20px} table.share_status.dashboard tr.header td{padding-bottom:10px} table.share_status.dashboard td{padding:3px 10px} +table.share_status.dashboard td.stopgap{height:10px!important;line-height:10px!important;padding:0!important;background-color:#1c1b1b} table.share_status.dashboard td.vpn{font-size:1.1rem;font-weight:bold;text-transform:uppercase;letter-spacing:1px} 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;white-space:normal} @@ -170,6 +171,7 @@ table.share_status.dashboard td span.info.title{font-weight:bold} table.share_status.dashboard td span.load{display:inline-block;width:38px;text-align:right} table.share_status.dashboard td span.finish{float:right;margin-right:24px} table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;background-color:rgba(255,255,255,0.1);padding:2px} +.dashboard-sortable{background-color:#1c1b1b} [name=arrayOps]{margin-top:12px} span.error{color:#f0000c;background-color:#ff9e9e;display:block;width:100%} span.warn{color:#e68a00;background-color:#feefb3;display:block;width:100%} @@ -190,7 +192,7 @@ span.strong{font-weight:bold} span.big{font-size:1.4rem} span.small{font-size:1.2rem} span.outer{margin-bottom:20px;margin-right:0} -span.outer.solid{background-color:#191818} +span.outer.solid{background-color:#262626} span.hand{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} diff --git a/emhttp/plugins/dynamix/styles/default-gray.css b/emhttp/plugins/dynamix/styles/default-gray.css index 7483f0b05..3beb543df 100644 --- a/emhttp/plugins/dynamix/styles/default-gray.css +++ b/emhttp/plugins/dynamix/styles/default-gray.css @@ -154,14 +154,15 @@ table.share_status tbody tr.warn{color:#e68a00} table.share_status.fixed tr>td+td{min-width:39px;font-size:1.1rem;text-align:center;padding:0} table.share_status.table{margin-top:36px} table.share_status.table tr>td{width:50%} -table.share_status.dashboard{margin:0;border:1px solid #606e7f} -table.share_status.dashboard tbody{border:1px solid #606e7f} -table.share_status.dashboard tr:first-child>td{height:3.6rem;padding-top:12px;font-size:1.6rem;font-weight:bold;letter-spacing:1.8px;text-transform:none;vertical-align:top} -table.share_status.dashboard tr:last-child>td{padding-bottom:20px} -table.share_status.dashboard tr.last>td{padding-bottom:20px} -table.share_status.dashboard tr{border:none} +table.share_status.dashboard{margin:0;border:none;background-color:#212F3D} +table.share_status.dashboard tbody{border:none} +table.share_status.dashboard tr:first-child td{height:3.6rem;padding-top:12px;font-size:1.6rem;font-weight:bold;letter-spacing:1.8px;text-transform:none;vertical-align:top} +table.share_status.dashboard tr:last-child td{padding-bottom:20px} +table.share_status.dashboard tr.last td{padding-bottom:20px} table.share_status.dashboard tr.header td{padding-bottom:10px;color:#82857e} -table.share_status.dashboard td{line-height:normal;padding:3px 10px} +table.share_status.dashboard tr{border:none} +table.share_status.dashboard td{line-height:normal;padding:3px 10px;border:none!important} +table.share_status.dashboard td.stopgap{height:10px!important;line-height:10px!important;padding:0!important;background-color:#1b1d1b} table.share_status.dashboard td.vpn{font-size:1.1rem;font-weight:bold;text-transform:uppercase;letter-spacing:1px} 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;white-space:normal} @@ -171,6 +172,7 @@ table.share_status.dashboard td span.load{display:inline-block;width:38px;text-a table.share_status.dashboard td span.finish{float:right;margin-right:24px} table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;background-color:rgba(255,255,255,0.1);padding:2px} table.share_status.dashboard .usage-disk.sys{height:auto} +.dashboard-sortable{background-color:#1b1d1b} tr.alert{color:#f0000c;background-color:#ff9e9e} tr.warn{color:#e68a00;background-color:#feefb3} tr.past{color:#d63301;background-color:#ffddd1} @@ -196,7 +198,7 @@ span.big{font-size:1.4rem} span.small{font-size:1.1rem} span#dropbox{background:none;line-height:6rem;margin-right:20px} span.outer{margin-bottom:20px;margin-right:0} -span.outer.solid{background-color:#1b1d1b} +span.outer.solid{background-color:#212F3D} span.hand{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} diff --git a/emhttp/plugins/dynamix/styles/default-white.css b/emhttp/plugins/dynamix/styles/default-white.css index c9d12bf21..62ccaaabb 100644 --- a/emhttp/plugins/dynamix/styles/default-white.css +++ b/emhttp/plugins/dynamix/styles/default-white.css @@ -154,14 +154,15 @@ table.share_status tbody tr.warn{color:#e68a00} table.share_status.fixed tr>td+td{min-width:39px;font-size:1.1rem;text-align:center;padding:0} table.share_status.table{margin-top:36px} table.share_status.table tr>td{width:50%} -table.share_status.dashboard{margin:0;border:1px solid #e3e3e3} -table.share_status.dashboard tbody{border:1px solid #e3e3e3} -table.share_status.dashboard tr:first-child>td{height:3.6rem;padding-top:12px;font-size:1.6rem;font-weight:bold;letter-spacing:1.8px;text-transform:none;vertical-align:top} +table.share_status.dashboard{margin:0;border:none;background-color:#F7F9F9} +table.share_status.dashboard tbody{border:none} +table.share_status.dashboard tr:first-child td{height:3.6rem;padding-top:12px;font-size:1.6rem;font-weight:bold;letter-spacing:1.8px;text-transform:none;vertical-align:top} table.share_status.dashboard tr:nth-child(even){background-color:transparent} -table.share_status.dashboard tr:last-child>td{padding-bottom:20px} -table.share_status.dashboard tr.last>td{padding-bottom:20px} +table.share_status.dashboard tr:last-child td{padding-bottom:20px} +table.share_status.dashboard tr.last td{padding-bottom:20px} table.share_status.dashboard tr.header td{padding-bottom:10px} table.share_status.dashboard td{padding:3px 10px} +table.share_status.dashboard td.stopgap{height:10px!important;line-height:10px!important;padding:0!important;background-color:#f2f2f2} table.share_status.dashboard td.vpn{font-size:1.1rem;font-weight:bold;text-transform:uppercase;letter-spacing:1px} 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;white-space:normal} @@ -170,6 +171,7 @@ table.share_status.dashboard td span.info.title{font-weight:bold} table.share_status.dashboard td span.load{display:inline-block;width:38px;text-align:right} table.share_status.dashboard td span.finish{float:right;margin-right:24px} table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;background-color:rgba(0,0,0,0.1);padding:2px} +.dashboard-sortable{background-color:#f2f2f2} [name=arrayOps]{margin-top:12px} span.error{color:#f0000c;background-color:#ff9e9e;display:block;width:100%} span.warn{color:#e68a00;background-color:#feefb3;display:block;width:100%} @@ -190,7 +192,7 @@ span.strong{font-weight:bold} span.big{font-size:1.4rem} span.small{font-size:1.2rem} span.outer{margin-bottom:20px;margin-right:0} -span.outer.solid{background-color:#f5f5f5} +span.outer.solid{background-color:#F7F9F9} span.hand{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} From 4068b85470a5c4d611196a126040d3e73248aa80 Mon Sep 17 00:00:00 2001 From: bergware Date: Thu, 12 Oct 2023 18:12:10 +0200 Subject: [PATCH 006/266] dashboard: display separate tiles without borders --- emhttp/plugins/dynamix/DashStats.page | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/emhttp/plugins/dynamix/DashStats.page b/emhttp/plugins/dynamix/DashStats.page index a3f856317..aa31e3eae 100644 --- a/emhttp/plugins/dynamix/DashStats.page +++ b/emhttp/plugins/dynamix/DashStats.page @@ -678,9 +678,11 @@ function hideShow() { var id = tbody.parent().prop('id'); if ($(this).prop('checked')) { tbody.show(); + tbody.prev().show(); count[id]++; } else { tbody.hide(); + tbody.prev().hide(); inactive.push(sort[n]); } n++; @@ -1271,6 +1273,7 @@ function showContent() { var id = tbody.parent().prop('id'); count[id]--; tbody.hide(); + tbody.prev().hide(); } } var hidden = $.cookie('hidden_content'); @@ -1332,6 +1335,7 @@ function dismiss(button) { var tile = table.parent(); var inactive = $.cookie('inactive_content'); tbody.hide(); + tbody.prev().hide(); if (table.find('tbody:visible').length>0) tile.show(); else tile.hide(); inactive = inactive==null ? [] : inactive.split(';'); inactive.push(tbody.attr('sort')); @@ -1400,7 +1404,14 @@ function LockButton() { receive:function(e,ui){ var table = ui.sender, index = []; var tile = table.parent(); - if (table.find('tbody:visible').length > 0) tile.show(); else tile.hide(); + var gap = ui.item.prev(); + if (table.find('tbody:visible').length > 0) { + tile.show(); + gap.show(); + } else { + tile.hide(); + gap.hide(); + } table.find('tbody').each(function(){index.push($(this).attr('sort'));}); $.cookie(table.prop('id'),index.join(';'),{expires:3650}); }, From 093d754b74df29102d188566eae94413366e294e Mon Sep 17 00:00:00 2001 From: SimonFair <39065407+SimonFair@users.noreply.github.com> Date: Thu, 12 Oct 2023 20:27:37 +0100 Subject: [PATCH 007/266] Create VM autostart disable option --- emhttp/languages/en_US/helptext.txt | 4 ++++ emhttp/plugins/dynamix.vm.manager/VMSettings.page | 8 ++++++++ sbin/qemu | 6 +++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/emhttp/languages/en_US/helptext.txt b/emhttp/languages/en_US/helptext.txt index 5d437b799..1689681ed 100644 --- a/emhttp/languages/en_US/helptext.txt +++ b/emhttp/languages/en_US/helptext.txt @@ -1581,6 +1581,10 @@ Make sure any newly entered values represent the selected temperature unit. Stopping the VM Manager will first attempt to shutdown all running VMs. After 60 seconds, any remaining VM instances will be terminated. :end +:vms_disable_help: +Stop VMs from Autostarting when VM Manager starts. +:end + :vms_libvirt_volume_help: This is the libvirt volume. :end diff --git a/emhttp/plugins/dynamix.vm.manager/VMSettings.page b/emhttp/plugins/dynamix.vm.manager/VMSettings.page index b7ca08f24..1693a06fe 100644 --- a/emhttp/plugins/dynamix.vm.manager/VMSettings.page +++ b/emhttp/plugins/dynamix.vm.manager/VMSettings.page @@ -99,6 +99,14 @@ _(Enable VMs)_: :vms_enable_help: +_(Disable Autostart VMs)_: +: + +:vms_disable_help: +
diff --git a/sbin/qemu b/sbin/qemu index 16d959464..467394cda 100755 --- a/sbin/qemu +++ b/sbin/qemu @@ -1,3 +1,7 @@ #!/bin/bash - +source /boot/config/domain.cfg +if [ $DISABLE == "yes" ] + then + exit ; +fi eval exec /usr/bin/qemu-system-x86_64 $(/usr/local/emhttp/plugins/dynamix.vm.manager/scripts/qemu.php "$@") \ No newline at end of file From 90a2ced901c0bf8fd19468d4396b5f8ce2811230 Mon Sep 17 00:00:00 2001 From: bergware Date: Thu, 12 Oct 2023 23:20:06 +0200 Subject: [PATCH 008/266] Improve Dashboard tiles when hidden --- emhttp/plugins/dynamix/DashStats.page | 45 +++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/emhttp/plugins/dynamix/DashStats.page b/emhttp/plugins/dynamix/DashStats.page index aa31e3eae..ee8522523 100644 --- a/emhttp/plugins/dynamix/DashStats.page +++ b/emhttp/plugins/dynamix/DashStats.page @@ -183,6 +183,9 @@ div.leftside{float:left;width:66%} div.rightside{float:right;margin:0;text-align:center} div[id$=chart]{margin:-12px 8px -24px -18px} div.template,div#dialogWindow,input#upload{display:none} +span.head_info{display:inline-block;width:240px} +span#head_cpu,span#head_ram,#head_ups,#head_apps,#head_vms{display:none;margin-left:0} +span.head_bar{display:inline-block;width:200px} span.green,span.red,span.orange{padding-left:0} span.ctrl{float:right;margin-top:0;margin-right:10px} span.ctrl span{font-size:2rem!important} @@ -287,7 +290,9 @@ input[value=Edit]{margin:12px 0 0 0;padding:5px 10px} -
_(Processor)_

+
_(Processor)_
+ +_(Load)_:0%

@@ -315,7 +320,9 @@ foreach ($cpus as $pair) { -
_(System)_
_(Memory)_:
+
_(System)_
+_(Memory)_: +_(RAM)_:0%

_(Usable size)_: _(Maximum size)_: @@ -393,7 +400,8 @@ foreach ($ports as $port) {
_(Power)_
-_(UPS Model)_:
+_(UPS Model)_: +_(UPS Load)_:
_(UPS status)_: @@ -449,7 +457,8 @@ echo "";
_(Docker Containers)_
-
+ +
@@ -457,7 +466,8 @@ echo "";
_(Virtual Machines)_
-
+ +
@@ -778,9 +788,19 @@ jQuery.prototype.hideMe = function() { jQuery.prototype.mixedView = function(s) { if (s==0) { this.find('tr:gt(0)').hide(); + this.find('span[id^="head_"]').show(); + this.find('span[id^="tile_"]').hide(); + this.find('span#_cpu_').prop('id','cpu'); + this.find('span#_sys0_').prop('id','sys0'); + this.find('span#_ups_loadpct_').prop('id','ups_loadpct'); return; } this.find('tr:gt(0)').show(); + this.find('span#cpu:first').prop('id','_cpu_'); + this.find('span#sys0:first').prop('id','_sys0_'); + this.find('span#ups_loadpct:first').prop('id','_ups_loadpct_'); + this.find('span[id^="head_"]').hide(); + this.find('span[id^="tile_"]').show(); if (this.attr('data')) { setTimeout(this.attr('data')); } @@ -998,6 +1018,14 @@ function loadlist(init) { $('#docker_view').append(data[0]).hideMe(); $('#vm_view tr.updated').remove(); $('#vm_view').append(data[1]).hideMe(); + var started_apps = $('#docker_view').find('span.outer.apps.started').length; + var stopped_apps = $('#docker_view').find('span.outer.apps.stopped').length; + var paused_apps = $('#docker_view').find('span.outer.apps.paused').length; + var started_vms = $('#vm_view').find('span.outer.vms.started').length; + var stopped_vms = $('#vm_view').find('span.outer.vms.stopped').length; + var paused_vms = $('#vm_view').find('span.outer.vms.paused').length; + $('#head_apps').html("_(Containers)_ -- _(Started)_: "+started_apps+", _(Stopped)_: "+stopped_apps+", _(Paused)_: "+paused_apps); + $('#head_vms').html("_(VMs)_ -- _(Started)_: "+started_vms+", _(Stopped)_: "+stopped_vms+", _(Paused)_: "+paused_vms); if ($.cookie('my_apps')!=null) $('span.apps.stopped').hide(0,noApps()); if ($.cookie('my_vms')!=null) $('span.vms.stopped').hide(0,noVMs()); }); @@ -1253,7 +1281,7 @@ function addProperties() { $(this).find('td:first').prepend(""); }); $('div.frame tr').attr('title',''); - $('tr#var0').hover(function(){$.post('/webGui/include/DashboardApps.php',{sys:0},function(val){$('.sys0').text(val);})}); + $('tr#var0').hover(function(){$.post('/webGui/include/DashboardApps.php',{sys:0},function(val){$('.sys0').not('.fixed').text(val);})}); $('tr#var1').show().hover(function(){$.post('/webGui/include/DashboardApps.php',{sys:1},function(val){$('.sys1').text(val);})}); @@ -1283,6 +1311,11 @@ function showContent() { var tbody = $('div.frame tbody[sort="'+md5+'"]'); tbody.find('.openclose').removeClass('fa-chevron-up fa-chevron-down').addClass('fa-chevron-down'); tbody.find('tr:gt(0)').hide(); + tbody.find('span[id^="head_"]').show(); + tbody.find('span[id^="tile_"]').hide(); + tbody.find('span#_cpu_').prop('id','cpu'); + tbody.find('span#_sys0_').prop('id','sys0'); + tbody.find('span#_ups_loadpct_').prop('id','ups_loadpct'); } } if (count['db-box1']>0) $('div#tile1').show(); From 9b0fbf1256a787598281c4b75f660c09c3efe9bc Mon Sep 17 00:00:00 2001 From: bergware Date: Thu, 12 Oct 2023 23:42:43 +0200 Subject: [PATCH 009/266] Improve Dashboard tiles when hidden --- emhttp/plugins/dynamix/DashStats.page | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/emhttp/plugins/dynamix/DashStats.page b/emhttp/plugins/dynamix/DashStats.page index ee8522523..bdccdd516 100644 --- a/emhttp/plugins/dynamix/DashStats.page +++ b/emhttp/plugins/dynamix/DashStats.page @@ -183,7 +183,7 @@ div.leftside{float:left;width:66%} div.rightside{float:right;margin:0;text-align:center} div[id$=chart]{margin:-12px 8px -24px -18px} div.template,div#dialogWindow,input#upload{display:none} -span.head_info{display:inline-block;width:240px} +span.head_info{width:240px;display:inline-block} span#head_cpu,span#head_ram,#head_ups,#head_apps,#head_vms{display:none;margin-left:0} span.head_bar{display:inline-block;width:200px} span.green,span.red,span.orange{padding-left:0} @@ -334,14 +334,13 @@ foreach ($cpus as $pair) { -
_(Interface)_
-_(Inbound)_: ---_(Outbound)_: --- - - -
+
+_(Inbound)_: ---_(Outbound)_: ---
@@ -309,9 +310,9 @@ foreach ($cpus as $pair) { [$cpu1, $cpu2] = my_preg_split('/[,-]/',$pair); echo ""; if ($cpu2) - echo "CPU $cpu1 - HT $cpu20%
0%
"; + echo "CPU $cpu1 - HT $cpu20%
0%
"; else - echo "CPU $cpu10%
"; + echo "CPU $cpu10%
"; echo ""; } ?> @@ -321,15 +322,15 @@ foreach ($cpus as $pair) {
_(System)_
_(Memory)_: -_(RAM)_:0%

+_(RAM)_:0%

_(Usable size)_: _(Maximum size)_: -_(RAM)_0%
-_(ZFS)_0%
-_(Flash)_0%
-_(Log)_0%
-_(Docker)_0%
+_(RAM)_0%
+_(ZFS)_0%
+_(Flash)_0%
+_(Log)_0%
+_(Docker)_0%
@@ -1279,7 +1280,7 @@ function addProperties() { $(this).find('td:first').prepend(""); }); $('div.frame tr').attr('title',''); - $('tr#var0').hover(function(){$.post('/webGui/include/DashboardApps.php',{sys:0},function(val){$('.sys0').not('.fixed').text(val);})}); + $('tr#var0').hover(function(){$.post('/webGui/include/DashboardApps.php',{sys:0},function(val){$('.sys0').not('.head').text(val);})}); $('tr#var1').show().hover(function(){$.post('/webGui/include/DashboardApps.php',{sys:1},function(val){$('.sys1').text(val);})}); From 5e2dc9da2f37bf1d286755e4136396664cb4b8a3 Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 13 Oct 2023 10:39:34 +0200 Subject: [PATCH 012/266] Dashboard: more enhancements --- emhttp/plugins/dynamix/DashStats.page | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/emhttp/plugins/dynamix/DashStats.page b/emhttp/plugins/dynamix/DashStats.page index cc6320484..5ff62e272 100644 --- a/emhttp/plugins/dynamix/DashStats.page +++ b/emhttp/plugins/dynamix/DashStats.page @@ -186,6 +186,7 @@ div.template,div#dialogWindow,input#upload{display:none} span.head_info{width:240px;display:inline-block} span#head_cpu,span#head_ram,#head_ups,#head_apps,#head_vms{display:none;margin-left:0} span.head_bar{display:inline-block;width:200px} +span.head_gap{padding-left:20px} span.green,span.red,span.orange{padding-left:0} span.ctrl{float:right;margin-top:0;margin-right:10px} span.ctrl span{font-size:2rem!important} @@ -209,7 +210,7 @@ span.w36{width:36%;display:inline-block;float:left} span.w44{width:44%;display:inline-block;float:left} span.w72{width:72%;display:inline-block;float:left} select#cpuline,select#netline{border:none;padding:0 12px 0 0} -select[name=enter_share]{margin-top:0} +select[name=enter_share],select[name=enter_user]{margin-top:0;float:none} img#mycase{width:auto;max-width:128px;height:auto;max-height:128px} i.heat{margin-left:8px} i.ups{margin-right:8px;font-size:1.4rem!important} @@ -335,7 +336,7 @@ foreach ($cpus as $pair) {
_(Interface)_ - @@ -398,9 +399,9 @@ foreach ($ports as $port) { -
_(Power)_
+
_(Power)_
_(UPS Model)_: -_(UPS Load)_:
+_(UPS Load)_:
_(UPS status)_: @@ -476,14 +477,14 @@ echo ""; class="mixed">
_(Shares)_ - - +
@@ -534,14 +535,14 @@ if (!$group) { class="mixed">
_(Users)_ - - +
@@ -792,12 +793,14 @@ jQuery.prototype.mixedView = function(s) { this.find('span#_cpu_').prop('id','cpu'); this.find('span#_sys0_').prop('id','sys0'); this.find('span#_ups_loadpct_').prop('id','ups_loadpct'); + this.find('span#_ups_status_').prop('id','ups_status'); return; } this.find('tr:gt(0)').show(); this.find('span#cpu:first').prop('id','_cpu_'); this.find('span#sys0:first').prop('id','_sys0_'); this.find('span#ups_loadpct:first').prop('id','_ups_loadpct_'); + this.find('span#ups_status:first').prop('id','_ups_status_'); this.find('span[id^="head_"]').hide(); this.find('span[id^="tile_"]').show(); if (this.attr('data')) { @@ -1315,6 +1318,7 @@ function showContent() { tbody.find('span#_cpu_').prop('id','cpu'); tbody.find('span#_sys0_').prop('id','sys0'); tbody.find('span#_ups_loadpct_').prop('id','ups_loadpct'); + tbody.find('span#_ups_status_').prop('id','ups_status'); } } if (count['db-box1']>0) $('div#tile1').show(); From 84b265cbe451adb6b68ce688300bef75a40540eb Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 13 Oct 2023 10:43:35 +0200 Subject: [PATCH 013/266] Dashboard: more enhancements --- emhttp/plugins/dynamix/DashStats.page | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emhttp/plugins/dynamix/DashStats.page b/emhttp/plugins/dynamix/DashStats.page index 5ff62e272..7bf662916 100644 --- a/emhttp/plugins/dynamix/DashStats.page +++ b/emhttp/plugins/dynamix/DashStats.page @@ -186,7 +186,7 @@ div.template,div#dialogWindow,input#upload{display:none} span.head_info{width:240px;display:inline-block} span#head_cpu,span#head_ram,#head_ups,#head_apps,#head_vms{display:none;margin-left:0} span.head_bar{display:inline-block;width:200px} -span.head_gap{padding-left:20px} +span.head_gap{padding-left:14px} span.green,span.red,span.orange{padding-left:0} span.ctrl{float:right;margin-top:0;margin-right:10px} span.ctrl span{font-size:2rem!important} @@ -401,7 +401,7 @@ foreach ($ports as $port) {
_(Power)_
_(UPS Model)_: -_(UPS Load)_:
+_(Load)_:

_(UPS status)_: From 83cb6424488cd02f8ae1cde146f551794e3eee34 Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 13 Oct 2023 10:52:02 +0200 Subject: [PATCH 014/266] Dashboard: more enhancements --- emhttp/plugins/dynamix/DashStats.page | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emhttp/plugins/dynamix/DashStats.page b/emhttp/plugins/dynamix/DashStats.page index 7bf662916..2f28692d8 100644 --- a/emhttp/plugins/dynamix/DashStats.page +++ b/emhttp/plugins/dynamix/DashStats.page @@ -184,7 +184,7 @@ div.rightside{float:right;margin:0;text-align:center} div[id$=chart]{margin:-12px 8px -24px -18px} div.template,div#dialogWindow,input#upload{display:none} span.head_info{width:240px;display:inline-block} -span#head_cpu,span#head_ram,#head_ups,#head_apps,#head_vms{display:none;margin-left:0} +span#head_cpu,span#head_ram,#head_ups,#head_apps,#head_vms,#_ups_status_{display:none;margin-left:0} span.head_bar{display:inline-block;width:200px} span.head_gap{padding-left:14px} span.green,span.red,span.orange{padding-left:0} From 53626274335aa6b5252872986bc26eaa36492e62 Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 13 Oct 2023 11:26:27 +0200 Subject: [PATCH 015/266] Dashboard: reintroduce borders around tiles --- emhttp/plugins/dynamix/styles/default-azure.css | 6 +++--- emhttp/plugins/dynamix/styles/default-black.css | 2 +- emhttp/plugins/dynamix/styles/default-gray.css | 6 +++--- emhttp/plugins/dynamix/styles/default-white.css | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/emhttp/plugins/dynamix/styles/default-azure.css b/emhttp/plugins/dynamix/styles/default-azure.css index a0d51ddd0..5ba9452b6 100644 --- a/emhttp/plugins/dynamix/styles/default-azure.css +++ b/emhttp/plugins/dynamix/styles/default-azure.css @@ -154,8 +154,8 @@ table.share_status tbody tr.warn{color:#e68a00} table.share_status.fixed tr>td+td{min-width:39px;font-size:1.1rem;text-align:center;padding:0} table.share_status.table{margin-top:36px} table.share_status.table tr>td{width:50%} -table.share_status.dashboard{margin:0;border:none;background-color:#D7DBDD} -table.share_status.dashboard tbody{border:none} +table.share_status.dashboard{margin:0;border:none;background-color:#d7dbdd} +table.share_status.dashboard tbody{border:1px solid #cacfd2} table.share_status.dashboard tr:first-child td{height:3.6rem;padding-top:12px;font-size:1.6rem;font-weight:bold;letter-spacing:1.8px;text-transform:none;vertical-align:top} table.share_status.dashboard tr:last-child td{padding-bottom:20px} table.share_status.dashboard tr.last td{padding-bottom:20px} @@ -199,7 +199,7 @@ span.small{font-size:1.1rem} span.score{font-size:1.1rem;color:#ffffff;position:absolute} span#dropbox{background:none;line-height:6rem;margin-right:20px} span.outer{margin-bottom:20px;margin-right:0} -span.outer.solid{background-color:#D7DBDD} +span.outer.solid{background-color:#d7dbdd} span.hand{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} diff --git a/emhttp/plugins/dynamix/styles/default-black.css b/emhttp/plugins/dynamix/styles/default-black.css index eafa6e203..3bfcc5a86 100644 --- a/emhttp/plugins/dynamix/styles/default-black.css +++ b/emhttp/plugins/dynamix/styles/default-black.css @@ -155,7 +155,7 @@ table.share_status.fixed tr>td+td{min-width:39px;font-size:1.1rem;text-align:cen table.share_status.table{margin-top:36px} table.share_status.table tr>td{width:50%} table.share_status.dashboard{margin:0;border:none;background-color:#262626} -table.share_status.dashboard tbody{border:none} +table.share_status.dashboard tbody{border:1px solid #333333} table.share_status.dashboard tr:first-child td{height:3.6rem;padding-top:12px;font-size:1.6rem;font-weight:bold;letter-spacing:1.8px;text-transform:none;vertical-align:top} table.share_status.dashboard tr:nth-child(even){background-color:transparent} table.share_status.dashboard tr:last-child td{padding-bottom:20px} diff --git a/emhttp/plugins/dynamix/styles/default-gray.css b/emhttp/plugins/dynamix/styles/default-gray.css index 3beb543df..8ba06e5f1 100644 --- a/emhttp/plugins/dynamix/styles/default-gray.css +++ b/emhttp/plugins/dynamix/styles/default-gray.css @@ -154,8 +154,8 @@ table.share_status tbody tr.warn{color:#e68a00} table.share_status.fixed tr>td+td{min-width:39px;font-size:1.1rem;text-align:center;padding:0} table.share_status.table{margin-top:36px} table.share_status.table tr>td{width:50%} -table.share_status.dashboard{margin:0;border:none;background-color:#212F3D} -table.share_status.dashboard tbody{border:none} +table.share_status.dashboard{margin:0;border:none;background-color:#212f3d} +table.share_status.dashboard tbody{border:1px solid #566573} table.share_status.dashboard tr:first-child td{height:3.6rem;padding-top:12px;font-size:1.6rem;font-weight:bold;letter-spacing:1.8px;text-transform:none;vertical-align:top} table.share_status.dashboard tr:last-child td{padding-bottom:20px} table.share_status.dashboard tr.last td{padding-bottom:20px} @@ -198,7 +198,7 @@ span.big{font-size:1.4rem} span.small{font-size:1.1rem} span#dropbox{background:none;line-height:6rem;margin-right:20px} span.outer{margin-bottom:20px;margin-right:0} -span.outer.solid{background-color:#212F3D} +span.outer.solid{background-color:#212f3d} span.hand{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} diff --git a/emhttp/plugins/dynamix/styles/default-white.css b/emhttp/plugins/dynamix/styles/default-white.css index 62ccaaabb..65ee3afbc 100644 --- a/emhttp/plugins/dynamix/styles/default-white.css +++ b/emhttp/plugins/dynamix/styles/default-white.css @@ -155,7 +155,7 @@ table.share_status.fixed tr>td+td{min-width:39px;font-size:1.1rem;text-align:cen table.share_status.table{margin-top:36px} table.share_status.table tr>td{width:50%} table.share_status.dashboard{margin:0;border:none;background-color:#F7F9F9} -table.share_status.dashboard tbody{border:none} +table.share_status.dashboard tbody{border:1px solid #dfdfdf} table.share_status.dashboard tr:first-child td{height:3.6rem;padding-top:12px;font-size:1.6rem;font-weight:bold;letter-spacing:1.8px;text-transform:none;vertical-align:top} table.share_status.dashboard tr:nth-child(even){background-color:transparent} table.share_status.dashboard tr:last-child td{padding-bottom:20px} From 7ee1d71d13c318dbd150b2ebb904563237726011 Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 13 Oct 2023 12:06:02 +0200 Subject: [PATCH 016/266] Dashboard: more enhancements --- emhttp/plugins/dynamix/DashStats.page | 2 +- emhttp/plugins/dynamix/styles/default-azure.css | 2 +- emhttp/plugins/dynamix/styles/default-black.css | 2 +- emhttp/plugins/dynamix/styles/default-gray.css | 2 +- emhttp/plugins/dynamix/styles/default-white.css | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/emhttp/plugins/dynamix/DashStats.page b/emhttp/plugins/dynamix/DashStats.page index 2f28692d8..d92a95f05 100644 --- a/emhttp/plugins/dynamix/DashStats.page +++ b/emhttp/plugins/dynamix/DashStats.page @@ -185,7 +185,7 @@ div[id$=chart]{margin:-12px 8px -24px -18px} div.template,div#dialogWindow,input#upload{display:none} span.head_info{width:240px;display:inline-block} span#head_cpu,span#head_ram,#head_ups,#head_apps,#head_vms,#_ups_status_{display:none;margin-left:0} -span.head_bar{display:inline-block;width:200px} +span.head_bar{display:inline-block;width:180px} span.head_gap{padding-left:14px} span.green,span.red,span.orange{padding-left:0} span.ctrl{float:right;margin-top:0;margin-right:10px} diff --git a/emhttp/plugins/dynamix/styles/default-azure.css b/emhttp/plugins/dynamix/styles/default-azure.css index 5ba9452b6..d99702203 100644 --- a/emhttp/plugins/dynamix/styles/default-azure.css +++ b/emhttp/plugins/dynamix/styles/default-azure.css @@ -170,7 +170,7 @@ table.share_status.dashboard td span.info{float:right;margin-right:20px;font-siz table.share_status.dashboard td span.info.title{font-weight:bold} table.share_status.dashboard td span.load{display:inline-block;width:38px;text-align:right} table.share_status.dashboard td span.finish{float:right;margin-right:24px} -table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;background-color:rgba(0,0,0,0.1);padding:2px} +table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#d7dbdd;background-color:rgba(0,0,0,0.4);padding:2px} table.share_status.dashboard .usage-disk.sys{height:auto} .dashboard-sortable{background-color:#e4e2e4} tr.alert{color:#f0000c;background-color:#ff9e9e} diff --git a/emhttp/plugins/dynamix/styles/default-black.css b/emhttp/plugins/dynamix/styles/default-black.css index 3bfcc5a86..c60db1175 100644 --- a/emhttp/plugins/dynamix/styles/default-black.css +++ b/emhttp/plugins/dynamix/styles/default-black.css @@ -170,7 +170,7 @@ table.share_status.dashboard td span.info{float:right;margin-right:20px;font-siz table.share_status.dashboard td span.info.title{font-weight:bold} table.share_status.dashboard td span.load{display:inline-block;width:38px;text-align:right} table.share_status.dashboard td span.finish{float:right;margin-right:24px} -table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;background-color:rgba(255,255,255,0.1);padding:2px} +table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#262626;background-color:rgba(255,255,255,0.4);padding:2px} .dashboard-sortable{background-color:#1c1b1b} [name=arrayOps]{margin-top:12px} span.error{color:#f0000c;background-color:#ff9e9e;display:block;width:100%} diff --git a/emhttp/plugins/dynamix/styles/default-gray.css b/emhttp/plugins/dynamix/styles/default-gray.css index 8ba06e5f1..3e0b20cc1 100644 --- a/emhttp/plugins/dynamix/styles/default-gray.css +++ b/emhttp/plugins/dynamix/styles/default-gray.css @@ -170,7 +170,7 @@ table.share_status.dashboard td span.info{float:right;margin-right:20px;font-siz table.share_status.dashboard td span.info.title{font-weight:bold} table.share_status.dashboard td span.load{display:inline-block;width:38px;text-align:right} table.share_status.dashboard td span.finish{float:right;margin-right:24px} -table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;background-color:rgba(255,255,255,0.1);padding:2px} +table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#212f3d;background-color:rgba(255,255,255,0.4);padding:2px} table.share_status.dashboard .usage-disk.sys{height:auto} .dashboard-sortable{background-color:#1b1d1b} tr.alert{color:#f0000c;background-color:#ff9e9e} diff --git a/emhttp/plugins/dynamix/styles/default-white.css b/emhttp/plugins/dynamix/styles/default-white.css index 65ee3afbc..fe0c3fe3b 100644 --- a/emhttp/plugins/dynamix/styles/default-white.css +++ b/emhttp/plugins/dynamix/styles/default-white.css @@ -154,7 +154,7 @@ table.share_status tbody tr.warn{color:#e68a00} table.share_status.fixed tr>td+td{min-width:39px;font-size:1.1rem;text-align:center;padding:0} table.share_status.table{margin-top:36px} table.share_status.table tr>td{width:50%} -table.share_status.dashboard{margin:0;border:none;background-color:#F7F9F9} +table.share_status.dashboard{margin:0;border:none;background-color:#f7f9f9} table.share_status.dashboard tbody{border:1px solid #dfdfdf} table.share_status.dashboard tr:first-child td{height:3.6rem;padding-top:12px;font-size:1.6rem;font-weight:bold;letter-spacing:1.8px;text-transform:none;vertical-align:top} table.share_status.dashboard tr:nth-child(even){background-color:transparent} @@ -170,7 +170,7 @@ table.share_status.dashboard td span.info{float:right;margin-right:20px;font-siz table.share_status.dashboard td span.info.title{font-weight:bold} table.share_status.dashboard td span.load{display:inline-block;width:38px;text-align:right} table.share_status.dashboard td span.finish{float:right;margin-right:24px} -table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;background-color:rgba(0,0,0,0.1);padding:2px} +table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#f7f9f9;background-color:rgba(0,0,0,0.4);padding:2px} .dashboard-sortable{background-color:#f2f2f2} [name=arrayOps]{margin-top:12px} span.error{color:#f0000c;background-color:#ff9e9e;display:block;width:100%} From 540215bc5db3f242ede756f1101afcf265651cc9 Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 13 Oct 2023 12:13:17 +0200 Subject: [PATCH 017/266] Dashboard: more enhancements --- emhttp/plugins/dynamix/styles/default-azure.css | 2 +- emhttp/plugins/dynamix/styles/default-black.css | 2 +- emhttp/plugins/dynamix/styles/default-gray.css | 2 +- emhttp/plugins/dynamix/styles/default-white.css | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/emhttp/plugins/dynamix/styles/default-azure.css b/emhttp/plugins/dynamix/styles/default-azure.css index d99702203..82c3e49d5 100644 --- a/emhttp/plugins/dynamix/styles/default-azure.css +++ b/emhttp/plugins/dynamix/styles/default-azure.css @@ -170,7 +170,7 @@ table.share_status.dashboard td span.info{float:right;margin-right:20px;font-siz table.share_status.dashboard td span.info.title{font-weight:bold} table.share_status.dashboard td span.load{display:inline-block;width:38px;text-align:right} table.share_status.dashboard td span.finish{float:right;margin-right:24px} -table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#d7dbdd;background-color:rgba(0,0,0,0.4);padding:2px} +table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#d7dbdd;background-color:rgba(0,0,0,0.3);padding:2px} table.share_status.dashboard .usage-disk.sys{height:auto} .dashboard-sortable{background-color:#e4e2e4} tr.alert{color:#f0000c;background-color:#ff9e9e} diff --git a/emhttp/plugins/dynamix/styles/default-black.css b/emhttp/plugins/dynamix/styles/default-black.css index c60db1175..7b2060aee 100644 --- a/emhttp/plugins/dynamix/styles/default-black.css +++ b/emhttp/plugins/dynamix/styles/default-black.css @@ -170,7 +170,7 @@ table.share_status.dashboard td span.info{float:right;margin-right:20px;font-siz table.share_status.dashboard td span.info.title{font-weight:bold} table.share_status.dashboard td span.load{display:inline-block;width:38px;text-align:right} table.share_status.dashboard td span.finish{float:right;margin-right:24px} -table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#262626;background-color:rgba(255,255,255,0.4);padding:2px} +table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#262626;background-color:rgba(255,255,255,0.3);padding:2px} .dashboard-sortable{background-color:#1c1b1b} [name=arrayOps]{margin-top:12px} span.error{color:#f0000c;background-color:#ff9e9e;display:block;width:100%} diff --git a/emhttp/plugins/dynamix/styles/default-gray.css b/emhttp/plugins/dynamix/styles/default-gray.css index 3e0b20cc1..39eb3a0b5 100644 --- a/emhttp/plugins/dynamix/styles/default-gray.css +++ b/emhttp/plugins/dynamix/styles/default-gray.css @@ -170,7 +170,7 @@ table.share_status.dashboard td span.info{float:right;margin-right:20px;font-siz table.share_status.dashboard td span.info.title{font-weight:bold} table.share_status.dashboard td span.load{display:inline-block;width:38px;text-align:right} table.share_status.dashboard td span.finish{float:right;margin-right:24px} -table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#212f3d;background-color:rgba(255,255,255,0.4);padding:2px} +table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#212f3d;background-color:rgba(255,255,255,0.3);padding:2px} table.share_status.dashboard .usage-disk.sys{height:auto} .dashboard-sortable{background-color:#1b1d1b} tr.alert{color:#f0000c;background-color:#ff9e9e} diff --git a/emhttp/plugins/dynamix/styles/default-white.css b/emhttp/plugins/dynamix/styles/default-white.css index fe0c3fe3b..3acee9070 100644 --- a/emhttp/plugins/dynamix/styles/default-white.css +++ b/emhttp/plugins/dynamix/styles/default-white.css @@ -170,7 +170,7 @@ table.share_status.dashboard td span.info{float:right;margin-right:20px;font-siz table.share_status.dashboard td span.info.title{font-weight:bold} table.share_status.dashboard td span.load{display:inline-block;width:38px;text-align:right} table.share_status.dashboard td span.finish{float:right;margin-right:24px} -table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#f7f9f9;background-color:rgba(0,0,0,0.4);padding:2px} +table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#f7f9f9;background-color:rgba(0,0,0,0.3);padding:2px} .dashboard-sortable{background-color:#f2f2f2} [name=arrayOps]{margin-top:12px} span.error{color:#f0000c;background-color:#ff9e9e;display:block;width:100%} From 946a32fd9665ee09bca691acb2b2abb416ce72b5 Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 13 Oct 2023 12:24:00 +0200 Subject: [PATCH 018/266] Dashboard: more enhancements --- emhttp/plugins/dynamix/styles/default-azure.css | 2 +- emhttp/plugins/dynamix/styles/default-black.css | 2 +- emhttp/plugins/dynamix/styles/default-gray.css | 2 +- emhttp/plugins/dynamix/styles/default-white.css | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/emhttp/plugins/dynamix/styles/default-azure.css b/emhttp/plugins/dynamix/styles/default-azure.css index 82c3e49d5..dcb2b8d58 100644 --- a/emhttp/plugins/dynamix/styles/default-azure.css +++ b/emhttp/plugins/dynamix/styles/default-azure.css @@ -170,7 +170,7 @@ table.share_status.dashboard td span.info{float:right;margin-right:20px;font-siz table.share_status.dashboard td span.info.title{font-weight:bold} table.share_status.dashboard td span.load{display:inline-block;width:38px;text-align:right} table.share_status.dashboard td span.finish{float:right;margin-right:24px} -table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#d7dbdd;background-color:rgba(0,0,0,0.3);padding:2px} +table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#d7dbdd;background-color:rgba(0,0,0,0.3);padding:2px;border-radius:5px} table.share_status.dashboard .usage-disk.sys{height:auto} .dashboard-sortable{background-color:#e4e2e4} tr.alert{color:#f0000c;background-color:#ff9e9e} diff --git a/emhttp/plugins/dynamix/styles/default-black.css b/emhttp/plugins/dynamix/styles/default-black.css index 7b2060aee..48e7e5108 100644 --- a/emhttp/plugins/dynamix/styles/default-black.css +++ b/emhttp/plugins/dynamix/styles/default-black.css @@ -170,7 +170,7 @@ table.share_status.dashboard td span.info{float:right;margin-right:20px;font-siz table.share_status.dashboard td span.info.title{font-weight:bold} table.share_status.dashboard td span.load{display:inline-block;width:38px;text-align:right} table.share_status.dashboard td span.finish{float:right;margin-right:24px} -table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#262626;background-color:rgba(255,255,255,0.3);padding:2px} +table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#262626;background-color:rgba(255,255,255,0.3);padding:2px;border-radius:5px} .dashboard-sortable{background-color:#1c1b1b} [name=arrayOps]{margin-top:12px} span.error{color:#f0000c;background-color:#ff9e9e;display:block;width:100%} diff --git a/emhttp/plugins/dynamix/styles/default-gray.css b/emhttp/plugins/dynamix/styles/default-gray.css index 39eb3a0b5..df3e88596 100644 --- a/emhttp/plugins/dynamix/styles/default-gray.css +++ b/emhttp/plugins/dynamix/styles/default-gray.css @@ -170,7 +170,7 @@ table.share_status.dashboard td span.info{float:right;margin-right:20px;font-siz table.share_status.dashboard td span.info.title{font-weight:bold} table.share_status.dashboard td span.load{display:inline-block;width:38px;text-align:right} table.share_status.dashboard td span.finish{float:right;margin-right:24px} -table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#212f3d;background-color:rgba(255,255,255,0.3);padding:2px} +table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#212f3d;background-color:rgba(255,255,255,0.3);padding:2px;border-radius:5px} table.share_status.dashboard .usage-disk.sys{height:auto} .dashboard-sortable{background-color:#1b1d1b} tr.alert{color:#f0000c;background-color:#ff9e9e} diff --git a/emhttp/plugins/dynamix/styles/default-white.css b/emhttp/plugins/dynamix/styles/default-white.css index 3acee9070..a906442fc 100644 --- a/emhttp/plugins/dynamix/styles/default-white.css +++ b/emhttp/plugins/dynamix/styles/default-white.css @@ -170,7 +170,7 @@ table.share_status.dashboard td span.info{float:right;margin-right:20px;font-siz table.share_status.dashboard td span.info.title{font-weight:bold} table.share_status.dashboard td span.load{display:inline-block;width:38px;text-align:right} table.share_status.dashboard td span.finish{float:right;margin-right:24px} -table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#f7f9f9;background-color:rgba(0,0,0,0.3);padding:2px} +table.share_status.dashboard i.control{float:right;font-size:1.4rem!important;margin:0 3px 0 0;cursor:pointer;color:#f7f9f9;background-color:rgba(0,0,0,0.3);padding:2px;border-radius:5px} .dashboard-sortable{background-color:#f2f2f2} [name=arrayOps]{margin-top:12px} span.error{color:#f0000c;background-color:#ff9e9e;display:block;width:100%} From debcacc1ba269d6a8a5ff92bd4cf1c3a1081ab0d Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 13 Oct 2023 12:33:33 +0200 Subject: [PATCH 019/266] Dashboard: more enhancements --- emhttp/plugins/dynamix/DashStats.page | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emhttp/plugins/dynamix/DashStats.page b/emhttp/plugins/dynamix/DashStats.page index d92a95f05..9f51656b4 100644 --- a/emhttp/plugins/dynamix/DashStats.page +++ b/emhttp/plugins/dynamix/DashStats.page @@ -183,7 +183,7 @@ div.leftside{float:left;width:66%} div.rightside{float:right;margin:0;text-align:center} div[id$=chart]{margin:-12px 8px -24px -18px} div.template,div#dialogWindow,input#upload{display:none} -span.head_info{width:240px;display:inline-block} +span.head_info{width:250px;display:inline-block} span#head_cpu,span#head_ram,#head_ups,#head_apps,#head_vms,#_ups_status_{display:none;margin-left:0} span.head_bar{display:inline-block;width:180px} span.head_gap{padding-left:14px} From e0ec6c1164dae739a2af4097324f0cf225e5e7b2 Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 13 Oct 2023 15:26:50 +0200 Subject: [PATCH 020/266] Dashboard: add current time display --- emhttp/plugins/dynamix/DashStats.page | 8 +++++ emhttp/plugins/dynamix/nchan/update_3 | 45 ++++++++++++++++++++++++--- 2 files changed, 48 insertions(+), 5 deletions(-) diff --git a/emhttp/plugins/dynamix/DashStats.page b/emhttp/plugins/dynamix/DashStats.page index 9f51656b4..30c0c994b 100644 --- a/emhttp/plugins/dynamix/DashStats.page +++ b/emhttp/plugins/dynamix/DashStats.page @@ -236,6 +236,9 @@ input[value=Edit]{margin:12px 0 0 0;padding:5px 10px} .switch-button-background{margin-left:0;margin-top:4px} .switch-button-label{margin-top:3px} .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%} +#current_time{font-size:4rem;margin-left:5px} +#current_date{font-size:1.3rem;margin-left:15px} +span.ampm{font-size:2rem} @@ -262,6 +265,7 @@ input[value=Edit]{margin:12px 0 0 0;padding:5px 10px}
+


_(Model)_


_(Registration)_
Unraid OS

_(Uptime)_
@@ -1562,6 +1566,10 @@ dashboard.on('message',function(msg,meta) { $.each(part[1].split('\0'),function(k,v) {$('#main'+k).html(v);}); $.each(part[2].split('\0'),function(k,v) {$('#port'+k).html(v);}); $.each(part[3].split('\0'),function(k,v) {$('#link'+k).html(v);}); + // current date and time + var timedate = part[4].split('\n'); + $('#current_time').html(timedate[0]); + $('#current_date').html(timedate[1]); break; case 4: // wireguard tunnels diff --git a/emhttp/plugins/dynamix/nchan/update_3 b/emhttp/plugins/dynamix/nchan/update_3 index c0bddc07e..948a26f3f 100755 --- a/emhttp/plugins/dynamix/nchan/update_3 +++ b/emhttp/plugins/dynamix/nchan/update_3 @@ -19,10 +19,30 @@ $data = []; require_once "$docroot/webGui/include/Helpers.php"; require_once "$docroot/webGui/include/publish.php"; +extract(parse_plugin_cfg('dynamix',true)); -// satisfy translations (not used) -if (!function_exists('_')) { - function _($text) {return $text;} +// add translations +$_SERVER['REQUEST_URI'] = 'dashboard/main'; +$login_locale = _var($display,'locale'); +require_once "$docroot/webGui/include/Translations.php"; + +function update_translation($locale) { + global $docroot,$language; + $language = []; + if ($locale) { + $text = "$docroot/languages/$locale/translations.txt"; + if (file_exists($text)) { + $store = "$docroot/languages/$locale/translations.dot"; + if (!file_exists($store)) file_put_contents($store,serialize(parse_lang_file($text))); + $language = unserialize(file_get_contents($store)); + } + $text = "$docroot/languages/$locale/dashboard.txt"; + if (file_exists($text)) { + $store = "$docroot/languages/$locale/dashboard.dot"; + if (!file_exists($store)) file_put_contents($store,serialize(parse_lang_file($text))); + $language = array_merge($language,unserialize(file_get_contents($store))); + } + } } function ports() { global $net; @@ -42,6 +62,12 @@ foreach (ports() as $port) { } // loop while (true) { + // check for language changes + extract(parse_plugin_cfg('dynamix',true)); + if (_var($display,'locale') != $locale_init) { + $locale_init = _var($display,'locale'); + update_translation($locale_init); + } $echo = $mode = $rxtx = $stat = []; $ts = $time - $time0; foreach (ports() as $port) { @@ -89,8 +115,17 @@ while (true) { $tx_fifo = port_get_contents("$net/$port/statistics/tx_fifo_errors"); $stat[] = "Errors: {$rx_errors}
Drops: {$rx_drops}
Overruns: {$rx_fifo}\0Errors: {$tx_errors}
Drops: {$tx_drops}
Overruns: {$tx_fifo}"; } - - publish('update3',implode("\n",$echo)."\1".implode("\0",$mode)."\1".implode("\0",$rxtx)."\1".implode("\0",$stat)); + // current date and time + $now = time(); + if (_var($display,'time')=='%R') { + // 24 hour format + $clock = date('H:i',$now); $ampm = ''; + } else { + // 12 hour format wih am/pm + $clock = date('h:i',$now); $ampm = ''.date('a',$now).''; + } + $timedate = "$clock $ampm\n"._(date('l, F j, Y',$now),0); + publish('update3',implode("\n",$echo)."\1".implode("\0",$mode)."\1".implode("\0",$rxtx)."\1".implode("\0",$stat)."\1".$timedate); $time0 = $time; sleep(1); $time = microtime(true); From 64d161d09d0de9b33148f153b230c08fc76f9fcb Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 13 Oct 2023 15:33:22 +0200 Subject: [PATCH 021/266] Dashboard: more enhancements --- emhttp/plugins/dynamix/styles/default-azure.css | 2 +- emhttp/plugins/dynamix/styles/default-black.css | 2 +- emhttp/plugins/dynamix/styles/default-gray.css | 2 +- emhttp/plugins/dynamix/styles/default-white.css | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/emhttp/plugins/dynamix/styles/default-azure.css b/emhttp/plugins/dynamix/styles/default-azure.css index dcb2b8d58..ec6dbc23a 100644 --- a/emhttp/plugins/dynamix/styles/default-azure.css +++ b/emhttp/plugins/dynamix/styles/default-azure.css @@ -162,7 +162,7 @@ table.share_status.dashboard tr.last td{padding-bottom:20px} table.share_status.dashboard tr.header td{padding-bottom:10px;color:#9794a0} table.share_status.dashboard tr{border:none} table.share_status.dashboard td{line-height:normal;padding:3px 10px;border:none!important} -table.share_status.dashboard td.stopgap{height:10px!important;line-height:10px!important;padding:0!important;background-color:#e4e2e4} +table.share_status.dashboard td.stopgap{height:20px!important;line-height:20px!important;padding:0!important;background-color:#e4e2e4} table.share_status.dashboard td.vpn{font-size:1.1rem;font-weight:bold;text-transform:uppercase;letter-spacing:1px} 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;white-space:normal} diff --git a/emhttp/plugins/dynamix/styles/default-black.css b/emhttp/plugins/dynamix/styles/default-black.css index 48e7e5108..5f2b87035 100644 --- a/emhttp/plugins/dynamix/styles/default-black.css +++ b/emhttp/plugins/dynamix/styles/default-black.css @@ -162,7 +162,7 @@ table.share_status.dashboard tr:last-child td{padding-bottom:20px} table.share_status.dashboard tr.last td{padding-bottom:20px} table.share_status.dashboard tr.header td{padding-bottom:10px} table.share_status.dashboard td{padding:3px 10px} -table.share_status.dashboard td.stopgap{height:10px!important;line-height:10px!important;padding:0!important;background-color:#1c1b1b} +table.share_status.dashboard td.stopgap{height:20px!important;line-height:20px!important;padding:0!important;background-color:#1c1b1b} table.share_status.dashboard td.vpn{font-size:1.1rem;font-weight:bold;text-transform:uppercase;letter-spacing:1px} 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;white-space:normal} diff --git a/emhttp/plugins/dynamix/styles/default-gray.css b/emhttp/plugins/dynamix/styles/default-gray.css index df3e88596..099a70081 100644 --- a/emhttp/plugins/dynamix/styles/default-gray.css +++ b/emhttp/plugins/dynamix/styles/default-gray.css @@ -162,7 +162,7 @@ table.share_status.dashboard tr.last td{padding-bottom:20px} table.share_status.dashboard tr.header td{padding-bottom:10px;color:#82857e} table.share_status.dashboard tr{border:none} table.share_status.dashboard td{line-height:normal;padding:3px 10px;border:none!important} -table.share_status.dashboard td.stopgap{height:10px!important;line-height:10px!important;padding:0!important;background-color:#1b1d1b} +table.share_status.dashboard td.stopgap{height:20px!important;line-height:20px!important;padding:0!important;background-color:#1b1d1b} table.share_status.dashboard td.vpn{font-size:1.1rem;font-weight:bold;text-transform:uppercase;letter-spacing:1px} 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;white-space:normal} diff --git a/emhttp/plugins/dynamix/styles/default-white.css b/emhttp/plugins/dynamix/styles/default-white.css index a906442fc..7759a9311 100644 --- a/emhttp/plugins/dynamix/styles/default-white.css +++ b/emhttp/plugins/dynamix/styles/default-white.css @@ -162,7 +162,7 @@ table.share_status.dashboard tr:last-child td{padding-bottom:20px} table.share_status.dashboard tr.last td{padding-bottom:20px} table.share_status.dashboard tr.header td{padding-bottom:10px} table.share_status.dashboard td{padding:3px 10px} -table.share_status.dashboard td.stopgap{height:10px!important;line-height:10px!important;padding:0!important;background-color:#f2f2f2} +table.share_status.dashboard td.stopgap{height:20px!important;line-height:20px!important;padding:0!important;background-color:#f2f2f2} table.share_status.dashboard td.vpn{font-size:1.1rem;font-weight:bold;text-transform:uppercase;letter-spacing:1px} 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;white-space:normal} From a6d66e0a6506e1477c0afc9364fcd56da41a703e Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 13 Oct 2023 16:15:07 +0200 Subject: [PATCH 022/266] Dashboard: more enhancements --- emhttp/plugins/dynamix/DashStats.page | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emhttp/plugins/dynamix/DashStats.page b/emhttp/plugins/dynamix/DashStats.page index 30c0c994b..35afb0afe 100644 --- a/emhttp/plugins/dynamix/DashStats.page +++ b/emhttp/plugins/dynamix/DashStats.page @@ -236,8 +236,8 @@ input[value=Edit]{margin:12px 0 0 0;padding:5px 10px} .switch-button-background{margin-left:0;margin-top:4px} .switch-button-label{margin-top:3px} .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%} -#current_time{font-size:4rem;margin-left:5px} -#current_date{font-size:1.3rem;margin-left:15px} +#current_time{font-size:4rem;margin-left:8px} +#current_date{font-size:1.3rem;margin-left:18px} span.ampm{font-size:2rem} From 5bd4280e83e87ac4218aadde030c7d0420c56fd9 Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 13 Oct 2023 17:49:13 +0200 Subject: [PATCH 023/266] Prepare for automatic style sheet loading per page This feature will be used in future development of the GUI It allows pages to have their own style sheet settings stored in a related .css file --- emhttp/plugins/dynamix/include/DefaultPageLayout.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/emhttp/plugins/dynamix/include/DefaultPageLayout.php b/emhttp/plugins/dynamix/include/DefaultPageLayout.php index fe0277879..e983ad8ca 100644 --- a/emhttp/plugins/dynamix/include/DefaultPageLayout.php +++ b/emhttp/plugins/dynamix/include/DefaultPageLayout.php @@ -738,6 +738,10 @@ foreach ($pages as $page) { // create list of nchan scripts to be started if (isset($page['Nchan'])) nchan_merge($page['root'], $page['Nchan']); annotate($page['file']); + // include page specific stylesheet (if existing) + $css = "/{$page['root']}/styles/".strtolower($page['name']).".css"; + if (is_file($docroot.$css)) echo '',"\n"; + // create page content empty($page['Markdown']) || $page['Markdown']=='true' ? eval('?>'.Markdown(parse_text($page['text']))) : eval('?>'.parse_text($page['text'])); if ($close) echo "
"; } From 48e8c5bb7383f896c97848135014451d7809963e Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 13 Oct 2023 17:59:06 +0200 Subject: [PATCH 024/266] Prepare for automatic style sheet loading per page --- emhttp/plugins/dynamix/include/DefaultPageLayout.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emhttp/plugins/dynamix/include/DefaultPageLayout.php b/emhttp/plugins/dynamix/include/DefaultPageLayout.php index e983ad8ca..594e5f490 100644 --- a/emhttp/plugins/dynamix/include/DefaultPageLayout.php +++ b/emhttp/plugins/dynamix/include/DefaultPageLayout.php @@ -739,7 +739,7 @@ foreach ($pages as $page) { if (isset($page['Nchan'])) nchan_merge($page['root'], $page['Nchan']); annotate($page['file']); // include page specific stylesheet (if existing) - $css = "/{$page['root']}/styles/".strtolower($page['name']).".css"; + $css = "/{$page['root']}/pages/".strtolower($page['name']).".css"; if (is_file($docroot.$css)) echo '',"\n"; // create page content empty($page['Markdown']) || $page['Markdown']=='true' ? eval('?>'.Markdown(parse_text($page['text']))) : eval('?>'.parse_text($page['text'])); From 2ddceae4a3a9b07e278136ab132a655085ce70db Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 13 Oct 2023 18:08:58 +0200 Subject: [PATCH 025/266] Prepare for automatic style sheet loading per page --- emhttp/plugins/dynamix/include/DefaultPageLayout.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emhttp/plugins/dynamix/include/DefaultPageLayout.php b/emhttp/plugins/dynamix/include/DefaultPageLayout.php index 594e5f490..0cdd4f4c3 100644 --- a/emhttp/plugins/dynamix/include/DefaultPageLayout.php +++ b/emhttp/plugins/dynamix/include/DefaultPageLayout.php @@ -739,7 +739,7 @@ foreach ($pages as $page) { if (isset($page['Nchan'])) nchan_merge($page['root'], $page['Nchan']); annotate($page['file']); // include page specific stylesheet (if existing) - $css = "/{$page['root']}/pages/".strtolower($page['name']).".css"; + $css = "/{$page['root']}/pages/{$page['name']}.css"; if (is_file($docroot.$css)) echo '',"\n"; // create page content empty($page['Markdown']) || $page['Markdown']=='true' ? eval('?>'.Markdown(parse_text($page['text']))) : eval('?>'.parse_text($page['text'])); From a162a40a46cc421869c8f52e235016c0d77fda86 Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 13 Oct 2023 18:47:02 +0200 Subject: [PATCH 026/266] rc.S.cont: fix regression error in timezone setting --- etc/rc.d/rc.S.cont | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/rc.d/rc.S.cont b/etc/rc.d/rc.S.cont index b4ff449ff..46e3ddb9e 100755 --- a/etc/rc.d/rc.S.cont +++ b/etc/rc.d/rc.S.cont @@ -201,7 +201,7 @@ fi # LimeTech - restore hostname from ident.cfg file on flash and ensure hostname is # defined as localhost alias in /etc/hosts (this lets wins name resolution work) NAME="Tower" -TIMEZONE="America/Los_Angeles" +timeZone="America/Los_Angeles" if [[ -r /boot/config/ident.cfg ]]; then . <(/usr/bin/fromdos >/etc/hosts # LimeTech - restore the configured timezone -if [[ $TIMEZONE == custom ]]; then +if [[ $timeZone == custom ]]; then /bin/ln -sf /boot/config/timezone /etc/localtime else - /bin/ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime + /bin/ln -sf /usr/share/zoneinfo/$timeZone /etc/localtime fi # LimeTech - restore password files stored on flash From d06d2cb476efb77decebfdb36d41369a6b8ac555 Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 13 Oct 2023 18:51:22 +0200 Subject: [PATCH 027/266] Dashboard: Remove leading zero in time display --- emhttp/plugins/dynamix/nchan/update_3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emhttp/plugins/dynamix/nchan/update_3 b/emhttp/plugins/dynamix/nchan/update_3 index 948a26f3f..2f09b8bc0 100755 --- a/emhttp/plugins/dynamix/nchan/update_3 +++ b/emhttp/plugins/dynamix/nchan/update_3 @@ -119,10 +119,10 @@ while (true) { $now = time(); if (_var($display,'time')=='%R') { // 24 hour format - $clock = date('H:i',$now); $ampm = ''; + $clock = date('G:i',$now); $ampm = ''; } else { // 12 hour format wih am/pm - $clock = date('h:i',$now); $ampm = ''.date('a',$now).''; + $clock = date('g:i',$now); $ampm = ''.date('a',$now).''; } $timedate = "$clock $ampm\n"._(date('l, F j, Y',$now),0); publish('update3',implode("\n",$echo)."\1".implode("\0",$mode)."\1".implode("\0",$rxtx)."\1".implode("\0",$stat)."\1".$timedate); From c7216f18b2b4eee63e1d01a3ac8567fa646f8838 Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 13 Oct 2023 19:26:13 +0200 Subject: [PATCH 028/266] Dashboard: show time in header when collapsed --- emhttp/plugins/dynamix/DashStats.page | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/emhttp/plugins/dynamix/DashStats.page b/emhttp/plugins/dynamix/DashStats.page index 35afb0afe..fabe85ee4 100644 --- a/emhttp/plugins/dynamix/DashStats.page +++ b/emhttp/plugins/dynamix/DashStats.page @@ -183,8 +183,9 @@ div.leftside{float:left;width:66%} div.rightside{float:right;margin:0;text-align:center} div[id$=chart]{margin:-12px 8px -24px -18px} div.template,div#dialogWindow,input#upload{display:none} +span.head_time{font-size:2rem!important;padding-left:80px} span.head_info{width:250px;display:inline-block} -span#head_cpu,span#head_ram,#head_ups,#head_apps,#head_vms,#_ups_status_{display:none;margin-left:0} +span#head_cpu,span#head_ram,#head_ups,#head_apps,#head_vms,#_ups_status_,#_current_time_{display:none;margin-left:0} span.head_bar{display:inline-block;width:180px} span.head_gap{padding-left:14px} span.green,span.red,span.orange{padding-left:0} @@ -250,7 +251,7 @@ span.ampm{font-size:2rem}
-"; - $iptitlestr .= "$ipaddrval $ipprefix\n" ; + $iptablestr .= "$ipaddrval/$ipprefix\n" ; } } } } else { - if ($gastate == "disconnected") { $ipliststr .= ""; $iptitlestr = _('Requires guest agent installed') ; } - else { $ipliststr = ""; $iptitlestr = _('Requires guest running') ; } + if ($gastate == "disconnected") { $ipliststr .= ""; $iptablestr = _('Requires guest agent installed') ; } + else { $ipliststr = ""; $iptablestr = _('Requires guest running') ; } } + $iptablestr = str_replace("\n", "
", trim($iptablestr)); $changemedia = "getisoimageboth(\"{$uuid}\",\"hda\",\"{$cdbus}\",\"{$cdfile}\",\"hdb\",\"{$cdbus2}\",\"{$cdfile2}\")"; $cdstr = $cdromcount." / 2 "; echo ""; + echo "$image$vm
"._($status)." $snapshotstcount
"; echo ""; echo ""; echo ""; echo ""; echo ""; + echo ""; echo ""; /* Disk device information */ From 7b181bd71a731e1b0ee526fef29eb971b5bb410f Mon Sep 17 00:00:00 2001 From: SimonFair <39065407+SimonFair@users.noreply.github.com> Date: Fri, 20 Oct 2023 18:31:07 +0100 Subject: [PATCH 093/266] Add cpumigrate field --- emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php | 1 + 1 file changed, 1 insertion(+) diff --git a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php index 337dd1480..2b12163ec 100644 --- a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php +++ b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php @@ -1276,6 +1276,7 @@ private static $encoding = 'UTF-8'; 'maxmem' => $lv->domain_get_memory($res), 'password' => '', //TODO? 'cpumode' => $lv->domain_get_cpu_type($res), + 'cpumigrate' => $lv->domain_get_cpu_migrate($res), 'vcpus' => $dom['nrVirtCpu'], 'vcpu' => $lv->domain_get_vcpu_pins($res), 'hyperv' => ($lv->domain_get_feature($res, 'hyperv') ? 1 : 0), From b04b5d3519af27e41174e33f38b46dda07736cf5 Mon Sep 17 00:00:00 2001 From: SimonFair <39065407+SimonFair@users.noreply.github.com> Date: Sat, 21 Oct 2023 10:54:15 +0100 Subject: [PATCH 094/266] Add option to set cpu migration Support is only on host passthrough not custom. --- .../dynamix.vm.manager/include/libvirt.php | 16 ++++++- .../templates/Custom.form.php | 42 +++++++++++++++---- 2 files changed, 50 insertions(+), 8 deletions(-) diff --git a/emhttp/plugins/dynamix.vm.manager/include/libvirt.php b/emhttp/plugins/dynamix.vm.manager/include/libvirt.php index cebfe945f..c28486269 100644 --- a/emhttp/plugins/dynamix.vm.manager/include/libvirt.php +++ b/emhttp/plugins/dynamix.vm.manager/include/libvirt.php @@ -369,6 +369,7 @@ $cpumode = ''; $cpucache = ''; $cpufeatures = ''; + $cpumigrate = ''; if (!empty($domain['cpumode']) && $domain['cpumode'] == 'host-passthrough') { $cpumode .= "mode='host-passthrough'"; $cpucache = ""; @@ -389,9 +390,11 @@ $intCores = $vcpus / $intCPUThreadsPerCore; $intThreads = $intCPUThreadsPerCore; } + + if (!empty($domain['cpumigrate'])) $cpumigrate = " migratable='".$domain['cpumigrate']."'" ; } - $cpustr = " + $cpustr = " $cpucache $cpufeatures @@ -2096,6 +2099,17 @@ return $var; } + function domain_get_cpu_migrate($domain) { + $tmp = $this->get_xpath($domain, '//domain/cpu/@migratable', false); + if (!$tmp) + return 'no'; + + $var = $tmp[0]; + unset($tmp); + + return $var; + } + function domain_get_vcpu($domain) { $tmp = $this->get_xpath($domain, '//domain/vcpu', false); $var = $tmp[0]; diff --git a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php index 939d352ed..f09ef6f65 100644 --- a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php +++ b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php @@ -53,6 +53,7 @@ 'maxmem' => 1024 * 1024, 'password' => '', 'cpumode' => 'host-passthrough', + 'cpumigrate' => 'on', 'vcpus' => 1, 'vcpu' => [0], 'hyperv' => 1, @@ -312,13 +313,26 @@ + + - +
_(CPU Mode)_:_(CPU)_ _(Mode)_: - _('Host Passthrough').' (' . $strCPUModel . ')', 'custom' => _('Emulated').' ('._('QEMU64').')'], $arrConfig['domain']['cpumode']);?> + >_(Migratable)_: + +
@@ -380,10 +394,8 @@ } ?> - - - _(Max)_ _(Memory)_: - + + _(Max)_ _(Memory)_: -
@@ -1833,6 +1844,23 @@ $(function() { } }); + $("#vmform").on("change", ".cpu", function changeCPUEvent() { + var myvalue = $(this).val(); + var mylabel = $(this).children('option:selected').text(); + var cpumigrate = document.getElementById("domain_cpumigrate_text") ; + var cpumigrate_text = document.getElementById("domain_cpumigrate") ; + if (myvalue == "custom") { + document.getElementById("domain_cpumigrate_text").style.visibility="hidden"; + document.getElementById("domain_cpumigrate").style.visibility="hidden"; + } else { + document.getElementById("domain_cpumigrate_text").style.display="inline"; + document.getElementById("domain_cpumigrate_text").style.visibility="visible"; + document.getElementById("domain_cpumigrate").style.display="inline"; + document.getElementById("domain_cpumigrate").style.visibility="visible"; + } + + }) ; + $("#vmform").on("change", ".gpu", function changeGPUEvent() { var myvalue = $(this).val(); var mylabel = $(this).children('option:selected').text(); From f86df19b7d2a3fd3f01e50d297a83bed3ce10a29 Mon Sep 17 00:00:00 2001 From: SimonFair <39065407+SimonFair@users.noreply.github.com> Date: Sat, 21 Oct 2023 11:55:58 +0100 Subject: [PATCH 095/266] Add migratable help text. --- emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php index f09ef6f65..51bed7531 100644 --- a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php +++ b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php @@ -347,6 +347,10 @@ Emulated
If you are having difficulties with Host Passthrough mode, you can try the emulated mode which doesn't expose the guest to host-based CPU features. This may impact the performance of your VM.

+

+ Migratable
+ Migratable attribute may be used to explicitly request such features to be removed from (on) or kept in (off) the virtual CPU. Off will not remove any host features when using Host Passthrough. Not support on emulated. +

From 1ba8f32464488a42f2d477a4a60a6c3d0f185ebe Mon Sep 17 00:00:00 2001 From: SimonFair <39065407+SimonFair@users.noreply.github.com> Date: Sat, 21 Oct 2023 14:58:40 +0100 Subject: [PATCH 096/266] Add hypeclock for windows machines --- emhttp/plugins/dynamix.vm.manager/include/libvirt.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emhttp/plugins/dynamix.vm.manager/include/libvirt.php b/emhttp/plugins/dynamix.vm.manager/include/libvirt.php index c28486269..66e0fc777 100644 --- a/emhttp/plugins/dynamix.vm.manager/include/libvirt.php +++ b/emhttp/plugins/dynamix.vm.manager/include/libvirt.php @@ -442,10 +442,13 @@ break; } + if ($os_type == "windows") $hypervclock = "" else $hypervclock = "" ; + $clock = " + $hypervclock "; $hyperv = ''; From c9b8d1326183f02ab57489b673f96b469232cb02 Mon Sep 17 00:00:00 2001 From: SimonFair <39065407+SimonFair@users.noreply.github.com> Date: Sat, 21 Oct 2023 15:58:09 +0100 Subject: [PATCH 097/266] Update libvirt.php --- emhttp/plugins/dynamix.vm.manager/include/libvirt.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emhttp/plugins/dynamix.vm.manager/include/libvirt.php b/emhttp/plugins/dynamix.vm.manager/include/libvirt.php index 66e0fc777..1f61a5735 100644 --- a/emhttp/plugins/dynamix.vm.manager/include/libvirt.php +++ b/emhttp/plugins/dynamix.vm.manager/include/libvirt.php @@ -442,7 +442,7 @@ break; } - if ($os_type == "windows") $hypervclock = "" else $hypervclock = "" ; + if ($os_type == "windows") $hypervclock = "" ; else $hypervclock = "" ; $clock = " From 594ff1d642e73d72dcec94667def644a8c057765 Mon Sep 17 00:00:00 2001 From: ljm42 Date: Mon, 23 Oct 2023 16:42:06 -0700 Subject: [PATCH 098/266] nginx: use the new http2 directive --- etc/rc.d/rc.nginx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/etc/rc.d/rc.nginx b/etc/rc.d/rc.nginx index 07ebdd264..b00debce8 100755 --- a/etc/rc.d/rc.nginx +++ b/etc/rc.d/rc.nginx @@ -176,7 +176,8 @@ build_servers(){ # ex: https://tower.local # server { - $(listen $PORTSSL ssl http2 default_server) + $(listen $PORTSSL ssl default_server) + http2 on; # Ok to use concatenated pem files; nginx will do the right thing. ssl_certificate $SELFCERTPATH; ssl_certificate_key $SELFCERTPATH; @@ -220,7 +221,8 @@ build_servers(){ # Return 404 (Not Found) as default ssl action, using self-signed cert # server { - $(listen $PORTSSL ssl http2 default_server) + $(listen $PORTSSL ssl default_server) + http2 on; # Ok to use concatenated pem files; nginx will do the right thing. ssl_certificate $SELFCERTPATH; ssl_certificate_key $SELFCERTPATH; @@ -240,7 +242,8 @@ build_servers(){ # Return 404 (Not Found) as default ssl action # server { - $(listen $PORTSSL ssl http2 default_server) + $(listen $PORTSSL ssl default_server) + http2 on; # Ok to use concatenated pem files; nginx will do the right thing. ssl_certificate $SELFCERTPATH; ssl_certificate_key $SELFCERTPATH; @@ -261,7 +264,8 @@ build_servers(){ # ex: https://hash.unraid.net # server { - $(listen $PORTSSL ssl http2) + $(listen $PORTSSL ssl) + http2 on; server_name ${SERVER_NAMES[@]}; # Ok to use concatenated pem files; nginx will do the right thing. ssl_certificate $CERTPATH; From d008f5a5f04d67fab74620d734f403cf3e3758ff Mon Sep 17 00:00:00 2001 From: Christoph Hummer Date: Tue, 24 Oct 2023 11:54:52 +0200 Subject: [PATCH 099/266] Just for the looks - only add space if version number from module is found --- emhttp/plugins/dynamix/include/SysDrivers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emhttp/plugins/dynamix/include/SysDrivers.php b/emhttp/plugins/dynamix/include/SysDrivers.php index 2b6ee2fa0..f6ad7cf34 100644 --- a/emhttp/plugins/dynamix/include/SysDrivers.php +++ b/emhttp/plugins/dynamix/include/SysDrivers.php @@ -79,9 +79,9 @@ switch ($_POST['table']) { $supporthtml = "" ; } } - if (isset($module["version"])) $version = "(".$module["version"].")" ; else $version = "" ; + if (isset($module["version"])) $version = " (".$module["version"].")" ; else $version = "" ; - $html .= "$modname $version$supporthtml" ; + $html .= "$modname$version$supporthtml" ; $html .= "{$module['description']}{$module['state']}{$module['type']}"; $text = "" ; From 25ccb39fa0a1aa5ebfb6836a24f3f3e9528a1dd9 Mon Sep 17 00:00:00 2001 From: Tom Mortensen Date: Tue, 24 Oct 2023 11:08:20 -0700 Subject: [PATCH 100/266] Fix comment in rc.nginx: php-fpm socket name is php-fpm, not php5-fpm Removed a couple files no longer needed: wrap_get.php wrap_post.php --- etc/rc.d/rc.nginx | 2 +- src/wrap_get.php | 17 ----------------- src/wrap_post.php | 18 ------------------ 3 files changed, 1 insertion(+), 36 deletions(-) delete mode 100644 src/wrap_get.php delete mode 100644 src/wrap_post.php diff --git a/etc/rc.d/rc.nginx b/etc/rc.d/rc.nginx index b00debce8..465523c94 100755 --- a/etc/rc.d/rc.nginx +++ b/etc/rc.d/rc.nginx @@ -381,7 +381,7 @@ build_locations(){ add_header Cache-Control no-cache; } # - # pass PHP scripts to FastCGI server listening on unix:/var/run/php5-fpm.sock + # pass PHP scripts to FastCGI server listening on unix:/var/run/php-fpm.sock # location ~ \.php$ { include fastcgi_params; diff --git a/src/wrap_get.php b/src/wrap_get.php deleted file mode 100644 index baa8e0c14..000000000 --- a/src/wrap_get.php +++ /dev/null @@ -1,17 +0,0 @@ - it invokes php-cli like this: -// cd /usr/local/emhttp ; /usr/bin/php ../sbin/wrap_get.php -// argv[0] argv[1] argv[2] -// A similar thing happens when a webGui "page" is rendered. In this case, any fname that begins -// with a capital letter and has no extension is assumed to be a Page. For example, for GET, when emhttp -// renfers
it invokes php-cli like this: -// cd /usr/local/emhttp ; /usr/bin/php ../sbin/wrap_get.php webGui/template.php -// argv[0] argv[1] argv[2] -// Included in is "path=Main/Disk&prev=Main" where "prev" is the previous page rendered. -// Note: we place 'wrap_get.php' outside webGui root so user can't invoke directly (or else OOM crash!) - $_SERVER['REQUEST_METHOD'] = "GET"; - $_SERVER['DOCUMENT_ROOT'] = "/usr/local/emhttp"; - parse_str($argv[2], $_GET); - include($argv[1]); -?> diff --git a/src/wrap_post.php b/src/wrap_post.php deleted file mode 100644 index b83dc474f..000000000 --- a/src/wrap_post.php +++ /dev/null @@ -1,18 +0,0 @@ - it invokes php-cli like this: -// cd /usr/local/emhttp ; /usr/bin/php ../sbin/wrap_post.php -// argv[0] argv[1] argv[2] argv[3] -// A similar thing happens when a webGui "page" is rendered. In this case, any fname that begins -// with a capital letter and has no extension is assumed to be a Page. For example, for POST, when emhttp -// renfers
it invokes php-cli like this: -// cd /usr/local/emhttp ; /usr/bin/php ../sbin/wrap_post.php webGui/template.php -// argv[0] argv[1] argv[2] argv[3] -// Included in is "path=Main/Disk&prev=Main" where "prev" is the previous page rendered. -// Note: we place 'wrap_post.php' outside webGui root so user can't invoke directly (or else OOM crash!) - $_SERVER['REQUEST_METHOD'] = "POST"; - $_SERVER['DOCUMENT_ROOT'] = "/usr/local/emhttp"; - parse_str($argv[2], $_GET); - parse_str($argv[3], $_POST); - include($argv[1]); -?> From 42e2ee6e393aad928891979b4f4dd91a8ed3f932 Mon Sep 17 00:00:00 2001 From: ljm42 Date: Tue, 24 Oct 2023 17:17:10 -0700 Subject: [PATCH 101/266] remove support for legacy unraid.net certs --- emhttp/plugins/dynamix/ManagementAccess.page | 34 ++++++------------- .../plugins/dynamix/include/ProvisionCert.php | 6 ++-- etc/rc.d/rc.nginx | 17 +++------- 3 files changed, 18 insertions(+), 39 deletions(-) diff --git a/emhttp/plugins/dynamix/ManagementAccess.page b/emhttp/plugins/dynamix/ManagementAccess.page index 9836b3824..264315805 100644 --- a/emhttp/plugins/dynamix/ManagementAccess.page +++ b/emhttp/plugins/dynamix/ManagementAccess.page @@ -56,7 +56,7 @@ $nginx = @parse_ini_file('/var/local/emhttp/nginx.ini') ?: []; $addr = _var($nginx,'NGINX_LANIP') ?: _var($nginx,'NGINX_LANIP6'); $keyfile = empty(_var($var,'regFILE')) ? false : @file_get_contents(_var($var,'regFILE')); $cert2Issuer = ''; -$isLEcert = false; +$isWildcardCert = false; if ($keyfile !== false) $keyfile = base64_encode($keyfile); // self-signed or user-provided cert @@ -82,25 +82,18 @@ if ($cert2Present) { $cert2Subject = exec("/usr/bin/openssl x509 -in $cert2File -noout -subject -nameopt multiline 2>/dev/null|sed -n 's/ *commonName *= //p'"); $cert2Issuer = exec("/usr/bin/openssl x509 -in $cert2File -noout -text | sed -n -e 's/^.*Issuer: //p'"); $cert2Expires = exec("/usr/bin/openssl x509 -in $cert2File -noout -text | sed -n -e 's/^.*Not After : //p'"); - $isLegacyCert = preg_match('/.*\.unraid\.net$/', $cert2Subject); $isWildcardCert = preg_match('/.*\.myunraid\.net$/', $cert2Subject); - $isLEcert = $isLegacyCert || $isWildcardCert; $subject2URL = $cert2Subject; if ($isWildcardCert) { - if (!$addr) - // if eth0 doesn't have an IP address, then show noip.hash.myunraid.net as a placeholder url - $subject2URL = str_replace("*", 'noip', $subject2URL); - elseif (strpos($addr, ":") === false) - $subject2URL = str_replace("*", str_replace(".", "-", $addr), $subject2URL); - else - $subject2URL = str_replace("*", str_replace(":", "-", $addr), $subject2URL); - } - if ($isLEcert) { exec("openssl x509 -checkend 2592000 -noout -in $cert2File 2>/dev/null", $arrout, $retval_expired); if (!$addr) { + // if eth0 doesn't have an IP address, then show noip.hash.myunraid.net as a placeholder url + $subject2URL = str_replace("*", 'noip', $subject2URL); $dnsValid = false; $dnsRebindingProtection = false; } elseif (strpos($addr, ":") === false) { + // eth0 is IPv4 + $subject2URL = str_replace("*", str_replace(".", "-", $addr), $subject2URL); $rebindtest_ip = exec("host -4 -t A rebindtest4.myunraid.net 2>/dev/null|awk '{print \$4}'"); $dnsRebindingProtection = ($rebindtest_ip != "192.168.42.42"); if (!$dnsRebindingProtection) { @@ -108,6 +101,8 @@ if ($cert2Present) { $dnsValid = $cert_ip==$addr; } } else { + // eth0 is IPv6 + $subject2URL = str_replace("*", str_replace(":", "-", $addr), $subject2URL); $rebindtest_ip = exec("host -6 -t AAAA rebindtest6.myunraid.net 2>/dev/null|awk '{print \$4}'"); // more: restore this after TTL expires // $dnsRebindingProtection = ($rebindtest_ip != "fd42::42"); @@ -166,14 +161,12 @@ case 'auto': // aka strict } $cert_time_format = $display['date'].($display['date']!='%c' ? ', '.str_replace(['%M','%R'],['%M:%S','%R:%S'],$display['time']):''); -$provisionlabel = $isLEcert ? _('Renew') : _('Provision'); -$disabled_provision = $keyfile===false || ($isLEcert && $retval_expired===0) || !$addr ? 'disabled' : ''; +$provisionlabel = $isWildcardCert ? _('Renew') : _('Provision'); +$disabled_provision = $keyfile===false || ($isWildcardCert && $retval_expired===0) || !$addr ? 'disabled' : ''; $disabled_provision_msg = !$addr ? _('Ensure the primary network card eth0 has an IP address.') : ''; -$disabled_upgrade = !$addr ? 'disabled' : ''; -$disabled_updatedns = $keyfile!==false && $isLEcert ? '' : 'disabled'; +$disabled_updatedns = $keyfile!==false && $isWildcardCert ? '' : 'disabled'; $disabled_delete = $cert2Present && $var['USE_SSL']!='auto' ? '' : 'disabled'; -$disabled_auto = $isLEcert && !$dnsRebindingProtection && $dnsValid ? '' : 'disabled'; -$upgradelabel = _('Upgrade Cert'); +$disabled_auto = $isWildcardCert && !$dnsRebindingProtection && $dnsValid ? '' : 'disabled'; // Get ports in use $portsInUse = []; @@ -440,11 +433,6 @@ _(CA-signed certificate file)_:   : - -  -: - - :mgmt_certificate_expiration_help: diff --git a/emhttp/plugins/dynamix/include/ProvisionCert.php b/emhttp/plugins/dynamix/include/ProvisionCert.php index bd85e06ae..475544901 100644 --- a/emhttp/plugins/dynamix/include/ProvisionCert.php +++ b/emhttp/plugins/dynamix/include/ProvisionCert.php @@ -46,9 +46,8 @@ $certPresent = file_exists($certPath); if ($certPresent) { // renew existing cert $certSubject = exec("/usr/bin/openssl x509 -subject -noout -in ".escapeshellarg($certPath)); - $isLegacyCert = preg_match('/.*\.unraid\.net$/', $certSubject); $isWildcardCert = preg_match('/.*\.myunraid\.net$/', $certSubject); - if ($isLegacyCert || $isWildcardCert) { + if ($isWildcardCert) { exec("/usr/bin/openssl x509 -checkend 2592000 -noout -in ".escapeshellarg($certPath), $arrout, $retval_expired); if ($retval_expired === 0) { // not within 30 days of cert expire date @@ -59,7 +58,6 @@ if ($certPresent) { response_complete(406, '{"error":"'._('Cannot renew a custom cert at').' '.$certPath.'"}'); } } -$endpoint = ($certPresent && $isLegacyCert) ? "provisioncert" : "provisionwildcard"; $keyfile = empty($var['regFILE']) ? false : @file_get_contents($var['regFILE']); if ($keyfile === false) { @@ -67,7 +65,7 @@ if ($keyfile === false) { } $keyfile = @base64_encode($keyfile); -$ch = curl_init("https://keys.lime-technology.com/account/ssl/$endpoint"); +$ch = curl_init("https://keys.lime-technology.com/account/ssl/provisionwildcard"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, [ diff --git a/etc/rc.d/rc.nginx b/etc/rc.d/rc.nginx index 465523c94..c54748843 100755 --- a/etc/rc.d/rc.nginx +++ b/etc/rc.d/rc.nginx @@ -12,9 +12,7 @@ # LANNAME 'tower' # LANMDNS 'tower.local' # LANFQDN 'lan-ip.hash.myunraid.net' (wildcard cert) -# LANFQDN 'hash.unraid.net' (legacy cert) # WANFQDN 'wan-ip.hash.myunraid.net' (wildcard cert) -# WANFQDN 'www.hash.unraid.net' (legacy) # WG0FQDN 'wg0-ip.hash.myunraid.net' (wildcard cert) DAEMON="Nginx server daemon" @@ -44,6 +42,10 @@ SERVER_NAMES=() [[ $PORTSSL != 443 ]] && PORTSSL_URL=":$PORTSSL" [[ $PORT != 80 ]] && PORT_URL=":$PORT" +# delete legacy unraid.net certificate +TMPCERTNAME=$(openssl x509 -noout -subject -nameopt multiline -in $CERTPATH | sed -n 's/ *commonName *= //p') +[[ $TMPCERTNAME == *\.unraid\.net ]] && rm $CERTPATH + # if USE_SSL="auto" and no uploaded cert, treat like USE_SSL="no" [[ $USE_SSL == auto && ! -f $CERTPATH ]] && USE_SSL=no @@ -261,7 +263,6 @@ build_servers(){ # # Port settings for https using CA-signed cert # ex: https://lan-ip.hash.myunraid.net - # ex: https://hash.unraid.net # server { $(listen $PORTSSL ssl) @@ -501,15 +502,7 @@ build_ssl(){ WANIP=$(curl https://wanip4.unraid.net/ 2>/dev/null) WANIP6=$(curl https://wanip6.unraid.net/ 2>/dev/null) fi - if [[ $CERTNAME == *\.unraid\.net ]]; then - # legacy LE certificate (only supports IPv4) - LANFQDN=$CERTNAME - SERVER_NAMES+=($LANFQDN) - if [[ -n $WANACCESS && -n $WANIP ]]; then - WANFQDN="www.$CERTNAME" - SERVER_NAMES+=($WANFQDN) - fi - elif [[ $CERTNAME == *\.myunraid\.net ]]; then + if [[ $CERTNAME == *\.myunraid\.net ]]; then # wildcard LE certificate [[ -n $LANIP ]] && LANFQDN=$(fqdn $LANIP) SERVER_NAMES+=($LANFQDN) [[ -n $LANIP6 ]] && LANFQDN6=$(fqdn $LANIP6) SERVER_NAMES+=($LANFQDN6) From 4f5b94f83bd63760de7cd1be92819cb2ce8e5aa3 Mon Sep 17 00:00:00 2001 From: ljm42 Date: Tue, 24 Oct 2023 17:24:53 -0700 Subject: [PATCH 102/266] remove support for legacy unraid.net certs --- etc/rc.d/rc.nginx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etc/rc.d/rc.nginx b/etc/rc.d/rc.nginx index c54748843..9562e13ca 100755 --- a/etc/rc.d/rc.nginx +++ b/etc/rc.d/rc.nginx @@ -43,8 +43,10 @@ SERVER_NAMES=() [[ $PORT != 80 ]] && PORT_URL=":$PORT" # delete legacy unraid.net certificate -TMPCERTNAME=$(openssl x509 -noout -subject -nameopt multiline -in $CERTPATH | sed -n 's/ *commonName *= //p') -[[ $TMPCERTNAME == *\.unraid\.net ]] && rm $CERTPATH +if [[ -f $CERTPATH ]]; then + TMPCERTNAME=$(openssl x509 -noout -subject -nameopt multiline -in $CERTPATH | sed -n 's/ *commonName *= //p') + [[ $TMPCERTNAME == *\.unraid\.net ]] && rm $CERTPATH +fi # if USE_SSL="auto" and no uploaded cert, treat like USE_SSL="no" [[ $USE_SSL == auto && ! -f $CERTPATH ]] && USE_SSL=no From 6ca0a396866d5c975b84dd2cb7e35ccb417ead38 Mon Sep 17 00:00:00 2001 From: ljm42 Date: Tue, 24 Oct 2023 17:56:01 -0700 Subject: [PATCH 103/266] remove legacy unraid.net settings migration --- .../dynamix.my.servers/scripts/cfgMigration | 91 ------------------- sbin/upgrade | 7 -- 2 files changed, 98 deletions(-) delete mode 100755 emhttp/plugins/dynamix.my.servers/scripts/cfgMigration diff --git a/emhttp/plugins/dynamix.my.servers/scripts/cfgMigration b/emhttp/plugins/dynamix.my.servers/scripts/cfgMigration deleted file mode 100755 index 92f1a8e3f..000000000 --- a/emhttp/plugins/dynamix.my.servers/scripts/cfgMigration +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/php - $var['csrf_token'], - '#file' => $mys_cfg, - '#section' => 'remote' - ]; - foreach($orig['remote'] as $key => $value) { - $fields_mys_remote[$key] = $value; - } - update($url, http_build_query($fields_mys_remote)); - } - /* - // write [wizard] section to myservers.cfg - if(!empty($orig['wizard'])) { - $fields_mys_wizard = [ - 'csrf_token' => $var['csrf_token'], - '#file' => $mys_cfg, - '#section' => 'wizard' - ]; - foreach($orig['wizard'] as $key => $value) { - $fields_mys_wizard[$key] = $value; - } - update($url, http_build_query($fields_mys_wizard)); - } - */ - // remove [remote] section from dynamix.cfg - if(!empty($orig['remote'])) { - $fields_dyn_remote = [ - 'csrf_token' => $var['csrf_token'], - '#file' => $dyn_cfg, - '#section' => 'remote', - '#cleanup' => 'true' - ]; - foreach($orig['remote'] as $key => $value) { - $fields_dyn_remote[$key] = ''; - } - update($url, http_build_query($fields_dyn_remote)); - } - // remove [wizard] section from dynamix.cfg - if(!empty($orig['wizard'])) { - $fields_dyn_wizard = [ - 'csrf_token' => $var['csrf_token'], - '#file' => $dyn_cfg, - '#section' => 'wizard', - '#cleanup' => 'true' - ]; - foreach($orig['wizard'] as $key => $value) { - $fields_dyn_wizard[$key] = ''; - } - update($url, http_build_query($fields_dyn_wizard)); - } - // remove [remote] and [wizard] section headings from dyn_cfg file - $oldtext = file_get_contents($dyn_cfg); - $newtext = preg_replace ('/\[(remote|wizard)\]\n/', '', $oldtext); - if (strcmp($oldtext, $newtext) !== 0) { - file_put_contents($dyn_cfg, $newtext); - } -} -if (!file_exists($mys_cfg)) touch($mys_cfg); - -?> diff --git a/sbin/upgrade b/sbin/upgrade index b22c109e7..d84d52a49 100755 --- a/sbin/upgrade +++ b/sbin/upgrade @@ -28,13 +28,6 @@ fi # remove previous auto-populated docker template descriptions /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/fixDescriptions -# migrate settings from early unraid.net users -CFG_OLD=/boot/config/plugins/Unraid.net -CFG_NEW=/boot/config/plugins/dynamix.my.servers -[[ -d "$CFG_OLD" ]] && [[ ! -d "$CFG_NEW" ]] && mv "$CFG_OLD" "$CFG_NEW" -mkdir -p "$CFG_NEW" -/usr/local/emhttp/plugins/dynamix.my.servers/scripts/cfgMigration - # stating with 6.10 'USE_SSL="auto"' without a LE cert is invalid [[ ! -f /boot/config/ssl/certs/certificate_bundle.pem ]] && sed -i s/USE_SSL=\"auto\"/USE_SSL=\"no\"/ /boot/config/ident.cfg From 8d43fc8aa55a9083dee23228d73104781390e04c Mon Sep 17 00:00:00 2001 From: bergware Date: Wed, 25 Oct 2023 09:24:16 +0200 Subject: [PATCH 104/266] Cache Devices: make style consistent --- emhttp/plugins/dynamix/CacheDevices.page | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/emhttp/plugins/dynamix/CacheDevices.page b/emhttp/plugins/dynamix/CacheDevices.page index df44dbf80..0fad46851 100644 --- a/emhttp/plugins/dynamix/CacheDevices.page +++ b/emhttp/plugins/dynamix/CacheDevices.page @@ -32,7 +32,7 @@ function isSubpool($name) { } ?> "> -"> +"> Date: Thu, 26 Oct 2023 02:06:06 +0200 Subject: [PATCH 123/266] Dashboard: update time when timezone is changed --- emhttp/plugins/dynamix/DateTime.page | 14 ++++++++----- emhttp/plugins/dynamix/include/ResetTZ.php | 23 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 emhttp/plugins/dynamix/include/ResetTZ.php diff --git a/emhttp/plugins/dynamix/DateTime.page b/emhttp/plugins/dynamix/DateTime.page index f141e48c9..b3da8bdf5 100644 --- a/emhttp/plugins/dynamix/DateTime.page +++ b/emhttp/plugins/dynamix/DateTime.page @@ -4,8 +4,8 @@ Icon="icon-clock" Tag="clock-o" --- -
+ _(Current date and time)_: : _(Time zone)_: -: @@ -69,6 +69,10 @@ _(New date and time)_:
$domain_bridge, 'mac' => "", 'model' => 'virtio-net' ] ; - } + } foreach ($arrConfig['nic'] as $i => $arrNic) { $strLabel = ($i > 0) ? appendOrdinalSuffix($i + 1) : ''; @@ -1326,7 +1327,7 @@ - + - + @@ -1373,14 +1374,14 @@ if (count($pcidevice=array_filter($arrConfig['pci'], function($arr) use ($arrDev) { return ($arr['id'] == $arrDev['id']); }))) { $extra .= ' checked="checked"'; foreach ($pcidevice as $pcikey => $pcidev) $pciboot = $pcidev["boot"]; ; - + } elseif (!in_array($arrDev['driver'], ['pci-stub', 'vfio-pci'])) { //$extra .= ' disabled="disabled"'; continue; } $intAvailableOtherPCIDevices++; ?> - - \n"; // XML encoding declaratio echo mk_option($arrGPU['autoport'], 'no', _('No')); ?> - + >_(VM Console Port)_: - + > - + >_(VM Console WS Port)_: - + > @@ -800,19 +801,19 @@ $hdrXML = "\n"; // XML encoding declaratio virtual video protocol VDA/SPICE
If you wish to assign a protocol type, specify one here.

- + Graphics Card
If you wish to assign a graphics card to the VM, select it from this list, otherwise leave it set to virtual.

virtual video protocol VDC/SPICE
- If you wish to assign a protocol type, specify one here. + If you wish to assign a protocol type, specify one here.

virtual auto port
- Set it you want to specify a manual port for VNC or Spice. VNC needs two ports where Spice only requires one. Leave as auto yes for the system to set. + Set it you want to specify a manual port for VNC or Spice. VNC needs two ports where Spice only requires one. Leave as auto yes for the system to set.

@@ -898,15 +899,15 @@ $hdrXML = "\n"; // XML encoding declaratio
_(Select)_  _(Optional)_  _(Boot Order)_
_(Select)_  _(Optional)_  _(Boot Order)_
_(USB Devices)_: @@ -1336,7 +1337,7 @@ foreach($arrVMUSBs as $i => $arrDev) { ?>
_(Select)_  _(Boot Order)_
_(Select)_  _(Boot Order)_
_(Other PCI Devices)_:
- $domain_bridge, 'mac' => "", 'model' => 'virtio-net' ] ; - } + } foreach ($arrConfig['nic'] as $i => $arrNic) { $strLabel = ($i > 0) ? appendOrdinalSuffix($i + 1) : ''; @@ -951,7 +952,7 @@ $hdrXML = "\n"; // XML encoding declaratio style="width: 50px;" name="nic[][boot]" title="_(Boot order)_" value="" > - +
@@ -1025,7 +1026,7 @@ $hdrXML = "\n"; // XML encoding declaratio - + @@ -1057,7 +1058,7 @@ $hdrXML = "\n"; // XML encoding declaratio
_(Select)_  _(Optional)_  _(Boot Order)_
_(Select)_  _(Optional)_  _(Boot Order)_
_(USB Devices)_:
- + @@ -1073,14 +1074,14 @@ $hdrXML = "\n"; // XML encoding declaratio if (count($pcidevice=array_filter($arrConfig['pci'], function($arr) use ($arrDev) { return ($arr['id'] == $arrDev['id']); }))) { $extra .= ' checked="checked"'; foreach ($pcidevice as $pcikey => $pcidev) $pciboot = $pcidev["boot"]; ; - + } elseif (!in_array($arrDev['driver'], ['pci-stub', 'vfio-pci'])) { //$extra .= ' disabled="disabled"'; continue; } $intAvailableOtherPCIDevices++; ?> - - +
_(Select)_  _(Boot Order)_
_(Select)_  _(Boot Order)_
_(Other PCI Devices)_: style="width: 50px;" name="nic[][boot]" title="_(Boot order)_" value="" >
@@ -1018,7 +1019,7 @@ $hdrXML = "\n"; // XML encoding declaratio - + @@ -1029,7 +1030,7 @@ $hdrXML = "\n"; // XML encoding declaratio foreach($arrVMUSBs as $i => $arrDev) { ?>
\n"; // XML encoding declaratio
_(Select)_  _(Optional)_  _(Boot Order)_
_(Select)_  _(Optional)_  _(Boot Order)_
_(USB Devices)_:
- + @@ -1066,14 +1067,14 @@ $hdrXML = "\n"; // XML encoding declaratio if (count($pcidevice=array_filter($arrConfig['pci'], function($arr) use ($arrDev) { return ($arr['id'] == $arrDev['id']); }))) { $extra .= ' checked="checked"'; foreach ($pcidevice as $pcikey => $pcidev) $pciboot = $pcidev["boot"]; ; - + } elseif (!in_array($arrDev['driver'], ['pci-stub', 'vfio-pci'])) { //$extra .= ' disabled="disabled"'; continue; } $intAvailableOtherPCIDevices++; ?> - "; } @@ -218,7 +218,7 @@ case 't3': exec('lsusb|sort',$lsusb); foreach ($lsusb as $line) { [$bus,$id] = my_explode(':',$line); - $usbport = usb_physical_port($line) ; + $usbport = usb_physical_port($line); echo ""; } break; diff --git a/emhttp/plugins/dynamix/include/SysDrivers.php b/emhttp/plugins/dynamix/include/SysDrivers.php index f6ad7cf34..251e6e240 100644 --- a/emhttp/plugins/dynamix/include/SysDrivers.php +++ b/emhttp/plugins/dynamix/include/SysDrivers.php @@ -11,112 +11,106 @@ */ ?> "; - $html .= "" ; - - if (is_array($arrModules)) ksort($arrModules) ; - foreach($arrModules as $modname => $module) { - if ($modname == "") continue ; +case 't1load': + $list = file_get_contents($sysdrvfile); + $arrModules = json_decode($list,TRUE); + $init = false; + if (is_file($sysdrvinit)) $init = file_get_contents($sysdrvinit); + $html = ""; + $html .= ""; + if (is_array($arrModules)) ksort($arrModules); + foreach($arrModules as $modname => $module) { + if ($modname == "") continue; + if (is_file("/boot/config/modprobe.d/$modname.conf")) { + $modprobe = file_get_contents("/boot/config/modprobe.d/$modname.conf"); + $state = strpos($modprobe, "blacklist"); + $modprobe = explode(PHP_EOL,$modprobe); + if($state !== false) {$state = "Disabled";} else $state="Custom"; + $module['state'] = $state; + $module['modprobe'] = $modprobe; + } else { + if (is_file("/etc/modprobe.d/$modname.conf")) { + $modprobe = file_get_contents("/etc/modprobe.d/$modname.conf"); + $state = strpos($modprobe, "blacklist"); + $modprobe = explode(PHP_EOL,$modprobe); + if($state !== false) {$state = "Disabled";} else $state="System"; + $module['state'] = $state; + $module['modprobe'] = $modprobe; + } + } + $html .= ""; + if ($supportpage) { + if ($module['support'] == false) { + $supporthtml = ""; + } else { + $supporturl = $module['supporturl']; + $pluginname = $module['plugin']; + $supporthtml = ""; + } + } + if (isset($module["version"])) $version = " (".$module["version"].")"; else $version = ""; + $html .= ""; + $html .= ""; + $text = ""; + if (is_array($module["modprobe"])) { + $text = implode("\n",$module["modprobe"]); + $html .= ""; + } else { + $html .= ""; + } + } + $html .= ""; + $rtn = array(); + $rtn['html'] = $html; + if ($init !== false) {$init = true; unlink($sysdrvinit);} + $rtn['init'] = $init; + echo json_encode($rtn); + break; - if (is_file("/boot/config/modprobe.d/$modname.conf")) { - $modprobe = file_get_contents("/boot/config/modprobe.d/$modname.conf") ; - $state = strpos($modprobe, "blacklist"); - $modprobe = explode(PHP_EOL,$modprobe) ; - if($state !== false) {$state = "Disabled" ;} else $state="Custom" ; - $module['state'] = $state ; - $module['modprobe'] = $modprobe ; - } else { - if (is_file("/etc/modprobe.d/$modname.conf")) { - $modprobe = file_get_contents("/etc/modprobe.d/$modname.conf") ; - $state = strpos($modprobe, "blacklist"); - $modprobe = explode(PHP_EOL,$modprobe) ; - if($state !== false) {$state = "Disabled" ;} else $state="System" ; - $module['state'] = $state ; - $module['modprobe'] = $modprobe ; - } - } - - $html .= "" ; - if ($supportpage) { - if ($module['support'] == false) { - $supporthtml = "" ; - } else { - $supporturl = $module['supporturl'] ; - $pluginname = $module['plugin'] ; - $supporthtml = "" ; - } - } - if (isset($module["version"])) $version = " (".$module["version"].")" ; else $version = "" ; - - $html .= "" ; - $html .= ""; - - $text = "" ; - if (is_array($module["modprobe"])) { - $text = implode("\n",$module["modprobe"]) ; - $html .= ""; - } else { - $html .= ""; - } - - } - $html .= "" ; - $rtn = array() ; - $rtn['html'] = $html ; - if ($init !== false) {$init = true ; unlink($sysdrvinit) ;} - $rtn['init'] = $init ; - echo json_encode($rtn) ; - break; - case "update": - $conf = $_POST['conf'] ; - $module = $_POST['module'] ; - if ($conf == "") $error = unlink("/boot/config/modprobe.d/$module.conf") ; else $error = file_put_contents("/boot/config/modprobe.d/$module.conf",$conf) ; - getmodules($module) ; - $return = $arrModules[$module] ; - $return['supportpage'] = $supportpage ; - if (is_array($return["modprobe"]))$return["modprobe"] = implode("\n",$return["modprobe"]) ; - if ($error !== false) $return["error"] = false ; else $return["error"] = true ; - echo json_encode($return) ; - break ; -} + $conf = $_POST['conf']; + $module = $_POST['module']; + if ($conf == "") $error = unlink("/boot/config/modprobe.d/$module.conf"); else $error = file_put_contents("/boot/config/modprobe.d/$module.conf",$conf); + getmodules($module); + $return = $arrModules[$module]; + $return['supportpage'] = $supportpage; + if (is_array($return["modprobe"]))$return["modprobe"] = implode("\n",$return["modprobe"]); + if ($error !== false) $return["error"] = false; else $return["error"] = true; + echo json_encode($return); + break; +} ?> diff --git a/emhttp/plugins/dynamix/include/SysDriversInit.php b/emhttp/plugins/dynamix/include/SysDriversInit.php index f9a5c3971..1beae8711 100755 --- a/emhttp/plugins/dynamix/include/SysDriversInit.php +++ b/emhttp/plugins/dynamix/include/SysDriversInit.php @@ -1,5 +1,5 @@ #!/usr/bin/php - \ No newline at end of file +$modtoplgfile = "/tmp/modulestoplg.json"; +$sysdrvfile = "/tmp/sysdrivers.json"; +$arrModtoPlg = json_decode(file_get_contents("/tmp/modulestoplg.json") ,TRUE); +file_put_contents("/tmp/sysdrivers.init","1"); + +SysDriverslog("SysDrivers Build Starting"); +modtoplg(); +createlist(); +SysDriverslog("SysDrivers Build Complete"); +?> diff --git a/emhttp/plugins/dynamix/include/Syslog.php b/emhttp/plugins/dynamix/include/Syslog.php index 72fcaf814..32b7f3a5a 100644 --- a/emhttp/plugins/dynamix/include/Syslog.php +++ b/emhttp/plugins/dynamix/include/Syslog.php @@ -1,6 +1,6 @@ 1) && $argv[1] == "-v") { if ($cli && ($argc > 1) && $argv[1] == "-vv") { $verbose = true; } -$var = @parse_ini_file('/var/local/emhttp/var.ini') ?: []; -$nginx = @parse_ini_file('/var/local/emhttp/nginx.ini') ?: []; +$var = (array)@parse_ini_file('/var/local/emhttp/var.ini'); +$nginx = (array)@parse_ini_file('/var/local/emhttp/nginx.ini'); $is69 = version_compare(_var($var,'version'),"6.9.9","<"); $reloadNginx = false; $dnserr = false; @@ -189,7 +189,7 @@ $icon_warn = "⚠️ "; $icon_ok = "✅ "; $myservers_flash_cfg_path='/boot/config/plugins/dynamix.my.servers/myservers.cfg'; -$myservers = file_exists($myservers_flash_cfg_path) ? @parse_ini_file($myservers_flash_cfg_path,true) : []; +$myservers = (array)@parse_ini_file($myservers_flash_cfg_path,true); // ensure some vars are defined here so we don't have to test them later if (empty($myservers['remote']['apikey'])) { $myservers['remote']['apikey'] = ""; diff --git a/emhttp/plugins/dynamix/include/UpdateOne.php b/emhttp/plugins/dynamix/include/UpdateOne.php index d44a45b03..ebfe8539c 100644 --- a/emhttp/plugins/dynamix/include/UpdateOne.php +++ b/emhttp/plugins/dynamix/include/UpdateOne.php @@ -1,6 +1,6 @@ Date: Thu, 26 Oct 2023 17:04:48 +0200 Subject: [PATCH 129/266] Copyright update --- emhttp/plugins/dynamix.vm.manager/AddVM.page | 2 +- emhttp/plugins/dynamix.vm.manager/UpdateVM.page | 2 +- emhttp/plugins/dynamix.vm.manager/VMSettings.page | 2 +- emhttp/plugins/dynamix.vm.manager/VMs.page | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/emhttp/plugins/dynamix.vm.manager/AddVM.page b/emhttp/plugins/dynamix.vm.manager/AddVM.page index 7db9d73fd..2e099b6b5 100644 --- a/emhttp/plugins/dynamix.vm.manager/AddVM.page +++ b/emhttp/plugins/dynamix.vm.manager/AddVM.page @@ -6,7 +6,7 @@ Markdown="false" /dev/null\")" --- Date: Thu, 26 Oct 2023 17:08:38 +0200 Subject: [PATCH 130/266] Copyright update --- emhttp/plugins/dynamix.docker.manager/AddContainer.page | 2 +- emhttp/plugins/dynamix.docker.manager/Docker.page | 1 + emhttp/plugins/dynamix.docker.manager/DockerContainers.page | 2 +- emhttp/plugins/dynamix.docker.manager/DockerSettings.page | 2 +- emhttp/plugins/dynamix.docker.manager/UpdateContainer.page | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/emhttp/plugins/dynamix.docker.manager/AddContainer.page b/emhttp/plugins/dynamix.docker.manager/AddContainer.page index 9afe0734d..e0d6efbbe 100644 --- a/emhttp/plugins/dynamix.docker.manager/AddContainer.page +++ b/emhttp/plugins/dynamix.docker.manager/AddContainer.page @@ -5,7 +5,7 @@ Markdown="false" /dev/null\ --- Date: Thu, 26 Oct 2023 17:11:36 +0200 Subject: [PATCH 131/266] Copyright update --- .../plugins/dynamix.docker.manager/include/CreateDocker.php | 2 +- emhttp/plugins/dynamix.docker.manager/include/Helpers.php | 2 +- emhttp/plugins/dynamix.docker.manager/include/PruneConfig.php | 4 ++-- emhttp/plugins/dynamix.docker.manager/include/UserPrefs.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php b/emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php index 73a405ad2..35b49e0a3 100644 --- a/emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php +++ b/emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php @@ -1,7 +1,7 @@ Date: Thu, 26 Oct 2023 17:14:53 +0200 Subject: [PATCH 132/266] Copyright update --- emhttp/plugins/dynamix.vm.manager/include/UserPrefs.php | 6 +++--- emhttp/plugins/dynamix.vm.manager/include/libvirt.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/emhttp/plugins/dynamix.vm.manager/include/UserPrefs.php b/emhttp/plugins/dynamix.vm.manager/include/UserPrefs.php index 3267a636b..57169f422 100644 --- a/emhttp/plugins/dynamix.vm.manager/include/UserPrefs.php +++ b/emhttp/plugins/dynamix.vm.manager/include/UserPrefs.php @@ -1,7 +1,7 @@ Date: Thu, 26 Oct 2023 17:18:00 +0200 Subject: [PATCH 133/266] Copyright update --- emhttp/plugins/dynamix.docker.manager/include/PruneConfig.php | 1 + emhttp/plugins/dynamix.docker.manager/include/UserPrefs.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/emhttp/plugins/dynamix.docker.manager/include/PruneConfig.php b/emhttp/plugins/dynamix.docker.manager/include/PruneConfig.php index 8e176aeff..8f0642dea 100644 --- a/emhttp/plugins/dynamix.docker.manager/include/PruneConfig.php +++ b/emhttp/plugins/dynamix.docker.manager/include/PruneConfig.php @@ -1,6 +1,7 @@ Date: Thu, 26 Oct 2023 17:32:25 +0200 Subject: [PATCH 134/266] Dashboard: update time when timezone is changed --- emhttp/plugins/dynamix/include/ResetTZ.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/emhttp/plugins/dynamix/include/ResetTZ.php b/emhttp/plugins/dynamix/include/ResetTZ.php index d946a8c65..0fa61182d 100644 --- a/emhttp/plugins/dynamix/include/ResetTZ.php +++ b/emhttp/plugins/dynamix/include/ResetTZ.php @@ -13,12 +13,17 @@ /dev/null &"); +if (!is_file($pidfile)) exit; + +foreach ($scripts as $script) { + if (exec("grep -Pom1 '^$nchan/$script' $pidfile")) { + // restart selected script + exec("pkill -f $nchan/$script"); + exec("$docroot/$nchan/$script &>/dev/null &"); + } } ?> From 33a64665eab07aa6992abec1a97a8ae76785bb1a Mon Sep 17 00:00:00 2001 From: bergware Date: Thu, 26 Oct 2023 18:10:11 +0200 Subject: [PATCH 135/266] Use "null coalescing assignment" operator for $docroot --- emhttp/plugins/dynamix/include/update.trim.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emhttp/plugins/dynamix/include/update.trim.php b/emhttp/plugins/dynamix/include/update.trim.php index b845e4fa4..8a5f7b2fc 100644 --- a/emhttp/plugins/dynamix/include/update.trim.php +++ b/emhttp/plugins/dynamix/include/update.trim.php @@ -11,7 +11,7 @@ */ ?> 0) { From d4e8617eef86080d5d77ee41beb6c26cfcfd65d7 Mon Sep 17 00:00:00 2001 From: bergware Date: Thu, 26 Oct 2023 18:17:44 +0200 Subject: [PATCH 136/266] Use "null coalescing assignment" operator for $docroot --- .../dynamix.plugin.manager/post-hooks/post_plugin_checks | 2 +- .../dynamix.plugin.manager/pre-hooks/pre_plugin_checks | 2 +- emhttp/plugins/dynamix/include/LanguageReset.php | 6 +++--- emhttp/plugins/gui.search/exec.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/emhttp/plugins/dynamix.plugin.manager/post-hooks/post_plugin_checks b/emhttp/plugins/dynamix.plugin.manager/post-hooks/post_plugin_checks index 272a30b3f..d681d3df3 100755 --- a/emhttp/plugins/dynamix.plugin.manager/post-hooks/post_plugin_checks +++ b/emhttp/plugins/dynamix.plugin.manager/post-hooks/post_plugin_checks @@ -12,7 +12,7 @@ */ ?> Date: Thu, 26 Oct 2023 18:22:27 +0200 Subject: [PATCH 137/266] Use "null coalescing assignment" operator for $docroot --- emhttp/plugins/dynamix/nchan/ups_status | 3 +-- emhttp/plugins/dynamix/nchan/wg_poller | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/emhttp/plugins/dynamix/nchan/ups_status b/emhttp/plugins/dynamix/nchan/ups_status index fc080effc..1d4a6c01f 100755 --- a/emhttp/plugins/dynamix/nchan/ups_status +++ b/emhttp/plugins/dynamix/nchan/ups_status @@ -13,8 +13,7 @@ */ ?> Date: Thu, 26 Oct 2023 20:08:55 +0200 Subject: [PATCH 138/266] SysDrivers: fix regression errors --- emhttp/plugins/dynamix/SysDrivers.page | 4 +-- emhttp/plugins/dynamix/include/SysDevs.php | 28 +++++++++---------- emhttp/plugins/dynamix/include/SysDrivers.php | 8 +++--- .../dynamix/include/SysDriversHelpers.php | 5 ++-- emhttp/plugins/dynamix/sheets/SysDrivers.css | 10 +++---- 5 files changed, 27 insertions(+), 28 deletions(-) diff --git a/emhttp/plugins/dynamix/SysDrivers.page b/emhttp/plugins/dynamix/SysDrivers.page index fe401b664..5316ee3ef 100644 --- a/emhttp/plugins/dynamix/SysDrivers.page +++ b/emhttp/plugins/dynamix/SysDrivers.page @@ -15,9 +15,9 @@ Tag="server" * all copies or substantial portions of the Software. */ ?> - - + :sysdrivers_intro_help: diff --git a/emhttp/plugins/dynamix/sheets/SysDrivers.css b/emhttp/plugins/dynamix/sheets/SysDrivers.css index 7a9414451..069faf5f3 100644 --- a/emhttp/plugins/dynamix/sheets/SysDrivers.css +++ b/emhttp/plugins/dynamix/sheets/SysDrivers.css @@ -11,3 +11,4 @@ textarea[id^=text]{width:90%;margin:0!important;padding:0!important;float:right} span[id^=save]{margin:0!important;padding:0!important} span.pin{display:inline-block;float:left} i.pin{margin:0!important;padding:2px 0!important;float:left;clear:both} +.tablesorter-header-inner{font-family:clear-sans;font-weight:bold} From adef4eb786cc1aaa644a15465b2f69bd859818bb Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 27 Oct 2023 15:09:15 +0200 Subject: [PATCH 169/266] SysDevs: fix regression error --- emhttp/plugins/dynamix/include/SysDevs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emhttp/plugins/dynamix/include/SysDevs.php b/emhttp/plugins/dynamix/include/SysDevs.php index e16f5269e..cf5d90905 100644 --- a/emhttp/plugins/dynamix/include/SysDevs.php +++ b/emhttp/plugins/dynamix/include/SysDevs.php @@ -136,7 +136,7 @@ case 't1': if ((strpos($line, 'Host bridge') === false) && (strpos($line, 'PCI bridge') === false)) { if (file_exists('/sys/kernel/iommu_groups/'.$iommu.'/devices/'.$pciaddress.'/reset')) echo ""; echo "
_(Select)_  _(Boot Order)_
_(Select)_  _(Boot Order)_
_(Other PCI Devices)_:
$bus Port $usbport".trim($id)."
$bus Port $usbport ".trim($id)."
"._("Driver").""._("Description").""._("State").""._("Type").""._("Modprobe.d config file")."
"._("Driver").""._("Description").""._("State").""._("Type").""._("Modprobe.d config file")."
$modname$version$supporthtml{$module['description']}{$module['state']}{$module['type']}"; + $hidden = ""; + if ($module['state'] == "System") $hidden = "hidden"; + $html .= " "; + $html .= "
"; + $html .= " "; + $html .= "
$modname$version$supporthtml{$module['description']}{$module['state']}{$module['type']}" ; - $hidden = "" ; - if ($module['state'] == "System") $hidden = "hidden" ; - $html .= " " ; - $html .= "
" ; - $html .= " " ; - $html .= "
"; - echo in_array($iommu, $iommuinuse) ? '| or just echo (in_array($pciaddress."|".$vd, $vfio_cfg_devices) || in_array($pciaddress, $vfio_cfg_devices)) ? " checked>" : ">"; } else { echo ""; } From eb0efc0d5c466ea82fefd7c1dcf7a66210e6930e Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 27 Oct 2023 15:13:38 +0200 Subject: [PATCH 170/266] Update SysDriversHelpers.php --- emhttp/plugins/dynamix/include/SysDriversHelpers.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/emhttp/plugins/dynamix/include/SysDriversHelpers.php b/emhttp/plugins/dynamix/include/SysDriversHelpers.php index 37a8ae11e..8374a1551 100644 --- a/emhttp/plugins/dynamix/include/SysDriversHelpers.php +++ b/emhttp/plugins/dynamix/include/SysDriversHelpers.php @@ -94,7 +94,6 @@ function getmodules($name) { $dir = str_replace("drivers/", "", $file); $state = ($state=="Inuse") ? "Kernel - Inuse" : "Kernel"; } - $description = $desc ? substr($desc,0,60) : ""; $arrModules[$modname] = [ 'modname' => $modname, 'dependacy' => $depends, @@ -107,7 +106,7 @@ function getmodules($name) { 'type' => $dir, 'support' => $support, 'supporturl' => $supporturl, - 'description' => $description + 'description' => $desc ]; } From b06fa2b659966f45bfc22c86409922ce871f8457 Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 27 Oct 2023 18:53:30 +0200 Subject: [PATCH 171/266] Move date & time settings from "Display Settings" to "Date & Time Settings" --- emhttp/plugins/dynamix/DateTime.page | 28 ++++++++++++++++++--- emhttp/plugins/dynamix/DisplaySettings.page | 18 ------------- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/emhttp/plugins/dynamix/DateTime.page b/emhttp/plugins/dynamix/DateTime.page index b3da8bdf5..01073bc3c 100644 --- a/emhttp/plugins/dynamix/DateTime.page +++ b/emhttp/plugins/dynamix/DateTime.page @@ -17,10 +17,28 @@ Tag="clock-o" ?> -
+ _(Current date and time)_: : +_(Date format)_: +: + +_(Time format)_: +: + _(Time zone)_: : _(Current date and time)_: : @@ -83,17 +84,19 @@ _(New date and time)_: :current_time_help:   -: +: