diff --git a/public/locales/de/common.json b/public/locales/de/common.json
index d3ff6e71..0083a337 100644
--- a/public/locales/de/common.json
+++ b/public/locales/de/common.json
@@ -101,5 +101,11 @@
"apps": "Anwendungen",
"clients": "Kunden",
"messages": "Mitteilungen"
+ },
+ "sabnzbd": {
+ "status": "Status",
+ "speed": "Speed",
+ "remaining": "Remaining",
+ "timeleft": "Time left"
}
}
diff --git a/public/locales/en/common.json b/public/locales/en/common.json
index c71ac966..155aae4a 100644
--- a/public/locales/en/common.json
+++ b/public/locales/en/common.json
@@ -112,5 +112,11 @@
"apps": "Applications",
"clients": "Clients",
"messages": "Messages"
+ },
+ "sabnzbd": {
+ "status": "Status",
+ "speed": "Speed",
+ "remaining": "Remaining",
+ "timeleft": "Time left"
}
}
diff --git a/public/locales/es/common.json b/public/locales/es/common.json
index 21bc6823..5889917b 100644
--- a/public/locales/es/common.json
+++ b/public/locales/es/common.json
@@ -101,5 +101,11 @@
"apps": "Aplicaciones",
"clients": "Clientela",
"messages": "Mensajes"
+ },
+ "sabnzbd": {
+ "status": "Status",
+ "speed": "Speed",
+ "remaining": "Remaining",
+ "timeleft": "Time left"
}
}
diff --git a/public/locales/fr/common.json b/public/locales/fr/common.json
index ac3f7e39..fe980f4b 100644
--- a/public/locales/fr/common.json
+++ b/public/locales/fr/common.json
@@ -112,5 +112,11 @@
"apps": "Applications",
"clients": "Clients",
"messages": "Messages"
+ },
+ "sabnzbd": {
+ "status": "Status",
+ "speed": "Speed",
+ "remaining": "Remaining",
+ "timeleft": "Time left"
}
}
diff --git a/public/locales/it/common.json b/public/locales/it/common.json
index b9ddbacc..b9357ef0 100644
--- a/public/locales/it/common.json
+++ b/public/locales/it/common.json
@@ -101,5 +101,11 @@
"apps": "Applications",
"clients": "Clients",
"messages": "Messages"
+ },
+ "sabnzbd": {
+ "status": "Status",
+ "speed": "Speed",
+ "remaining": "Remaining",
+ "timeleft": "Time left"
}
}
diff --git a/public/locales/nb-NO/common.json b/public/locales/nb-NO/common.json
index e273650c..d6af7820 100644
--- a/public/locales/nb-NO/common.json
+++ b/public/locales/nb-NO/common.json
@@ -101,5 +101,11 @@
"apps": "Applications",
"clients": "Clients",
"messages": "Messages"
+ },
+ "sabnzbd": {
+ "status": "Status",
+ "speed": "Speed",
+ "remaining": "Remaining",
+ "timeleft": "Time left"
}
}
diff --git a/public/locales/nl/common.json b/public/locales/nl/common.json
index 8377a56d..d4d28a0b 100644
--- a/public/locales/nl/common.json
+++ b/public/locales/nl/common.json
@@ -101,5 +101,11 @@
"apps": "Applications",
"clients": "Clients",
"messages": "Messages"
+ },
+ "sabnzbd": {
+ "status": "Status",
+ "speed": "Speed",
+ "remaining": "Remaining",
+ "timeleft": "Time left"
}
}
diff --git a/public/locales/pt/common.json b/public/locales/pt/common.json
index ab25e191..a5cabc23 100644
--- a/public/locales/pt/common.json
+++ b/public/locales/pt/common.json
@@ -112,5 +112,11 @@
"apps": "Aplicações",
"clients": "Clientes",
"messages": "Mensagens"
+ },
+ "sabnzbd": {
+ "status": "Status",
+ "speed": "Speed",
+ "remaining": "Remaining",
+ "timeleft": "Time left"
}
}
diff --git a/public/locales/ru/common.json b/public/locales/ru/common.json
index 121e8673..9b3984be 100644
--- a/public/locales/ru/common.json
+++ b/public/locales/ru/common.json
@@ -101,5 +101,11 @@
"apps": "Aplicações",
"clients": "Clientes",
"messages": "Mensagens"
+ },
+ "sabnzbd": {
+ "status": "Status",
+ "speed": "Speed",
+ "remaining": "Remaining",
+ "timeleft": "Time left"
}
}
diff --git a/public/locales/vi/common.json b/public/locales/vi/common.json
index 519c2ab6..8396fed8 100644
--- a/public/locales/vi/common.json
+++ b/public/locales/vi/common.json
@@ -101,5 +101,11 @@
"apps": "Aplicações",
"clients": "Clientes",
"messages": "Mensagens"
+ },
+ "sabnzbd": {
+ "status": "Status",
+ "speed": "Speed",
+ "remaining": "Remaining",
+ "timeleft": "Time left"
}
}
diff --git a/public/locales/zh-CN/common.json b/public/locales/zh-CN/common.json
index bb7e66a3..a7f504f1 100644
--- a/public/locales/zh-CN/common.json
+++ b/public/locales/zh-CN/common.json
@@ -101,5 +101,11 @@
"apps": "Aplicações",
"clients": "Clientes",
"messages": "Mensagens"
+ },
+ "sabnzbd": {
+ "status": "Status",
+ "speed": "Speed",
+ "remaining": "Remaining",
+ "timeleft": "Time left"
}
}
diff --git a/src/components/services/widget.jsx b/src/components/services/widget.jsx
index f55f3a6d..0712c7f3 100644
--- a/src/components/services/widget.jsx
+++ b/src/components/services/widget.jsx
@@ -17,6 +17,7 @@ import Overseerr from "./widgets/service/overseerr";
import Npm from "./widgets/service/npm";
import Tautulli from "./widgets/service/tautulli";
import Gotify from "./widgets/service/gotify";
+import Sabnzbd from "./widgets/service/sabnzbd";
const widgetMappings = {
docker: Docker,
@@ -36,6 +37,7 @@ const widgetMappings = {
npm: Npm,
tautulli: Tautulli,
gotify: Gotify,
+ sabnzbd: Sabnzbd
};
export default function Widget({ service }) {
diff --git a/src/components/services/widgets/service/sabnzbd.jsx b/src/components/services/widgets/service/sabnzbd.jsx
new file mode 100644
index 00000000..fbafc4b5
--- /dev/null
+++ b/src/components/services/widgets/service/sabnzbd.jsx
@@ -0,0 +1,41 @@
+import useSWR from "swr";
+import { useTranslation } from "react-i18next";
+
+import Widget from "../widget";
+import Block from "../block";
+
+import { formatApiUrl } from "utils/api-helpers";
+
+export default function Sabnzbd({ service }) {
+ const { t } = useTranslation("common");
+
+ const config = service.widget;
+ const { data: statusData, error: statusError } = useSWR(formatApiUrl(config, "mode=queue"));
+
+ if (statusError) {
+ return ;
+ }
+
+ if (!statusData) {
+ return (
+
+
+
+
+
+
+ );
+ }
+
+ return (
+
+
+
+
+
+
+ );
+}
diff --git a/src/pages/api/services/proxy.js b/src/pages/api/services/proxy.js
index efa69193..c1737b0c 100644
--- a/src/pages/api/services/proxy.js
+++ b/src/pages/api/services/proxy.js
@@ -14,6 +14,7 @@ const serviceProxyHandlers = {
speedtest: genericProxyHandler,
tautulli: genericProxyHandler,
traefik: genericProxyHandler,
+ sabnzbd: genericProxyHandler,
// uses X-API-Key header auth
gotify: credentialedProxyHandler,
portainer: credentialedProxyHandler,
diff --git a/src/utils/api-helpers.js b/src/utils/api-helpers.js
index cc7c5e11..7b53c02c 100644
--- a/src/utils/api-helpers.js
+++ b/src/utils/api-helpers.js
@@ -14,6 +14,7 @@ const formats = {
ombi: `{url}/api/v1/{endpoint}`,
npm: `{url}/api/{endpoint}`,
gotify: `{url}/{endpoint}`,
+ sabnzbd: `{url}/api?output=json&apikey={key}&{endpoint}`,
};
export function formatApiCall(api, args) {