Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions apps/application-admin-console/src/api/disruptions-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import type { ApiClient } from "./client";

export type DisruptionScope = "all" | "team" | "random-n";

/** [ADR-037] When the injection runs: immediately, or scheduled `afterMinutes` from now. */
export type DisruptionTiming = "immediate" | "scheduled";

/** One declared disruption as surfaced by the catalog (a problem's metadata.json declaration). */
export interface DisruptionCatalogItem {
readonly id: string;
Expand All @@ -26,6 +29,8 @@ export interface DisruptionCatalogItem {
readonly parameters?: Readonly<Record<string, unknown>>;
/** Whether competitors can see this disruption exists (operator view shows all). */
readonly publicHint?: boolean;
/** [ADR-037] Declared default delay (minutes) used to pre-fill the schedule input. */
readonly defaultAfterMinutes?: number;
}

export interface DisruptionCatalogEntry {
Expand All @@ -46,6 +51,10 @@ export interface FireDisruptionRequest {
readonly parameters?: Readonly<Record<string, unknown>>;
/** Idempotency key (>= 8 chars); re-firing with the same id is a no-op on the platform. */
readonly requestId: string;
/** [ADR-037] `immediate` (default) injects now; `scheduled` defers by `afterMinutes`. */
readonly timing?: DisruptionTiming;
/** [ADR-037] Required when `timing === "scheduled"`; 1–1440 minutes. */
readonly afterMinutes?: number;
}

export interface FireDisruptionResult {
Expand All @@ -64,6 +73,8 @@ export interface DisruptionAuditRow {
readonly targetTeamIds: readonly string[];
readonly parameters: Readonly<Record<string, unknown>>;
readonly requestId: string;
/** [ADR-037] For a scheduled fire, the time the injection is/was due (ISO8601). */
readonly scheduledFor?: string;
}

export interface DisruptionAuditResponse {
Expand Down
11 changes: 10 additions & 1 deletion apps/application-admin-console/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@
"col_description": "Description",
"col_scope": "Scope",
"col_affected": "Teams hit",
"col_scheduled_for": "Scheduled for",
"col_fired_at": "Fired at",
"fire_button": "Fire",
"loading": "Loading disruptions…",
Expand All @@ -723,6 +724,14 @@
"teams_placeholder": "Select teams",
"random_label": "Pick the pool of teams (a random subset is hit)",
"random_description": "The platform hits a random subset sized to your selection.",
"fired_flash": "Fired \"{name}\" at {count} team(s)."
"timing_label": "Timing",
"timing_description": "Inject immediately, or schedule it to run after a number of minutes.",
"timing_immediate": "Run now",
"timing_scheduled": "Schedule (in N min)",
"after_minutes_label": "Run after (minutes)",
"after_minutes_description": "1–1440 minutes. The injection runs once this many minutes have elapsed.",
"after_minutes_error": "Enter a whole number between 1 and 1440.",
"fired_flash": "Fired \"{name}\" at {count} team(s).",
"scheduled_flash": "Scheduled \"{name}\" to fire in {minutes} minute(s)."
}
}
11 changes: 10 additions & 1 deletion apps/application-admin-console/src/i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@
"col_description": "説明",
"col_scope": "対象範囲",
"col_affected": "対象チーム数",
"col_scheduled_for": "注入予定時刻",
"col_fired_at": "発火時刻",
"fire_button": "発火",
"loading": "障害を読み込み中…",
Expand All @@ -723,6 +724,14 @@
"teams_placeholder": "チームを選択",
"random_label": "母集団のチームを選ぶ (ここからランダムな一部に当たります)",
"random_description": "選択した数に応じて、 platform がランダムな一部に当てます。",
"fired_flash": "「{name}」 を {count} チームに発火しました。"
"timing_label": "実行タイミング",
"timing_description": "即座に注入するか、 指定した分数後に予約するかを選びます。",
"timing_immediate": "即座に実行",
"timing_scheduled": "予約 (N 分後)",
"after_minutes_label": "何分後に実行するか",
"after_minutes_description": "1〜1440 分。 この分数が経過した時点で注入が走ります。",
"after_minutes_error": "1〜1440 の整数を入力してください。",
"fired_flash": "「{name}」 を {count} チームに発火しました。",
"scheduled_flash": "「{name}」 を {minutes} 分後に発火するよう予約しました。"
}
}
Loading
Loading