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