mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
Dashboard implementation
This commit is contained in:
@@ -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>
|
||||
) : (
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user