From 42e7bc1dbf787bdcb10c49709ac790dde158af86 Mon Sep 17 00:00:00 2001 From: Br0wnHammer Date: Thu, 19 Feb 2026 13:02:38 +0530 Subject: [PATCH] Feat: Add gRPC to filters --- client/src/Components/monitors/ControlsFilter.tsx | 12 ++++++++++-- client/src/Pages/Uptime/Monitors/index.tsx | 2 +- client/src/Utils/MonitorUtils.ts | 1 + client/src/locales/en.json | 7 +++++++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/client/src/Components/monitors/ControlsFilter.tsx b/client/src/Components/monitors/ControlsFilter.tsx index e37408819..705435e6a 100644 --- a/client/src/Components/monitors/ControlsFilter.tsx +++ b/client/src/Components/monitors/ControlsFilter.tsx @@ -6,7 +6,15 @@ import useMediaQuery from "@mui/material/useMediaQuery"; import type { MonitorType } from "@/Types/Monitor"; import { Typography, useTheme } from "@mui/material"; -const types = ["http", "ping", "port", "docker", "game"]; +const types = ["http", "ping", "port", "docker", "game", "grpc"]; +const typeDisplayNames: Record = { + http: "HTTP", + ping: "Ping", + port: "Port", + docker: "Docker", + game: "Game", + grpc: "gRPC", +}; const statuses = ["up", "down"]; const states = ["active", "paused"]; @@ -50,7 +58,7 @@ export const ControlsFilter = ({ key={type} value={type} > - {type} + {typeDisplayNames[type] ?? type} ))} diff --git a/client/src/Pages/Uptime/Monitors/index.tsx b/client/src/Pages/Uptime/Monitors/index.tsx index 5c419738b..4251e5edf 100644 --- a/client/src/Pages/Uptime/Monitors/index.tsx +++ b/client/src/Pages/Uptime/Monitors/index.tsx @@ -68,7 +68,7 @@ const UptimeMonitorsPage = () => { // Default to all types when none selected const effectiveTypes = - selectedTypes.length > 0 ? selectedTypes : ["http", "ping", "docker", "port", "game"]; + selectedTypes.length > 0 ? selectedTypes : ["http", "ping", "docker", "port", "game", "grpc"]; // Build URL for monitors with checks const monitorsWithChecksUrl = useMemo(() => { diff --git a/client/src/Utils/MonitorUtils.ts b/client/src/Utils/MonitorUtils.ts index a19316c62..ad744ba6d 100644 --- a/client/src/Utils/MonitorUtils.ts +++ b/client/src/Utils/MonitorUtils.ts @@ -8,6 +8,7 @@ export const getMonitorPath = (type: MonitorType): string => { port: "uptime", ping: "uptime", game: "uptime", + grpc: "uptime", unknown: "uptime", docker: "uptime", hardware: "infrastructure", diff --git a/client/src/locales/en.json b/client/src/locales/en.json index bb740cd13..6d45fadeb 100644 --- a/client/src/locales/en.json +++ b/client/src/locales/en.json @@ -481,6 +481,10 @@ "port": { "label": "Port to monitor", "placeholder": 80 + }, + "grpcServiceName": { + "label": "Service name", + "placeholder": "e.g. my.service.v1 (leave empty for overall health)" } }, "title": "General settings", @@ -491,6 +495,7 @@ "docker": "Enter the Docker container name or ID. You can use either the container name (e.g., my-app) or the container ID (full 64-char ID or short ID).", "game": "Enter the IP address or hostname and the port number to ping (e.g., 192.168.1.100 or example.com) and choose game type.", "pagespeed": "Track page load performance, Core Web Vitals, and optimization scores for your website.", + "grpc": "Enter the hostname and port of the gRPC server, optionally specify a service name for the health check, and add a display name.", "hardware": "Monitor CPU, memory, disk usage, and temperature for your infrastructure." } }, @@ -525,6 +530,8 @@ "optionDockerDescription": "Use Docker to monitor if a container is running.", "optionGame": "Game", "optionGameDescription": "Monitor if a specific game server is online.", + "optionGrpc": "gRPC", + "optionGrpcDescription": "Monitor gRPC services using the standard Health Checking Protocol.", "optionHttp": "HTTP(S)", "optionHttpDescription": "Use HTTP(S) to monitor your website or API endpoint.", "optionPing": "Ping",