Skip to content

Commit e506d85

Browse files
committed
[fix] Fixed default nodeCategories
1 parent 40c11bb commit e506d85

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

public/example_templates/netjson-clustering.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,13 @@
8787
maxZoom: 18,
8888
// No label configuration to keep the view clean
8989
},
90-
nodeCategories: [
91-
{name: "ok", nodeStyle: {color: "#1ba619"}},
92-
{name: "problem", nodeStyle: {color: "#ffa500"}},
93-
{name: "critical", nodeStyle: {color: "#c92517"}},
94-
]
90+
// defaults categories and colors
91+
// shown here to make customization easier
92+
// nodeCategories: [
93+
// {name: "ok", nodeStyle: {color: "#1ba619"}},
94+
// {name: "problem", nodeStyle: {color: "#ffa500"}},
95+
// {name: "critical", nodeStyle: {color: "#c92517"}},
96+
// ]
9597
}
9698
);
9799

src/js/netjsongraph.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,19 +268,19 @@ const NetJSONGraphDefaultConfig = {
268268
{
269269
name: "ok",
270270
nodeStyle: {
271-
color: "#28a745",
271+
color: "#1ba619",
272272
},
273273
},
274274
{
275275
name: "problem",
276276
nodeStyle: {
277-
color: "#ffc107",
277+
color: "#ffa500",
278278
},
279279
},
280280
{
281281
name: "critical",
282282
nodeStyle: {
283-
color: "#dc3545",
283+
color: "#c92517",
284284
},
285285
},
286286
],

test/netjsongraph.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,19 +281,19 @@ describe("NetJSONGraph Specification", () => {
281281
{
282282
name: "ok",
283283
nodeStyle: {
284-
color: "#28a745",
284+
color: "#1ba619",
285285
},
286286
},
287287
{
288288
name: "problem",
289289
nodeStyle: {
290-
color: "#ffc107",
290+
color: "#ffa500",
291291
},
292292
},
293293
{
294294
name: "critical",
295295
nodeStyle: {
296-
color: "#dc3545",
296+
color: "#c92517",
297297
},
298298
},
299299
]);

0 commit comments

Comments
 (0)