parent
d3efb3165e
commit
8937d28346
@ -1,22 +1,22 @@
|
|||||||
(ns wanijo.visualisation.view
|
(ns wanijo.visualisation.view
|
||||||
(:require [hiccup.page :refer [include-js include-css]]
|
(:require [hiccup.page :refer [include-js include-css]]
|
||||||
[hiccup.form :as hform]
|
[hiccup.form :as hform]
|
||||||
|
[hiccup.core :refer [h]]
|
||||||
[wanijo.framework.routing :refer [path]]
|
[wanijo.framework.routing :refer [path]]
|
||||||
[wanijo.framework.view :as view]))
|
[wanijo.framework.view :as view]))
|
||||||
|
|
||||||
(defn index [instance-uuid req]
|
(defn index [instance req]
|
||||||
(view/layout!
|
(view/layout!
|
||||||
:request req
|
:request req
|
||||||
:head (list (include-css "/css/vis-network.min.css")
|
:head (list (include-css "/css/vis-network.min.css")
|
||||||
(include-js "/js/vis-network.min.js"
|
(include-js "/js/vis-network.min.js"
|
||||||
"/js/vis.js"))
|
"/js/vis.js"))
|
||||||
:content
|
:content
|
||||||
[[:h1 "Explore"]
|
[[:h1 "Explore instance " [:small (h (:name instance))]]
|
||||||
[:form.search {:action (path :vis-search-instance {:term ""})}
|
[:form.search {:action (path :vis-search-instance {:term ""})}
|
||||||
(hform/label "term" "Search Instance")
|
(hform/label "term" "Search Instance")
|
||||||
(hform/text-field {:autofocus true} "term")
|
(hform/text-field {:autofocus true} "term")
|
||||||
[:input {:style "display: none" :type "submit"}]]
|
[:input {:style "display: none" :type "submit"}]]
|
||||||
[:div.vis-canvas {:data-instance-url (path :vis-get-instance
|
[:div.vis-canvas {:data-instance-url (path :vis-get-instance instance)}]
|
||||||
{:uuid instance-uuid})}]
|
|
||||||
[:p.flash--warn
|
[:p.flash--warn
|
||||||
"Changes to the visualisation will not (yet) mirror to the actual database"]]))
|
"Changes to the visualisation will not (yet) mirror to the actual database"]]))
|
||||||
|
Loading…
Reference in new issue