Files
cve-dashboard/frontend/src/App.js

188 lines
9.0 KiB
JavaScript
Raw Normal View History

Refactor home page: extract components, add toast system, debounce search Major restructuring of the monolithic App.js (2484 lines) into focused, testable components: Architecture: - App.js is now a 189-line routing shell (header, nav, page switching) - HomePage.js orchestrates all home page state and layout - Each visual section is its own component with clear props API Extracted components: - StatsBar: clickable stat cards that filter by severity - QuickCVELookup: CVE existence check with inline results - CVEFilters: search + vendor/severity dropdowns - CVECard: expandable CVE with vendor entries, docs, tickets - OpenTicketsPanel: right sidebar open JIRA tickets - IvantiWorkflowPanel: right sidebar Ivanti workflow status + archive Extracted modals: - AddCVEModal: self-contained add form with NVD auto-fill - EditCVEModal: self-contained edit form with NVD update - JiraTicketModal: unified add/edit JIRA ticket modal - ArcherTicketModal: unified add/edit Archer ticket modal Performance optimizations: - Debounced search (300ms) via useDebounce hook — eliminates redundant API calls on every keystroke - Memoized groupedCVEs, openTicketCount, criticalCount via useMemo - Proper state updates (no direct mutation of cveDocuments) - useCallback on fetch functions to stabilize effect dependencies UX improvements: - Toast notification system replaces all alert() calls - Stat cards are now clickable to filter CVE list by severity - onKeyDown replaces deprecated onKeyPress - aria-labels added to interactive elements Infrastructure: - ToastContext with auto-dismiss, typed toasts (success/error/warning/info) - useDebounce custom hook for reuse across the app - Toast slide-in animation in App.css
2026-06-23 11:46:39 -06:00
import React, { useState } from 'react';
import { Plus, RefreshCw, Menu, Loader } from 'lucide-react';
import { useAuth } from './contexts/AuthContext';
import LoginForm from './components/LoginForm';
import UserMenu from './components/UserMenu';
import UserManagement from './components/UserManagement';
2026-01-29 15:10:29 -07:00
import AuditLog from './components/AuditLog';
import NvdSyncModal from './components/NvdSyncModal';
import NavDrawer from './components/NavDrawer';
import AdminScopeToggle from './components/AdminScopeToggle';
import VulnerabilityTriagePage from './components/pages/ReportingPage';
import KnowledgeBasePage from './components/pages/KnowledgeBasePage';
import ExportsPage from './components/pages/ExportsPage';
import CompliancePage from './components/pages/CompliancePage';
import CCPMetricsPage from './components/pages/CCPMetricsPage';
import JiraPage from './components/pages/JiraPage';
import AdminPage from './components/pages/AdminPage';
import ArcherTemplatePage from './components/pages/ArcherTemplatePage';
Refactor home page: extract components, add toast system, debounce search Major restructuring of the monolithic App.js (2484 lines) into focused, testable components: Architecture: - App.js is now a 189-line routing shell (header, nav, page switching) - HomePage.js orchestrates all home page state and layout - Each visual section is its own component with clear props API Extracted components: - StatsBar: clickable stat cards that filter by severity - QuickCVELookup: CVE existence check with inline results - CVEFilters: search + vendor/severity dropdowns - CVECard: expandable CVE with vendor entries, docs, tickets - OpenTicketsPanel: right sidebar open JIRA tickets - IvantiWorkflowPanel: right sidebar Ivanti workflow status + archive Extracted modals: - AddCVEModal: self-contained add form with NVD auto-fill - EditCVEModal: self-contained edit form with NVD update - JiraTicketModal: unified add/edit JIRA ticket modal - ArcherTicketModal: unified add/edit Archer ticket modal Performance optimizations: - Debounced search (300ms) via useDebounce hook — eliminates redundant API calls on every keystroke - Memoized groupedCVEs, openTicketCount, criticalCount via useMemo - Proper state updates (no direct mutation of cveDocuments) - useCallback on fetch functions to stabilize effect dependencies UX improvements: - Toast notification system replaces all alert() calls - Stat cards are now clickable to filter CVE list by severity - onKeyDown replaces deprecated onKeyPress - aria-labels added to interactive elements Infrastructure: - ToastContext with auto-dismiss, typed toasts (success/error/warning/info) - useDebounce custom hook for reuse across the app - Toast slide-in animation in App.css
2026-06-23 11:46:39 -06:00
import HomePage from './components/pages/HomePage';
import FeedbackModal from './components/FeedbackModal';
import NotificationBell from './components/NotificationBell';
import { canAccessPage } from './config/pageVisibility';
2026-02-10 10:12:56 -07:00
import './App.css';
export default function App() {
const { isAuthenticated, loading: authLoading, canWrite, user } = useAuth();
Refactor home page: extract components, add toast system, debounce search Major restructuring of the monolithic App.js (2484 lines) into focused, testable components: Architecture: - App.js is now a 189-line routing shell (header, nav, page switching) - HomePage.js orchestrates all home page state and layout - Each visual section is its own component with clear props API Extracted components: - StatsBar: clickable stat cards that filter by severity - QuickCVELookup: CVE existence check with inline results - CVEFilters: search + vendor/severity dropdowns - CVECard: expandable CVE with vendor entries, docs, tickets - OpenTicketsPanel: right sidebar open JIRA tickets - IvantiWorkflowPanel: right sidebar Ivanti workflow status + archive Extracted modals: - AddCVEModal: self-contained add form with NVD auto-fill - EditCVEModal: self-contained edit form with NVD update - JiraTicketModal: unified add/edit JIRA ticket modal - ArcherTicketModal: unified add/edit Archer ticket modal Performance optimizations: - Debounced search (300ms) via useDebounce hook — eliminates redundant API calls on every keystroke - Memoized groupedCVEs, openTicketCount, criticalCount via useMemo - Proper state updates (no direct mutation of cveDocuments) - useCallback on fetch functions to stabilize effect dependencies UX improvements: - Toast notification system replaces all alert() calls - Stat cards are now clickable to filter CVE list by severity - onKeyDown replaces deprecated onKeyPress - aria-labels added to interactive elements Infrastructure: - ToastContext with auto-dismiss, typed toasts (success/error/warning/info) - useDebounce custom hook for reuse across the app - Toast slide-in animation in App.css
2026-06-23 11:46:39 -06:00
const [currentPage, setCurrentPageRaw] = useState(() => {
try {
const saved = localStorage.getItem('cve-dashboard-page');
return saved && canAccessPage(saved, user?.group) ? saved : 'home';
} catch { return 'home'; }
});
const setCurrentPage = (page) => {
if (!canAccessPage(page, user?.group)) { setCurrentPageRaw('home'); return; }
setCurrentPageRaw(page);
try { localStorage.setItem('cve-dashboard-page', page); } catch {}
};
Refactor home page: extract components, add toast system, debounce search Major restructuring of the monolithic App.js (2484 lines) into focused, testable components: Architecture: - App.js is now a 189-line routing shell (header, nav, page switching) - HomePage.js orchestrates all home page state and layout - Each visual section is its own component with clear props API Extracted components: - StatsBar: clickable stat cards that filter by severity - QuickCVELookup: CVE existence check with inline results - CVEFilters: search + vendor/severity dropdowns - CVECard: expandable CVE with vendor entries, docs, tickets - OpenTicketsPanel: right sidebar open JIRA tickets - IvantiWorkflowPanel: right sidebar Ivanti workflow status + archive Extracted modals: - AddCVEModal: self-contained add form with NVD auto-fill - EditCVEModal: self-contained edit form with NVD update - JiraTicketModal: unified add/edit JIRA ticket modal - ArcherTicketModal: unified add/edit Archer ticket modal Performance optimizations: - Debounced search (300ms) via useDebounce hook — eliminates redundant API calls on every keystroke - Memoized groupedCVEs, openTicketCount, criticalCount via useMemo - Proper state updates (no direct mutation of cveDocuments) - useCallback on fetch functions to stabilize effect dependencies UX improvements: - Toast notification system replaces all alert() calls - Stat cards are now clickable to filter CVE list by severity - onKeyDown replaces deprecated onKeyPress - aria-labels added to interactive elements Infrastructure: - ToastContext with auto-dismiss, typed toasts (success/error/warning/info) - useDebounce custom hook for reuse across the app - Toast slide-in animation in App.css
2026-06-23 11:46:39 -06:00
const [navOpen, setNavOpen] = useState(false);
const [calendarFilter, setCalendarFilter] = useState(null);
const [reportingExcFilter, setReportingExcFilter] = useState(null);
const [showAddCVE, setShowAddCVE] = useState(false);
const [showUserManagement, setShowUserManagement] = useState(false);
2026-01-29 15:10:29 -07:00
const [showAuditLog, setShowAuditLog] = useState(false);
const [showFeedback, setShowFeedback] = useState(false);
const [feedbackType, setFeedbackType] = useState('bug');
const [showNvdSync, setShowNvdSync] = useState(false);
Refactor home page: extract components, add toast system, debounce search Major restructuring of the monolithic App.js (2484 lines) into focused, testable components: Architecture: - App.js is now a 189-line routing shell (header, nav, page switching) - HomePage.js orchestrates all home page state and layout - Each visual section is its own component with clear props API Extracted components: - StatsBar: clickable stat cards that filter by severity - QuickCVELookup: CVE existence check with inline results - CVEFilters: search + vendor/severity dropdowns - CVECard: expandable CVE with vendor entries, docs, tickets - OpenTicketsPanel: right sidebar open JIRA tickets - IvantiWorkflowPanel: right sidebar Ivanti workflow status + archive Extracted modals: - AddCVEModal: self-contained add form with NVD auto-fill - EditCVEModal: self-contained edit form with NVD update - JiraTicketModal: unified add/edit JIRA ticket modal - ArcherTicketModal: unified add/edit Archer ticket modal Performance optimizations: - Debounced search (300ms) via useDebounce hook — eliminates redundant API calls on every keystroke - Memoized groupedCVEs, openTicketCount, criticalCount via useMemo - Proper state updates (no direct mutation of cveDocuments) - useCallback on fetch functions to stabilize effect dependencies UX improvements: - Toast notification system replaces all alert() calls - Stat cards are now clickable to filter CVE list by severity - onKeyDown replaces deprecated onKeyPress - aria-labels added to interactive elements Infrastructure: - ToastContext with auto-dismiss, typed toasts (success/error/warning/info) - useDebounce custom hook for reuse across the app - Toast slide-in animation in App.css
2026-06-23 11:46:39 -06:00
// Navigation handler that accepts optional context (filters)
const handleNavigate = (page, context) => {
if (page === 'triage') {
setCalendarFilter(context?.calendarFilter || null);
setReportingExcFilter(context?.reportingExcFilter || null);
}
Refactor home page: extract components, add toast system, debounce search Major restructuring of the monolithic App.js (2484 lines) into focused, testable components: Architecture: - App.js is now a 189-line routing shell (header, nav, page switching) - HomePage.js orchestrates all home page state and layout - Each visual section is its own component with clear props API Extracted components: - StatsBar: clickable stat cards that filter by severity - QuickCVELookup: CVE existence check with inline results - CVEFilters: search + vendor/severity dropdowns - CVECard: expandable CVE with vendor entries, docs, tickets - OpenTicketsPanel: right sidebar open JIRA tickets - IvantiWorkflowPanel: right sidebar Ivanti workflow status + archive Extracted modals: - AddCVEModal: self-contained add form with NVD auto-fill - EditCVEModal: self-contained edit form with NVD update - JiraTicketModal: unified add/edit JIRA ticket modal - ArcherTicketModal: unified add/edit Archer ticket modal Performance optimizations: - Debounced search (300ms) via useDebounce hook — eliminates redundant API calls on every keystroke - Memoized groupedCVEs, openTicketCount, criticalCount via useMemo - Proper state updates (no direct mutation of cveDocuments) - useCallback on fetch functions to stabilize effect dependencies UX improvements: - Toast notification system replaces all alert() calls - Stat cards are now clickable to filter CVE list by severity - onKeyDown replaces deprecated onKeyPress - aria-labels added to interactive elements Infrastructure: - ToastContext with auto-dismiss, typed toasts (success/error/warning/info) - useDebounce custom hook for reuse across the app - Toast slide-in animation in App.css
2026-06-23 11:46:39 -06:00
setCurrentPage(page);
};
// Show loading while checking auth
if (authLoading) {
return (
<div className="min-h-screen bg-gray-100 flex items-center justify-center">
<div className="text-center">
<Loader className="w-12 h-12 text-[#0476D9] mx-auto animate-spin" />
<p className="text-gray-600 mt-4">Loading...</p>
</div>
</div>
);
}
// Show login if not authenticated
if (!isAuthenticated) {
return <LoginForm />;
}
return (
Transform CVE Dashboard to tactical intelligence platform aesthetic Implemented a sophisticated cyber-intelligence visual design with: DESIGN DIRECTION: - "Tactical Intelligence Command Center" aesthetic - Typography: JetBrains Mono for data/code + Outfit for UI labels - Color Palette: Deep navy (#0A0E27) base with electric cyan (#00D9FF) accents - Visual Language: Grid patterns, glowing borders, scanning animations - Motion: Smooth fade-ins, pulse effects, hover transformations FRONTEND CHANGES: - Redesigned App.css with comprehensive intelligence dashboard theme - Custom CSS classes: intel-card, intel-button, intel-input, status-badge - Added scanning line animations and pulse glow effects - Implemented grid background pattern and scrollbar styling COMPONENT UPDATES: - App.js: Transformed all UI sections to intel theme - Header with stats dashboard - Search/filter cards - CVE list with expandable cards - Document management - Quick check interface - JIRA ticket tracking - LoginForm.js: Redesigned authentication portal - All modals: Add/Edit CVE, Add/Edit JIRA tickets UI FEATURES: - Monospace fonts for technical data - Glowing accent borders on interactive elements - Status badges with animated pulse indicators - Data rows with hover states - Responsive grid layouts - Modal overlays with backdrop blur TECHNICAL: - Tailwind CSS extended with custom intel theme - Google Fonts: JetBrains Mono & Outfit - Maintained all existing functionality - Build tested successfully - No breaking changes to business logic Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 09:34:22 -07:00
<div className="min-h-screen bg-intel-darkest grid-bg p-6 relative overflow-hidden fade-in">
<NavDrawer
isOpen={navOpen}
onClose={() => setNavOpen(false)}
currentPage={currentPage}
onNavigate={(page) => {
if (page === 'triage') { setCalendarFilter(null); setReportingExcFilter(null); }
setCurrentPage(page);
}}
/>
Transform CVE Dashboard to tactical intelligence platform aesthetic Implemented a sophisticated cyber-intelligence visual design with: DESIGN DIRECTION: - "Tactical Intelligence Command Center" aesthetic - Typography: JetBrains Mono for data/code + Outfit for UI labels - Color Palette: Deep navy (#0A0E27) base with electric cyan (#00D9FF) accents - Visual Language: Grid patterns, glowing borders, scanning animations - Motion: Smooth fade-ins, pulse effects, hover transformations FRONTEND CHANGES: - Redesigned App.css with comprehensive intelligence dashboard theme - Custom CSS classes: intel-card, intel-button, intel-input, status-badge - Added scanning line animations and pulse glow effects - Implemented grid background pattern and scrollbar styling COMPONENT UPDATES: - App.js: Transformed all UI sections to intel theme - Header with stats dashboard - Search/filter cards - CVE list with expandable cards - Document management - Quick check interface - JIRA ticket tracking - LoginForm.js: Redesigned authentication portal - All modals: Add/Edit CVE, Add/Edit JIRA tickets UI FEATURES: - Monospace fonts for technical data - Glowing accent borders on interactive elements - Status badges with animated pulse indicators - Data rows with hover states - Responsive grid layouts - Modal overlays with backdrop blur TECHNICAL: - Tailwind CSS extended with custom intel theme - Google Fonts: JetBrains Mono & Outfit - Maintained all existing functionality - Build tested successfully - No breaking changes to business logic Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 09:34:22 -07:00
{/* Scanning line effect */}
<div className="scan-line"></div>
<div className={`${currentPage === 'triage' ? 'w-full' : 'max-w-7xl mx-auto'} relative z-10`}>
{/* Header */}
Transform CVE Dashboard to tactical intelligence platform aesthetic Implemented a sophisticated cyber-intelligence visual design with: DESIGN DIRECTION: - "Tactical Intelligence Command Center" aesthetic - Typography: JetBrains Mono for data/code + Outfit for UI labels - Color Palette: Deep navy (#0A0E27) base with electric cyan (#00D9FF) accents - Visual Language: Grid patterns, glowing borders, scanning animations - Motion: Smooth fade-ins, pulse effects, hover transformations FRONTEND CHANGES: - Redesigned App.css with comprehensive intelligence dashboard theme - Custom CSS classes: intel-card, intel-button, intel-input, status-badge - Added scanning line animations and pulse glow effects - Implemented grid background pattern and scrollbar styling COMPONENT UPDATES: - App.js: Transformed all UI sections to intel theme - Header with stats dashboard - Search/filter cards - CVE list with expandable cards - Document management - Quick check interface - JIRA ticket tracking - LoginForm.js: Redesigned authentication portal - All modals: Add/Edit CVE, Add/Edit JIRA tickets UI FEATURES: - Monospace fonts for technical data - Glowing accent borders on interactive elements - Status badges with animated pulse indicators - Data rows with hover states - Responsive grid layouts - Modal overlays with backdrop blur TECHNICAL: - Tailwind CSS extended with custom intel theme - Google Fonts: JetBrains Mono & Outfit - Maintained all existing functionality - Build tested successfully - No breaking changes to business logic Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 09:34:22 -07:00
<div className="mb-8">
<div className="flex justify-between items-start mb-6">
<div className="flex items-center gap-4 flex-1">
<button
onClick={() => setNavOpen(true)}
style={{ background: 'none', border: '1px solid rgba(14, 165, 233, 0.25)', borderRadius: '0.375rem', padding: '0.5rem', cursor: 'pointer', color: '#64748B', flexShrink: 0 }}
onMouseEnter={e => { e.currentTarget.style.color = '#0EA5E9'; e.currentTarget.style.borderColor = 'rgba(14, 165, 233, 0.6)'; }}
onMouseLeave={e => { e.currentTarget.style.color = '#64748B'; e.currentTarget.style.borderColor = 'rgba(14, 165, 233, 0.25)'; }}
title="Navigation"
>
<Menu className="w-5 h-5" />
</button>
<div>
<div className="flex items-center gap-3">
<img src="/shieldlogo.jpeg" alt="AEGIS" style={{ width: '44px', height: '44px', borderRadius: '6px' }} />
<div>
<h1 className="text-4xl font-bold text-intel-accent mb-1 font-mono tracking-tight">
AEGIS
</h1>
<p className="text-gray-400 text-sm font-sans">Advanced Engineering Group Intelligence System</p>
</div>
</div>
</div>
Transform CVE Dashboard to tactical intelligence platform aesthetic Implemented a sophisticated cyber-intelligence visual design with: DESIGN DIRECTION: - "Tactical Intelligence Command Center" aesthetic - Typography: JetBrains Mono for data/code + Outfit for UI labels - Color Palette: Deep navy (#0A0E27) base with electric cyan (#00D9FF) accents - Visual Language: Grid patterns, glowing borders, scanning animations - Motion: Smooth fade-ins, pulse effects, hover transformations FRONTEND CHANGES: - Redesigned App.css with comprehensive intelligence dashboard theme - Custom CSS classes: intel-card, intel-button, intel-input, status-badge - Added scanning line animations and pulse glow effects - Implemented grid background pattern and scrollbar styling COMPONENT UPDATES: - App.js: Transformed all UI sections to intel theme - Header with stats dashboard - Search/filter cards - CVE list with expandable cards - Document management - Quick check interface - JIRA ticket tracking - LoginForm.js: Redesigned authentication portal - All modals: Add/Edit CVE, Add/Edit JIRA tickets UI FEATURES: - Monospace fonts for technical data - Glowing accent borders on interactive elements - Status badges with animated pulse indicators - Data rows with hover states - Responsive grid layouts - Modal overlays with backdrop blur TECHNICAL: - Tailwind CSS extended with custom intel theme - Google Fonts: JetBrains Mono & Outfit - Maintained all existing functionality - Build tested successfully - No breaking changes to business logic Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 09:34:22 -07:00
</div>
<div className="flex items-center gap-3">
{canWrite() && (
<button
onClick={() => setShowNvdSync(true)}
className="intel-button intel-button-success relative z-10 flex items-center gap-2"
>
<RefreshCw className="w-4 h-4" />
NVD Sync
</button>
)}
Refactor home page: extract components, add toast system, debounce search Major restructuring of the monolithic App.js (2484 lines) into focused, testable components: Architecture: - App.js is now a 189-line routing shell (header, nav, page switching) - HomePage.js orchestrates all home page state and layout - Each visual section is its own component with clear props API Extracted components: - StatsBar: clickable stat cards that filter by severity - QuickCVELookup: CVE existence check with inline results - CVEFilters: search + vendor/severity dropdowns - CVECard: expandable CVE with vendor entries, docs, tickets - OpenTicketsPanel: right sidebar open JIRA tickets - IvantiWorkflowPanel: right sidebar Ivanti workflow status + archive Extracted modals: - AddCVEModal: self-contained add form with NVD auto-fill - EditCVEModal: self-contained edit form with NVD update - JiraTicketModal: unified add/edit JIRA ticket modal - ArcherTicketModal: unified add/edit Archer ticket modal Performance optimizations: - Debounced search (300ms) via useDebounce hook — eliminates redundant API calls on every keystroke - Memoized groupedCVEs, openTicketCount, criticalCount via useMemo - Proper state updates (no direct mutation of cveDocuments) - useCallback on fetch functions to stabilize effect dependencies UX improvements: - Toast notification system replaces all alert() calls - Stat cards are now clickable to filter CVE list by severity - onKeyDown replaces deprecated onKeyPress - aria-labels added to interactive elements Infrastructure: - ToastContext with auto-dismiss, typed toasts (success/error/warning/info) - useDebounce custom hook for reuse across the app - Toast slide-in animation in App.css
2026-06-23 11:46:39 -06:00
{canWrite() && currentPage === 'home' && (
Transform CVE Dashboard to tactical intelligence platform aesthetic Implemented a sophisticated cyber-intelligence visual design with: DESIGN DIRECTION: - "Tactical Intelligence Command Center" aesthetic - Typography: JetBrains Mono for data/code + Outfit for UI labels - Color Palette: Deep navy (#0A0E27) base with electric cyan (#00D9FF) accents - Visual Language: Grid patterns, glowing borders, scanning animations - Motion: Smooth fade-ins, pulse effects, hover transformations FRONTEND CHANGES: - Redesigned App.css with comprehensive intelligence dashboard theme - Custom CSS classes: intel-card, intel-button, intel-input, status-badge - Added scanning line animations and pulse glow effects - Implemented grid background pattern and scrollbar styling COMPONENT UPDATES: - App.js: Transformed all UI sections to intel theme - Header with stats dashboard - Search/filter cards - CVE list with expandable cards - Document management - Quick check interface - JIRA ticket tracking - LoginForm.js: Redesigned authentication portal - All modals: Add/Edit CVE, Add/Edit JIRA tickets UI FEATURES: - Monospace fonts for technical data - Glowing accent borders on interactive elements - Status badges with animated pulse indicators - Data rows with hover states - Responsive grid layouts - Modal overlays with backdrop blur TECHNICAL: - Tailwind CSS extended with custom intel theme - Google Fonts: JetBrains Mono & Outfit - Maintained all existing functionality - Build tested successfully - No breaking changes to business logic Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 09:34:22 -07:00
<button
onClick={() => setShowAddCVE(true)}
className="intel-button intel-button-primary relative z-10 flex items-center gap-2"
>
<Plus className="w-4 h-4" />
Add Entry
</button>
)}
<AdminScopeToggle />
<button
onClick={() => { setFeedbackType('bug'); setShowFeedback(true); }}
title="Report a Bug"
style={{
display: 'inline-flex', alignItems: 'center', gap: '0.35rem',
padding: '0.4rem 0.7rem',
background: 'rgba(239,68,68,0.08)',
border: '1px solid rgba(239,68,68,0.25)',
borderRadius: '0.375rem',
color: '#94A3B8',
fontSize: '0.72rem',
fontFamily: "'JetBrains Mono', monospace",
cursor: 'pointer',
transition: 'all 0.15s',
}}
onMouseEnter={e => { e.currentTarget.style.color = '#F87171'; e.currentTarget.style.borderColor = 'rgba(239,68,68,0.5)'; }}
onMouseLeave={e => { e.currentTarget.style.color = '#94A3B8'; e.currentTarget.style.borderColor = 'rgba(239,68,68,0.25)'; }}
>
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="m8 2 1.88 1.88"/><path d="M14.12 3.88 16 2"/><path d="M9 7.13v-1a3.003 3.003 0 1 1 6 0v1"/><path d="M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6"/><path d="M12 20v-9"/><path d="M6.53 9C4.6 8.8 3 7.1 3 5"/><path d="M6 13H2"/><path d="M3 21c0-2.1 1.7-3.9 3.8-4"/><path d="M20.97 5c0 2.1-1.6 3.8-3.5 4"/><path d="M22 13h-4"/><path d="M17.2 17c2.1.1 3.8 1.9 3.8 4"/></svg>
Bug
</button>
<NotificationBell />
<UserMenu onManageUsers={() => setShowUserManagement(true)} onAuditLog={() => setShowAuditLog(true)} onFeatureRequest={() => { setFeedbackType('feature'); setShowFeedback(true); }} />
Transform CVE Dashboard to tactical intelligence platform aesthetic Implemented a sophisticated cyber-intelligence visual design with: DESIGN DIRECTION: - "Tactical Intelligence Command Center" aesthetic - Typography: JetBrains Mono for data/code + Outfit for UI labels - Color Palette: Deep navy (#0A0E27) base with electric cyan (#00D9FF) accents - Visual Language: Grid patterns, glowing borders, scanning animations - Motion: Smooth fade-ins, pulse effects, hover transformations FRONTEND CHANGES: - Redesigned App.css with comprehensive intelligence dashboard theme - Custom CSS classes: intel-card, intel-button, intel-input, status-badge - Added scanning line animations and pulse glow effects - Implemented grid background pattern and scrollbar styling COMPONENT UPDATES: - App.js: Transformed all UI sections to intel theme - Header with stats dashboard - Search/filter cards - CVE list with expandable cards - Document management - Quick check interface - JIRA ticket tracking - LoginForm.js: Redesigned authentication portal - All modals: Add/Edit CVE, Add/Edit JIRA tickets UI FEATURES: - Monospace fonts for technical data - Glowing accent borders on interactive elements - Status badges with animated pulse indicators - Data rows with hover states - Responsive grid layouts - Modal overlays with backdrop blur TECHNICAL: - Tailwind CSS extended with custom intel theme - Google Fonts: JetBrains Mono & Outfit - Maintained all existing functionality - Build tested successfully - No breaking changes to business logic Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 09:34:22 -07:00
</div>
</div>
</div>
{/* Page content — generic route guard via canAccessPage */}
Refactor home page: extract components, add toast system, debounce search Major restructuring of the monolithic App.js (2484 lines) into focused, testable components: Architecture: - App.js is now a 189-line routing shell (header, nav, page switching) - HomePage.js orchestrates all home page state and layout - Each visual section is its own component with clear props API Extracted components: - StatsBar: clickable stat cards that filter by severity - QuickCVELookup: CVE existence check with inline results - CVEFilters: search + vendor/severity dropdowns - CVECard: expandable CVE with vendor entries, docs, tickets - OpenTicketsPanel: right sidebar open JIRA tickets - IvantiWorkflowPanel: right sidebar Ivanti workflow status + archive Extracted modals: - AddCVEModal: self-contained add form with NVD auto-fill - EditCVEModal: self-contained edit form with NVD update - JiraTicketModal: unified add/edit JIRA ticket modal - ArcherTicketModal: unified add/edit Archer ticket modal Performance optimizations: - Debounced search (300ms) via useDebounce hook — eliminates redundant API calls on every keystroke - Memoized groupedCVEs, openTicketCount, criticalCount via useMemo - Proper state updates (no direct mutation of cveDocuments) - useCallback on fetch functions to stabilize effect dependencies UX improvements: - Toast notification system replaces all alert() calls - Stat cards are now clickable to filter CVE list by severity - onKeyDown replaces deprecated onKeyPress - aria-labels added to interactive elements Infrastructure: - ToastContext with auto-dismiss, typed toasts (success/error/warning/info) - useDebounce custom hook for reuse across the app - Toast slide-in animation in App.css
2026-06-23 11:46:39 -06:00
{currentPage === 'home' && <HomePage onNavigate={handleNavigate} showAddCVE={showAddCVE} setShowAddCVE={setShowAddCVE} />}
{currentPage === 'triage' && <VulnerabilityTriagePage filterDate={calendarFilter} filterEXC={reportingExcFilter} />}
{currentPage === 'compliance' && <CompliancePage onNavigate={setCurrentPage} />}
{currentPage === 'ccp-metrics' && <CCPMetricsPage />}
Refactor home page: extract components, add toast system, debounce search Major restructuring of the monolithic App.js (2484 lines) into focused, testable components: Architecture: - App.js is now a 189-line routing shell (header, nav, page switching) - HomePage.js orchestrates all home page state and layout - Each visual section is its own component with clear props API Extracted components: - StatsBar: clickable stat cards that filter by severity - QuickCVELookup: CVE existence check with inline results - CVEFilters: search + vendor/severity dropdowns - CVECard: expandable CVE with vendor entries, docs, tickets - OpenTicketsPanel: right sidebar open JIRA tickets - IvantiWorkflowPanel: right sidebar Ivanti workflow status + archive Extracted modals: - AddCVEModal: self-contained add form with NVD auto-fill - EditCVEModal: self-contained edit form with NVD update - JiraTicketModal: unified add/edit JIRA ticket modal - ArcherTicketModal: unified add/edit Archer ticket modal Performance optimizations: - Debounced search (300ms) via useDebounce hook — eliminates redundant API calls on every keystroke - Memoized groupedCVEs, openTicketCount, criticalCount via useMemo - Proper state updates (no direct mutation of cveDocuments) - useCallback on fetch functions to stabilize effect dependencies UX improvements: - Toast notification system replaces all alert() calls - Stat cards are now clickable to filter CVE list by severity - onKeyDown replaces deprecated onKeyPress - aria-labels added to interactive elements Infrastructure: - ToastContext with auto-dismiss, typed toasts (success/error/warning/info) - useDebounce custom hook for reuse across the app - Toast slide-in animation in App.css
2026-06-23 11:46:39 -06:00
{currentPage === 'knowledge-base' && <KnowledgeBasePage />}
{currentPage === 'exports' && <ExportsPage />}
{currentPage === 'jira' && <JiraPage />}
{currentPage === 'archer-templates' && <ArcherTemplatePage />}
{currentPage === 'admin' && <AdminPage />}
Refactor home page: extract components, add toast system, debounce search Major restructuring of the monolithic App.js (2484 lines) into focused, testable components: Architecture: - App.js is now a 189-line routing shell (header, nav, page switching) - HomePage.js orchestrates all home page state and layout - Each visual section is its own component with clear props API Extracted components: - StatsBar: clickable stat cards that filter by severity - QuickCVELookup: CVE existence check with inline results - CVEFilters: search + vendor/severity dropdowns - CVECard: expandable CVE with vendor entries, docs, tickets - OpenTicketsPanel: right sidebar open JIRA tickets - IvantiWorkflowPanel: right sidebar Ivanti workflow status + archive Extracted modals: - AddCVEModal: self-contained add form with NVD auto-fill - EditCVEModal: self-contained edit form with NVD update - JiraTicketModal: unified add/edit JIRA ticket modal - ArcherTicketModal: unified add/edit Archer ticket modal Performance optimizations: - Debounced search (300ms) via useDebounce hook — eliminates redundant API calls on every keystroke - Memoized groupedCVEs, openTicketCount, criticalCount via useMemo - Proper state updates (no direct mutation of cveDocuments) - useCallback on fetch functions to stabilize effect dependencies UX improvements: - Toast notification system replaces all alert() calls - Stat cards are now clickable to filter CVE list by severity - onKeyDown replaces deprecated onKeyPress - aria-labels added to interactive elements Infrastructure: - ToastContext with auto-dismiss, typed toasts (success/error/warning/info) - useDebounce custom hook for reuse across the app - Toast slide-in animation in App.css
2026-06-23 11:46:39 -06:00
{/* Global Modals */}
{showUserManagement && <UserManagement onClose={() => setShowUserManagement(false)} />}
{showAuditLog && <AuditLog onClose={() => setShowAuditLog(false)} />}
{showNvdSync && <NvdSyncModal onClose={() => setShowNvdSync(false)} onSyncComplete={() => {}} />}
<FeedbackModal
isOpen={showFeedback}
onClose={() => setShowFeedback(false)}
defaultType={feedbackType}
currentPage={currentPage}
/>
</div>
</div>
);
}