integration-tests
Josha von Gizycki 6 years ago
commit 381ee87d4d

@ -61,6 +61,7 @@
:ring {:handler wanijo.handler/app}
:less {:source-paths ["resources/app/stylesheets"]
:target-path "resources/public/css"}
:aliases {"uberjar" ["do" ["less" "once"] "uberjar"]}
:aliases {"uberjar" ["do" ["less" "once"] "uberjar"]
"compile" ["do" ["less" "once"] "compile"]}
:hiera {:cluster-depth 2}
:eastwood {:namespaces [:source-paths]})

@ -108,10 +108,20 @@ img, svg {
grid-area: nav;
.accent-border-element;
h2::before {
content: "▤ ";
color: @ci-blue;
}
h2 {
margin-left: -1rem;
padding-left: 1rem;
}
ul {
list-style-type: none;
padding-left: 1.8rem;
}
}
main {

@ -70,14 +70,14 @@
(when authed?
(list
[:section.schemas
[:h2 [:span.__icon "▤"] "Schemas"]
[:h2 "Schemas"]
[:ul
(for [schema (:schemas session)]
[:li [:a {:href (path :instance-list
{:schema-uuid (:uuid schema)})}
(h (:name schema))]])]]
[:section
[:h2 [:span.__icon "▤"] "Visualisation"]
[:h2 "Visualisation"]
[:ul
[:li [:a {:href (path :vis-all-instances)}
"All Instances"]]]]))]

@ -198,3 +198,15 @@
(outgoing-links! uuid)
:links-in
(incoming-links! uuid)))
(neo4j/defquery is-starred
"MATCH (u:user {uuid:{user_uuid}}),
(i:instance {uuid:{uuid}})
RETURN EXISTS((i)-[:starred_by]->(u)) AS starred")
(defn is-starred! [uuid user-uuid]
(-> (neo4j/exec-query! is-starred
{:user_uuid user-uuid
:uuid uuid})
first
:starred))

@ -40,7 +40,12 @@
(domain/full-instance-by-uuid! uuid))
(defn show! [uuid req]
(view/show! (instance! uuid) req))
(let [user-uuid (-> req :session :uuid)
instance (assoc (instance! uuid)
:starred
(domain/is-starred! uuid
user-uuid))]
(view/show! instance req)))
(defn form! [uuid attrs]
(forms-inst/with-attributes attrs))

@ -44,6 +44,9 @@
:request req
:content
[[:h1
(if (:starred instance)
"★" "☆")
" "
(h (-> instance :schema :name))
" "
[:small (h (:name instance))]]

Loading…
Cancel
Save