fix: fetching game/grpc/websocket as well for statusPage
This commit is contained in:
1 parent
622446c308
commit
115fcc67f6
1 file changed
+9
-3
@@ -54,9 +54,15 @@ const CreateStatusPage = () => {
|
|||||||
isCreate ? null : `/status-page/${url}?type=uptime&type=infrastructure`
|
isCreate ? null : `/status-page/${url}?type=uptime&type=infrastructure`
|
||||||
);
|
);
|
||||||
|
|
||||||
const { data: monitorsResponse } = useGet<Monitor[]>(
|
const monitorsUrl = useMemo(() => {
|
||||||
"/monitors/team?type=http&type=ping&type=port&type=docker&type=hardware"
|
const params = new URLSearchParams();
|
||||||
);
|
["http", "ping", "port", "docker", "game", "grpc", "websocket", "hardware"].forEach(
|
||||||
|
(type) => params.append("type", type)
|
||||||
|
);
|
||||||
|
return `/monitors/team?${params.toString()}`;
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const { data: monitorsResponse } = useGet<Monitor[]>(monitorsUrl);
|
||||||
const monitors = monitorsResponse ?? [];
|
const monitors = monitorsResponse ?? [];
|
||||||
|
|
||||||
const { post, loading: isSubmittingPost } = usePost();
|
const { post, loading: isSubmittingPost } = usePost();
|
||||||
|
|||||||
Reference in new issue
Block a user