diff --git a/components/Graph.js b/components/Graph.js index 978dc9b..8563476 100644 --- a/components/Graph.js +++ b/components/Graph.js @@ -1,4 +1,4 @@ -import React, {useEffect, useRef, useState} from 'react'; +import React, {useState} from 'react'; // import cytoscape from 'cytoscape'; // import cola from 'cytoscape-cola'; @@ -36,8 +36,8 @@ const styleSheet = [{ "background-color": "#666", "font-size": "10px", "width": "20px", - "height": "20px" - //"label": el => el.data("id") === current ? "" : el.data('title') ? el.data("title").slice(0,16) : el.data("id") + "height": "20px", + "label":"data(label)" } }, { selector: "label", diff --git a/lib/utils.js b/lib/utils.js index 437d724..b8e1269 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -126,8 +126,7 @@ export function getGraphData(currentNodeId) { { data: { id: aNode.slug.toString(), - label: aNode.slug.toString(), - type: "ip" + label: Transformer.parseFileNameFromPath(toFilePath(aNode.slug)), } } )) @@ -136,7 +135,6 @@ export function getGraphData(currentNodeId) { data: { source: anEdge.source, target: anEdge.target, - // label: anEdge.source + " => " + anEdge.target } }))