This commit is contained in:
2025-12-24 10:57:43 +00:00
commit ba79b4bfb6
118 changed files with 292546 additions and 0 deletions

50
dist_ts_web/services/admin-state.d.ts vendored Normal file
View File

@@ -0,0 +1,50 @@
import type { IServiceStatus, IIncidentDetails, IStatusPageConfig, IMonitorFormData, IIncidentFormData } from '../interfaces/index.js';
type TStateChangeListener<T> = (data: T) => void;
/**
* Simple observable implementation for state changes
*/
declare class SimpleObservable<T> {
private listeners;
subscribe(listener: TStateChangeListener<T>): () => void;
next(value: T): void;
}
/**
* Centralized state management for the admin dashboard.
* Handles cross-view data passing and state synchronization.
*/
export declare class AdminState {
monitors$: SimpleObservable<IServiceStatus[]>;
incidents$: SimpleObservable<IIncidentDetails[]>;
config$: SimpleObservable<IStatusPageConfig>;
private _monitors;
private _incidents;
private _config;
private _selectedMonitor;
private _selectedIncident;
get monitors(): IServiceStatus[];
set monitors(value: IServiceStatus[]);
get incidents(): IIncidentDetails[];
set incidents(value: IIncidentDetails[]);
get config(): IStatusPageConfig | null;
set config(value: IStatusPageConfig | null);
setSelectedMonitor(monitor: IServiceStatus | null): void;
getSelectedMonitor(): IServiceStatus | null;
clearSelectedMonitor(): void;
setSelectedIncident(incident: IIncidentDetails | null): void;
getSelectedIncident(): IIncidentDetails | null;
clearSelectedIncident(): void;
getCategories(): string[];
getAvailableServices(): IServiceStatus[];
getMonitorById(id: string): IServiceStatus | undefined;
getIncidentById(id: string): IIncidentDetails | undefined;
getActiveIncidents(): IIncidentDetails[];
getPastIncidents(): IIncidentDetails[];
addMonitor(monitor: IServiceStatus): void;
updateMonitor(id: string, data: Partial<IMonitorFormData>): void;
deleteMonitor(id: string): void;
addIncident(incident: IIncidentDetails): void;
updateIncident(id: string, data: Partial<IIncidentFormData>): void;
deleteIncident(id: string): void;
}
export declare const adminState: AdminState;
export {};

File diff suppressed because one or more lines are too long

1
dist_ts_web/services/index.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
export * from './admin-state.js';

View File

@@ -0,0 +1,2 @@
export * from './admin-state.js';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90c193ZWIvc2VydmljZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxrQkFBa0IsQ0FBQyJ9