Skip to content

Commit 40c11bb

Browse files
committed
[chores] Removed bloat from clustering example
1 parent 9dfea5c commit 40c11bb

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

public/example_templates/netjson-clustering.html

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
</head>
7171
<body>
7272
<script type="text/javascript">
73-
// Load dataset from external JSON file and initialize the map
7473
const map = new NetJSONGraph(
7574
"../assets/data/netjson-clustering.json",
7675
{
@@ -92,29 +91,8 @@
9291
{name: "ok", nodeStyle: {color: "#1ba619"}},
9392
{name: "problem", nodeStyle: {color: "#ffa500"}},
9493
{name: "critical", nodeStyle: {color: "#c92517"}},
95-
],
96-
nodeLabel: function(node) {
97-
// Return just the node name without the ID
98-
return node.name || '';
99-
},
100-
prepareData: (data) => {
101-
data.nodes.forEach((node) => {
102-
// Keep location inside properties for later usage
103-
node.properties = {
104-
...node.properties,
105-
location: node.location,
106-
};
107-
108-
const status = (node.properties?.status || "").toLowerCase();
109-
if (["ok", "problem", "critical"].includes(status)) {
110-
node.category = status;
111-
} else {
112-
node.category = "unknown";
113-
}
114-
// No `node.label` assignment to suppress labels
115-
});
116-
},
117-
},
94+
]
95+
}
11896
);
11997

12098
// Build legend UI

0 commit comments

Comments
 (0)