Skip to content

Commit

Permalink
dashboard: version
Browse files Browse the repository at this point in the history
  • Loading branch information
irq0 committed Feb 15, 2024
1 parent c093cce commit d89d657
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
12 changes: 10 additions & 2 deletions src/llar/apis/dashboard.clj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
[java-time :as time]
[mount.core :as mount]
[puget.printer :as puget]
[llar.apis.reader :refer [frontend-db] :as reader]
[llar.apis.reader :refer [frontend-db map-to-tree] :as reader]
[llar.appconfig :refer [appconfig-redact-secrets]]
[llar.config :as config]
[llar.human :as human]
[llar.live :as live]
Expand Down Expand Up @@ -277,14 +278,21 @@
[:td chime-times]
[:td (pprint-html pred)]])]])))

(defn config-tab []
(html
[:h2 "Home"]
[:div [:h3 "Application Config"]
(map-to-tree (appconfig-redact-secrets))]))

(def tabs
{:sources #'source-tab
:memory #'memory-tab
:database #'database-tab
:schedules #'schedule-tab
:state #'state-tab
:metrics #'metrics-tab
:threads #'thread-tab})
:threads #'thread-tab
:config #'config-tab})

(defn status-index []
(wrap-body
Expand Down
5 changes: 5 additions & 0 deletions src/llar/appconfig.clj
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@
(defstate appconfig
:start (read-config))

(defn appconfig-redact-secrets []
(-> appconfig
(assoc-in [:postgresql :frontend :password] "--secret removed--")
(assoc-in [:postgresql :backend :password] "--secret removed--")))

(defn update-max-retry []
(get appconfig :update-max-retry))

Expand Down
1 change: 0 additions & 1 deletion src/llar/config.clj
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@
(load-config (get-config-files)))

(defn start-watcher []
;; (log/info (get appconfig :runtime-config-dir) (mount/running-states))
(beholder/watch handle-config-dir-change (get appconfig :runtime-config-dir)))

(defstate change-watcher
Expand Down

0 comments on commit d89d657

Please sign in to comment.