diff --git a/.gitignore b/.gitignore index 687fc7e7..c7451661 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ +.DS_Store +*~ +*# +.#* depviz.db /vendor/ diff --git a/cmd_web.go b/cmd_web.go index e9755dac..8f7517a1 100644 --- a/cmd_web.go +++ b/cmd_web.go @@ -71,8 +71,14 @@ func webListIssues(w http.ResponseWriter, r *http.Request) { return } + targets := strings.Split(r.URL.Query().Get("targets"), ",") + issues.filterByTargets(targets) + list := []render.Renderer{} for _, issue := range issues { + if issue.Hidden { + continue + } list = append(list, issue) } diff --git a/web/depviz.js b/web/depviz.js new file mode 100644 index 00000000..83a1412b --- /dev/null +++ b/web/depviz.js @@ -0,0 +1,17 @@ +$(document).ready(function() { + $("#submit").click(function() { + $("#result").html("loading JSON..."); + $.ajax({ + url: "/api/issues.json?targets=" + $("#targets").attr("value"), + success: function(result, status, xhr) { + console.dir(result); + $("#result").html(JSON.stringify(result)); + $("#image-link").attr("href", "/api/graph/image?targets=" + $("#targets").attr("value")); + }, + error: function(xhr, status, error) { + console.error("failed", xhr, status, error); + alert("failed: " + error); + }, + }) + }); +}); diff --git a/web/index.html b/web/index.html index 17cf2091..5b61dcbc 100644 --- a/web/index.html +++ b/web/index.html @@ -1 +1,15 @@ -berty/berty + + + + DepViz + + + + + + +
+ download image + + +