feat: Phase 8 - Frontend main views (T-026 to T-031)
Implement all main frontend views for the MITRE ATT&CK coverage platform: - T-026: Dashboard with coverage summary cards and tactic breakdown table - T-027: Interactive ATT&CK matrix with filtering by status, tactic, platform - T-028: Technique detail page with tests, intel items, and review actions - T-029: Test creation form with technique selector and validation - T-030: Test detail page with drag and drop evidence upload and download - T-031: System admin panel with MITRE sync and intel scan controls New components: CoverageSummaryCard, TacticCoverageChart, AttackMatrix, TechniqueCell, TestForm, EvidenceUpload, EvidenceList New API modules: metrics.ts, techniques.ts, tests.ts, evidence.ts, system.ts All views use TanStack Query for data fetching with proper loading and error states. Role-based UI controls for admin/lead actions.
This commit is contained in:
41
frontend/src/api/system.ts
Normal file
41
frontend/src/api/system.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import client from "./client";
|
||||
|
||||
export interface SyncMitreResponse {
|
||||
message: string;
|
||||
new: number;
|
||||
updated: number;
|
||||
}
|
||||
|
||||
export interface IntelScanResponse {
|
||||
message: string;
|
||||
new_items: number;
|
||||
}
|
||||
|
||||
export interface SchedulerJob {
|
||||
id: string;
|
||||
name: string;
|
||||
next_run_time: string | null;
|
||||
}
|
||||
|
||||
export interface SchedulerStatusResponse {
|
||||
running: boolean;
|
||||
jobs: SchedulerJob[];
|
||||
}
|
||||
|
||||
/** Manually trigger MITRE ATT&CK sync. */
|
||||
export async function triggerMitreSync(): Promise<SyncMitreResponse> {
|
||||
const { data } = await client.post<SyncMitreResponse>("/system/sync-mitre");
|
||||
return data;
|
||||
}
|
||||
|
||||
/** Manually trigger threat intelligence scan. */
|
||||
export async function triggerIntelScan(): Promise<IntelScanResponse> {
|
||||
const { data } = await client.post<IntelScanResponse>("/system/run-intel-scan");
|
||||
return data;
|
||||
}
|
||||
|
||||
/** Get scheduler status. */
|
||||
export async function getSchedulerStatus(): Promise<SchedulerStatusResponse> {
|
||||
const { data } = await client.get<SchedulerStatusResponse>("/system/scheduler-status");
|
||||
return data;
|
||||
}
|
||||
Reference in New Issue
Block a user