Event webhooks: game_server.started and game_server.stopped

Sent for every Fragnet game server seen turned on or off, whatever the notification switch says, with the server, game, account and, when a power signal sent from here caused it, which signal and who sent it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-11-14 22:59:40 +01:00
1 parent 2986734196
commit 25183c0320
10 files changed
+127 -9

No files matched your search

+1 -1
View File
@@ -1040,7 +1040,7 @@ export interface MetricsToken {
lastUsedAt: string | null;
}
export type WebhookEventName = "alert.opened" | "alert.resolved" | "maintenance.started" | "maintenance.ended";
export type WebhookEventName = "alert.opened" | "alert.resolved" | "maintenance.started" | "maintenance.ended" | "game_server.started" | "game_server.stopped";
/** A URL sent a signed JSON message when something happens. */
export interface EventWebhook {
+2
View File
@@ -58,6 +58,8 @@ export const sv: Record<string, string> = {
"90 days": "90 dagar",
"A display is a screen with its own address — the hall TV, the office monitor — that shows the pages you choose, in your order, at the speed you choose. Open it from the user menu's Wall display, or bookmark its address on the screen it is for. It chooses among the pages the board has; what the board shows does not change.": "En display är en skärm med en egen adress — hallens TV, kontorets skärm — som visar de sidor du väljer, i den ordning du väljer, i den takt du väljer. Öppna den från Väggskärm i användarmenyn, eller bokmärk dess adress på skärmen den är till för. Den väljer bland de sidor tavlan har; vad tavlan visar ändras inte.",
"A full-screen status board for a spare monitor or tablet": "En helskärmsöversikt för en ledig skärm eller surfplatta",
"A game server turns off": "En spelserver slås av",
"A game server turns on": "En spelserver slås på",
"A job about this": "Ett jobb om det här",
"A job to add": "Ett jobb att lägga till",
"A name like Europe/Stockholm, so 02:00 stays 02:00 in summer and winter.": "Ett namn som Europe/Stockholm, så att 02:00 förblir 02:00 sommar som vinter.",
+3 -1
View File
@@ -16,6 +16,8 @@ const EVENT_WORDS: Record<WebhookEventName, string> = {
"alert.resolved": "A problem ends",
"maintenance.started": "Maintenance begins",
"maintenance.ended": "Maintenance ends",
"game_server.started": "A game server turns on",
"game_server.stopped": "A game server turns off",
};
const hostOf = (address: string) => {
@@ -354,7 +356,7 @@ export default function ApiSettings() {
))}
{hooks === null && <LoadingRow colSpan={4} />}
{hooks?.length === 0 && (
<EmptyRow colSpan={4} title="No webhooks yet" hint="A webhook tells another system when an alert opens or resolves, or when maintenance starts or ends." action={{ label: "Add a webhook", onClick: () => setAdding(true) }} />
<EmptyRow colSpan={4} title="No webhooks yet" hint="A webhook tells another system when an alert opens or resolves, when maintenance starts or ends, or when a game server is turned on or off." action={{ label: "Add a webhook", onClick: () => setAdding(true) }} />
)}
</tbody>
</table>