Makes editing work correctly for non-admins

This commit is contained in:
2024-04-03 20:08:46 -07:00
parent d2ed08f6f9
commit dfccbf35cd
7 changed files with 341 additions and 139 deletions

View File

@@ -19,6 +19,7 @@
[com.brunobonacci.mulog.buffer :as rb]
[config.core :refer [env]]
[datomic.api :as dc]
[puget.printer :as puget]
[datomic.api :as d]
[figwheel.main.api]
[hawk.core]
@@ -27,30 +28,32 @@
(:import (org.apache.commons.io.input BOMInputStream)
[org.eclipse.jetty.server.handler.gzip GzipHandler]))
(defn println-event [item]
(printf "%s: %s - %s:%s by %s\n"
(str (c/to-date-time (:mulog/timestamp item)))
(:mulog/namespace item) (:mulog/event-name item)
(if (:mulog/duration item)
(str " " (int (/ (:mulog/duration item) 1000000)) "ms")
"")
(:user-name item))
(println (reduce
(fn [acc [k v]]
(assoc acc k v))
{}
(dissoc
item
:user)))
#_(puget/cprint (reduce
(fn [acc [k v]]
(assoc acc k v))
{}
(dissoc
item
:user))
{:seq-limit 10})
#_(printf "%s: %s - %s:%s by %s\n"
(str (c/to-date-time (:mulog/timestamp item)))
(:mulog/namespace item) (:mulog/event-name item)
(if (:mulog/duration item)
(str " " (int (/ (:mulog/duration item) 1000000)) "ms")
"")
(:user-name item))
#_(println (reduce
(fn [acc [k v]]
(assoc acc k v))
{}
(dissoc
item
:user)))
(when (= :auto-ap.logging/peek (:mulog/event-name item))
(println "\u001B[31mTEST")
)
(puget/cprint (reduce
(fn [acc [k v]]
(assoc acc k v))
{}
(dissoc
item
:user))
{:seq-limit 10})
(println))
@@ -354,7 +357,7 @@
`src` or `resources`."
[]
(println "starting auto reset")
(hawk.core/watch! [{:paths ["src/"]
(hawk.core/watch! [{:paths ["src/" "test/"]
:handler auto-reset-handler}]))