feat(evaluations): bulk approve evaluation tests with 4-step confirmation modal
Backend: - POST /system/attck-evaluations/bulk-approve: finds all [EVAL R*] tests in in_review state, approves blue side, transitions to validated, recalculates technique statuses, audit logs each test - GET /system/attck-evaluations/pending-count: returns count of pending eval tests Frontend: - BulkApproveModal: 4 mandatory checkboxes before confirm button enables (lab env / not org detection / metrics impact / spot-check recommendation) - Bulk Approve button in header badge showing pending count - Green result banner showing approved tests + techniques recalculated - Invalidates techniques, metrics and review-queue queries on success
This commit is contained in:
@@ -102,3 +102,21 @@ export async function checkNewEvaluationRound(): Promise<NewRoundCheckResult> {
|
||||
const { data } = await client.get<NewRoundCheckResult>("/system/attck-evaluations/check-new");
|
||||
return data;
|
||||
}
|
||||
|
||||
export interface BulkApproveResult {
|
||||
approved: number;
|
||||
techniques_recalculated: number;
|
||||
message: string;
|
||||
}
|
||||
|
||||
/** Bulk-approve all in-review evaluation tests (Blue Team side). */
|
||||
export async function bulkApproveEvaluationTests(): Promise<BulkApproveResult> {
|
||||
const { data } = await client.post<BulkApproveResult>("/system/attck-evaluations/bulk-approve");
|
||||
return data;
|
||||
}
|
||||
|
||||
/** Get the count of evaluation tests still awaiting Blue approval. */
|
||||
export async function getEvalPendingCount(): Promise<{ pending: number }> {
|
||||
const { data } = await client.get<{ pending: number }>("/system/attck-evaluations/pending-count");
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user