Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v11.0.x] Nodegraph: Fix issue with rendering single node #86195

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

grafana-delivery-bot[bot]
Copy link
Contributor

Backport aba6574 from #84930


If a single node without any edges was passed to node graph it would error out:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'obj')
    at layout (layoutMsagl.worker.js:55:1)
    at layoutMsagl.worker.js:15:1

This happened because for the specific DOT syntax used by the layout engine, nodes were extracted from the edges which does not work for single node graphs or for graphs where some nodes have 0 edges.

Fix for single node graph case

(cherry picked from commit aba6574)
@grafana-delivery-bot grafana-delivery-bot bot requested review from a team as code owners April 15, 2024 15:16
@grafana-delivery-bot grafana-delivery-bot bot added this to the 11.0.x milestone Apr 15, 2024
@grafana-delivery-bot grafana-delivery-bot bot requested review from ashharrison90 and eledobleefe and removed request for a team April 15, 2024 15:16
@grafana-delivery-bot grafana-delivery-bot bot added add to changelog area/frontend area/panel/node-graph backport A backport PR product-approved Pull requests that are approved by product/managers and are allowed to be backported labels Apr 15, 2024
Copy link
Contributor

@ashharrison90 ashharrison90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm bot 🤖

@ashharrison90 ashharrison90 merged commit c7c5c58 into v11.0.x Apr 15, 2024
22 checks passed
@ashharrison90 ashharrison90 deleted the backport-84930-to-v11.0.x branch April 15, 2024 15:49
@fabrizio-grafana fabrizio-grafana modified the milestones: 11.0.x, 11.0.0 May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/frontend area/panel/node-graph backport A backport PR product-approved Pull requests that are approved by product/managers and are allowed to be backported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants