fix: update Configuration Status card labels and add new rows

Notifications section: renamed Notification agents to Channels,
Notification routing to Routing, added Mute Rules row linking to
notification-suppression settings.

Security section: added Trivy installed Yes/No row, renamed
Vulnerability scanning to Scan policies.

Backend: added trivyInstalled and suppressionRules fields to
the /dashboard/configuration payload.
This commit is contained in:
SaelixCode
2026-07-05 23:19:39 -04:00
parent 5d798b36bf
commit eef1b72249
4 changed files with 31 additions and 8 deletions
+8
View File
@@ -1,6 +1,7 @@
import { Router, type Request, type Response } from 'express';
import { DatabaseService, type StackRestartSummary } from '../services/DatabaseService';
import { CloudBackupService } from '../services/CloudBackupService';
import TrivyService from '../services/TrivyService';
import { effectiveTier } from '../middleware/tierGates';
import { isDebugEnabled } from '../utils/debug';
import type { LicenseTier } from '../services/license-types';
@@ -18,6 +19,7 @@ export interface ConfigurationStatus {
agents: { discord: AgentStatus; slack: AgentStatus; webhook: AgentStatus };
alertRules: number;
routingRules: { count: number; enabledCount: number; locked: boolean };
suppressionRules: { total: number; enabledCount: number };
};
automation: {
autoHeal: { total: number; enabled: number };
@@ -29,6 +31,7 @@ export interface ConfigurationStatus {
mfaEnabled: boolean | null;
ssoEnabled: boolean;
ssoProvider: string | null;
trivyInstalled: boolean;
scanPolicies: { total: number; enabled: number; locked: boolean };
};
thresholds: {
@@ -101,6 +104,10 @@ export function buildLocalConfigurationStatus(
enabledCount: notifRoutes.filter(r => r.enabled).length,
locked: false,
},
suppressionRules: (() => {
const rules = db.getNotificationSuppressionRules();
return { total: rules.length, enabledCount: rules.filter(r => r.enabled).length };
})(),
},
automation: {
autoHeal: {
@@ -128,6 +135,7 @@ export function buildLocalConfigurationStatus(
mfaEnabled: mfaRow ? mfaRow.enabled === 1 : null,
ssoEnabled: !!enabledSso,
ssoProvider: enabledSso?.provider ?? null,
trivyInstalled: TrivyService.getInstance().getSource() !== 'none',
// Scan policies are available on every tier.
scanPolicies: {
total: scanPolicies.length,