59 lines
1.8 KiB
TypeScript
59 lines
1.8 KiB
TypeScript
export type DeviceStatus = 'online' | 'offline' | 'kiosk'
|
||
|
||
export interface Device {
|
||
id: string
|
||
name: string
|
||
androidVersion: string
|
||
batteryPercent: number
|
||
status: DeviceStatus
|
||
}
|
||
|
||
export interface AppDeployment {
|
||
id: string
|
||
name: string
|
||
version: string
|
||
deployed: number
|
||
total: number
|
||
}
|
||
|
||
export interface DashboardStats {
|
||
totalAndroidDevices: number
|
||
deployedApps: number
|
||
activePolicies: number
|
||
averageBatteryPercent: number
|
||
}
|
||
|
||
export const MOCK_DASHBOARD_STATS: DashboardStats = {
|
||
totalAndroidDevices: 12,
|
||
deployedApps: 8,
|
||
activePolicies: 5,
|
||
averageBatteryPercent: 78,
|
||
}
|
||
|
||
export const MOCK_DEVICES: Device[] = [
|
||
{ id: '1', name: 'Samsung Galaxy A54 – Ventas01', androidVersion: '14', batteryPercent: 92, status: 'online' },
|
||
{ id: '2', name: 'Samsung Galaxy A54 – Ventas02', androidVersion: '14', batteryPercent: 45, status: 'online' },
|
||
{ id: '3', name: 'Xiaomi Redmi Note 12 – Almacén', androidVersion: '13', batteryPercent: 100, status: 'kiosk' },
|
||
{ id: '4', name: 'Motorola Moto G – Reparto01', androidVersion: '13', batteryPercent: 12, status: 'offline' },
|
||
{ id: '5', name: 'Samsung Galaxy A34 – Oficina', androidVersion: '14', batteryPercent: 78, status: 'online' },
|
||
]
|
||
|
||
export const MOCK_APP_DEPLOYMENTS: AppDeployment[] = [
|
||
{ id: '1', name: 'App Corporativa Ventas', version: '2.1.0', deployed: 12, total: 12 },
|
||
{ id: '2', name: 'Headwind Kiosk', version: '1.4.2', deployed: 10, total: 12 },
|
||
{ id: '3', name: 'Authenticator', version: '6.2.1', deployed: 12, total: 12 },
|
||
{ id: '4', name: 'Microsoft Teams', version: '1416/1.0.0', deployed: 8, total: 12 },
|
||
]
|
||
|
||
export function getMdmDashboardData(): {
|
||
stats: DashboardStats
|
||
devices: Device[]
|
||
appDeployments: AppDeployment[]
|
||
} {
|
||
return {
|
||
stats: MOCK_DASHBOARD_STATS,
|
||
devices: MOCK_DEVICES,
|
||
appDeployments: MOCK_APP_DEPLOYMENTS,
|
||
}
|
||
}
|