Skip to content
Snippets Groups Projects
Commit d5b10351 authored by Tom Robinson's avatar Tom Robinson
Browse files

Merge branch 'pulses' of github.com:metabase/metabase into pulses

parents ebd662db 338c1a30
Branches
Tags
No related merge requests found
......@@ -55,6 +55,16 @@
[id]
(db/cascade-delete Pulse :id id))
(defendpoint GET "/form_input"
""
[]
(let [card (Card id)]
(read-check Database (:database (:dataset_query card)))
(let [data (:data (driver/dataset-query (:dataset_query card) {:executed_by *current-user-id*}))]
{:status 200 :body (html [:html [:body {:style ""} (p/render-pulse-card card data)]])})))
(defendpoint GET "/preview_card/:id"
"Get HTML rendering of a `Card` with ID."
[id]
......
......@@ -17,8 +17,22 @@
{:email {:name \"Email\", :recipients? true}
:slack {:name \"Slack\", :recipients? false}}"
{:email {:recipients? true}
:slack {:recipients? false}})
{:email {:displayName "Email"
:recipients? true
:fields [{:name "recipients"
:displayName "Send to"
:multi: true
:type: "email"
:placeholder "Enter email address these questions should be sent to"
:required true}]}
:slack {:displayName "Slack"
:recipients? false
:fields [{:name "channel"
:displayName "Send to"
:multi: false
:type: "select"
:options ["#general", "#random", "#ios"]
:required true}]}})
(defn channel-type?
"Predicate function which returns `true` if the given argument is a valid value as a channel-type, `false` otherwise."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment