31 lines
819 B
HTML
31 lines
819 B
HTML
{% extends "wiki_groups/base.html" %}
|
|
{% load staticfiles %}
|
|
|
|
{% block extra_head %}
|
|
<script src="{% static 'wiki_groups/js/vendor/viz.js' %}"></script>
|
|
<script src="{% static 'wiki_groups/js/vendor/lite.render.js' %}"></script>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<section>
|
|
<h2>Graphe des groupes</h2>
|
|
|
|
<div id="svg-graph"></div>
|
|
</section>
|
|
|
|
<script>
|
|
var viz = new Viz();
|
|
|
|
var xhttp = new XMLHttpRequest();
|
|
xhttp.onreadystatechange = function() {
|
|
if (this.readyState == 4 && this.status == 200) {
|
|
viz.renderSVGElement(this.responseText)
|
|
.then(element => {
|
|
document.getElementById("svg-graph").appendChild(element);
|
|
})
|
|
}
|
|
};
|
|
xhttp.open("GET", "{% url 'wiki_groups:dot_graph' %}", true);
|
|
xhttp.send();
|
|
</script>
|
|
{% endblock %}
|