Adds warning

This commit is contained in:
2024-10-15 21:14:59 -07:00
parent 9d22de1338
commit 4e215c98ae
2 changed files with 37 additions and 9 deletions

View File

@@ -148,10 +148,12 @@
(apply max counts)
0)))
(defn table [{:keys [table widths investigate-url]}]
(defn table [{:keys [table widths investigate-url warning]}]
(let [cell-count (cell-count table)]
(com/content-card {:class "inline-block overflow-hidden"}
[:div { :class "overflow-y-auto h-[70vh] m-4 inline-block"}
(when warning [:div.rounded.bg-red-50.text-red-800.p-4.m-2
warning])
(-> [:table {:class "text-sm text-left text-gray-500 dark:text-gray-400"}
[:thead {:class "text-xs text-gray-800 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400 font-bold"}
(map
@@ -289,7 +291,8 @@
(table {:widths (cond-> (into [30 ] (repeat 13 client-count))
(:include-comparison (:args data)) (into (repeat 13 (* 2 client-count))))
:investigate-url (bidi.bidi/path-for ssr-routes/only-routes ::route/investigate)
:table report} ))))])
:table report
:warning (:warning report)} ))))])
(defn form* [request]
(let [params (merge (:query-params request) (:form-params request) {})]