From 3c28e4af44e1656d3acb3b6453072243a6ba6eb6 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:42:06 -0800 Subject: [PATCH 01/29] Fix empty groups with configured services --- src/utils/config/api-response.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/config/api-response.js b/src/utils/config/api-response.js index 5f40d626..01bef3a1 100644 --- a/src/utils/config/api-response.js +++ b/src/utils/config/api-response.js @@ -158,7 +158,7 @@ export async function servicesResponse() { const discoveredKubernetesGroup = findGroupByName(discoveredKubernetesServices, groupName) || { services: [], }; - const configuredGroup = findGroupByName(configuredServices, groupName) || { services: [] }; + const configuredGroup = findGroupByName(configuredServices, groupName) || { services: [], groups: [] }; const mergedGroup = { name: groupName, From 22c02f4e45552d5857739efe32f8653f4f37d812 Mon Sep 17 00:00:00 2001 From: Mindfreak9100 Date: Thu, 12 Dec 2024 19:32:03 -0500 Subject: [PATCH 02/29] Enhancement: downloading torrents list for qbittorrent (#4405) --- docs/widgets/services/qbittorrent.md | 1 + src/utils/config/service-helpers.js | 6 ++++++ src/widgets/qbittorrent/component.jsx | 31 +++++++++++++++++++++------ 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/docs/widgets/services/qbittorrent.md b/docs/widgets/services/qbittorrent.md index d60785e7..103430de 100644 --- a/docs/widgets/services/qbittorrent.md +++ b/docs/widgets/services/qbittorrent.md @@ -15,4 +15,5 @@ widget: url: http://qbittorrent.host.or.ip username: username password: password + enableLeechProgress: true # optional, defaults to false ``` diff --git a/src/utils/config/service-helpers.js b/src/utils/config/service-helpers.js index e3c491ac..1c37ad49 100644 --- a/src/utils/config/service-helpers.js +++ b/src/utils/config/service-helpers.js @@ -479,6 +479,9 @@ export function cleanServiceGroups(groups) { // proxmox node, + // qbittorrent + enableLeechProgress, + // speedtest bitratePrecision, @@ -671,6 +674,9 @@ export function cleanServiceGroups(groups) { if (type === "spoolman") { if (spoolIds !== undefined) widget.spoolIds = spoolIds; } + if (type === "qbittorrent") { + if (enableLeechProgress !== undefined) widget.enableLeechProgress = JSON.parse(enableLeechProgress); + } return widget; }); return cleanedService; diff --git a/src/widgets/qbittorrent/component.jsx b/src/widgets/qbittorrent/component.jsx index e88b2622..d7fb8bf7 100644 --- a/src/widgets/qbittorrent/component.jsx +++ b/src/widgets/qbittorrent/component.jsx @@ -1,12 +1,13 @@ import { useTranslation } from "next-i18next"; +import QueueEntry from "../../components/widgets/queue/queueEntry"; + import Container from "components/services/widget/container"; import Block from "components/services/widget/block"; import useWidgetAPI from "utils/proxy/use-widget-api"; export default function Component({ service }) { const { t } = useTranslation(); - const { widget } = service; const { data: torrentData, error: torrentError } = useWidgetAPI(widget, "torrents"); @@ -29,6 +30,7 @@ export default function Component({ service }) { let rateDl = 0; let rateUl = 0; let completed = 0; + const leechTorrents = []; for (let i = 0; i < torrentData.length; i += 1) { const torrent = torrentData[i]; @@ -37,16 +39,31 @@ export default function Component({ service }) { if (torrent.progress === 1) { completed += 1; } + if (torrent.state.includes("DL") || torrent.state === "downloading") { + leechTorrents.push(torrent); + } } const leech = torrentData.length - completed; return ( - - - - - - + <> + + + + + + + {widget?.enableLeechProgress && + leechTorrents.map((queueEntry) => ( + + ))} + ); } From 5bc67137f6cb37ec7ed3d21da83d0bcdbcfbd03b Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 12 Dec 2024 20:53:20 -0800 Subject: [PATCH 03/29] Fix: glances metric - different key for process list memory on windows host (#4410) --- src/widgets/glances/metrics/process.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/glances/metrics/process.jsx b/src/widgets/glances/metrics/process.jsx index b997a568..b20b4c63 100644 --- a/src/widgets/glances/metrics/process.jsx +++ b/src/widgets/glances/metrics/process.jsx @@ -63,7 +63,7 @@ export default function Component({ service }) {
{item.cpu_percent.toFixed(1)}%
{t("common.bytes", { - value: item.memory_info[memoryInfoKey], + value: item.memory_info[memoryInfoKey] ?? item.memory_info.wset, maximumFractionDigits: 0, })}
From 20445583cd19542cee1bbbbb21d2ca3c9e28d564 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 13 Dec 2024 10:59:44 -0800 Subject: [PATCH 04/29] Build feature images --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 2ac8b3e8..00608705 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -118,7 +118,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - push: ${{ github.event_name != 'pull_request' && !(github.event_name == 'push' && startsWith(github.ref, 'refs/heads/feature')) }} + push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | From 48e0a0e8efdb1b822c6d48ac1d4774947120cdeb Mon Sep 17 00:00:00 2001 From: Epoch Philosophy <35877292+epoch-philosophy@users.noreply.github.com> Date: Fri, 13 Dec 2024 14:03:32 -0600 Subject: [PATCH 05/29] Documentation: update k8s.md to Reflect New Traefik V3 API (#4416) --- docs/installation/k8s.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation/k8s.md b/docs/installation/k8s.md index 24be2c34..cf0ec3c6 100644 --- a/docs/installation/k8s.md +++ b/docs/installation/k8s.md @@ -210,7 +210,7 @@ rules: - get - list - apiGroups: - - traefik.containo.us + - traefik.io resources: - ingressroutes verbs: From 191a95c55c6546e69fb0a18350a6fb33276ba3bd Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 14 Dec 2024 15:51:52 -0800 Subject: [PATCH 06/29] Fix: maybe prevent unnecessary search suggestion calls --- src/components/quicklaunch.jsx | 2 +- src/components/widgets/search/search.jsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/quicklaunch.jsx b/src/components/quicklaunch.jsx index 9f55f973..cf2ed813 100644 --- a/src/components/quicklaunch.jsx +++ b/src/components/quicklaunch.jsx @@ -129,7 +129,7 @@ export default function QuickLaunch({ servicesAndBookmarks, searchString, setSea useEffect(() => { const abortController = new AbortController(); - if (searchString.length === 0) setResults([]); + if (searchString.trim().length === 0) setResults([]); else { let newResults = servicesAndBookmarks.filter((r) => { const nameMatch = r.name.toLowerCase().includes(searchString); diff --git a/src/components/widgets/search/search.jsx b/src/components/widgets/search/search.jsx index c9391d35..5a7edc04 100644 --- a/src/components/widgets/search/search.jsx +++ b/src/components/widgets/search/search.jsx @@ -94,6 +94,7 @@ export default function Search({ options }) { if ( options.showSearchSuggestions && (selectedProvider.suggestionUrl || options.suggestionUrl) && // custom providers pass url via options + query.trim().length > 0 && query.trim() !== searchSuggestions[0] ) { fetch(`/api/search/searchSuggestion?query=${encodeURIComponent(query)}&providerName=${selectedProvider.name}`, { From 29928a9a5ffc3dc2790f890a89576f520e2e3151 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 14 Dec 2024 22:57:36 -0800 Subject: [PATCH 07/29] Update requirement --- docs/widgets/authoring/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/widgets/authoring/getting-started.md b/docs/widgets/authoring/getting-started.md index 4b9126ea..dd33c21e 100644 --- a/docs/widgets/authoring/getting-started.md +++ b/docs/widgets/authoring/getting-started.md @@ -55,7 +55,7 @@ self-hosted / open-source alternative, we ask that any widgets, etc. are develop To ensure cohesiveness of various widgets, the following should be used as a guide for developing new widgets: -- Please only submit widgets that target a feature request discussion with at least 10 'up-votes'. The purpose of this requirement is to avoid the addition (and maintenance) of service widgets that might only benefit a small number of users. +- Please only submit widgets that target a feature request discussion with at least 20 'up-votes'. The purpose of this requirement is to avoid the addition (and maintenance) of service widgets that might only benefit a small number of users. - Note that we reserve the right to decline widgets for projects that are very young (eg < ~1y) or those with a small reach (eg low GitHub stars). Again, this is in an effort to keep overall widget maintenance under control. - Widgets should be only one row of blocks - Widgets should be no more than 4 blocks wide and generally conform to the styling / design choices of other widgets From a35c60f9736c4b20c96a34d51f904d9010051b35 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 14 Dec 2024 22:59:56 -0800 Subject: [PATCH 08/29] Update repo-maintenance.yml --- .github/workflows/repo-maintenance.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/repo-maintenance.yml b/.github/workflows/repo-maintenance.yml index 7cf47c51..02f33b99 100644 --- a/.github/workflows/repo-maintenance.yml +++ b/.github/workflows/repo-maintenance.yml @@ -212,9 +212,9 @@ jobs: } const CUTOFF_1_DAYS = 180; - const CUTOFF_1_COUNT = 5; + const CUTOFF_1_COUNT = 10; const CUTOFF_2_DAYS = 365; - const CUTOFF_2_COUNT = 10; + const CUTOFF_2_COUNT = 20; const cutoff1Date = new Date(); cutoff1Date.setDate(cutoff1Date.getDate() - CUTOFF_1_DAYS); From deff2f5506e39c73ef492280b6b4201c322de010 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 15 Dec 2024 15:24:31 -0800 Subject: [PATCH 09/29] Maybe this will make the requirements more obvious --- .github/PULL_REQUEST_TEMPLATE.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 1d9e6243..ba593523 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,3 +1,14 @@ + + ## Proposed change