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) => { ...@@ -366,21 +366,16 @@ const getNodesAndLinks = (data) => {
const getCatalogNodesAndLinks = ({catalogPaths, sourceId}) => { const getCatalogNodesAndLinks = ({catalogPaths, sourceId}) => {
catalogPaths && catalogPaths &&
catalogPaths.map(catalogPath => { catalogPaths.map(catalogPath => {
//console.log("catalogPath", catalogPath);
const catalogId = catalogPath.split("/")[0]; const catalogId = catalogPath.split("/")[0];
//console.log("catalogId", catalogId);
const identifier = `Catalog ${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 // TODO: to get labels for catalogs, the Hub should be extended to query iDAI.objects catalogs for their title etc.
// NOTE: to get labels for all catalogs, the Hub has to 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),
const catalogLabel = catalogs.find(catalog => catalog.id === parseInt(catalogId))?.label || null; // then the label for this catalog could be taken from there.
//console.log("catalogLabel", catalogLabel);
nodes.push({ nodes.push({
id: identifier, id: identifier,
name: catalogLabel || identifier, // use identifier as fallback name if a catalog is not defined in config file name: identifier,
type: "arachne", type: "arachne",
subtype: "arachne_catalogs" 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