Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Update backend docs on Wed Jan 10 01:41:59 UTC 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jan 10, 2024
1 parent f990090 commit 25795cb
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10990,7 +10990,32 @@ <h2>Important Libraries</h2>
[metabase.util.malli.schema :as ms]
[steffan-westcott.clj-otel.api.trace.span :as span]
[toucan2.core :as t2]))</pre></td></tr><tr><td class="docs">
</td><td class="codes"><pre class="brush: clojure">(set! *warn-on-reflection* true)</pre></td></tr><tr><td class="docs"><p>Get dashboard details for the complete dashboard, including tabs, dashcards, params, etc.</p>
</td><td class="codes"><pre class="brush: clojure">(set! *warn-on-reflection* true)</pre></td></tr><tr><td class="docs">
</td><td class="codes"><pre class="brush: clojure">(defn- dashboards-list [filter-option]
(as-&gt; (t2/select :model/Dashboard {:where [:and (case (or (keyword filter-option) :all)
(:all :archived) true
:mine [:= :creator_id api/*current-user-id*])
[:= :archived (= (keyword filter-option) :archived)]]
:order-by [:%lower.name]}) &lt;&gt;
(t2/hydrate &lt;&gt; :creator)
(filter mi/can-read? &lt;&gt;)))</pre></td></tr><tr><td class="docs"><p>/</p>
</td><td class="codes"><pre class="brush: clojure">(api/defendpoint ^:deprecated GET
&quot;This endpoint is currently unused by the Metabase frontend and may be out of date with the rest of the application.
It only exists for backwards compatibility and may be removed in the future.
Get `Dashboards`. With filter option `f` (default `all`), restrict results as follows:
* `all` - Return all Dashboards.
* `mine` - Return Dashboards created by the current user.
* `archived` - Return Dashboards that have been archived. (By default, these are *excluded*.)&quot;
[f]
{f [:maybe [:enum &quot;all&quot; &quot;mine&quot; &quot;archived&quot;]]}
(let [dashboards (dashboards-list f)
edit-infos (:dashboard (last-edit/fetch-last-edited-info {:dashboard-ids (map :id dashboards)}))]
(into []
(map (fn [{:keys [id] :as dashboard}]
(if-let [edit-info (get edit-infos id)]
(assoc dashboard :last-edit-info edit-info)
dashboard)))
dashboards)))</pre></td></tr><tr><td class="docs"><p>Get dashboard details for the complete dashboard, including tabs, dashcards, params, etc.</p>
</td><td class="codes"><pre class="brush: clojure">(defn- hydrate-dashboard-details
[{dashboard-id :id :as dashboard}]
;; I'm a bit worried that this is an n+1 situation here. The cards can be batch hydrated i think because they
Expand Down

0 comments on commit 25795cb

Please sign in to comment.