Skip to main content

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

FieldTypeDescription
idstringUnique identifier for the node
typestringNode type (e.g., "custom", "node", "cbs")
position{ x: number, y: number }Coordinates of the node
dataobjectCore data object containing the node’s attributes
data.component_namestringAsset name (e.g., "Router")
data.typestringAsset type (e.g., "PLC", "Camera")
data.security_zonestringSecurity zone ID that the asset belongs to
data.ip_addressstringIP address of the asset
data.system_categorystringSystem 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
selectedboolean?Indicates whether the node is currently selected (optional)
parentIdstring?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"
}