some restructuring around vis and explore

integration-tests
Josha von Gizycki 6 years ago
parent 3551350908
commit cae1ffd760

@ -79,8 +79,6 @@
[:section [:section
[:h2 [:span.__icon "▤"] "Visualisation"] [:h2 [:span.__icon "▤"] "Visualisation"]
[:ul [:ul
[:li [:a {:href (path :vis-index)}
"Custom Visualisation"]]
[:li [:a {:href (path :vis-all-instances)} [:li [:a {:href (path :vis-all-instances)}
"All Instances"]]]]))] "All Instances"]]]]))]
(into [:main (into [:main

@ -55,8 +55,8 @@
[:a {:href (path :instance-edit-form instance)} [:a {:href (path :instance-edit-form instance)}
"Edit Instance"] "Edit Instance"]
" | " " | "
[:a {:href (path :vis-index)} [:a {:href (path :vis-explore {:instance-uuid (:uuid instance)})}
"Start visualisation"]]] "Explore from here"]]]
(when (seq (:properties instance)) (when (seq (:properties instance))
[:section.properties [:section.properties
[:h2 "Properties"] [:h2 "Properties"]

@ -23,12 +23,12 @@
:body (domain-schema/accessible-schemas! (-> req :session :uuid))}) :body (domain-schema/accessible-schemas! (-> req :session :uuid))})
(defroutes routes (defroutes routes
(GET (register! :vis-index "/visualisation/index") (GET (register! :vis-explore "/vis/explore/:instance-uuid")
[:as req] [:as req]
(vis-view/index req)) (vis-view/index req))
(GET (register! :vis-all-instances "/visualisation/all-instances") (GET (register! :vis-all-instances "/vis/all-instances")
[:as req] [:as req]
(all-instances req)) (all-instances req))
(GET (register! :vis-all-schemas "/api/visualisation/schemas") (GET (register! :vis-all-schemas "/api/vis/schemas")
[:as req] [:as req]
(all-schemas req))) (all-schemas req)))

@ -29,8 +29,8 @@
[(:uuid source) :> (:uuid instance) [(:uuid source) :> (:uuid instance)
{:label (:name link)}]) {:label (:name link)}])
(:links-in instance)) (:links-in instance))
rankdir (if (or (> (count in-nodes) 7) rankdir (if (or (> (count in-nodes) 5)
(> (count out-nodes) 7)) (> (count out-nodes) 5))
"LR" "LR"
"TD")] "TD")]
(-> [{:rankdir rankdir} (-> [{:rankdir rankdir}

Loading…
Cancel
Save