Node
The Node type is the lowest-level data structure used in Palito, representing individual components such as routers, PLCs, and other devices. Each node contains component metadata, IP address, type, and connection information.
Definition Example
Node = {
id: string;
type: string;
position: {
x: number;
y: number;
};
data: {
component_name: string;
type: string;
security_zone: string;
ip_address: string;
system_category: string;
other_system_connection: {
id: string;
type: string; // e.g., "Default", "Internet"
}[];
};
measured: {
width: number;
height: number;
};
selected?: boolean;
parentId?: string;
extent?: "parent";
};
Field Descriptions
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the node |
type | string | Node type (e.g., "custom", "node", "cbs") |
position | { x: number, y: number } | Coordinates of the node |
data | object | Core data object containing the node’s attributes |
data.component_name | string | Asset name (e.g., "Router") |
data.type | string | Asset type (e.g., "PLC", "Camera") |
data.security_zone | string | Security zone ID that the asset belongs to |
data.ip_address | string | IP address of the asset |
data.system_category | string | System category (e.g., "Network", "Other") |
data.other_system_connection | { id: string; type: string; }[] | Array of connections to other assets (source-based) |
measured | { width: number, height: number } | Actual measured dimensions of the node |
selected | boolean? | Indicates whether the node is currently selected (optional) |
parentId | string? | ID of the parent group node (e.g., cbs, zone) |
extent | "parent"? | Position constraint flag (use "parent" if nested under parent) |
Example Usage
{
"id": "117",
"type": "custom",
"position": {
"x": 230,
"y": 505
},
"data": {
"component_name": "Router",
"type": "Router",
"security_zone": "zone-6",
"ip_address": "192.168.0.1",
"system_category": "Network",
"other_system_connection": [
{
"id": "114",
"type": "Default"
}
]
},
"measured": {
"width": 80,
"height": 100
},
"selected": false,
"parentId": "112",
"extent": "parent"
}