diff --git a/src/main/cljs/dda/c4k_shynet/browser.cljs b/src/main/cljs/dda/c4k_shynet/browser.cljs index 1d75b78..d6063b2 100644 --- a/src/main/cljs/dda/c4k_shynet/browser.cljs +++ b/src/main/cljs/dda/c4k_shynet/browser.cljs @@ -6,20 +6,51 @@ [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") - [(br/generate-br)] - (br/generate-button "generate-button" "Generate c4k yaml"))))] - (br/generate-output "c4k-shynet-output" "Your c4k deployment.yaml:" "25")))) + (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")))) (defn generate-content-div []