Dashboard implementation

This commit is contained in:
proddy
2024-10-08 22:53:36 +02:00
parent fc0fd625d3
commit 4611ed49b0
9 changed files with 145 additions and 37 deletions

View File

@@ -225,6 +225,7 @@ const Dashboard = () => {
<Body>
{tableList.map((di: DashboardItem) => (
<Row key={di.id} item={di}>
{/* TODO add a comment about the number 99 */}
{di.id > 99 ? (
<Cell>{showName(di)}</Cell>
) : (

View File

@@ -117,13 +117,13 @@ export interface CoreData {
export interface DashboardItem {
id: number; // unique index
t?: number; // type from DeviceType
n?: string; // name
dv?: DeviceValue;
n?: string; // name, optional
dv?: DeviceValue; // device value, optional
nodes?: DashboardItem[]; // children nodes, optional
}
export interface DashboardData {
data: DashboardItem[];
nodes: DashboardItem[];
}
export interface DeviceValue {
@@ -139,7 +139,7 @@ export interface DeviceValue {
}
export interface DeviceData {
data: DeviceValue[];
nodes: DeviceValue[];
}
export interface DeviceEntity {