feat: add alert management functionality in NotificationSettingsModal and implement stacks API endpoint

This commit is contained in:
SaelixCode
2026-02-27 09:52:54 -05:00
parent 0899fc0d64
commit 9cdf273b8c
4 changed files with 255 additions and 3 deletions
+4
View File
@@ -0,0 +1,4 @@
# Netscape HTTP Cookie File
# https://curl.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
+2 -2
View File
@@ -6,7 +6,7 @@
"scripts": {
"build": "tsc",
"start": "node dist/index.js",
"dev": "nodemon --exec ts-node src/index.ts",
"dev": "nodemon --watch src --ext ts,json --exec ts-node src/index.ts",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
@@ -42,4 +42,4 @@
"ws": "^8.19.0",
"yaml": "^2.8.2"
}
}
}
+9
View File
@@ -663,6 +663,15 @@ app.get('/api/system/stats', async (req: Request, res: Response) => {
// --- Notification & Alerting Routes ---
app.get('/api/stacks', async (req: Request, res: Response) => {
try {
const stacks = await fileSystemService.getStacks();
res.json(stacks);
} catch (error) {
res.status(500).json({ error: 'Failed to fetch stacks' });
}
});
app.get('/api/agents', async (req: Request, res: Response) => {
try {
const agents = DatabaseService.getInstance().getAgents();