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 Tue Jan 9 09:23:25 UTC 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jan 9, 2024
1 parent 19ffedd commit 963f58a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74707,7 +74707,7 @@ <h6>`audit`</h6>
(log/debug e (trs &quot;Error validating token&quot;)))
;; log every five minutes
:ttl/threshold (* 1000 60 5))]
(mu/defn token-features :- [:set ms/NonBlankString]
(mu/defn ^:dynamic *token-features* :- [:set ms/NonBlankString]
&quot;Get the features associated with the system's premium features token.&quot;
[]
(try
Expand All @@ -74718,13 +74718,13 @@ <h6>`audit`</h6>
#{}))))</pre></td></tr><tr><td class="docs"><p>True if we have a valid premium features token with ANY features.</p>
</td><td class="codes"><pre class="brush: clojure">(defn- has-any-features?
[]
(boolean (seq (token-features))))</pre></td></tr><tr><td class="docs"><p>Does this instance's premium token have <code>feature</code>?</p>
(boolean (seq (*token-features*))))</pre></td></tr><tr><td class="docs"><p>Does this instance's premium token have <code>feature</code>?</p>

<p> (has-feature? :sandboxes) ; -> true
(has-feature? :toucan-management) ; -> false</p>
</td><td class="codes"><pre class="brush: clojure">(defn has-feature?
[feature]
(contains? (token-features) (name feature)))</pre></td></tr><tr><td class="docs"><p>Returns an error that can be used to throw when an enterprise feature check fails.</p>
(contains? (*token-features*) (name feature)))</pre></td></tr><tr><td class="docs"><p>Returns an error that can be used to throw when an enterprise feature check fails.</p>
</td><td class="codes"><pre class="brush: clojure">(defn ee-feature-error
[feature-name]
(ex-info (tru &quot;{0} is a paid feature not currently available to your instance. Please upgrade to use it. Learn more at metabase.com/upgrade/&quot;
Expand Down Expand Up @@ -74819,14 +74819,14 @@ <h6>`audit`</h6>
:visibility :public
:setter :none
:audit :never
:getter (fn [] (boolean ((token-features) &quot;hosting&quot;)))
:getter (fn [] (boolean ((*token-features*) &quot;hosting&quot;)))
:doc false)</pre></td></tr><tr><td class="docs"><p>Should we various other enhancements, e.g. NativeQuerySnippet collection permissions?</p>

<p><code>enhancements</code> are not currently a specific "feature" that EE tokens can have or not have. Instead, it's a
catch-all term for various bits of EE functionality that we assume all EE licenses include. (This may change in the
future.)</p>

<p>By checking whether <code>(token-features)</code> is non-empty we can see whether we have a valid EE token. If the token is
<p>By checking whether <code>(*token-features*)</code> is non-empty we can see whether we have a valid EE token. If the token is
valid, we can enable EE enhancements.</p>

<p>DEPRECATED -- it should now be possible to use the new 0.41.0+ features for everything previously covered by
Expand Down Expand Up @@ -77194,8 +77194,12 @@ <h6>`:fallback`</h6>
[_ render-type _timezone-id card _dashcard {:keys [rows cols viz-settings] :as data}]
(let [[x-axis-rowfn
y-axis-rowfn] (formatter/graphing-column-row-fns card data)
rows (map (juxt x-axis-rowfn y-axis-rowfn)
funnel-rows (:funnel.rows viz-settings)
raw-rows (map (juxt x-axis-rowfn y-axis-rowfn)
(formatter/row-preprocess x-axis-rowfn y-axis-rowfn rows))
rows (cond-&gt;&gt; raw-rows
funnel-rows (mapv (fn [[idx val]]
[(get-in funnel-rows [(dec idx) :key]) val])))
[x-col y-col] cols
settings (as-&gt; (-&gt;js-viz x-col y-col viz-settings) jsviz-settings
(assoc jsviz-settings :step {:name (:display_name x-col)
Expand Down

0 comments on commit 963f58a

Please sign in to comment.