turbot / steampipe

Zero-ETL, infinite possibilities. Live query APIs, code & more with SQL. No DB required.
https://steampipe.io
GNU Affero General Public License v3.0
6.86k stars 269 forks source link

Downloadable relationship diagrams #3983

Closed ksmaheshkumar closed 1 month ago

ksmaheshkumar commented 11 months ago

Is your feature request related to a problem? Please describe. Currently the relationship diagrams are generated on the fly and once we navigate from the page again it rendering. There is no way to put that for future refernece other than copying the sps and rerendering it.

Describe the solution you'd like Downloadable relationship diagram , which can be used in many places for referring the relationship of the services/resources, exportable as Draw.io xml will be more beneficial to add or modify the diagram.

Describe alternatives you've considered Either we can give download as image option or render it as svg which in turn can be used later

Additional context Relationship diagrams in Dashboards

github-actions[bot] commented 9 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

ksmaheshkumar commented 9 months ago

HI, please keep this

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

ksmaheshkumar commented 7 months ago

Commenting to keep active

ksmaheshkumar commented 6 months ago

Commenting to keep active

judell commented 6 months ago

Hey @ksmaheshkumar, sorry to have not seen this sooner. I have done a quick experiment based on this graph.

image

Here is the data downloaded directly from the page.

id,title,from_id,to_id
bob-bot,bob-bot,,,
turbot/powerpipe_242,Update demo link,,,
turbot/powerpipe_243,Update logo to wordmark,,,
turbot/powerpipe_244,Update wordmark ref,,,
turbot/powerpipe_245,minor readme changes,,,
turbot/steampipe-plugin-csv_87,Broken link on CSV table,,,
,author,,bob-bot,turbot/powerpipe_242
,author,,bob-bot,turbot/powerpipe_245
,author,,bob-bot,turbot/powerpipe_243
,author,,bob-bot,turbot/powerpipe_244
,author,,bob-bot,turbot/steampipe-plugin-csv_87
,pull,,turbot/powerpipe_242,turbot/powerpipe
,pull,,turbot/powerpipe_243,turbot/powerpipe
,pull,,turbot/powerpipe_244,turbot/powerpipe
,pull,,turbot/powerpipe_245,turbot/powerpipe
,pull,,turbot/steampipe-plugin-csv_87,turbot/steampipe-plugin-csv

Here is an (AI-written) draw.io xml version.


<mxGraphModel>
  <root>
    <mxCell id="0"/>
    <mxCell id="1" parent="0"/>
    <mxCell id="node1" value="turbot/powerpipe_242&#xa;Update demo link" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
      <mxGeometry x="40" y="40" width="120" height="60" as="geometry"/>
    </mxCell>
    <mxCell id="node2" value="turbot/powerpipe_243&#xa;Update logo to wordmark" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
      <mxGeometry x="40" y="140" width="120" height="60" as="geometry"/>
    </mxCell>
    <mxCell id="node3" value="turbot/powerpipe_244&#xa;Update wordmark ref" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
      <mxGeometry x="40" y="240" width="120" height="60" as="geometry"/>
    </mxCell>
    <mxCell id="node4" value="bob-bot" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
      <mxGeometry x="220" y="120" width="80" height="80" as="geometry"/>
    </mxCell>
    <mxCell id="edge1" value="" edge="1" parent="1" source="node1" target="node4">
      <mxGeometry relative="1" as="geometry"/>
    </mxCell>
    <mxCell id="edge2" value="" edge="1" parent="1" source="node2" target="node4">
      <mxGeometry relative="1" as="geometry"/>
    </mxCell>
    <mxCell id="edge3" value="" edge="1" parent="1" source="node3" target="node4">
      <mxGeometry relative="1" as="geometry"/>
    </mxCell>
    <mxCell id="node5" value="turbot/steampipe-plugin-csv_87&#xa;Broken link on CSV table" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
      <mxGeometry x="360" y="40" width="120" height="60" as="geometry"/>
    </mxCell>
    <mxCell id="edge4" value="" edge="1" parent="1" source="node5" target="node4">
      <mxGeometry relative="1" as="geometry"/>
    </mxCell>
    <mxCell id="node6" value="turbot/powerpipe_245&#xa;minor readme changes" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
      <mxGeometry x="360" y="140" width="120" height="60" as="geometry"/>
    </mxCell>
    <mxCell id="edge5" value="" edge="1" parent="1" source="node6" target="node4">
      <mxGeometry relative="1" as="geometry"/>
    </mxCell>
    <mxCell id="node7" value="turbot/powerpipe" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
      <mxGeometry x="540" y="130" width="120" height="60" as="geometry"/>
    </mxCell>
    <mxCell id="edge6" value="" edge="1" parent="1" source="node4" target="node7">
      <mxGeometry relative="1" as="geometry"/>
    </mxCell>
  </root>
</mxGraphModel>

Here is the rendering.

image

Not wonderful, but it is a proof of concept. Apart from the mechanics of translating from one format to the other, which I haven't even looked into (I just asked Claude to do the transform, after ChatGPT did it less well), there's then the question of how draw.io would handle a more complex graph. The Powerpipe renderer collapses repetitive nodes, I don't think draw.io could do that?

Exploring this further could be a nice project for an interested community member!

github-actions[bot] commented 4 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

ksmaheshkumar commented 4 months ago

Hi @judell, Thanks for checking , missed your comment. Is there any way that we can render the relationship in cli to export as image.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] commented 1 month ago

This issue was closed because it has been stalled for 90 days with no activity.