feat(status): add router configurations and update InfraType to include routers

This commit is contained in:
2025-11-07 10:49:56 +01:00
parent c99c11c241
commit a5476b26fe
3 changed files with 47 additions and 3 deletions

View File

@@ -18,4 +18,10 @@ DB_DATABASE=protojx_manager
DB_LOGGING=false DB_LOGGING=false
# Environment # Environment
NODE_ENV=development NODE_ENV=development
# Protected IPS
PROTOJX_ROUTER_1=
PROTOJX_ROUTER_2=
PROTOJX_ROUTER_3=
PROTOJX_ROUTER_4=

View File

@@ -109,7 +109,40 @@ export class StatusService {
ping_type: 'ping', ping_type: 'ping',
type: 'games', type: 'games',
notify: true notify: true
} },
// Routers
{
host: process.env.PROTOJX_ROUTER_1 as string,
name: 'ROUTER-FR 01',
alive: false,
ping_type: 'ping',
type: 'router',
notify: false
},
{
host: process.env.PROTOJX_ROUTER_2 as string,
name: 'ROUTER-FR 02',
alive: false,
ping_type: 'ping',
type: 'router',
notify: false
},
{
host: process.env.PROTOJX_ROUTER_3 as string,
name: 'ROUTER-DE 03',
alive: false,
ping_type: 'ping',
type: 'router',
notify: false
},
{
host: process.env.PROTOJX_ROUTER_1 as string,
name: 'ROUTER-DE 04',
alive: false,
ping_type: 'ping',
type: 'router',
notify: false
},
]; ];
private client: Client | null = null; private client: Client | null = null;
@@ -294,6 +327,11 @@ export class StatusService {
title: 'Games', title: 'Games',
type: 'games', type: 'games',
thumbnail: 'https://protojx.com/assets/img/hero-img.png' thumbnail: 'https://protojx.com/assets/img/hero-img.png'
},
{
title: 'Routers',
type: 'router',
thumbnail: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRMnCmtQRkLlcD1Cb6vKXz6NOxAu79vzmq2pRqpNYxpTJa5JQEsouhqnVn7cyl6ivYSyzY&usqp=CAU'
} }
] ]

2
src/type.d.ts vendored
View File

@@ -1,6 +1,6 @@
import { ButtonInteraction, ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js"; import { ButtonInteraction, ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js";
export type InfraType = 'website' | 'ryzen' | 'xeon' | 'games'; export type InfraType = 'website' | 'ryzen' | 'xeon' | 'games' | 'router';
export type Host = { export type Host = {
host: string, host: string,
name: string, name: string,