flip sorting of instance overview

integration-tests
Josha von Gizycki 6 years ago
parent 7be530ff28
commit 2977cc1319

@ -11,7 +11,7 @@
"MATCH (i:instance)-[:of]->(s:schema) "MATCH (i:instance)-[:of]->(s:schema)
WHERE s.uuid = {uuid} WHERE s.uuid = {uuid}
RETURN i RETURN i
ORDER BY i.updated_at DESC") ORDER BY i.name")
(defn find-by-schema! [schema-uuid] (defn find-by-schema! [schema-uuid]
(map :i (map :i

@ -68,15 +68,15 @@
[:thead [:thead
[:tr [:tr
[:th "Name"] [:th "Name"]
[:th "Schema"]
[:th "Instance"] [:th "Instance"]
[:th "Schema"]
[:th "Created"]]] [:th "Created"]]]
[:tbody [:tbody
(for [{:keys [link target schema]} (:links-out instance)] (for [{:keys [link target schema]} (:links-out instance)]
[:tr [:tr
[:td (h (:name link))] [:td (h (:name link))]
[:td (h (:name schema))]
[:td (h (:name target))] [:td (h (:name target))]
[:td (h (:name schema))]
[:td (prettify-dt (:created_at link))]])]]])])) [:td (prettify-dt (:created_at link))]])]]])]))
(defn edit! [instance form form-data schemas req] (defn edit! [instance form form-data schemas req]
@ -101,16 +101,16 @@
[:thead [:thead
[:tr [:tr
[:th "Name"] [:th "Name"]
[:th "Schema"]
[:th "Instance"] [:th "Instance"]
[:th "Schema"]
[:th "Created"] [:th "Created"]
[:th]]] [:th]]]
[:tbody [:tbody
(for [{:keys [link target schema]} (:links-out instance)] (for [{:keys [link target schema]} (:links-out instance)]
[:tr [:tr
[:td (h (:name link))] [:td (h (:name link))]
[:td (h (:name schema))]
[:td (h (:name target))] [:td (h (:name target))]
[:td (h (:name schema))]
[:td (prettify-dt (:created_at link))] [:td (prettify-dt (:created_at link))]
[:td (hform/form-to [:delete (path :instance-link-delete [:td (hform/form-to [:delete (path :instance-link-delete
{:uuid (:uuid instance) {:uuid (:uuid instance)

Loading…
Cancel
Save