add Overseerr widget

pull/100/head
Ben Phelps 2 years ago
parent f79213c9d3
commit 4aedda7ba2

@ -17,7 +17,7 @@
- Container status (Running / Stopped) & statistics (CPU, Memory, Network) - Container status (Running / Stopped) & statistics (CPU, Memory, Network)
- Automatic service discovery (via labels) - Automatic service discovery (via labels)
* Service Integration * Service Integration
- Currently supports Sonarr, Radarr, Ombi, Emby, Jellyfin, Tautulli (Plex), Jellyseerr ([ilusi0n](https://github.com/benphelps/homepage/pull/34)), NZBGet, ruTorrent - Currently supports Sonarr, Radarr, Ombi, Emby, Jellyfin, Tautulli (Plex), Overseerr, Jellyseerr ([ilusi0n](https://github.com/benphelps/homepage/pull/34)), NZBGet, ruTorrent
- Portainer, Traefik, Speedtest Tracker, PiHole, Nginx Proxy Manager ([aidenpwnz](https://github.com/benphelps/homepage/pull/45)) - Portainer, Traefik, Speedtest Tracker, PiHole, Nginx Proxy Manager ([aidenpwnz](https://github.com/benphelps/homepage/pull/45))
* Information & Utility Widgets * Information & Utility Widgets
- System Stats (Disk, CPU, Memory) - System Stats (Disk, CPU, Memory)

@ -78,6 +78,11 @@
"approved": "Approved", "approved": "Approved",
"available": "Available" "available": "Available"
}, },
"overseerr": {
"pending": "Pending",
"approved": "Approved",
"available": "Available"
},
"pihole": { "pihole": {
"queries": "Queries", "queries": "Queries",
"blocked": "Blocked", "blocked": "Blocked",

@ -13,6 +13,7 @@ import Jellyfin from "./widgets/service/jellyfin";
import Speedtest from "./widgets/service/speedtest"; import Speedtest from "./widgets/service/speedtest";
import Traefik from "./widgets/service/traefik"; import Traefik from "./widgets/service/traefik";
import Jellyseerr from "./widgets/service/jellyseerr"; import Jellyseerr from "./widgets/service/jellyseerr";
import Overseerr from "./widgets/service/overseerr";
import Npm from "./widgets/service/npm"; import Npm from "./widgets/service/npm";
import Tautulli from "./widgets/service/tautulli"; import Tautulli from "./widgets/service/tautulli";
@ -30,6 +31,7 @@ const widgetMappings = {
speedtest: Speedtest, speedtest: Speedtest,
traefik: Traefik, traefik: Traefik,
jellyseerr: Jellyseerr, jellyseerr: Jellyseerr,
overseerr: Overseerr,
npm: Npm, npm: Npm,
tautulli: Tautulli, tautulli: Tautulli,
}; };

@ -0,0 +1,37 @@
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 Overseerr({ service }) {
const { t } = useTranslation();
const config = service.widget;
const { data: statsData, error: statsError } = useSWR(formatApiUrl(config, `request/count`));
if (statsError) {
return <Widget error={t("widget.api_error")} />;
}
if (!statsData) {
return (
<Widget>
<Block label={t("overseerr.pending")} />
<Block label={t("overseerr.approved")} />
<Block label={t("overseerr.available")} />
</Widget>
);
}
return (
<Widget>
<Block label={t("overseerr.pending")} value={statsData.pending} />
<Block label={t("overseerr.approved")} value={statsData.approved} />
<Block label={t("overseerr.available")} value={statsData.available} />
</Widget>
);
}

@ -17,6 +17,7 @@ const serviceProxyHandlers = {
// uses X-API-Key header auth // uses X-API-Key header auth
portainer: credentialedProxyHandler, portainer: credentialedProxyHandler,
jellyseerr: credentialedProxyHandler, jellyseerr: credentialedProxyHandler,
overseerr: credentialedProxyHandler,
ombi: credentialedProxyHandler, ombi: credentialedProxyHandler,
// super specific handlers // super specific handlers
rutorrent: rutorrentProxyHandler, rutorrent: rutorrentProxyHandler,

@ -10,6 +10,7 @@ const formats = {
portainer: `{url}/api/endpoints/{env}/{endpoint}`, portainer: `{url}/api/endpoints/{env}/{endpoint}`,
rutorrent: `{url}/plugins/httprpc/action.php`, rutorrent: `{url}/plugins/httprpc/action.php`,
jellyseerr: `{url}/api/v1/{endpoint}`, jellyseerr: `{url}/api/v1/{endpoint}`,
overseerr: `{url}/api/v1/{endpoint}`,
ombi: `{url}/api/v1/{endpoint}`, ombi: `{url}/api/v1/{endpoint}`,
npm: `{url}/api/{endpoint}`, npm: `{url}/api/{endpoint}`,
}; };

Loading…
Cancel
Save