mirror of
https://github.com/thedrewen/protojx-manager.git
synced 2026-03-21 09:48:56 +01:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2aa5c56ca7 | |||
| 7b35fcf31b | |||
| a5476b26fe | |||
| c99c11c241 | |||
| df048c1352 | |||
| 290e8b982a | |||
| 8bfeb1c43c | |||
| e2a8255d5a | |||
| 85ec27cb2b |
@@ -18,4 +18,10 @@ DB_DATABASE=protojx_manager
|
||||
DB_LOGGING=false
|
||||
|
||||
# Environment
|
||||
NODE_ENV=development
|
||||
NODE_ENV=development
|
||||
|
||||
# Protected IPS
|
||||
PROTOJX_ROUTER_1=
|
||||
PROTOJX_ROUTER_2=
|
||||
PROTOJX_ROUTER_3=
|
||||
PROTOJX_ROUTER_4=
|
||||
@@ -7,6 +7,6 @@ COPY . .
|
||||
RUN apt-get update && apt-get install -y iputils-ping
|
||||
RUN npm i
|
||||
|
||||
RUN npm register
|
||||
# RUN npm run register
|
||||
|
||||
CMD [ "npm", "run", "start" ]
|
||||
@@ -15,16 +15,16 @@ export class StatusService {
|
||||
|
||||
public hosts: Host[] = [
|
||||
{
|
||||
'host': 'https://protojx.com',
|
||||
'name': 'Protojx Website',
|
||||
host: 'https://protojx.com',
|
||||
name: 'Protojx Website',
|
||||
alive: false,
|
||||
ping_type: 'website',
|
||||
type: 'website',
|
||||
notify: false
|
||||
},
|
||||
{
|
||||
'host': 'https://manager.protojx.com',
|
||||
'name': 'Espace Client',
|
||||
host: 'https://manager.protojx.com',
|
||||
name: 'Espace Client',
|
||||
alive: false,
|
||||
ping_type: 'website',
|
||||
type: 'website',
|
||||
@@ -94,6 +94,14 @@ export class StatusService {
|
||||
type: 'games',
|
||||
notify: true
|
||||
},
|
||||
{
|
||||
host: '5.178.99.17',
|
||||
name: 'RYZEN-GAME 02',
|
||||
alive: false,
|
||||
ping_type: 'ping',
|
||||
type: 'games',
|
||||
notify: true
|
||||
},
|
||||
{
|
||||
host: '5.178.99.63',
|
||||
name: 'XEON-GAME 01',
|
||||
@@ -101,7 +109,40 @@ export class StatusService {
|
||||
ping_type: 'ping',
|
||||
type: 'games',
|
||||
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_4 as string,
|
||||
name: 'ROUTER-DE 04',
|
||||
alive: false,
|
||||
ping_type: 'ping',
|
||||
type: 'router',
|
||||
notify: false
|
||||
},
|
||||
];
|
||||
|
||||
private client: Client | null = null;
|
||||
@@ -286,6 +327,11 @@ export class StatusService {
|
||||
title: 'Games',
|
||||
type: 'games',
|
||||
thumbnail: 'https://protojx.com/assets/img/hero-img.png'
|
||||
},
|
||||
{
|
||||
title: 'Routers\n-# *The data displayed here is not real data but demonstration data. (Beta)*',
|
||||
type: 'router',
|
||||
thumbnail: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRMnCmtQRkLlcD1Cb6vKXz6NOxAu79vzmq2pRqpNYxpTJa5JQEsouhqnVn7cyl6ivYSyzY&usqp=CAU'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -297,14 +343,16 @@ export class StatusService {
|
||||
(text) =>
|
||||
text.setContent('## ' + sectionData.title + '\n' + hostTexts.filter((v) => v.type == sectionData.type).map((v) => v.value).join('\n'))
|
||||
)
|
||||
.setThumbnailAccessory(
|
||||
(acc) =>
|
||||
acc.setURL(sectionData.thumbnail)
|
||||
)
|
||||
.setThumbnailAccessory(
|
||||
(acc) =>
|
||||
acc.setURL(sectionData.thumbnail)
|
||||
)
|
||||
)
|
||||
});
|
||||
|
||||
container.addTextDisplayComponents((text) => text.setContent(`${live ? 'Last update : ' : ''}<t:${dayjs().unix()}:f> - Receive automatic notifications when there is an outage with /follow !`));
|
||||
container.addSeparatorComponents((s) => s);
|
||||
|
||||
container.addTextDisplayComponents((text) => text.setContent(`:globe_with_meridians: Website Status : https://statut.protojx.com/\n${live ? 'Last update : ' : ''}<t:${dayjs().unix()}:f> - Receive automatic notifications when there is an outage with /follow !`));
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
2
src/type.d.ts
vendored
2
src/type.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
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 = {
|
||||
host: string,
|
||||
name: string,
|
||||
|
||||
Reference in New Issue
Block a user