add groups to input form
This commit is contained in:
parent
3478add538
commit
6b6488595d
1 changed files with 43 additions and 12 deletions
|
@ -6,17 +6,48 @@
|
|||
[dda.c4k-common.browser :as br]
|
||||
[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
|
||||
[]
|
||||
(into [] (concat [(assoc (br/generate-needs-validation) :content
|
||||
(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")
|
||||
(br/generate-input-field "issuer" "(Optional) Your issuer prod/staging:" "")
|
||||
[(br/generate-br)]
|
||||
(br/generate-text-area "auth" "Your auth.edn:" "{:postgres-db-user \"shynet\"
|
||||
:postgres-db-password \"shynet-db-password\"
|
||||
:django-secret-key \"djangosecretkey\"}"
|
||||
"5")
|
||||
(into
|
||||
[]
|
||||
(concat
|
||||
[(assoc
|
||||
(br/generate-needs-validation) :content
|
||||
(into
|
||||
[]
|
||||
(concat
|
||||
[(generate-group
|
||||
"domain"
|
||||
(into
|
||||
[]
|
||||
(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"))))
|
||||
|
|
Loading…
Reference in a new issue