Files
prowler/ui/components/graphs/shared/constants.ts
T
Alan Buscaglia b9747dc604 feat(ui): add ThreatMap component and refactor chart color system
- Add ThreatMap component with world map visualization
- Refactor chart colors to use chart- prefix in CSS variables
- Update all graph components to use new color system
- Add topojson-client and d3-geo dependencies
2025-10-17 10:45:23 +02:00

48 lines
1.2 KiB
TypeScript

export const SEVERITY_COLORS = {
Informational: "var(--chart-info)",
Info: "var(--chart-info)",
Low: "var(--chart-warning)",
Medium: "var(--chart-warning-emphasis)",
High: "var(--chart-danger)",
Critical: "var(--chart-danger-emphasis)",
} as const;
export const CHART_COLORS = {
tooltipBorder: "var(--chart-border-emphasis)",
tooltipBackground: "var(--chart-background)",
textPrimary: "#ffffff",
textSecondary: "var(--chart-text-secondary)",
gridLine: "var(--chart-border-emphasis)",
backgroundTrack: "rgba(51, 65, 85, 0.5)", // slate-700 with 50% opacity
alertPillBg: "var(--chart-alert-bg)",
alertPillText: "var(--chart-alert-text)",
defaultColor: "#64748b", // slate-500
} as const;
export const CHART_DIMENSIONS = {
defaultHeight: 400,
tooltipMinWidth: "200px",
borderRadius: "8px",
} as const;
export const SORT_OPTIONS = {
highLow: "high-low",
lowHigh: "low-high",
alphabetical: "alphabetical",
} as const;
export const DEFAULT_SORT_OPTION = SORT_OPTIONS.highLow;
export const SEVERITY_ORDER = {
Critical: 0,
High: 1,
Medium: 2,
Low: 3,
Informational: 4,
} as const;
export const LAYOUT_OPTIONS = {
horizontal: "horizontal",
vertical: "vertical",
} as const;