-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(relations): graph visualisation of relations
Adds a Graph tab to the tabbed relations template. Graph tab shows a graphical representation of the all relations that include the current object. Nodes represent objects, each entity type deterministically gets a unique colour. All edges are directed from the object to the related objects.
- Loading branch information
Showing
3 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
apis_core/relations/templates/relations/graph_relations.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{% load relations %} | ||
{% relations_graph relations target as graph %} | ||
{% if graph.error %}<div class="alert alert-warning" role="alert">{{ graph.error }}</div>{% endif %} | ||
{% if graph.svg %} | ||
<div class="d-flex justify-content-center" | ||
style="overflow: auto; | ||
max-width: 100%"> | ||
<div id="svg-container">{{ graph.svg|safe }}</div> | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters