MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / parseData

Function parseData

web/pgadmin/misc/dependencies/static/js/Dependencies.jsx:37–56  ·  view source on GitHub ↗
(data, node)

Source from the content-addressed store, hash-verified

35}));
36
37function parseData(data, node) {
38 // Update the icon
39 data.forEach((element) => {
40 if (element.icon == null || element.icon == '') {
41 if (node) {
42 element.icon = _.isFunction(node['node_image'])
43 ? node['node_image'](null, null)
44 : node['node_image'] || 'icon-' + element.type;
45 } else {
46 element.icon = 'icon-' + element.type;
47 }
48 }
49 if (element.icon) {
50 element['icon'] = {
51 type: element.icon,
52 };
53 }
54 });
55 return data;
56}
57
58function Dependencies({ nodeData, nodeItem, node, treeNodeInfo, isActive, isStale, setIsStale }) {
59

Callers 1

DependenciesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected