Commit 066e0e66 authored by Elisabeth Reuhl's avatar Elisabeth Reuhl
Browse files

bug fix: remove outdated line from utils function to prevent crash of Graph

parent ac04d66c
......@@ -366,21 +366,16 @@ const getNodesAndLinks = (data) => {
const getCatalogNodesAndLinks = ({catalogPaths, sourceId}) => {
catalogPaths &&
catalogPaths.map(catalogPath => {
//console.log("catalogPath", catalogPath);
const catalogId = catalogPath.split("/")[0];
//console.log("catalogId", catalogId);
const identifier = `Catalog ${catalogId}`;
// if the catalog is part of the ones defined in the config file (catalogs to be used for filtering in Filters),
// then get the label for this catalog and add it to the node
// NOTE: to get labels for all catalogs, the Hub has to be extended to query iDAI.objects catalogs for their title etc.
const catalogLabel = catalogs.find(catalog => catalog.id === parseInt(catalogId))?.label || null;
//console.log("catalogLabel", catalogLabel);
// TODO: to get labels for catalogs, the Hub should be extended to query iDAI.objects catalogs for their title etc.
// If the catalog is part of the ones defined in the config file (catalogs to be used for filtering in Filters),
// then the label for this catalog could be taken from there.
nodes.push({
id: identifier,
name: catalogLabel || identifier, // use identifier as fallback name if a catalog is not defined in config file
name: identifier,
type: "arachne",
subtype: "arachne_catalogs"
})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment