bind generate to button
This commit is contained in:
parent
42a08c3c7f
commit
2f2ac79ece
3 changed files with 8 additions and 3 deletions
|
@ -54,7 +54,7 @@
|
|||
:token "XXXX"
|
||||
:token_secret "XXXX"}}}
|
||||
</textarea><br><br>
|
||||
<button type="button" onclick="generate()">Generate k8s yaml</button>
|
||||
<button type="button" id="generate-button">Generate k8s yaml</button>
|
||||
</div>
|
||||
<div id="k8s-mastodon-bot-output">
|
||||
<label for="output">Your k8s deployment.yaml:</label>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
[expound "0.8.4"]]
|
||||
:dev-http {8080 "public"}
|
||||
:builds {:frontend {:target :browser
|
||||
:modules {:main {:init-fn dda.k8s-mastodon-bot.browser/generate}}
|
||||
:modules {:main {:init-fn dda.k8s-mastodon-bot.browser/init}}
|
||||
:release {}}
|
||||
:app {:target :node-script
|
||||
:output-to "target/k8s-mastodon-bot.js"
|
||||
|
|
|
@ -22,3 +22,8 @@
|
|||
(defn generate []
|
||||
(-> (dda.k8s-mastodon-bot.core/generate (config-from-document) (auth-from-document))
|
||||
(render-to-document)))
|
||||
|
||||
(defn init []
|
||||
(-> js/document
|
||||
(.getElementById "generate-button")
|
||||
(.onclick generate)))
|
Loading…
Reference in a new issue