Priority: P1
Summary
Extend the web frontend dashboard (argus-frontend) to support commands that require file/parameter input via a reusable modal component system. Currently the dashboard only shows real-time READ metrics. This adds file analysis commands with modal forms, input validation, and result rendering within the dashboard UI.
UX Flow
- Dashboard sidebar or bottom panel shows categorized WRITE commands
- User clicks a command → modal popup with command-specific input form
- Real-time validation (file format, required fields)
- On submit → API call to server → results render in dashboard panel
Modal Example (gclogdiff)
┌─ GC Log Diff ─────────────────────────────────┐
│ │
│ File 1: [Choose File...] gc-before.log ✓ │
│ File 2: [Choose File...] gc-after.log ✓ │
│ │
│ Format: auto-detected (JDK 17 Unified) │
│ │
│ [Cancel] [Analyze] │
└────────────────────────────────────────────────┘
Command Categories
File Analysis (upload file → analysis results):
| Command |
Inputs |
Validation |
| gclog |
1 file (.log/.gz) |
File size limit, GC log format |
| gclogdiff |
2 files (.log/.gz) |
Both files parseable |
| jfranalyze |
1 file (.jfr) |
Valid JFR recording |
| heapanalyze |
1 file (.hprof) |
Valid heap dump |
Extraction/Download (PID → output file):
| Command |
Inputs |
Output |
| heapdump |
PID, output path |
.hprof → browser download |
| jfr |
PID, duration |
.jfr → browser download |
| profile |
PID, type, duration |
profile data → download |
| flame |
PID, duration |
.html → new tab or download |
| threaddump |
PID |
text → copy/save/download |
Mutation (requires confirmation dialog):
| Command |
Inputs |
Safety |
| gcrun |
PID |
Confirmation dialog |
| vmset |
PID, flag, value |
Type validation + confirm |
Frontend Component Architecture
FileAnalysisModal (base component)
├── SingleFileModal → gclog, jfranalyze, heapanalyze
├── DualFileModal → gclogdiff
├── PidActionModal → heapdump, jfr, profile, flame, threaddump
└── PidMutationModal → gcrun, vmset (with confirmation step)
AnalysisResultPanel (renders command output)
├── GcLogResultPanel → pause stats, timeline, rates, leak
├── GcDiffResultPanel → comparison table with verdict
└── GenericResultPanel → fallback for other commands
Server-side API
POST /api/analyze/gclog — upload file, return JSON analysis
POST /api/analyze/gclogdiff — upload 2 files, return comparison JSON
POST /api/extract/heapdump — trigger extraction, return download URL
POST /api/extract/jfr — start/stop recording, return download URL
Download Behavior (Extraction commands)
- JFR/heapdump/profile: server extracts → returns download URL → browser downloads
- Progress indicator during extraction
- Flame graph: generate HTML → open in new browser tab
Validation Rules
- File size limit (configurable, default 200MB)
- File extension check (.log, .jfr, .hprof)
- Upload progress bar for large files
- PID validation (process exists, is JVM)
Checklist
Priority: P1
Summary
Extend the web frontend dashboard (argus-frontend) to support commands that require file/parameter input via a reusable modal component system. Currently the dashboard only shows real-time READ metrics. This adds file analysis commands with modal forms, input validation, and result rendering within the dashboard UI.
UX Flow
Modal Example (gclogdiff)
Command Categories
File Analysis (upload file → analysis results):
Extraction/Download (PID → output file):
Mutation (requires confirmation dialog):
Frontend Component Architecture
Server-side API
POST /api/analyze/gclog— upload file, return JSON analysisPOST /api/analyze/gclogdiff— upload 2 files, return comparison JSONPOST /api/extract/heapdump— trigger extraction, return download URLPOST /api/extract/jfr— start/stop recording, return download URLDownload Behavior (Extraction commands)
Validation Rules
Checklist
FileAnalysisModalReact component with validation frameworkSingleFileModalfor single-file analysis commandsDualFileModalfor two-file comparison commandsPidActionModalfor extraction commands with downloadPidMutationModalfor mutation commands with confirmationAnalysisResultPanelfor rendering analysis output