betadots / container-puppet-catalog-graph-viewer

Puppet Catalog Graph Viewer
GNU General Public License v3.0
0 stars 0 forks source link

bug: make it work with current catalogs #2

Open rwaffen opened 1 month ago

rwaffen commented 1 month ago

does not work with current catalogs from puppet7.

hierarchy_graph.js:68 Uncaught TypeError: Cannot read properties of undefined (reading 'edges')
    at hierarchy_graph.js:68:18
    at Object.<anonymous> (d3.v3.min.js:1:11277)
    at Object.t (d3.v3.min.js:1:1565)
    at XMLHttpRequest.i (d3.v3.min.js:1:10137)

used catalog: catalog.json

tuxmea commented 1 month ago

Even if one removes https://github.com/betadots/container-puppet-catalog-graph-viewer/blob/a6a633b09e89413b0c7be56eba59fec00b4b8a94/files/hierarchy_graph.js#L53 we receive errors.

New error:

Uncaught TypeError: object is undefined
    resource_ref http://localhost:8080/hierarchy_graph.js:33
    edge_index   http://localhost:8080/hierarchy_graph.js:78
    n            https://d3js.org/d3.v3.min.js:3
    s            https://d3js.org/d3.v3.min.js:3
    forEach      https://d3js.org/d3.v3.min.js:3
    n            https://d3js.org/d3.v3.min.js:3
    map          https://d3js.org/d3.v3.min.js:3
    <anonymous>  http://localhost:8080/hierarchy_graph.js:79
    send         https://d3js.org/d3.v3.min.js:1
    t            https://d3js.org/d3.v3.min.js:1
    i            https://d3js.org/d3.v3.min.js:1
    Cn           https://d3js.org/d3.v3.min.js:1
    json         https://d3js.org/d3.v3.min.js:5
    <anonymous>  http://localhost:8080/hierarchy_graph.js:50
hierarchy_graph.js:33:3
rwaffen commented 1 week ago

this is how the agent generates the dot files: https://github.com/search?q=repo%3Apuppetlabs%2Fpuppet+graph&type=code

rwaffen commented 1 week ago

please add catalog with dependency cycle