added output textarea
This commit is contained in:
parent
6cb74163fe
commit
39b2aaee87
1 changed files with 15 additions and 17 deletions
|
@ -8,6 +8,7 @@
|
||||||
[dda.c4k-common.postgres :as postgres]
|
[dda.c4k-common.postgres :as postgres]
|
||||||
[dda.c4k-jira.jira :as jira]
|
[dda.c4k-jira.jira :as jira]
|
||||||
[dda.c4k-jira.backup :as backup]
|
[dda.c4k-jira.backup :as backup]
|
||||||
|
[clojure.walk :refer [postwalk]]
|
||||||
[clojure.zip :as zip]
|
[clojure.zip :as zip]
|
||||||
[hickory.core :as hc]
|
[hickory.core :as hc]
|
||||||
[hickory.zip :as hz]))
|
[hickory.zip :as hz]))
|
||||||
|
@ -48,7 +49,7 @@
|
||||||
; START OF HTML EDIT REFACTOR
|
; START OF HTML EDIT REFACTOR
|
||||||
; TODO: Move this to somewhere in commons
|
; TODO: Move this to somewhere in commons
|
||||||
|
|
||||||
(def htest (hz/hickory-zip (hc/as-hickory (hc/parse (clojure.core/slurp "public/index.html")))))
|
(def htest (hc/as-hickory (hc/parse (clojure.core/slurp "public/index.html"))))
|
||||||
|
|
||||||
(defn generate-feedback-tag
|
(defn generate-feedback-tag
|
||||||
[id]
|
[id]
|
||||||
|
@ -91,33 +92,30 @@
|
||||||
|
|
||||||
; TODO: add br tags
|
; TODO: add br tags
|
||||||
; TODO: add generate button
|
; TODO: add generate button
|
||||||
; TODO: add output text-area
|
|
||||||
(defn generate-content
|
(defn generate-content
|
||||||
[]
|
[]
|
||||||
(conj
|
(conj
|
||||||
(assoc (generate-needs-validation) :content
|
[(assoc (generate-needs-validation) :content
|
||||||
(conj (generate-input-field "fqdn" "Your fqdn:" "jira-neu.prod.meissa-gmbh.de")
|
(conj (generate-input-field "fqdn" "Your fqdn:" "jira-neu.prod.meissa-gmbh.de")
|
||||||
(generate-input-field "jira-data-volume-path" "(Optional) Your jira-data-volume-path:" "/var/jira")
|
(generate-input-field "jira-data-volume-path" "(Optional) Your jira-data-volume-path:" "/var/jira")
|
||||||
(generate-input-field "postgres-data-volume-path" "(Optional) Your postgres-data-volume-path:" "/var/postgres")
|
(generate-input-field "postgres-data-volume-path" "(Optional) Your postgres-data-volume-path:" "/var/postgres")
|
||||||
(generate-input-field "restic-repository" "(Optional) Your restic-repository:" "restic-repository")
|
(generate-input-field "restic-repository" "(Optional) Your restic-repository:" "restic-repository")
|
||||||
(generate-input-field "issuer" "(Optional) Your issuer prod/staging:" "")
|
(generate-input-field "issuer" "(Optional) Your issuer prod/staging:" "")
|
||||||
(generate-text-area "auth" "Your auth.edn:" "{:postgres-db-user \" jira \"
|
(generate-text-area "auth" "Your auth.edn:" "{:postgres-db-user \" jira \"
|
||||||
:postgres-db-password \" jira-db-password \"
|
:postgres-db-password \" jira-db-password \"
|
||||||
:aws-access-key-id \" aws-id \"
|
:aws-access-key-id \" aws-id \"
|
||||||
:aws-secret-access-key \" aws-secret \"
|
:aws-secret-access-key \" aws-secret \"
|
||||||
:restic-password \" restic-password \"}"
|
:restic-password \" restic-password \"}"
|
||||||
5)))
|
5)))]
|
||||||
(generate-output "c4k-keycloak-output" "Your c4k deployment.yaml:" 25)))
|
[(generate-output "c4k-keycloak-output" "Your c4k deployment.yaml:" 25)]))
|
||||||
|
|
||||||
(defn find-map
|
(defn find-map
|
||||||
[zipper]
|
[zipper]
|
||||||
(if (not (zip/end? zipper))
|
(postwalk #(if (and (map? %)
|
||||||
(find-map (zip/next zipper))
|
(= (:class (:attrs %)) "container jumbotron"))
|
||||||
(zip/node zipper))
|
|
||||||
(if (and (map? (zip/node zipper))
|
|
||||||
(= (:class (:attrs (zip/node zipper))) "container jumbotron"))
|
|
||||||
;replace instead of print later
|
;replace instead of print later
|
||||||
(assoc (zip/node zipper) :content (generate-content))))
|
(assoc zipper :content (generate-content))
|
||||||
|
%) zipper))
|
||||||
|
|
||||||
; END REFACTOR
|
; END REFACTOR
|
||||||
|
|
||||||
|
|
Reference in a new issue