add groups to input form
This commit is contained in:
parent
3478add538
commit
6b6488595d
1 changed files with 43 additions and 12 deletions
|
@ -6,20 +6,51 @@
|
||||||
[dda.c4k-common.browser :as br]
|
[dda.c4k-common.browser :as br]
|
||||||
[dda.c4k-common.postgres :as pgc]))
|
[dda.c4k-common.postgres :as pgc]))
|
||||||
|
|
||||||
|
(defn generate-group
|
||||||
|
[name
|
||||||
|
content]
|
||||||
|
{:type :element
|
||||||
|
:tag :div
|
||||||
|
:attrs {:class "rounded border border-3 m-2 p-2"}
|
||||||
|
:content [{:type :element
|
||||||
|
:tag :fieldset
|
||||||
|
:content
|
||||||
|
content}]})
|
||||||
|
|
||||||
(defn generate-content
|
(defn generate-content
|
||||||
[]
|
[]
|
||||||
(into [] (concat [(assoc (br/generate-needs-validation) :content
|
(into
|
||||||
(into [] (concat (br/generate-input-field "fqdn" "Your fqdn:" "shynet.prod.meissa-gmbh.de")
|
[]
|
||||||
(br/generate-input-field "postgres-data-volume-path" "(Optional) Your postgres-data-volume-path:" "/var/postgres")
|
(concat
|
||||||
(br/generate-input-field "issuer" "(Optional) Your issuer prod/staging:" "")
|
[(assoc
|
||||||
[(br/generate-br)]
|
(br/generate-needs-validation) :content
|
||||||
(br/generate-text-area "auth" "Your auth.edn:" "{:postgres-db-user \"shynet\"
|
(into
|
||||||
:postgres-db-password \"shynet-db-password\"
|
[]
|
||||||
:django-secret-key \"djangosecretkey\"}"
|
(concat
|
||||||
"5")
|
[(generate-group
|
||||||
[(br/generate-br)]
|
"domain"
|
||||||
(br/generate-button "generate-button" "Generate c4k yaml"))))]
|
(into
|
||||||
(br/generate-output "c4k-shynet-output" "Your c4k deployment.yaml:" "25"))))
|
[]
|
||||||
|
(concat
|
||||||
|
(br/generate-input-field "fqdn" "Your fqdn:" "shynet.prod.meissa-gmbh.de")
|
||||||
|
(br/generate-input-field "issuer" "(Optional) Your issuer prod/staging:" ""))))
|
||||||
|
(generate-group
|
||||||
|
"provider"
|
||||||
|
(into
|
||||||
|
[]
|
||||||
|
(concat
|
||||||
|
(br/generate-input-field "postgres-data-volume-path" "(Optional) Your postgres-data-volume-path:" "/var/postgres"))))
|
||||||
|
(generate-group
|
||||||
|
"credentials"
|
||||||
|
(br/generate-text-area
|
||||||
|
"auth" "Your auth.edn:"
|
||||||
|
"{:postgres-db-user \"shynet\"
|
||||||
|
:postgres-db-password \"shynet-db-password\"
|
||||||
|
:django-secret-key \"djangosecretkey\"}"
|
||||||
|
"5"))]
|
||||||
|
[(br/generate-br)]
|
||||||
|
(br/generate-button "generate-button" "Generate c4k yaml"))))]
|
||||||
|
(br/generate-output "c4k-shynet-output" "Your c4k deployment.yaml:" "25"))))
|
||||||
|
|
||||||
(defn generate-content-div
|
(defn generate-content-div
|
||||||
[]
|
[]
|
||||||
|
|
Loading…
Reference in a new issue