19 lines
309 B
TypeScript
19 lines
309 B
TypeScript
export type DashboardContent = {
|
|
version: string
|
|
boxes: DashboardContentBox[]
|
|
}
|
|
|
|
export type DashboardContentBox = {
|
|
id: string
|
|
x: number
|
|
y: number
|
|
w: number
|
|
h: number
|
|
sensor: string
|
|
title?: string
|
|
}
|
|
|
|
export const parseDashboard = (input: string) => {
|
|
return JSON.parse(input) as DashboardContent
|
|
}
|