Merge branch 'main' of gitlab.com:domaindrivenarchitecture/c4k-jira into main
This commit is contained in:
commit
a817be3a69
3 changed files with 29 additions and 71 deletions
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>c4k-keycloak</title>
|
<title>c4k-jira</title>
|
||||||
<link href="https://domaindrivenarchitecture.org/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
|
<link href="https://domaindrivenarchitecture.org/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
|
||||||
<link href="https://domaindrivenarchitecture.org/css/fonts/fontawesome/fontawesome.css" rel="stylesheet"
|
<link href="https://domaindrivenarchitecture.org/css/fonts/fontawesome/fontawesome.css" rel="stylesheet"
|
||||||
type="text/css" />
|
type="text/css" />
|
||||||
|
@ -11,58 +11,7 @@
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="container jumbotron">
|
<div id="app"></div>
|
||||||
<form class="needs-validation" id="form">
|
|
||||||
<label for="fqdn" class="form-label">Your fqdn:</label>
|
|
||||||
<input class="form-control" type="text" name="fqdn" id="fqdn" value="jira-neu.prod.meissa-gmbh.de">
|
|
||||||
<div class="invalid-feedback">
|
|
||||||
<pre id="fqdn-validation"></pre>
|
|
||||||
</div>
|
|
||||||
<label for="jira-data-volume-path" class="form-label">(Optional) Your jira-data-volume-path:</label>
|
|
||||||
<input class="form-control" type="text" name="jira-data-volume-path" id="jira-data-volume-path" value="/var/jira">
|
|
||||||
<div class="invalid-feedback">
|
|
||||||
<pre id="jira-data-volume-path-validation"></pre>
|
|
||||||
</div>
|
|
||||||
<label for="postgres-data-volume-path" class="form-label">(Optional) Your postgres-data-volume-path:</label>
|
|
||||||
<input class="form-control" type="text" name="postgres-data-volume-path" id="postgres-data-volume-path" value="/var/postgres">
|
|
||||||
<div class="invalid-feedback">
|
|
||||||
<pre id="postgres-data-volume-path-validation"></pre>
|
|
||||||
</div>
|
|
||||||
<label for="restic-repository" class="form-label">(Optional) Your restic-repository:</label>
|
|
||||||
<input class="form-control" type="text" name="restic-repository" id="restic-repository" value="restic-repository">
|
|
||||||
<div class="invalid-feedback">
|
|
||||||
<pre id="restic-repository-validation"></pre>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
<label for="issuer" class="form-label">(Optional) Your issuer prod/staging:</label>
|
|
||||||
<input class="form-control" type="text" name="issuer" id="issuer" value="">
|
|
||||||
<div class="invalid-feedback">
|
|
||||||
<pre id="issuer-validation"></pre>
|
|
||||||
</div>
|
|
||||||
<br><br>
|
|
||||||
<label for="auth" class="form-label">Your auth.edn:</label>
|
|
||||||
<textarea name="auth" id="auth" class="form-control" rows="5">
|
|
||||||
{:postgres-db-user "jira"
|
|
||||||
:postgres-db-password "jira-db-password"
|
|
||||||
:aws-access-key-id "aws-id"
|
|
||||||
:aws-secret-access-key "aws-secret"
|
|
||||||
:restic-password "restic-password"}
|
|
||||||
</textarea>
|
|
||||||
<div class="invalid-feedback">
|
|
||||||
<pre id="auth-validation"></pre>
|
|
||||||
</div>
|
|
||||||
<br><br>
|
|
||||||
<button type="button" id="generate-button" class="btn btn-primary">
|
|
||||||
Generate c4k yaml
|
|
||||||
</button>
|
|
||||||
</form><br><br>
|
|
||||||
<div id="c4k-keycloak-output">
|
|
||||||
<label for="output" class="form-label">Your c4k deployment.yaml:</label>
|
|
||||||
<textarea name="output" id="output" class="form-control" rows="25">
|
|
||||||
</textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<script src="js/main.js"></script>
|
<script src="js/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
|
@ -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 "0.2.8"]
|
:dependencies [[org.domaindrivenarchitecture/c4k-common-cljs "0.3.1"]
|
||||||
[hickory "0.7.1"]]
|
[hickory "0.7.1"]]
|
||||||
:builds {:frontend {:target :browser
|
:builds {:frontend {:target :browser
|
||||||
:modules {:main {:init-fn dda.c4k-jira.browser/init}}
|
:modules {:main {:init-fn dda.c4k-jira.browser/init}}
|
||||||
|
|
|
@ -8,27 +8,35 @@
|
||||||
|
|
||||||
(defn generate-content
|
(defn generate-content
|
||||||
[]
|
[]
|
||||||
(into [] (concat [(assoc (generate-needs-validation) :content
|
(into [] (concat [(assoc (br/generate-needs-validation) :content
|
||||||
(into [] (concat (generate-input-field "fqdn" "Your fqdn:" "jira-neu.prod.meissa-gmbh.de")
|
(into [] (concat (br/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")
|
(br/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")
|
(br/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")
|
(br/generate-input-field "restic-repository" "(Optional) Your restic-repository:" "restic-repository")
|
||||||
(generate-br)
|
[(br/generate-br)]
|
||||||
(generate-input-field "issuer" "(Optional) Your issuer prod/staging:" "")
|
(br/generate-input-field "issuer" "(Optional) Your issuer prod/staging:" "")
|
||||||
(generate-br)
|
[(br/generate-br)]
|
||||||
(generate-br)
|
[(br/generate-br)]
|
||||||
(generate-text-area "auth" "Your auth.edn:" "{:postgres-db-user \" jira \"
|
(br/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-br)
|
[(br/generate-br)]
|
||||||
(generate-br)
|
[(br/generate-br)]
|
||||||
(generate-button "generate-button" "Generate c4k yaml"))))]
|
[(br/generate-button "generate-button" "Generate c4k yaml")])))]
|
||||||
(generate-br)
|
[(br/generate-br)
|
||||||
(generate-br)
|
(br/generate-br)
|
||||||
(generate-output "c4k-keycloak-output" "Your c4k deployment.yaml:" "25"))))
|
(br/generate-output "c4k-keycloak-output" "Your c4k deployment.yaml:" "25")])))
|
||||||
|
|
||||||
|
(defn generate-final
|
||||||
|
[]
|
||||||
|
{:type :element
|
||||||
|
:attrs {:class "container jumbotron"}
|
||||||
|
:tag :div
|
||||||
|
:content
|
||||||
|
(generate-content)})
|
||||||
|
|
||||||
(defn config-from-document []
|
(defn config-from-document []
|
||||||
(let [jira-data-volume-path (br/get-content-from-element "jira-data-volume-path" :optional true)
|
(let [jira-data-volume-path (br/get-content-from-element "jira-data-volume-path" :optional true)
|
||||||
|
@ -61,6 +69,7 @@
|
||||||
(.addEventListener "blur" #(do (validate-all!)))))
|
(.addEventListener "blur" #(do (validate-all!)))))
|
||||||
|
|
||||||
(defn init []
|
(defn init []
|
||||||
|
(br/replace-element-content "app" (generate-final))
|
||||||
(-> js/document
|
(-> js/document
|
||||||
(.getElementById "generate-button")
|
(.getElementById "generate-button")
|
||||||
(.addEventListener "click"
|
(.addEventListener "click"
|
||||||
|
|
Reference in a new issue