",{class:"textarea fileTree"}),i.after(r)),i.click(function(){r.is(":visible")?r.slideUp("fast"):(""===r.html()&&(r.html('
Loading...'),r.fileTree({root:a.pickroot,top:a.picktop,filter:(a.pickfilter||"").split(","),match:a.pickmatch||".*"},e.isFunction(t)?t:function(e){i.val(e).change(),a.hasOwnProperty("pickcloseonfile")&&r.slideUp("fast")},e.isFunction(l)?l:function(e){a.hasOwnProperty("pickfolders")&&i.val(e).change()})),r.offset({left:i.position().left}),r.slideDown("fast"))})})}})}(jQuery);
\ No newline at end of file
+jQuery && function(e) {
+ e.extend(e.fn, {
+ fileTree: function(i, t, l) {
+ // Initialize pickexclude with an empty string if not provided
+ void 0 === i.root && (i.root = "/mnt/"),
+ void 0 === i.top && (i.top = "/mnt/"),
+ void 0 === i.filter && (i.filter = ""),
+ void 0 === i.match && (i.match = ".*"),
+ void 0 === i.script && (i.script = "/webGui/include/FileTree.php"),
+ void 0 === i.folderEvent && (i.folderEvent = "click"),
+ void 0 === i.expandSpeed && (i.expandSpeed = 300),
+ void 0 === i.collapseSpeed && (i.collapseSpeed = 300),
+ void 0 === i.expandEasing && (i.expandEasing = null),
+ void 0 === i.collapseEasing && (i.collapseEasing = null),
+ void 0 === i.multiFolder && (i.multiFolder = !1),
+ void 0 === i.loadMessage && (i.loadMessage = "Loading..."),
+ void 0 === i.multiSelect && (i.multiSelect = !1),
+ void 0 === i.allowBrowsing && (i.allowBrowsing = !1),
+ void 0 === i.pickexclude && (i.pickexclude = "");
+ e(this).each(function() {
+ function s(r, n, o) {
+ e(r).addClass("wait"),
+ e(".jqueryFileTree.start").remove(),
+ // Modify the post data to include pickexclude
+ e.post(i.script, {
+ dir: n,
+ root: i.top,
+ multiSelect: i.multiSelect,
+ filter: i.filter,
+ match: i.match,
+ show_parent: o,
+ // Add pickexclude parameter
+ pickexclude: i.pickexclude
+ }).done(function(o) {
+ var d;
+ e(r).find(".start").html(""),
+ e(r).removeClass("wait").append(o),
+ i.root == n ? e(r).find("UL:hidden").show() : e(r).find("UL:hidden").slideDown({
+ duration: i.expandSpeed,
+ easing: i.expandEasing
+ }),
+ e(d = r).find("LI A").on(i.folderEvent, function(r) {
+ r.preventDefault();
+ var n = {};
+ return n.li = e(this).closest("li"),
+ n.type = n.li.hasClass("directory") ? "directory" : "file",
+ n.value = e(this).text(),
+ n.rel = e(this).prop("rel"),
+ ".." == e(this).text() ? (i.root = n.rel, l && l(e(this).attr("rel")), a(e(this), "filetreefolderclicked", n), root = e(this).closest("ul.jqueryFileTree"), root.html('
"), s(e(root), i.root, i.allowBrowsing)) : e(this).parent().hasClass("directory") ? (e(this).parent().hasClass("collapsed") ? (a(e(this), "filetreeexpand", n), i.multiFolder || (e(this).parent().parent().find("UL").slideUp({
+ duration: i.collapseSpeed,
+ easing: i.collapseEasing
+ }), e(this).parent().parent().find("LI.directory").removeClass("expanded").addClass("collapsed")), e(this).parent().removeClass("collapsed").addClass("expanded"), e(this).parent().find("UL").remove(), s(e(this).parent(), e(this).attr("rel").match(/.*\//)[0], !1)) : (a(e(this), "filetreecollapse", n), e(this).parent().find("UL").slideUp({
+ duration: i.collapseSpeed,
+ easing: i.collapseEasing
+ }), e(this).parent().removeClass("expanded").addClass("collapsed"), a(e(this), "filetreecollapsed", n)), l && l(e(this).attr("rel")), a(e(this), "filetreefolderclicked", n)) : (t && t(e(this).attr("rel")), a(e(this), "filetreeclicked", n)), !1
+ }),
+ "click" != i.folderEvent.toLowerCase && e(d).find("LI A").on("click", function(e) {
+ return e.preventDefault(), !1
+ }),
+ a(e(this), "filetreeexpanded", o)
+ }).fail(function() {
+ e(r).find(".start").html(""),
+ e(r).removeClass("wait").append("
Unable to get file tree information")
+ })
+ }
+
+ function a(e, i, t) {
+ t.trigger = i,
+ e.trigger(i, t)
+ }
+ e(this).html('
"),
+ s(e(this), i.root, i.allowBrowsing),
+ e(this).on("change", "input:checkbox", function() {
+ var i = {};
+ i.li = e(this).closest("li"),
+ i.type = i.li.hasClass("directory") ? "directory" : "file",
+ i.value = i.li.children("a").text(),
+ i.rel = i.li.children("a").prop("rel"),
+ i.li.find("input:checkbox").prop("checked", e(this).prop("checked")),
+ e(this).prop("checked") ? a(e(this), "filetreechecked", i) : a(e(this), "filetreeunchecked", i)
+ })
+ })
+ },
+ fileTreeAttach: function(i, t, l) {
+ var s = {};
+ e.isFunction(i) ? (e.isFunction(t) && (l = t), t = i) : i && e.extend(s, i),
+ e(this).each(function() {
+ var i = e(this),
+ a = e.extend({}, s, i.data()),
+ r = i.next(".fileTree");
+ 0 === r.length && (e(document).mousedown(function(i) {
+ var t = e(".fileTree");
+ t.is(i.target) || 0 !== t.has(i.target).length || t.slideUp("fast")
+ }),
+ r = e("
", {
+ class: "textarea fileTree"
+ }),
+ i.after(r)),
+ i.click(function() {
+ r.is(":visible") ? r.slideUp("fast") : ("" === r.html() && (r.html('
Loading...'),
+ r.fileTree({
+ root: a.pickroot,
+ top: a.picktop,
+ filter: (a.pickfilter || "").split(","),
+ match: a.pickmatch || ".*",
+ // Include pickexclude parameter in fileTreeAttach
+ pickexclude: a.pickexclude
+ }, e.isFunction(t) ? t : function(e) {
+ i.val(e).change(),
+ a.hasOwnProperty("pickcloseonfile") && r.slideUp("fast")
+ }, e.isFunction(l) ? l : function(e) {
+ a.hasOwnProperty("pickfolders") && i.val(e).change()
+ })),
+ r.offset({
+ left: i.position().left
+ }),
+ r.slideDown("fast"))
+ })
+ })
+ }
+ })
+}(jQuery);
From cb48e168453dcb365c14e59a864d2cefa6596d61 Mon Sep 17 00:00:00 2001
From: SimonFair <39065407+SimonFair@users.noreply.github.com>
Date: Sat, 27 Apr 2024 10:04:10 +0100
Subject: [PATCH 07/67] Fix QEMU command line expanding if no data.
Rework of XML mobile page size.
---
.../dynamix.vm.manager/include/libvirt_helpers.php | 9 +++++++--
.../plugins/dynamix.vm.manager/templates/Custom.form.php | 4 ++--
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php
index 3384fe5fa..5c68ec5fa 100644
--- a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php
+++ b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php
@@ -1330,7 +1330,12 @@ private static $encoding = 'UTF-8';
}
if ($lv->domain_get_boot_devices($res)[0] == "fd") $osbootdev = "Yes" ; else $osbootdev = "No" ;
-
+ $cmdline = null;
+ $QEMUCmdline = getQEMUCmdLine($strDOMXML);
+ $QEMUOverride = getQEMUOverride($strDOMXML);
+ if (isset($QEMUCmdline)) $cmdline = $QEMUCmdline;
+ if (isset($QEMUOverride) && isset($QEMUCmdline)) $cmdline .= "\n".$QEMUOverride;
+ if (isset($QEMUOverride) && !isset($QEMUCmdline)) $cmdline = $QEMUOverride;
return [
'template' => $arrTemplateValues,
'domain' => [
@@ -1370,7 +1375,7 @@ private static $encoding = 'UTF-8';
'nic' => $arrNICs,
'usb' => $arrUSBDevs,
'shares' => $lv->domain_get_mount_filesystems($res),
- 'qemucmdline' => getQEMUCmdLine($strDOMXML),
+ 'qemucmdline' => $cmdline,
'clocks' => getClocks($strDOMXML)
];
}
diff --git a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php
index 9579fcafa..8b91a956b 100644
--- a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php
+++ b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php
@@ -1913,8 +1913,8 @@ $(function() {
$('.advancedview').change(function () {
if ($(this).is(':checked')) {
setTimeout(function() {
- var xmlPanelHeight = window.outerHeight - 550;
- if (xmlPanelHeight < 0) xmlPanelHeight = null;
+ var xmlPanelHeight = window.outerHeight;
+ if (xmlPanelHeight > 1024) xmlPanelHeight = xmlPanelHeight-550;
editor.setSize(null,xmlPanelHeight);
editor.refresh();
}, 100);
From 90eb25f11475173f67c2d41e19a1220005df4f3c Mon Sep 17 00:00:00 2001
From: dlandon
Date: Sat, 27 Apr 2024 06:42:29 -0500
Subject: [PATCH 08/67] Change commenting.
---
emhttp/plugins/dynamix/javascript/jquery.filetree.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/emhttp/plugins/dynamix/javascript/jquery.filetree.js b/emhttp/plugins/dynamix/javascript/jquery.filetree.js
index d1f38ed39..f17a9e1d1 100644
--- a/emhttp/plugins/dynamix/javascript/jquery.filetree.js
+++ b/emhttp/plugins/dynamix/javascript/jquery.filetree.js
@@ -22,7 +22,7 @@ jQuery && function(e) {
function s(r, n, o) {
e(r).addClass("wait"),
e(".jqueryFileTree.start").remove(),
- // Modify the post data to include pickexclude
+ /* Modify the post data to include pickexclude. */
e.post(i.script, {
dir: n,
root: i.top,
@@ -30,7 +30,7 @@ jQuery && function(e) {
filter: i.filter,
match: i.match,
show_parent: o,
- // Add pickexclude parameter
+ /* Add pickexclude parameter. */
pickexclude: i.pickexclude
}).done(function(o) {
var d;
@@ -104,7 +104,7 @@ jQuery && function(e) {
top: a.picktop,
filter: (a.pickfilter || "").split(","),
match: a.pickmatch || ".*",
- // Include pickexclude parameter in fileTreeAttach
+ /* Include pickexclude parameter in fileTreeAttach. */
pickexclude: a.pickexclude
}, e.isFunction(t) ? t : function(e) {
i.val(e).change(),
From 33b27f0a71a764729e317ca54b804e17854c3bef Mon Sep 17 00:00:00 2001
From: dlandon
Date: Sat, 27 Apr 2024 11:13:59 -0500
Subject: [PATCH 09/67] Put list of folders to be excluded in the file picker
dropdown in a php variable for greater flexibility to make changes.
---
.../plugins/dynamix.docker.manager/DockerSettings.page | 9 ++++++---
emhttp/plugins/dynamix.vm.manager/VMSettings.page | 9 ++++++---
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/emhttp/plugins/dynamix.docker.manager/DockerSettings.page b/emhttp/plugins/dynamix.docker.manager/DockerSettings.page
index b39e9ef8b..8ce287a76 100644
--- a/emhttp/plugins/dynamix.docker.manager/DockerSettings.page
+++ b/emhttp/plugins/dynamix.docker.manager/DockerSettings.page
@@ -20,6 +20,9 @@ Tag="icon-docker"
// Add the Docker JSON client
require_once "$docroot/plugins/dynamix.docker.manager/include/DockerClient.php";
+/* Folders to be excluded from the drop down file picker. */
+$excludeFolders = ".Recycle.Bin,RecycleBin,addons,disks,remotes,rootshare,user0";
+
$DockerClient = new DockerClient();
exec("/etc/rc.d/rc.docker status >/dev/null",$dummy,$DockerStopped);
@@ -163,7 +166,7 @@ _(Docker vDisk size)_:
:docker_vdisk_size_help:
_(Docker vDisk location)_:
-:
+:
_(Modify with caution: unable to validate path until Array is Started)_
_(Path does not exist)_
@@ -174,7 +177,7 @@ _(Docker vDisk location)_:
_(Docker directory)_:
-:
+:
_(Modify with caution: unable to validate path until Array is Started)_
_(Path does not exist)_
@@ -184,7 +187,7 @@ _(Docker directory)_:
_(Default appdata storage location)_:
-:
+:
_(Modify with caution: unable to validate path until Array is Started)_
diff --git a/emhttp/plugins/dynamix.vm.manager/VMSettings.page b/emhttp/plugins/dynamix.vm.manager/VMSettings.page
index 44b21450a..a39fc9125 100644
--- a/emhttp/plugins/dynamix.vm.manager/VMSettings.page
+++ b/emhttp/plugins/dynamix.vm.manager/VMSettings.page
@@ -19,6 +19,9 @@ Tag="columns"
require_once "$docroot/plugins/dynamix.vm.manager/include/libvirt_helpers.php";
+/* Folders to be excluded from the drop down file picker. */
+$excludeFolders = ".Recycle.Bin,RecycleBin,addons,disks,remotes,rootshare,user0";
+
// Check for Intel VT-x (vmx) or AMD-V (svm) cpu virtualization support
// If either kvm_intel or kvm_amd are loaded then Intel VT-x (vmx) or AMD-V (svm) cpu virtualization support was found
$hardware = !empty(shell_exec("/etc/rc.d/rc.libvirt test"));
@@ -115,7 +118,7 @@ _(Libvirt vdisk size)_:
:vms_libvirt_vdisk_size_help:
_(Libvirt storage location)_:
-:
+:
_(Modify with caution: unable to validate path until Array is Started)_
_(Path does not exist)_
@@ -125,14 +128,14 @@ _(Libvirt storage location)_:
_(Default VM storage path)_:
-:
+:
_(Modify with caution: unable to validate path until Array is Started)_
_(Path does not exist)_
:vms_libvirt_storage_help:
_(Default ISO storage path)_:
-:
+:
_(Modify with caution: unable to validate path until Array is Started)_
_(Path does not exist)_
From e6441a8345301738545ac12ff72f7348a66d697c Mon Sep 17 00:00:00 2001
From: ljm42
Date: Sun, 28 Apr 2024 16:12:40 -0700
Subject: [PATCH 10/67] in http_get_contents, detect and recover from curl
error 23
---
emhttp/plugins/dynamix/include/Wrappers.php | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/emhttp/plugins/dynamix/include/Wrappers.php b/emhttp/plugins/dynamix/include/Wrappers.php
index 115801216..0963472fa 100644
--- a/emhttp/plugins/dynamix/include/Wrappers.php
+++ b/emhttp/plugins/dynamix/include/Wrappers.php
@@ -180,16 +180,22 @@ function http_get_contents(string $url, array $opts = [], array &$getinfo = NULL
}
}
$out = curl_exec($ch);
- if(isset($getinfo)) {
+ if (curl_errno($ch) == 23) {
+ // error 23 detected, try CURLOPT_ENCODING = null
+ curl_setopt($ch, CURLOPT_ENCODING, null);
+ $out = curl_exec($ch);
+ }
+ if (isset($getinfo)) {
$getinfo = curl_getinfo($ch);
}
- if (curl_errno($ch)) {
- $msg = curl_error($ch) . " {$url}";
+ if ($errno = curl_errno($ch)) {
+ $msg = "Curl error $errno: " . (curl_error($ch) ?: curl_strerror($errno)) . ". Requested url: '$url'";
if(isset($getinfo)) {
$getinfo['error'] = $msg;
}
my_logger($msg, "http_get_contents");
}
+ curl_close($ch);
return $out;
}
/**
From d1e5f3bb109cef012b2c88b9d7cb49376218b240 Mon Sep 17 00:00:00 2001
From: ljm42
Date: Sun, 28 Apr 2024 16:37:39 -0700
Subject: [PATCH 11/67] rc.local - be consistent with backup extension
---
etc/rc.d/rc.local | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/etc/rc.d/rc.local b/etc/rc.d/rc.local
index 480263e0d..6a6407628 100755
--- a/etc/rc.d/rc.local
+++ b/etc/rc.d/rc.local
@@ -29,7 +29,7 @@ proxy_url_1="${proxy}:${port}"
proxy_name_1="Imported from CA"
EOF
fi
- mv "${CAProxy}" "${CAProxy}.bak"
+ mv "${CAProxy}" "${CAProxy}~"
fi
# load proxy environment vars so it is used for plugin updates and the go script
From 45cfa13e14a9b88df44e315fe7b9a753a4295f4a Mon Sep 17 00:00:00 2001
From: Tom Mortensen
Date: Mon, 29 Apr 2024 12:43:24 -0700
Subject: [PATCH 12/67] changes to include '/bin' in repo
---
.gitignore | 1 -
bin/firefox | 1 +
bin/unraidwold | 1 +
sbin/emhttp | 2 +-
sbin/mover | 4 ++--
src/unraidwold/wolbuild | 2 +-
6 files changed, 6 insertions(+), 5 deletions(-)
create mode 120000 bin/firefox
create mode 120000 bin/unraidwold
diff --git a/.gitignore b/.gitignore
index 33161d56d..60e39eb2d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,7 +54,6 @@ sftp-config.json
# =========================
# Exclude these dirs commonly found in /usr/local
-bin/
games/
info/
lib64/
diff --git a/bin/firefox b/bin/firefox
new file mode 120000
index 000000000..21fd74b86
--- /dev/null
+++ b/bin/firefox
@@ -0,0 +1 @@
+/usr/libexec/unraid/firefox-119.0.r20231019122658-x86_64.AppImage
\ No newline at end of file
diff --git a/bin/unraidwold b/bin/unraidwold
new file mode 120000
index 000000000..6ee2c193b
--- /dev/null
+++ b/bin/unraidwold
@@ -0,0 +1 @@
+/usr/libexec/unraid/unraidwold
\ No newline at end of file
diff --git a/sbin/emhttp b/sbin/emhttp
index 86c1ba99b..5692f798b 100755
--- a/sbin/emhttp
+++ b/sbin/emhttp
@@ -46,7 +46,7 @@ case "${1:-start}" in
exit 1
fi
# start emhttpd
- /usr/local/bin/emhttpd
+ /usr/libexec/unraid/emhttpd
;;
'stop')
log "Stopping web services..."
diff --git a/sbin/mover b/sbin/mover
index ab25bfd1b..04b5799f8 100755
--- a/sbin/mover
+++ b/sbin/mover
@@ -67,7 +67,7 @@ start() {
for SHAREPATH in /mnt/$(basename "$POOL" .cfg)/*/ ; do
SHARE=$(basename "$SHAREPATH")
if grep -qs 'shareUseCache="yes"' "/boot/config/shares/${SHARE}.cfg" ; then
- find "${SHAREPATH%/}" -depth | /usr/local/bin/move $DEBUGGING
+ find "${SHAREPATH%/}" -depth | /usr/libexec/unraid/move $DEBUGGING
fi
done
done
@@ -81,7 +81,7 @@ start() {
shareCachePool="cache"
fi
if [[ -d "/mnt/$shareCachePool" ]]; then
- find "${SHAREPATH%/}" -depth | /usr/local/bin/move $DEBUGGING
+ find "${SHAREPATH%/}" -depth | /usr/libexec/unraid/move $DEBUGGING
fi
fi
done
diff --git a/src/unraidwold/wolbuild b/src/unraidwold/wolbuild
index 0d9fd62e2..ff79781ce 100644
--- a/src/unraidwold/wolbuild
+++ b/src/unraidwold/wolbuild
@@ -7,4 +7,4 @@ git checkout main
PATH="$PATH:/usr/local/go/bin"
go mod tidy
go build
-cp /tmp/unraidwol/unraidwold /usr/local/bin
+cp /tmp/unraidwol/unraidwold /usr/libexec/unraid
From ba9bef985c60c3a6498ee2a9c8f4707bad2b61e5 Mon Sep 17 00:00:00 2001
From: dlandon
Date: Mon, 29 Apr 2024 17:58:39 -0500
Subject: [PATCH 13/67] Fix misspelled variable.
---
emhttp/plugins/dynamix.vm.manager/VMSettings.page | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/emhttp/plugins/dynamix.vm.manager/VMSettings.page b/emhttp/plugins/dynamix.vm.manager/VMSettings.page
index a39fc9125..8ccf45065 100644
--- a/emhttp/plugins/dynamix.vm.manager/VMSettings.page
+++ b/emhttp/plugins/dynamix.vm.manager/VMSettings.page
@@ -118,7 +118,7 @@ _(Libvirt vdisk size)_:
:vms_libvirt_vdisk_size_help:
_(Libvirt storage location)_:
-:
+:
_(Modify with caution: unable to validate path until Array is Started)_
_(Path does not exist)_
@@ -128,14 +128,14 @@ _(Libvirt storage location)_:
_(Default VM storage path)_:
-:
+:
_(Modify with caution: unable to validate path until Array is Started)_
_(Path does not exist)_
:vms_libvirt_storage_help:
_(Default ISO storage path)_:
-:
+:
_(Modify with caution: unable to validate path until Array is Started)_
_(Path does not exist)_
From f8ff2333bb12663107dfaf49e17dd2b2fdf31188 Mon Sep 17 00:00:00 2001
From: Christoph Hummer
Date: Tue, 30 Apr 2024 07:55:28 +0200
Subject: [PATCH 14/67] Update rc.S
- remove wsync from XFS mount to prevent WebGUI from freezing during heavy I/O on /boot
---
etc/rc.d/rc.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/etc/rc.d/rc.S b/etc/rc.d/rc.S
index 731361a6c..f5d10dc8f 100755
--- a/etc/rc.d/rc.S
+++ b/etc/rc.d/rc.S
@@ -100,7 +100,7 @@ if /sbin/blkid -s TYPE $DEVICE | /bin/grep -q "btrfs" ; then
/sbin/mount -v -t btrfs -o auto,rw,noatime,nodiratime,degraded,discard=sync $DEVICE /boot || abort "cannot mount $DEVICE"
elif /sbin/blkid -s TYPE $DEVICE | /bin/grep -q "xfs" ; then
NONVFAT=xfs
- /sbin/mount -v -t xfs -o auto,rw,noatime,nodiratime,discard,wsync $DEVICE /boot || abort "cannot mount $DEVICE"
+ /sbin/mount -v -t xfs -o auto,rw,noatime,nodiratime,discard $DEVICE /boot || abort "cannot mount $DEVICE"
else
/bin/echo "Checking $DEVICE ..."
/sbin/fsck.fat -a -w $DEVICE 2>/dev/null
From 0c32fe5d4d4658db223e1b73dec700591c605c36 Mon Sep 17 00:00:00 2001
From: dlandon
Date: Tue, 30 Apr 2024 06:24:34 -0500
Subject: [PATCH 15/67] Change root folder on isos to /mnt/user.
---
emhttp/plugins/dynamix.vm.manager/VMSettings.page | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/emhttp/plugins/dynamix.vm.manager/VMSettings.page b/emhttp/plugins/dynamix.vm.manager/VMSettings.page
index 8ccf45065..1ace30c44 100644
--- a/emhttp/plugins/dynamix.vm.manager/VMSettings.page
+++ b/emhttp/plugins/dynamix.vm.manager/VMSettings.page
@@ -135,7 +135,7 @@ _(Default VM storage path)_:
:vms_libvirt_storage_help:
_(Default ISO storage path)_:
-:
+:
_(Modify with caution: unable to validate path until Array is Started)_
_(Path does not exist)_
From efe372d1d9220d32c0dd89e92e2cfa2a8dbc3532 Mon Sep 17 00:00:00 2001
From: dlandon
Date: Wed, 1 May 2024 04:58:17 -0500
Subject: [PATCH 16/67] Change variables back to the original plugin variables.
---
.../dynamix/javascript/jquery.filetree.js | 217 +++++++++---------
1 file changed, 108 insertions(+), 109 deletions(-)
diff --git a/emhttp/plugins/dynamix/javascript/jquery.filetree.js b/emhttp/plugins/dynamix/javascript/jquery.filetree.js
index f17a9e1d1..744e5982a 100644
--- a/emhttp/plugins/dynamix/javascript/jquery.filetree.js
+++ b/emhttp/plugins/dynamix/javascript/jquery.filetree.js
@@ -1,121 +1,120 @@
/* jQuery File Tree. Authors - Cory S.N. LaViska & Dave Rogers. Copyright 2008 A Beautiful Site, LLC. - Adapted by Bergware for use in Unraid */
-jQuery && function(e) {
- e.extend(e.fn, {
- fileTree: function(i, t, l) {
- // Initialize pickexclude with an empty string if not provided
- void 0 === i.root && (i.root = "/mnt/"),
- void 0 === i.top && (i.top = "/mnt/"),
- void 0 === i.filter && (i.filter = ""),
- void 0 === i.match && (i.match = ".*"),
- void 0 === i.script && (i.script = "/webGui/include/FileTree.php"),
- void 0 === i.folderEvent && (i.folderEvent = "click"),
- void 0 === i.expandSpeed && (i.expandSpeed = 300),
- void 0 === i.collapseSpeed && (i.collapseSpeed = 300),
- void 0 === i.expandEasing && (i.expandEasing = null),
- void 0 === i.collapseEasing && (i.collapseEasing = null),
- void 0 === i.multiFolder && (i.multiFolder = !1),
- void 0 === i.loadMessage && (i.loadMessage = "Loading..."),
- void 0 === i.multiSelect && (i.multiSelect = !1),
- void 0 === i.allowBrowsing && (i.allowBrowsing = !1),
- void 0 === i.pickexclude && (i.pickexclude = "");
- e(this).each(function() {
- function s(r, n, o) {
- e(r).addClass("wait"),
- e(".jqueryFileTree.start").remove(),
- /* Modify the post data to include pickexclude. */
- e.post(i.script, {
- dir: n,
- root: i.top,
- multiSelect: i.multiSelect,
- filter: i.filter,
- match: i.match,
- show_parent: o,
- /* Add pickexclude parameter. */
- pickexclude: i.pickexclude
- }).done(function(o) {
- var d;
- e(r).find(".start").html(""),
- e(r).removeClass("wait").append(o),
- i.root == n ? e(r).find("UL:hidden").show() : e(r).find("UL:hidden").slideDown({
- duration: i.expandSpeed,
- easing: i.expandEasing
- }),
- e(d = r).find("LI A").on(i.folderEvent, function(r) {
- r.preventDefault();
- var n = {};
- return n.li = e(this).closest("li"),
- n.type = n.li.hasClass("directory") ? "directory" : "file",
- n.value = e(this).text(),
- n.rel = e(this).prop("rel"),
- ".." == e(this).text() ? (i.root = n.rel, l && l(e(this).attr("rel")), a(e(this), "filetreefolderclicked", n), root = e(this).closest("ul.jqueryFileTree"), root.html('"), s(e(root), i.root, i.allowBrowsing)) : e(this).parent().hasClass("directory") ? (e(this).parent().hasClass("collapsed") ? (a(e(this), "filetreeexpand", n), i.multiFolder || (e(this).parent().parent().find("UL").slideUp({
- duration: i.collapseSpeed,
- easing: i.collapseEasing
- }), e(this).parent().parent().find("LI.directory").removeClass("expanded").addClass("collapsed")), e(this).parent().removeClass("collapsed").addClass("expanded"), e(this).parent().find("UL").remove(), s(e(this).parent(), e(this).attr("rel").match(/.*\//)[0], !1)) : (a(e(this), "filetreecollapse", n), e(this).parent().find("UL").slideUp({
- duration: i.collapseSpeed,
- easing: i.collapseEasing
- }), e(this).parent().removeClass("expanded").addClass("collapsed"), a(e(this), "filetreecollapsed", n)), l && l(e(this).attr("rel")), a(e(this), "filetreefolderclicked", n)) : (t && t(e(this).attr("rel")), a(e(this), "filetreeclicked", n)), !1
- }),
- "click" != i.folderEvent.toLowerCase && e(d).find("LI A").on("click", function(e) {
- return e.preventDefault(), !1
- }),
- a(e(this), "filetreeexpanded", o)
- }).fail(function() {
- e(r).find(".start").html(""),
- e(r).removeClass("wait").append("Unable to get file tree information")
- })
- }
-
- function a(e, i, t) {
- t.trigger = i,
- e.trigger(i, t)
- }
- e(this).html('"),
- s(e(this), i.root, i.allowBrowsing),
- e(this).on("change", "input:checkbox", function() {
- var i = {};
- i.li = e(this).closest("li"),
- i.type = i.li.hasClass("directory") ? "directory" : "file",
- i.value = i.li.children("a").text(),
- i.rel = i.li.children("a").prop("rel"),
- i.li.find("input:checkbox").prop("checked", e(this).prop("checked")),
- e(this).prop("checked") ? a(e(this), "filetreechecked", i) : a(e(this), "filetreeunchecked", i)
+jQuery && function($) {
+ $.extend($.fn, {
+ fileTree: function(options, callback, onCancel) {
+ void 0 === options.root && (options.root = "/mnt/"),
+ void 0 === options.top && (options.top = "/mnt/"),
+ void 0 === options.filter && (options.filter = ""),
+ void 0 === options.match && (options.match = ".*"),
+ void 0 === options.script && (options.script = "/webGui/include/FileTree.php"),
+ void 0 === options.folderEvent && (options.folderEvent = "click"),
+ void 0 === options.expandSpeed && (options.expandSpeed = 300),
+ void 0 === options.collapseSpeed && (options.collapseSpeed = 300),
+ void 0 === options.expandEasing && (options.expandEasing = null),
+ void 0 === options.collapseEasing && (options.collapseEasing = null),
+ void 0 === options.multiFolder && (options.multiFolder = !1),
+ void 0 === options.loadMessage && (options.loadMessage = "Loading..."),
+ void 0 === options.multiSelect && (options.multiSelect = !1),
+ void 0 === options.allowBrowsing && (options.allowBrowsing = !1),
+ void 0 === options.pickexclude && (options.pickexclude = "");
+ $(this).each(function() {
+ function showTree($this, dir, showParent) {
+ $this.addClass("wait"),
+ $(".jqueryFileTree.start").remove(),
+ /* Modify the post data to include pickexclude. */
+ $.post(options.script, {
+ dir: dir,
+ root: options.top,
+ multiSelect: options.multiSelect,
+ filter: options.filter,
+ match: options.match,
+ show_parent: showParent,
+ /* Add pickexclude parameter. */
+ pickexclude: options.pickexclude
+ }).done(function(data) {
+ var $parent;
+ $this.find(".start").html(""),
+ $this.removeClass("wait").append(data),
+ options.root == dir ? $this.find("UL:hidden").show() : $this.find("UL:hidden").slideDown({
+ duration: options.expandSpeed,
+ easing: options.expandEasing
+ }),
+ $($parent = $this).find("LI A").on(options.folderEvent, function(event) {
+ event.preventDefault();
+ var node = {};
+ return node.li = $(this).closest("li"),
+ node.type = node.li.hasClass("directory") ? "directory" : "file",
+ node.value = $(this).text(),
+ node.rel = $(this).prop("rel"),
+ ".." == $(this).text() ? (options.root = node.rel, callback && callback($(this).attr("rel")), triggerEvent($(this), "filetreefolderclicked", node), root = $(this).closest("ul.jqueryFileTree"), root.html('- ' + options.loadMessage + "
"), showTree($(root), options.root, options.allowBrowsing)) : $(this).parent().hasClass("directory") ? ($(this).parent().hasClass("collapsed") ? (triggerEvent($(this), "filetreeexpand", node), options.multiFolder || ($(this).parent().parent().find("UL").slideUp({
+ duration: options.collapseSpeed,
+ easing: options.collapseEasing
+ }), $(this).parent().parent().find("LI.directory").removeClass("expanded").addClass("collapsed")), $(this).parent().removeClass("collapsed").addClass("expanded"), $(this).parent().find("UL").remove(), showTree($(this).parent(), $(this).attr("rel").match(/.*\//)[0], !1)) : (triggerEvent($(this), "filetreecollapse", node), $(this).parent().find("UL").slideUp({
+ duration: options.collapseSpeed,
+ easing: options.collapseEasing
+ }), $(this).parent().removeClass("expanded").addClass("collapsed"), triggerEvent($(this), "filetreecollapsed", node)), callback && callback($(this).attr("rel")), triggerEvent($(this), "filetreefolderclicked", node)) : (onCancel && onCancel($(this).attr("rel")), triggerEvent($(this), "filetreeclicked", node)), !1
+ }),
+ "click" != options.folderEvent.toLowerCase && $parent.find("LI A").on("click", function(event) {
+ return event.preventDefault(), !1
+ }),
+ triggerEvent($(this), "filetreeexpanded", data)
+ }).fail(function() {
+ $this.find(".start").html(""),
+ $this.removeClass("wait").append("Unable to get file tree information")
})
- })
+ }
+
+ function triggerEvent($elem, event, data) {
+ data.trigger = event,
+ $elem.trigger(event, data)
+ }
+ $(this).html('- ' + options.loadMessage + "
"),
+ showTree($(this), options.root, options.allowBrowsing),
+ $(this).on("change", "input:checkbox", function() {
+ var node = {};
+ node.li = $(this).closest("li"),
+ node.type = node.li.hasClass("directory") ? "directory" : "file",
+ node.value = node.li.children("a").text(),
+ node.rel = node.li.children("a").prop("rel"),
+ node.li.find("input:checkbox").prop("checked", $(this).prop("checked")),
+ $(this).prop("checked") ? triggerEvent($(this), "filetreechecked", node) : triggerEvent($(this), "filetreeunchecked", node)
+ })
+ })
},
- fileTreeAttach: function(i, t, l) {
- var s = {};
- e.isFunction(i) ? (e.isFunction(t) && (l = t), t = i) : i && e.extend(s, i),
- e(this).each(function() {
- var i = e(this),
- a = e.extend({}, s, i.data()),
- r = i.next(".fileTree");
- 0 === r.length && (e(document).mousedown(function(i) {
- var t = e(".fileTree");
- t.is(i.target) || 0 !== t.has(i.target).length || t.slideUp("fast")
+ fileTreeAttach: function(options, callback, onCancel) {
+ var settings = {};
+ $.isFunction(options) ? ($.isFunction(callback) && (onCancel = callback), callback = options) : options && $.extend(settings, options),
+ $(this).each(function() {
+ var $this = $(this),
+ config = $.extend({}, settings, $this.data()),
+ $fileTree = $this.next(".fileTree");
+ 0 === $fileTree.length && ($(document).mousedown(function(event) {
+ var $fileTree = $(".fileTree");
+ $fileTree.is(event.target) || 0 !== $fileTree.has(event.target).length || $fileTree.slideUp("fast")
}),
- r = e("", {
+ $fileTree = $("
", {
class: "textarea fileTree"
}),
- i.after(r)),
- i.click(function() {
- r.is(":visible") ? r.slideUp("fast") : ("" === r.html() && (r.html('
Loading...'),
- r.fileTree({
- root: a.pickroot,
- top: a.picktop,
- filter: (a.pickfilter || "").split(","),
- match: a.pickmatch || ".*",
+ $this.after($fileTree)),
+ $this.click(function() {
+ $fileTree.is(":visible") ? $fileTree.slideUp("fast") : ("" === $fileTree.html() && ($fileTree.html('
Loading...'),
+ $fileTree.fileTree({
+ root: config.pickroot,
+ top: config.picktop,
+ filter: (config.pickfilter || "").split(","),
+ match: config.pickmatch || ".*",
/* Include pickexclude parameter in fileTreeAttach. */
- pickexclude: a.pickexclude
- }, e.isFunction(t) ? t : function(e) {
- i.val(e).change(),
- a.hasOwnProperty("pickcloseonfile") && r.slideUp("fast")
- }, e.isFunction(l) ? l : function(e) {
- a.hasOwnProperty("pickfolders") && i.val(e).change()
+ pickexclude: config.pickexclude
+ }, $.isFunction(callback) ? callback : function(data) {
+ $this.val(data).change(),
+ config.hasOwnProperty("pickcloseonfile") && $fileTree.slideUp("fast")
+ }, $.isFunction(onCancel) ? onCancel : function(data) {
+ config.hasOwnProperty("pickfolders") && $this.val(data).change()
})),
- r.offset({
- left: i.position().left
+ $fileTree.offset({
+ left: $this.position().left
}),
- r.slideDown("fast"))
+ $fileTree.slideDown("fast"))
})
})
}
From a90d083cb018cca5261e1466e5f4a4ed8aa98d43 Mon Sep 17 00:00:00 2001
From: dlandon
Date: Thu, 2 May 2024 08:06:20 -0500
Subject: [PATCH 17/67] Revert excluded folders.
---
.../plugins/dynamix.docker.manager/DockerSettings.page | 9 +++------
emhttp/plugins/dynamix.vm.manager/VMSettings.page | 9 +++------
2 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/emhttp/plugins/dynamix.docker.manager/DockerSettings.page b/emhttp/plugins/dynamix.docker.manager/DockerSettings.page
index 8ce287a76..dba410d3b 100644
--- a/emhttp/plugins/dynamix.docker.manager/DockerSettings.page
+++ b/emhttp/plugins/dynamix.docker.manager/DockerSettings.page
@@ -20,9 +20,6 @@ Tag="icon-docker"
// Add the Docker JSON client
require_once "$docroot/plugins/dynamix.docker.manager/include/DockerClient.php";
-/* Folders to be excluded from the drop down file picker. */
-$excludeFolders = ".Recycle.Bin,RecycleBin,addons,disks,remotes,rootshare,user0";
-
$DockerClient = new DockerClient();
exec("/etc/rc.d/rc.docker status >/dev/null",$dummy,$DockerStopped);
@@ -166,7 +163,7 @@ _(Docker vDisk size)_:
:docker_vdisk_size_help:
_(Docker vDisk location)_:
-:
+:
_(Modify with caution: unable to validate path until Array is Started)_
_(Path does not exist)_
@@ -177,7 +174,7 @@ _(Docker vDisk location)_:
_(Docker directory)_:
-:
+:
_(Modify with caution: unable to validate path until Array is Started)_
_(Path does not exist)_
@@ -187,7 +184,7 @@ _(Docker directory)_:
_(Default appdata storage location)_:
-:
+:
_(Modify with caution: unable to validate path until Array is Started)_
diff --git a/emhttp/plugins/dynamix.vm.manager/VMSettings.page b/emhttp/plugins/dynamix.vm.manager/VMSettings.page
index 1ace30c44..d4c311db8 100644
--- a/emhttp/plugins/dynamix.vm.manager/VMSettings.page
+++ b/emhttp/plugins/dynamix.vm.manager/VMSettings.page
@@ -19,9 +19,6 @@ Tag="columns"
require_once "$docroot/plugins/dynamix.vm.manager/include/libvirt_helpers.php";
-/* Folders to be excluded from the drop down file picker. */
-$excludeFolders = ".Recycle.Bin,RecycleBin,addons,disks,remotes,rootshare,user0";
-
// Check for Intel VT-x (vmx) or AMD-V (svm) cpu virtualization support
// If either kvm_intel or kvm_amd are loaded then Intel VT-x (vmx) or AMD-V (svm) cpu virtualization support was found
$hardware = !empty(shell_exec("/etc/rc.d/rc.libvirt test"));
@@ -118,7 +115,7 @@ _(Libvirt vdisk size)_:
:vms_libvirt_vdisk_size_help:
_(Libvirt storage location)_:
-:
+:
_(Modify with caution: unable to validate path until Array is Started)_
_(Path does not exist)_
@@ -128,14 +125,14 @@ _(Libvirt storage location)_:
_(Default VM storage path)_:
-:
+:
_(Modify with caution: unable to validate path until Array is Started)_
_(Path does not exist)_
:vms_libvirt_storage_help:
_(Default ISO storage path)_:
-:
+:
_(Modify with caution: unable to validate path until Array is Started)_
_(Path does not exist)_
From 4f82b16fddfed38be3e749bb2b92d6938898d146 Mon Sep 17 00:00:00 2001
From: dlandon
Date: Thu, 2 May 2024 08:06:46 -0500
Subject: [PATCH 18/67] Revert to minimized version.
---
.../dynamix/javascript/jquery.filetree.js | 122 +-----------------
1 file changed, 1 insertion(+), 121 deletions(-)
diff --git a/emhttp/plugins/dynamix/javascript/jquery.filetree.js b/emhttp/plugins/dynamix/javascript/jquery.filetree.js
index 744e5982a..d59f986b1 100644
--- a/emhttp/plugins/dynamix/javascript/jquery.filetree.js
+++ b/emhttp/plugins/dynamix/javascript/jquery.filetree.js
@@ -1,122 +1,2 @@
/* jQuery File Tree. Authors - Cory S.N. LaViska & Dave Rogers. Copyright 2008 A Beautiful Site, LLC. - Adapted by Bergware for use in Unraid */
-jQuery && function($) {
- $.extend($.fn, {
- fileTree: function(options, callback, onCancel) {
- void 0 === options.root && (options.root = "/mnt/"),
- void 0 === options.top && (options.top = "/mnt/"),
- void 0 === options.filter && (options.filter = ""),
- void 0 === options.match && (options.match = ".*"),
- void 0 === options.script && (options.script = "/webGui/include/FileTree.php"),
- void 0 === options.folderEvent && (options.folderEvent = "click"),
- void 0 === options.expandSpeed && (options.expandSpeed = 300),
- void 0 === options.collapseSpeed && (options.collapseSpeed = 300),
- void 0 === options.expandEasing && (options.expandEasing = null),
- void 0 === options.collapseEasing && (options.collapseEasing = null),
- void 0 === options.multiFolder && (options.multiFolder = !1),
- void 0 === options.loadMessage && (options.loadMessage = "Loading..."),
- void 0 === options.multiSelect && (options.multiSelect = !1),
- void 0 === options.allowBrowsing && (options.allowBrowsing = !1),
- void 0 === options.pickexclude && (options.pickexclude = "");
- $(this).each(function() {
- function showTree($this, dir, showParent) {
- $this.addClass("wait"),
- $(".jqueryFileTree.start").remove(),
- /* Modify the post data to include pickexclude. */
- $.post(options.script, {
- dir: dir,
- root: options.top,
- multiSelect: options.multiSelect,
- filter: options.filter,
- match: options.match,
- show_parent: showParent,
- /* Add pickexclude parameter. */
- pickexclude: options.pickexclude
- }).done(function(data) {
- var $parent;
- $this.find(".start").html(""),
- $this.removeClass("wait").append(data),
- options.root == dir ? $this.find("UL:hidden").show() : $this.find("UL:hidden").slideDown({
- duration: options.expandSpeed,
- easing: options.expandEasing
- }),
- $($parent = $this).find("LI A").on(options.folderEvent, function(event) {
- event.preventDefault();
- var node = {};
- return node.li = $(this).closest("li"),
- node.type = node.li.hasClass("directory") ? "directory" : "file",
- node.value = $(this).text(),
- node.rel = $(this).prop("rel"),
- ".." == $(this).text() ? (options.root = node.rel, callback && callback($(this).attr("rel")), triggerEvent($(this), "filetreefolderclicked", node), root = $(this).closest("ul.jqueryFileTree"), root.html('- ' + options.loadMessage + "
"), showTree($(root), options.root, options.allowBrowsing)) : $(this).parent().hasClass("directory") ? ($(this).parent().hasClass("collapsed") ? (triggerEvent($(this), "filetreeexpand", node), options.multiFolder || ($(this).parent().parent().find("UL").slideUp({
- duration: options.collapseSpeed,
- easing: options.collapseEasing
- }), $(this).parent().parent().find("LI.directory").removeClass("expanded").addClass("collapsed")), $(this).parent().removeClass("collapsed").addClass("expanded"), $(this).parent().find("UL").remove(), showTree($(this).parent(), $(this).attr("rel").match(/.*\//)[0], !1)) : (triggerEvent($(this), "filetreecollapse", node), $(this).parent().find("UL").slideUp({
- duration: options.collapseSpeed,
- easing: options.collapseEasing
- }), $(this).parent().removeClass("expanded").addClass("collapsed"), triggerEvent($(this), "filetreecollapsed", node)), callback && callback($(this).attr("rel")), triggerEvent($(this), "filetreefolderclicked", node)) : (onCancel && onCancel($(this).attr("rel")), triggerEvent($(this), "filetreeclicked", node)), !1
- }),
- "click" != options.folderEvent.toLowerCase && $parent.find("LI A").on("click", function(event) {
- return event.preventDefault(), !1
- }),
- triggerEvent($(this), "filetreeexpanded", data)
- }).fail(function() {
- $this.find(".start").html(""),
- $this.removeClass("wait").append("Unable to get file tree information")
- })
- }
-
- function triggerEvent($elem, event, data) {
- data.trigger = event,
- $elem.trigger(event, data)
- }
- $(this).html('- ' + options.loadMessage + "
"),
- showTree($(this), options.root, options.allowBrowsing),
- $(this).on("change", "input:checkbox", function() {
- var node = {};
- node.li = $(this).closest("li"),
- node.type = node.li.hasClass("directory") ? "directory" : "file",
- node.value = node.li.children("a").text(),
- node.rel = node.li.children("a").prop("rel"),
- node.li.find("input:checkbox").prop("checked", $(this).prop("checked")),
- $(this).prop("checked") ? triggerEvent($(this), "filetreechecked", node) : triggerEvent($(this), "filetreeunchecked", node)
- })
- })
- },
- fileTreeAttach: function(options, callback, onCancel) {
- var settings = {};
- $.isFunction(options) ? ($.isFunction(callback) && (onCancel = callback), callback = options) : options && $.extend(settings, options),
- $(this).each(function() {
- var $this = $(this),
- config = $.extend({}, settings, $this.data()),
- $fileTree = $this.next(".fileTree");
- 0 === $fileTree.length && ($(document).mousedown(function(event) {
- var $fileTree = $(".fileTree");
- $fileTree.is(event.target) || 0 !== $fileTree.has(event.target).length || $fileTree.slideUp("fast")
- }),
- $fileTree = $("