summaryrefslogtreecommitdiffstats
path: root/web_src/js/gitGraph.js
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/gitGraph.js')
-rw-r--r--web_src/js/gitGraph.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/web_src/js/gitGraph.js b/web_src/js/gitGraph.js
new file mode 100644
index 0000000000..cfa466d8c8
--- /dev/null
+++ b/web_src/js/gitGraph.js
@@ -0,0 +1,16 @@
+$(async () => {
+ const graphCanvas = document.getElementById('graph-canvas');
+ if (!graphCanvas) return;
+
+ const [{ default: gitGraph }] = await Promise.all([
+ import(/* webpackChunkName: "gitgraph" */'../vendor/gitgraph.js/gitgraph.custom.js'),
+ import(/* webpackChunkName: "gitgraph" */'../vendor/gitgraph.js/gitgraph.custom.css'),
+ ]);
+
+ const graphList = [];
+ $('#graph-raw-list li span.node-relation').each(function () {
+ graphList.push($(this).text());
+ });
+
+ gitGraph(graphCanvas, graphList);
+});