28mm / blast-radius

Interactive visualizations of Terraform dependency graphs using d3.js
https://28mm.github.io/blast-radius-docs/
MIT License
2.04k stars 258 forks source link

Tooltip hide/show is buggy and strobes rapidly #11

Closed stantonk closed 6 years ago

stantonk commented 6 years ago

I started up blast-radius using the instructions in the README with a very basic Terraform setup from the introductory tutorial..

The tooltip strobes on/off rapidly. So fast that it is somewhat hard to see in this gif:

blast-radius-tooltip-bug

stantonk commented 6 years ago

Better gif:

blast-radius-tooltip-bug

28mm commented 6 years ago

Thanks for reporting—and the gifs are very helpful. this is likely down to some naive javascripting on my part.

Going to have a closer look tomorrow, but a temporary workaround is to click rather than hover.

Thanks! Patrick.

stantonk commented 6 years ago

Oh cool! Thanks for the tip on clicking, that is a great workaround in the meantime.

This is really exciting work. Our Terraform repo is quite large and I have been looking for something to visualize. Unfortunately the way our repo is laid out the graph generation and SVG is intractable (takes 10+ minutes and pegs a CPU), we need to clean that up.

I'd love to see a tool someday producing a graph of servers from terraform configuration keyed on hostname to input to something like vizceral in concert with event data from opentracing.io or perhaps the newly open-sourced OpenCensus from Google.

28mm commented 6 years ago

@stantonk -- bumping the tooltip offset up a few pixels seems to resolve the flicker issue. Without a small offset, a lot of conflicting mouse events fire and create the strobe effect... Anyway I've pushed the changes to the PyPi and Docker repositories.

I'm really interested in your repo. Most of my projects have been small-ish, and of course most public examples are as well. If you don't mind sharing, how many edges are we talking about?

terraform graph | grep -c '\->'

And just so I'm clear, are you saying that terraform graph | dot -Tsvg takes ten minutes, or is that fast and blast radius takes ten minutes?

I've opened issue #10 to add a few features to make it easier to get just a particular subgraph, and collapse module display-- same as Terraform's --module-depth option. I'm hoping those sorts of features will help in scenarios like you describe.

P.S. thanks for the links to vszceral, and opentracing... I agree that there could be some cool integrations there!