TTMT.ManageWebGUI/src/types/dashboard.ts

106 lines
2.3 KiB
TypeScript
Raw Normal View History

2026-04-01 16:46:33 +07:00
export interface RecentOfflineDevice {
deviceId: string;
room?: string | null;
lastSeen?: string | null;
}
export interface DeviceOverviewResponse {
totalDevices: number;
onlineDevices: number;
offlineDevices: number;
onlinePercentage?: number;
devicesWithOutdatedVersion: number;
recentOfflineDevices: RecentOfflineDevice[];
}
export interface DeviceStatusByRoom {
roomName: string;
totalDevices: number;
onlineDevices: number;
offlineDevices: number;
onlinePercentage?: number;
}
export interface DashboardGeneralInfo {
totalDevices: number;
totalRooms: number;
onlineDevices: number;
offlineDevices: number;
}
export interface RoomUsagePoint {
date: string;
onlineDevices: number;
}
export interface RoomUsageItem {
roomName: string;
weekly: RoomUsagePoint[];
monthly: RoomUsagePoint[];
weeklyTotalOnlineDevices: number;
monthlyTotalOnlineDevices: number;
}
export interface RoomUsageResponse {
weekFrom: string;
weekTo: string;
monthFrom: string;
monthTo: string;
rooms: RoomUsageItem[];
}
export interface RoomHealthStatus {
roomName: string;
totalDevices: number;
onlineDevices: number;
offlineDevices: number;
healthPercentage?: number;
healthStatus?: string;
}
export interface RoomManagementResponse {
totalRooms: number;
rooms: RoomHealthStatus[];
roomsNeedAttention: RoomHealthStatus[];
}
export interface AgentVersionStats {
latestVersion: string;
devicesWithLatestVersion: number;
devicesWithOldVersion: number;
updateCoverage?: number;
}
export interface TopFailedSoftware {
fileName: string;
failCount: number;
}
export interface RecentInstallActivity {
deviceId: string;
fileName: string;
status: string;
timestamp: string;
message?: string | null;
}
export interface SoftwareDistributionResponse {
totalInstallations: number;
successfulInstallations: number;
failedInstallations: number;
pendingInstallations: number;
successRate?: number;
agentVersionStats: AgentVersionStats;
topFailedSoftware: TopFailedSoftware[];
recentActivities: RecentInstallActivity[];
}
export interface DashboardSummaryResponse {
generalInfo: DashboardGeneralInfo;
roomUsage: RoomUsageResponse;
deviceOverview: DeviceOverviewResponse;
roomManagement: RoomManagementResponse;
softwareDistribution: SoftwareDistributionResponse;
generatedAt: string;
}