diff options
Diffstat (limited to 'apps/dreki_web/templates/index.dtl')
-rw-r--r-- | apps/dreki_web/templates/index.dtl | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/apps/dreki_web/templates/index.dtl b/apps/dreki_web/templates/index.dtl new file mode 100644 index 0000000..8f9024f --- /dev/null +++ b/apps/dreki_web/templates/index.dtl @@ -0,0 +1,38 @@ +<h1 class="text-xl">Dreki {{dreki_node}}</h1> + +<p>Hello, {{identity_name}}.</p> + +<ul class="list-disc ml-8 mx-4 my-4 nav-tree"> + {% for el in nav_tree %} + <li class="{{ el.type }}"><a href="{{ el.href }}">{{ el.title }}</a></li> + {% endfor %} +</ul> + + +<h2 class="text-lg">Peers</h2> + +<ul class="list-disc ml-8 mx-4 my-4"> + {% for peer in dreki_peers %}<li>{{ peer }}</li>{% endfor %} +</ul> + +<h2 class="text-lg">World</h2> +<div data-controller="graphviz" + data-graphviz-url-value="/api/admin/world/graph.dot" + class="px-2 py-2 mt-4"> + <div data-graphviz-target="loading" + class="flex items-center justify-center"> + <svg class="animate-spin -ml-1 mr-3 h-5 w-5 text-primary-600" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"> + <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle> + <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path> + </svg> + Loading world graph... + </div> + <div data-graphviz-target="error" class="hidden text-red-800 dark:text-red-300"> + Failed to load world graph + </div> + <div id="world-graph" data-graphviz-target="graph"></div> +</div> + +<pre class="px-2 py-2 mt-4 bg-gray-50 dark:bg-gray-800"><code>{{ dreki_world_pretty_json }}</code></pre> + +<script src="/static/hpcc.wasm.min.js" type="javascript/worker"></script> |