Merge branch 'main' into 'backup'
# Conflicts: # src/main/cljc/dda/c4k_gitea/gitea.cljc
This commit is contained in:
commit
d4a0df85f9
2 changed files with 6 additions and 13 deletions
BIN
doc/tryItOut.png
BIN
doc/tryItOut.png
Binary file not shown.
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 43 KiB |
|
@ -4,8 +4,7 @@
|
||||||
[clojure.tools.reader.edn :as edn]
|
[clojure.tools.reader.edn :as edn]
|
||||||
[dda.c4k-gitea.core :as core]
|
[dda.c4k-gitea.core :as core]
|
||||||
[dda.c4k-gitea.gitea :as gitea]
|
[dda.c4k-gitea.gitea :as gitea]
|
||||||
[dda.c4k-common.browser :as br]
|
[dda.c4k-common.browser :as br]
|
||||||
[dda.c4k-common.postgres :as pgc]
|
|
||||||
[dda.c4k-common.common :as cm]))
|
[dda.c4k-common.common :as cm]))
|
||||||
|
|
||||||
(defn generate-group
|
(defn generate-group
|
||||||
|
@ -40,8 +39,7 @@
|
||||||
(generate-group
|
(generate-group
|
||||||
"provider"
|
"provider"
|
||||||
(cm/concat-vec
|
(cm/concat-vec
|
||||||
(br/generate-input-field "volume-total-storage-size" "Your gitea volume-total-storage-size:" "20")
|
(br/generate-input-field "volume-total-storage-size" "Your gitea volume-total-storage-size:" "20")))
|
||||||
(br/generate-input-field "postgres-data-volume-path" "(Optional) Your postgres-data-volume-path if Persistent Volumes are not generated by an Operator:" "")))
|
|
||||||
(generate-group
|
(generate-group
|
||||||
"credentials"
|
"credentials"
|
||||||
(br/generate-text-area
|
(br/generate-text-area
|
||||||
|
@ -63,8 +61,7 @@
|
||||||
(generate-content)})
|
(generate-content)})
|
||||||
|
|
||||||
(defn config-from-document []
|
(defn config-from-document []
|
||||||
(let [postgres-data-volume-path (br/get-content-from-element "postgres-data-volume-path" :optional true)
|
(let [issuer (br/get-content-from-element "issuer" :optional true)
|
||||||
issuer (br/get-content-from-element "issuer" :optional true)
|
|
||||||
app-name (br/get-content-from-element "app-name" :optional true)
|
app-name (br/get-content-from-element "app-name" :optional true)
|
||||||
domain-whitelist (br/get-content-from-element "domain-whitelist" :optional true)]
|
domain-whitelist (br/get-content-from-element "domain-whitelist" :optional true)]
|
||||||
(merge
|
(merge
|
||||||
|
@ -72,9 +69,7 @@
|
||||||
:mailer-from (br/get-content-from-element "mailer-from")
|
:mailer-from (br/get-content-from-element "mailer-from")
|
||||||
:mailer-host-port (br/get-content-from-element "mailer-host-port")
|
:mailer-host-port (br/get-content-from-element "mailer-host-port")
|
||||||
:service-noreply-address (br/get-content-from-element "service-noreply-address")
|
:service-noreply-address (br/get-content-from-element "service-noreply-address")
|
||||||
:volume-total-storage-size (br/get-content-from-element "volume-total-storage-size" :deserializer js/parseInt)}
|
:volume-total-storage-size (br/get-content-from-element "volume-total-storage-size" :deserializer js/parseInt)}
|
||||||
(when (not (st/blank? postgres-data-volume-path))
|
|
||||||
{:postgres-data-volume-path postgres-data-volume-path})
|
|
||||||
(when (not (st/blank? issuer))
|
(when (not (st/blank? issuer))
|
||||||
{:issuer issuer})
|
{:issuer issuer})
|
||||||
(when (not (st/blank? app-name))
|
(when (not (st/blank? app-name))
|
||||||
|
@ -90,8 +85,7 @@
|
||||||
(br/validate! "service-noreply-address" ::gitea/service-noreply-address)
|
(br/validate! "service-noreply-address" ::gitea/service-noreply-address)
|
||||||
(br/validate! "issuer" ::gitea/issuer :optional true)
|
(br/validate! "issuer" ::gitea/issuer :optional true)
|
||||||
(br/validate! "app-name" ::gitea/default-app-name :optional true)
|
(br/validate! "app-name" ::gitea/default-app-name :optional true)
|
||||||
(br/validate! "domain-whitelist" ::gitea/service-domain-whitelist :optional true)
|
(br/validate! "domain-whitelist" ::gitea/service-domain-whitelist :optional true)
|
||||||
(br/validate! "postgres-data-volume-path" ::pgc/postgres-data-volume-path :optional true)
|
|
||||||
(br/validate! "volume-total-storage-size" ::gitea/volume-total-storage-size :deserializer js/parseInt)
|
(br/validate! "volume-total-storage-size" ::gitea/volume-total-storage-size :deserializer js/parseInt)
|
||||||
(br/validate! "auth" core/auth? :deserializer edn/read-string)
|
(br/validate! "auth" core/auth? :deserializer edn/read-string)
|
||||||
(br/set-form-validated!))
|
(br/set-form-validated!))
|
||||||
|
@ -118,8 +112,7 @@
|
||||||
(add-validate-listener "mailer-host-port")
|
(add-validate-listener "mailer-host-port")
|
||||||
(add-validate-listener "service-noreply-address")
|
(add-validate-listener "service-noreply-address")
|
||||||
(add-validate-listener "app-name")
|
(add-validate-listener "app-name")
|
||||||
(add-validate-listener "domain-whitelist")
|
(add-validate-listener "domain-whitelist")
|
||||||
(add-validate-listener "postgres-data-volume-path")
|
|
||||||
(add-validate-listener "volume-total-storage-size")
|
(add-validate-listener "volume-total-storage-size")
|
||||||
(add-validate-listener "issuer")
|
(add-validate-listener "issuer")
|
||||||
(add-validate-listener "auth"))
|
(add-validate-listener "auth"))
|
Loading…
Reference in a new issue