Makes snapshots sticky
This commit is contained in:
@@ -172,7 +172,7 @@
|
|||||||
(d/history (d/db conn))
|
(d/history (d/db conn))
|
||||||
entity-id )
|
entity-id )
|
||||||
inline-add-deletes
|
inline-add-deletes
|
||||||
(sort-by (comp :db/txInstant :tx))
|
(sort-by (comp :db/id first))
|
||||||
vec)
|
vec)
|
||||||
best-guess-entity (or (->> history
|
best-guess-entity (or (->> history
|
||||||
(group-by
|
(group-by
|
||||||
@@ -195,34 +195,40 @@
|
|||||||
[:table.table.compact.grid {:style "width: 100%"}
|
[:table.table.compact.grid {:style "width: 100%"}
|
||||||
[:thead
|
[:thead
|
||||||
[:tr
|
[:tr
|
||||||
[:td {:style "width: 12em"} "Transaction" ]
|
[:td {:style "width: 14em"} "Date"]
|
||||||
[:td {:style "width: 12em"} "Date"]
|
[:td {:style "width: 14em"} "User"]
|
||||||
[:td {:style "width: 12em"} "User"]
|
[:td {:style "width: 18em"} "Field"]
|
||||||
[:td {:style "width: 10em"} "Field"]
|
[:td "From"]
|
||||||
[:td "Change"]]]
|
[:td "To"]]]
|
||||||
[:tbody
|
[:tbody
|
||||||
(for [[tx a c] history]
|
(for [[tx a c] history]
|
||||||
[:tr
|
[:tr
|
||||||
[:td (:db/id tx)]
|
[:td [:div [:div (some-> (:db/txInstant tx)
|
||||||
[:td (some-> (:db/txInstant tx)
|
coerce/to-date-time
|
||||||
coerce/to-date-time
|
atime/localize
|
||||||
atime/localize
|
(atime/unparse atime/standard-time))
|
||||||
(atime/unparse atime/standard-time))]
|
]
|
||||||
|
[:div.tag (:db/id tx)]]]
|
||||||
[:td (str (:audit/user tx))]
|
[:td (str (:audit/user tx))]
|
||||||
[:td (namespace a) ": " (name a)]
|
[:td (namespace a) ": " (name a)]
|
||||||
|
|
||||||
[:td
|
[:td
|
||||||
[:div.tags
|
[:div.tag.is-danger.is-light
|
||||||
[:div.tag.is-danger.is-light
|
[:span
|
||||||
[:span
|
(format-value (:removed c))]]]
|
||||||
"FROM "
|
[:td
|
||||||
(format-value (:removed c))]]
|
[:div.tag.is-primary.is-light
|
||||||
[:div.tag.is-primary.is-light
|
[:span
|
||||||
[:span
|
(format-value (:added c))]]]])]
|
||||||
"TO "
|
|
||||||
(format-value (:added c))]]]]])]
|
|
||||||
]]
|
]]
|
||||||
[:div.column.is-3
|
[:div.column.is-3
|
||||||
[:div#inspector.card]]]]]
|
[:div#inspector.box {:style {:position "sticky"
|
||||||
|
:display "inline-block"
|
||||||
|
:vertical-align "top"
|
||||||
|
:overflow-y "auto"
|
||||||
|
:max-height "100vh"
|
||||||
|
:top "0px"
|
||||||
|
:bottom "0px"}}]]]]]
|
||||||
|
|
||||||
(alog/info ::trace
|
(alog/info ::trace
|
||||||
:bge best-guess-entity
|
:bge best-guess-entity
|
||||||
@@ -252,8 +258,9 @@
|
|||||||
) ]
|
) ]
|
||||||
|
|
||||||
(html-response
|
(html-response
|
||||||
[:div.box [:h1.title "Snapshot of "
|
[:div {:style {:display "inline-block"}}
|
||||||
entity-id]
|
[:h1.title "Snapshot of "
|
||||||
|
entity-id]
|
||||||
[:ul
|
[:ul
|
||||||
(for [[k v] data]
|
(for [[k v] data]
|
||||||
[:li [:strong k] ":" v]
|
[:li [:strong k] ":" v]
|
||||||
|
|||||||
Reference in New Issue
Block a user