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:
1 parent
174cb651b4
commit
09eb172079
8 files changed
+65
-40
No files matched your search
@@ -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")} />;
|
||||
|
||||
Reference in new issue
Block a user