Skip to content
This repository was archived by the owner on Jul 18, 2020. It is now read-only.

Commit 3ff5280

Browse files
committed
Make region-selection a Dropdown.
1 parent 4663dfa commit 3ff5280

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/syme/html.clj

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
[tentacles.repos :as repos]
44
[tentacles.users :as users]
55
[environ.core :refer [env]]
6-
[hiccup.page :refer [html5 include-css]]))
6+
[syme.instance :as instance]
7+
[hiccup.page :refer [html5 include-css]]
8+
[hiccup.form :as form]))
79

810
(def login-url (str "https://github.com/login/oauth/authorize?"
911
"client_id=" (env :oauth-client-id)))
@@ -68,9 +70,10 @@
6870
[:input {:type :text :style "width: 320px"
6971
:name "credential" :id "credential"
7072
:value credential :placeholder "AWS Secret Key"}]
71-
[:input {:type :text :name "region"
72-
:style "width: 48%"
73-
:placeholder "region (default: us-west-2)"}]
73+
(form/drop-down "region" (->> (keys instance/ami-by-region)
74+
(map name)
75+
sort)
76+
"us-west-2")
7477
[:input {:type :text :name "ami-id"
7578
:style "width: 48%"
7679
:placeholder "ami id (optional)"}]

0 commit comments

Comments
 (0)