From 53c70e8042a356d3260a7c813833cf55870ded21 Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Sun, 14 Jun 2020 00:23:59 +0200 Subject: [PATCH] Get graph from api for new map --- bgpdata/templates/bgpdata/new_new_map.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bgpdata/templates/bgpdata/new_new_map.html b/bgpdata/templates/bgpdata/new_new_map.html index 8fa38b0..5ad01b6 100644 --- a/bgpdata/templates/bgpdata/new_new_map.html +++ b/bgpdata/templates/bgpdata/new_new_map.html @@ -109,8 +109,9 @@ drag = simulation => { .on("end", dragended); } - -d3.json("/api/v2/crawlrun/live/?with_graph").then((data) => { +let path_tokens = window.location.pathname.split("/") +let elem = path_tokens[path_tokens.length - 2] +d3.json("/api/v2/crawlrun/" + elem + "/?with_graph").then((data) => { // Links data join data = data.graph