Compare commits

..
Author SHA1 Message Date
dosubot[bot] 2163747170 docs: add PrusaLink to service index 2026-09-23 22:30:22 +00:00
13 changed files with 32 additions and 93 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: crowdin action - name: crowdin action
uses: crowdin/github-action@9af557de76d70c480f88065d336f445a362f402b # v3.1.0 uses: crowdin/github-action@0d5670f539973aea2f01abce61a8989934df0025 # v3.0.2
with: with:
upload_translations: false upload_translations: false
download_translations: true download_translations: true
+3 -3
View File
@@ -99,14 +99,14 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup QEMU - name: Setup QEMU
uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0 uses: docker/setup-qemu-action@1f40c72289eff860ee54a304f1438e3cff362e0a # v4.3.0
- name: Setup Docker buildx - name: Setup Docker buildx
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4 uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4
- name: Build and push Docker image - name: Build and push Docker image
id: build-and-push id: build-and-push
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7 uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7
with: with:
context: . context: .
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
+1 -1
View File
@@ -31,7 +31,7 @@ jobs:
# Run Vitest directly so `--shard` is parsed as an option # Run Vitest directly so `--shard` is parsed as an option
- run: pnpm -s exec vitest run --coverage --shard ${{ matrix.shard }}/4 --pool forks - run: pnpm -s exec vitest run --coverage --shard ${{ matrix.shard }}/4 --pool forks
- name: Upload coverage reports to Codecov - name: Upload coverage reports to Codecov
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with: with:
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info files: ./coverage/lcov.info
+1 -2
View File
@@ -6,7 +6,6 @@ description: Arcane Widget Configuration
Learn more about [Arcane](https://github.com/getarcaneapp/arcane). Learn more about [Arcane](https://github.com/getarcaneapp/arcane).
**Allowed fields** (max 4): `running`, `stopped`, `total`, `images`, `images_used`, `images_unused`, `image_updates`. **Allowed fields** (max 4): `running`, `stopped`, `total`, `images`, `images_used`, `images_unused`, `image_updates`.
**Default fields**: `running`, `stopped`, `total`, `image_updates`. **Default fields**: `running`, `stopped`, `total`, `image_updates`.
```yaml ```yaml
@@ -18,4 +17,4 @@ widget:
fields: ["running", "stopped", "total", "image_updates"] # optional fields: ["running", "stopped", "total", "image_updates"] # optional
``` ```
Using an API key for the widget requires permissions for: `containers:list`, `images:list`, and `image-updates:read`. Using an api key for the widget requires permissions for: `containers:list` `images:list and `image-updates:read`
+1 -1
View File
@@ -30,7 +30,6 @@ You can also find a list of all available service widgets in the sidebar navigat
- [Coin Market Cap](coin-market-cap.md) - [Coin Market Cap](coin-market-cap.md)
- [CrowdSec](crowdsec.md) - [CrowdSec](crowdsec.md)
- [Custom API](customapi.md) - [Custom API](customapi.md)
- [DDNS-Updater](ddns-updater.md)
- [Deluge](deluge.md) - [Deluge](deluge.md)
- [DeveLanCacheUI](develancacheui.md) - [DeveLanCacheUI](develancacheui.md)
- [DiskStation](diskstation.md) - [DiskStation](diskstation.md)
@@ -116,6 +115,7 @@ You can also find a list of all available service widgets in the sidebar navigat
- [Prowlarr](prowlarr.md) - [Prowlarr](prowlarr.md)
- [Proxmox](proxmox.md) - [Proxmox](proxmox.md)
- [Proxmox Backup Server](proxmoxbackupserver.md) - [Proxmox Backup Server](proxmoxbackupserver.md)
- [PrusaLink](prusalink.md)
- [Pterodactyl](pterodactyl.md) - [Pterodactyl](pterodactyl.md)
- [PyLoad](pyload.md) - [PyLoad](pyload.md)
- [qBittorrent](qbittorrent.md) - [qBittorrent](qbittorrent.md)
+4 -7
View File
@@ -11,13 +11,10 @@ const widget = {
}, },
issues: { issues: {
endpoint: "repos/issues/search", endpoint: "repos/issues/search",
map: (data) => { map: (data) => ({
const items = asJson(data); pulls: asJson(data).filter((issue) => issue.pull_request),
return { issues: asJson(data).filter((issue) => !issue.pull_request),
pulls: items.filter((issue) => issue.pull_request), }),
issues: items.filter((issue) => !issue.pull_request),
};
},
}, },
repositories: { repositories: {
endpoint: "repos/search", endpoint: "repos/search",
+1 -10
View File
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest"; import { describe, it } from "vitest";
import { expectWidgetConfigShape } from "test-utils/widget-config"; import { expectWidgetConfigShape } from "test-utils/widget-config";
@@ -8,13 +8,4 @@ describe("gitea widget config", () => {
it("exports a valid widget config", () => { it("exports a valid widget config", () => {
expectWidgetConfigShape(widget); expectWidgetConfigShape(widget);
}); });
it("splits issues and pull requests", () => {
const result = widget.mappings.issues.map(
Buffer.from(JSON.stringify([{ id: 1, pull_request: {} }, { id: 2 }, { id: 3 }])),
);
expect(result.pulls.map((i) => i.id)).toEqual([1]);
expect(result.issues.map((i) => i.id)).toEqual([2, 3]);
});
}); });
+4 -7
View File
@@ -8,13 +8,10 @@ const widget = {
mappings: { mappings: {
counters: { counters: {
endpoint: "feeds/counters", endpoint: "feeds/counters",
map: (data) => { map: (data) => ({
const { reads, unreads } = asJson(data); read: Object.values(asJson(data).reads).reduce((acc, i) => acc + i, 0),
return { unread: Object.values(asJson(data).unreads).reduce((acc, i) => acc + i, 0),
read: Object.values(reads).reduce((acc, i) => acc + i, 0), }),
unread: Object.values(unreads).reduce((acc, i) => acc + i, 0),
};
},
}, },
}, },
}; };
+1 -9
View File
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest"; import { describe, it } from "vitest";
import { expectWidgetConfigShape } from "test-utils/widget-config"; import { expectWidgetConfigShape } from "test-utils/widget-config";
@@ -8,12 +8,4 @@ describe("miniflux widget config", () => {
it("exports a valid widget config", () => { it("exports a valid widget config", () => {
expectWidgetConfigShape(widget); expectWidgetConfigShape(widget);
}); });
it("sums read and unread counters", () => {
const result = widget.mappings.counters.map(
Buffer.from(JSON.stringify({ reads: { 1: 2, 2: 3 }, unreads: { 1: 4, 2: 1 } })),
);
expect(result).toEqual({ read: 5, unread: 5 });
});
}); });
+10 -13
View File
@@ -1,4 +1,4 @@
import { asJson } from "utils/proxy/api-helpers"; import { asJson, jsonArrayFilter } from "utils/proxy/api-helpers";
import genericProxyHandler from "utils/proxy/handlers/generic"; import genericProxyHandler from "utils/proxy/handlers/generic";
const widget = { const widget = {
@@ -8,18 +8,15 @@ const widget = {
mappings: { mappings: {
movie: { movie: {
endpoint: "movie", endpoint: "movie",
map: (data) => { map: (data) => ({
const movieData = asJson(data) ?? []; wanted: jsonArrayFilter(data, (item) => item.monitored && !item.hasFile && item.isAvailable).length,
return { have: jsonArrayFilter(data, (item) => item.hasFile).length,
wanted: movieData.filter((item) => item.monitored && !item.hasFile && item.isAvailable).length, missing: jsonArrayFilter(data, (item) => item.monitored && !item.hasFile).length,
have: movieData.filter((item) => item.hasFile).length, all: asJson(data).map((entry) => ({
missing: movieData.filter((item) => item.monitored && !item.hasFile).length, title: entry.title,
all: movieData.map((entry) => ({ id: entry.id,
title: entry.title, })),
id: entry.id, }),
})),
};
},
}, },
"queue/status": { "queue/status": {
endpoint: "queue/status", endpoint: "queue/status",
-23
View File
@@ -33,27 +33,4 @@ describe("radarr widget config", () => {
expect(queue.map((entry) => entry.movieId)).toEqual([2, 1]); expect(queue.map((entry) => entry.movieId)).toEqual([2, 1]);
}); });
it("maps movie counts and titles", () => {
const movies = widget.mappings.movie.map(
Buffer.from(
JSON.stringify([
{ id: 1, title: "A", monitored: true, hasFile: false, isAvailable: true },
{ id: 2, title: "B", monitored: true, hasFile: true },
{ id: 3, title: "C", monitored: true, hasFile: false, isAvailable: false },
]),
),
);
expect(movies).toEqual({
wanted: 1,
have: 1,
missing: 2,
all: [
{ title: "A", id: 1 },
{ title: "B", id: 2 },
{ title: "C", id: 3 },
],
});
});
}); });
+4 -7
View File
@@ -8,13 +8,10 @@ const widget = {
mappings: { mappings: {
workers: { workers: {
endpoint: "workers/status", endpoint: "workers/status",
map: (data) => { map: (data) => ({
const workers = asJson(data).workers_status; total_workers: asJson(data).workers_status.length,
return { active_workers: asJson(data).workers_status.filter((worker) => !worker.idle).length,
total_workers: workers.length, }),
active_workers: workers.filter((worker) => !worker.idle).length,
};
},
}, },
pending: { pending: {
method: "POST", method: "POST",
+1 -9
View File
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest"; import { describe, it } from "vitest";
import { expectWidgetConfigShape } from "test-utils/widget-config"; import { expectWidgetConfigShape } from "test-utils/widget-config";
@@ -8,12 +8,4 @@ describe("unmanic widget config", () => {
it("exports a valid widget config", () => { it("exports a valid widget config", () => {
expectWidgetConfigShape(widget); expectWidgetConfigShape(widget);
}); });
it("counts total and active workers", () => {
const result = widget.mappings.workers.map(
Buffer.from(JSON.stringify({ workers_status: [{ idle: true }, { idle: false }, { idle: false }] })),
);
expect(result).toEqual({ total_workers: 3, active_workers: 2 });
});
}); });