embed svg of all-instances directly into html

integration-tests
Josha von Gizycki 6 years ago
parent 9cbca46b6d
commit 038c3ea0a8

@ -44,7 +44,7 @@ em {
font-weight: bold; font-weight: bold;
} }
img { img, svg {
max-width: 100%; max-width: 100%;
} }

@ -13,8 +13,7 @@
:request req :request req
:content :content
[[:h1 "All Instances"] [[:h1 "All Instances"]
[:img {:src (path :vis-all-instances-img) (viz/all-instances (vis-domain/all-instance-connections!))]))
:alt "All Instances"}]]))
(defroutes routes (defroutes routes
(GET (register! :vis-single-instance "/visualisation/instance/:uuid") (GET (register! :vis-single-instance "/visualisation/instance/:uuid")
@ -24,8 +23,4 @@
:headers {"Content-Type" "image/svg+xml"}}) :headers {"Content-Type" "image/svg+xml"}})
(GET (register! :vis-all-instances "/visualisation/all-instances") (GET (register! :vis-all-instances "/visualisation/all-instances")
[:as req] [:as req]
(all-instances req)) (all-instances req)))
(GET (register! :vis-all-instances-img "/visualisation/all-instances.svg")
[]
{:body (viz/all-instances (vis-domain/all-instance-connections!))
:headers {"Content-Type" "image/svg+xml"}}))

Loading…
Cancel
Save