use new common version

This commit is contained in:
bom 2022-05-13 15:10:18 +02:00
parent 808c3aff45
commit 2fab2a1335
5 changed files with 15 additions and 17 deletions

View file

@ -5,7 +5,7 @@
:url "https://www.apache.org/licenses/LICENSE-2.0.html"} :url "https://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.10.3"] :dependencies [[org.clojure/clojure "1.10.3"]
[org.clojure/tools.reader "1.3.6"] [org.clojure/tools.reader "1.3.6"]
[org.domaindrivenarchitecture/c4k-common-clj "1.1.4"] [org.domaindrivenarchitecture/c4k-common-clj "2.0.1"]
[hickory "0.7.1"]] [hickory "0.7.1"]]
:target-path "target/%s/" :target-path "target/%s/"
:source-paths ["src/main/cljc" :source-paths ["src/main/cljc"

View file

@ -4,7 +4,7 @@
"src/test/cljc" "src/test/cljc"
"src/test/cljs" "src/test/cljs"
"src/test/resources"] "src/test/resources"]
:dependencies [[org.domaindrivenarchitecture/c4k-common-cljs "1.1.0-SNAPSHOT"] :dependencies [[org.domaindrivenarchitecture/c4k-common-cljs "2.0.1"]
[hickory "0.7.1"]] [hickory "0.7.1"]]
:builds {:frontend {:target :browser :builds {:frontend {:target :browser
:modules {:main {:init-fn dda.c4k-shynet.browser/init}} :modules {:main {:init-fn dda.c4k-shynet.browser/init}}

View file

@ -2,7 +2,7 @@
(:gen-class) (:gen-class)
(:require (:require
[dda.c4k-shynet.core :as core] [dda.c4k-shynet.core :as core]
[dda.c4k-common.common :as common])) [dda.c4k-common.uberjar :as uberjar]))
(defn -main [& cmd-args] (defn -main [& cmd-args]
(common/main-common "c4k-shynet" core/config? core/auth? core/config-defaults core/k8s-objects cmd-args)) (uberjar/main-common "c4k-shynet" core/config? core/auth? core/config-defaults core/k8s-objects cmd-args))

View file

@ -5,12 +5,8 @@
[dda.c4k-shynet.core :as core] [dda.c4k-shynet.core :as core]
[dda.c4k-shynet.shynet :as shynet] [dda.c4k-shynet.shynet :as shynet]
[dda.c4k-common.browser :as br] [dda.c4k-common.browser :as br]
[dda.c4k-common.postgres :as pgc])) [dda.c4k-common.postgres :as pgc]
[dda.c4k-common.common :as cm]))
;; TODO: Move these fkt up to common
(defn concat-vec [& vs]
(into []
(apply concat vs)))
(defn generate-group (defn generate-group
[name [name
@ -27,18 +23,18 @@
:content content}]}]) :content content}]}])
(defn generate-content [] (defn generate-content []
(concat-vec (cm/concat-vec
[(assoc [(assoc
(br/generate-needs-validation) :content (br/generate-needs-validation) :content
(concat-vec (cm/concat-vec
(generate-group (generate-group
"domain" "domain"
(concat-vec (cm/concat-vec
(br/generate-input-field "fqdn" "Your fqdn:" "shynet.prod.meissa-gmbh.de") (br/generate-input-field "fqdn" "Your fqdn:" "shynet.prod.meissa-gmbh.de")
(br/generate-input-field "issuer" "(Optional) Your issuer prod/staging:" ""))) (br/generate-input-field "issuer" "(Optional) Your issuer prod/staging:" "")))
(generate-group (generate-group
"provider" "provider"
(concat-vec (cm/concat-vec
(br/generate-input-field "postgres-data-volume-path" "(Optional) Your postgres-data-volume-path if Persistent Volumes are not generated by an Operator:" ""))) (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"
@ -89,9 +85,11 @@
(.getElementById "generate-button") (.getElementById "generate-button")
(.addEventListener "click" (.addEventListener "click"
#(do (validate-all!) #(do (validate-all!)
(-> (core/generate ;TODO: common/generate (?) (-> (cm/generate-common
(config-from-document) (config-from-document)
(br/get-content-from-element "auth" :deserializer edn/read-string)) (br/get-content-from-element "auth" :deserializer edn/read-string)
core/config-defaults
core/k8s-objects)
(br/set-output!))))) (br/set-output!)))))
(add-validate-listener "fqdn") (add-validate-listener "fqdn")
(add-validate-listener "postgres-data-volume-path") (add-validate-listener "postgres-data-volume-path")

View file

@ -1,3 +1,3 @@
{:fqdn "statistics.test.meissa-gmbh.de" {:fqdn "statistics.test.meissa-gmbh.de"
:issuer :staging :issuer "staging"
:postgres-data-volume-path "/var/postgres"} :postgres-data-volume-path "/var/postgres"}