Skip to main content

Zone

The Zone type represents a logical grouping of systems in Palito. It includes the zone's ID, name, and associated nodes.


Definition Example

Zone = {
id: string;
name: string;
nodes: Node[]; // Array of Node objects
viewport: {
x: number;
y: number;
zoom: number;
};
};

Field Descriptions

Field NameTypeDescription
idstringA unique ID that identifies the Zone
namestringDisplay name of the Zone
nodesNode[]Array of nodes (CBS/assets) contained in the zone
viewport{ x: number, y: number, zoom: number }Last saved view location and zoom level
viewport.xnumberX position of the viewport (relative to canvas)
viewport.ynumberY position of the viewport
viewport.zoomnumberZoom level of the viewport (e.g., 1.0 = 100%)

Usage Example

{
"id": "zone-2",
"name": "Sample Zone",
"nodes": [
{
"id": "8",
"type": "cbs",
"position": { "x": 425, "y": 225 },
"data": {
"system_name": "CBS",
"security_zone": "zone-2"
},
"style": {
"width": 700,
"height": 650
},
"measured": {
"width": 700,
"height": 650
},
"selected": false
},
{
"id": "9",
"type": "custom",
"position": { "x": 305, "y": 80 },
"data": {
"component_name": "Firewall",
"type": "Firewall",
"security_zone": "zone-2",
"system_category": "Network",
"other_system_connection": []
},
"measured": {
"width": 80,
"height": 100
},
"style": {},
"selected": false,
"parentId": "8",
"extent": "parent"
}
],
"viewport": {
"x": 350.7117668589808,
"y": 308.75703829088684,
"zoom": 0.7438277117503215
}
}