mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-08 14:38:47 +00:00
new status format, new podSelector field, more accurate pod stats
* renamed pod label prefix from "homepage" to "gethomepage.dev" which is more inline with typical kubernetes practices
This commit is contained in:
parent
174cb651b4
commit
09eb172079
8 changed files with 65 additions and 40 deletions
|
@ -8,12 +8,13 @@ export default function Component({ service }) {
|
|||
const { t } = useTranslation();
|
||||
|
||||
const { widget } = service;
|
||||
const podSelectorString = service.podSelector !== undefined ? `podSelector=${widget.podSelector}` : "";
|
||||
|
||||
const { data: statusData, error: statusError } = useSWR(
|
||||
`/api/kubernetes/status/${widget.namespace}/${widget.app}`);
|
||||
`/api/kubernetes/status/${widget.namespace}/${widget.app}?${podSelectorString}`);
|
||||
|
||||
const { data: statsData, error: statsError } = useSWR(
|
||||
`/api/kubernetes/stats/${widget.namespace}/${widget.app}`);
|
||||
`/api/kubernetes/stats/${widget.namespace}/${widget.app}?${podSelectorString}`);
|
||||
|
||||
if (statsError || statusError) {
|
||||
return <Container error={t("widget.api_error")} />;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue