Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion _docs/master/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
<body>
<script id="api-reference" data-url="api.json"></script>

<script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
<script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.39.1/dist/browser/standalone.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.39.1/dist/style.min.css">
</body>
</html>
54 changes: 51 additions & 3 deletions _docs/master/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -2912,6 +2912,9 @@
"authority_level" : {
"type" : "string"
},
"description" : {
"type" : "string"
},
"name" : {
"type" : "string"
}
Expand Down Expand Up @@ -16189,6 +16192,44 @@
"tags" : [ "/api/ee/billing" ]
}
},
"/api/ee/cloud-add-ons/addons" : {
"get" : {
"summary" : "GET /api/ee/cloud-add-ons/addons",
"description" : "Get addons information from the Metabase Store API.",
"parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
},
"5XX" : {
"description" : "Server error response"
}
},
"tags" : [ "/api/ee/cloud-add-ons" ]
}
},
"/api/ee/cloud-add-ons/plans" : {
"get" : {
"summary" : "GET /api/ee/cloud-add-ons/plans",
"description" : "Get plans information from the Metabase Store API.",
"parameters" : [ ],
"responses" : {
"2XX" : {
"description" : "Successful response"
},
"4XX" : {
"description" : "Client error response"
},
"5XX" : {
"description" : "Server error response"
}
},
"tags" : [ "/api/ee/cloud-add-ons" ]
}
},
"/api/ee/cloud-add-ons/{product-type}" : {
"post" : {
"summary" : "POST /api/ee/cloud-add-ons/{product-type}",
Expand All @@ -16199,7 +16240,7 @@
"required" : true,
"schema" : {
"type" : "string",
"enum" : [ "metabase-ai" ]
"enum" : [ "metabase-ai", "python-execution" ]
}
} ],
"responses" : {
Expand All @@ -16222,8 +16263,7 @@
"terms_of_service" : {
"type" : "boolean"
}
},
"required" : [ "terms_of_service" ]
}
}
}
}
Expand Down Expand Up @@ -20914,6 +20954,14 @@
"default" : false,
"type" : "boolean"
}
}, {
"in" : "query",
"name" : "reindex",
"required" : true,
"schema" : {
"default" : true,
"type" : "boolean"
}
} ],
"responses" : {
"2XX" : {
Expand Down
8 changes: 5 additions & 3 deletions _docs/master/configuring-metabase/appearance.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ Appearance settings are split across different tabs:

People can display their Metabase in dark mode in their [account settings](../people-and-groups/account-settings#theme). Options are:

- System default (which is also the default setting). Metabase will switch between light and dark mode when the system switches without having to reload the page.
- Always use dark mode.
- Always use light mode.
- System default (which is also the default setting). Metabase will switch between light and dark mode when the system switches without having to reload the page.
- Always use dark mode.
- Always use light mode.

You can quickly toggle dark mode from anywhere in Metabase by opening the [command palette](../exploration-and-organization/exploration#command-palette) and searching for "light" or "dark" or "theme".

Dark mode is a user-level setting, not an instance-level setting. Currently, there's no way to change the theme to dark mode for the entire instance, but you can edit some [user interface colors](#user-interface-colors).

Expand Down
12 changes: 10 additions & 2 deletions _docs/master/data-modeling/model-persistence.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,22 @@ layout: new-docs

# Model persistence

> Currently available for PostgreSQL, MySQL, and Redshift.

Metabase can persist the results of your models so that your models (and the questions based on those models) load faster.

Metabase will store model results in tables in a bespoke schema in your data warehouse (not the Metabase application database). When people ask questions based on your models, Metabase will use the tables with the stored results instead of re-running the model's query.

> Model persistence doesn't work with [row and column security](../permissions/row-and-column-security) or [impersonation](../permissions/impersonation).

## Databases that support model persistence

Currently, model persistence is only available for the following databases:

- PostgreSQL
- MySQL
- Redshift

Model persistence doesn't work with [row and column security](../permissions/row-and-column-security) or [impersonation](../permissions/impersonation).

## Turn on model persistence in Metabase

To persist models for faster loading, you'll need to turn on model persistence for:
Expand Down
4 changes: 4 additions & 0 deletions _docs/master/embedding/sdk/dashboards.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ If you want to replace the existing menu with your own component, you can do so
{% include_file "{{ dirname }}/snippets/dashboards/plugins.tsx" snippet="example-custom-actions-menu" %}
```

### `mapQuestionClickActions`

You can customize what happens when people click on a data point on a dashboard with the `mapQuestionClickActions` plugin. See [mapQuestionClickActions](./questions#mapquestionclickactions).

## Creating dashboards

Creating a dashboard could be done with `useCreateDashboardApi` hook or `CreateDashboardModal` component.
Expand Down
37 changes: 37 additions & 0 deletions _docs/master/embedding/sdk/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,43 @@ To use a plugin on a per-component basis, pass the plugin as a prop to the compo
{% include_file "{{ dirname }}/snippets/plugins/component-plugins.tsx" snippet="example" %}
```

## `handleLink`

To customize what happens when people click a link in your embedded questions and dashboards, use the global plugin `handleLink`:

```typescript
export default function App() {
const navigate = useNavigate(); // coming from whatever routing lib you're using

const plugins = {
handleLink: (urlString: string) => {
const url = new URL(urlString, window.location.origin);
const isInternal = url.origin === window.location.origin;
if (isInternal) {
// client side navigation
navigate(url.pathname + url.search + url.hash);

return { handled: true }; // prevent default navigation
}
return { handled: false }; // let the sdk do the default behavior
},
};

return (
<MetabaseProvider authConfig={authConfig} pluginsConfig={plugins}>
<nav style={{ display: "flex", gap: 12, padding: 12 }}>
<Link to="/">Home</Link>
<Link to="/question">Question</Link>
<Link to="/about">About</Link>
</nav>
<div style={{ padding: 12 }}>
<Outlet />
</div>
</MetabaseProvider>
);
}
```

## Further reading

- [Interactive question plugins](./questions#interactive-question-plugins)
Expand Down
23 changes: 21 additions & 2 deletions _docs/master/embedding/sdk/questions.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,27 @@ You can use [plugins](./plugins) to add custom functionality to your questions.

### `mapQuestionClickActions`

This plugin allows you to add custom actions to the click-through menu of an interactive question. You can add and
customize the appearance and behavior of the custom actions.
When people click on a data point in the embedded interactive chart, Metabase shows them a menu of actions by default. The plugin `mapQuestionClickActions` allows you to customize this behavior. You can choose to:

- Open the default Metabase menu.
- Add custom actions to that click-through menu.
- Perform immediate action without opening a menu.

Use `mapQuestionClickActions` globally at the provider level, or on individual `InteractiveQuestion` or `InteractiveDashboard` components. For more on provider scope, see [Plugins](./plugins)

The example below shows all the options for click action behavior. This example will:

- Open a menu with custom actions when "Last Name" column is clicked.
- Perform an immediate action (show an alert) when the "Plan" column is clicked.
- Shows the default menu (available as `clickActions`) in all other cases.

The behavior is determined by what `mapQuestionClickActions` returns: array of actions to open a menu, or a single action to trigger an immediate action.

```typescript
{% include_file "{{ dirname }}/snippets/questions/interactive-question-click-actions.tsx" snippet="example" %}
```

You can also customize the appearance of custom actions in the click menu. The example below shows an example of a click menu with default actions, a custom action, and a custom action with customized appearance:

```typescript
{% include_file "{{ dirname }}/snippets/questions/interactive-question-plugins.tsx" snippet="example" %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import {
defineMetabaseAuthConfig,
InteractiveQuestion,
MetabaseProvider,
} from "@metabase/embedding-sdk-react";

const authConfig = defineMetabaseAuthConfig({
metabaseInstanceUrl: "http://localhost:3000",
});

const Example = () => {
return (
// [<snippet example>]
<MetabaseProvider
authConfig={authConfig}
pluginsConfig={{
mapQuestionClickActions: (clickActions, clicked) => {
if (clicked?.column?.display_name === "Last Name") {
// This adds a custom action to the menu when clicked on on "Last Name" column
return [
...clickActions,
{
buttonType: "horizontal",
name: "custom",
title: "This is the Last Name column",
onClick: () => alert("You clicked the Last Name column!"),
},
];
}

if (clicked?.column?.display_name === "Plan") {
// This performs an immediate action on "Plan" column instead of opening the menu
return {
onClick: () => alert("You clicked the Plan column!"),
};
}
// default behavior (open Metabase's default click menu) on other columns
return clickActions;
},
}}
>
<InteractiveQuestion questionId={1} />
</MetabaseProvider>
);
// [<endsnippet example>]
};
15 changes: 15 additions & 0 deletions _docs/master/installation-and-operation/remote-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,21 @@ In Production mode, you can set Metabase to auto-sync changes from your main bra

By default, Metabase will pull any changes (if any) from the branch you specify every five minutes. You can also manually sync as needed.

## Disabling Remote Sync

To disable Remote Sync, go to the Remote Sync settings page in Admin settings.

To disable Remote Sync:

1. Go to **Admin settings** > **Settings** > **Remote sync**.
2. Click **Disable Remote Sync**.
3. In the confirmation dialog, click **Disable**.

- All remote sync settings are cleared, including the repository URL, access token, and branch information.
- Your synced collection and its content remain in your Metabase (they're not deleted).
- The synced collection becomes a regular collection that you can edit like any other collection.
- You can re-enable Remote Sync later by reconnecting to a repository, but any changes you made to the collection after disabling can be overwritten if you enable sync again.

## Migrating existing content to Remote Sync

If you already have content in your Metabase, you can gradually adopt Remote Sync. Content that lives outside the synced collection remains unaffected—you can continue working with it normally while you migrate content into the synced collection over time.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ services:
MB_DB_USER_FILE: /run/secrets/db_user
MB_DB_PASS_FILE: /run/secrets/db_password
MB_DB_HOST: postgres
logging:
driver: local
networks:
- metanet1
secrets:
Expand Down
4 changes: 3 additions & 1 deletion _docs/master/people-and-groups/account-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ You can set your first and last names, change your email address, and set your l

You can choose to display Metabase in light or dark mode.

To quickly toggle dark mode, use the [command palette](../exploration-and-organization/exploration#command-palette).

The theme only applies to your account. The theme doesn't apply to chart colors or embedded Metabases.

## Account password
Expand All @@ -49,4 +51,4 @@ This isn't an in-Metabase setting, but just so you know: you can disable UI anim

If you subscribe or are added to dashboard subscriptions or alerts, you’ll be able to manage those notifications here (as well as on the relevant question or dashboard themselves).

Metabase excludes notificatione for [comments](../documents/introduction#comment-notifications) from this page.
Metabase excludes notifications for [comments](../documents/introduction#comment-notifications) from this page.
4 changes: 2 additions & 2 deletions _site/docs/all.html
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ <h6>Embedded Analytics</h6>

<div class="Button btn btn-transparent px-3 py-2 button-desktop" id="features-nav-button-desktop" tabindex="0">
<div class="fs-13 d-flex align-items-center">
Features
<a href="/features">Features</a>
<svg class="nav-button-chevron" fill="none" height="7" viewBox="0 0 11 7" width="11" xmlns="http://www.w3.org/2000/svg">
<path d="M1.5 1L5.5 5L9.5 1" stroke-width="1.5" stroke="#509EE3"></path>
</svg>
Expand Down Expand Up @@ -550,7 +550,7 @@ <h6>Embedded Analytics</h6>
</div>
<div class="menu-footer buttons">
<a href="/releases"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path stroke="#509EE3" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16.283 12.26 15.5 15l-.783-2.74a4.333 4.333 0 0 0-2.975-2.976L9 8.5l2.74-.783a4.333 4.333 0 0 0 2.976-2.975L15.5 2l.783 2.74a4.333 4.333 0 0 0 2.975 2.976L22 8.5l-2.74.783a4.334 4.334 0 0 0-2.976 2.975l-.001.001ZM6.5 22l.591-1.774a3.375 3.375 0 0 1 2.135-2.135L11 17.5l-1.774-.591a3.375 3.375 0 0 1-2.135-2.134L6.5 13l-.591 1.774a3.375 3.375 0 0 1-2.134 2.135L2 17.5l1.775.591a3.375 3.375 0 0 1 2.134 2.134L6.5 22Z"></path></svg>
Whats new</a>
What's new</a>
<a href="/roadmap"><svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path stroke="#8D93A5" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m4.75 6.75 4.5-2v12.5l-4.5 2V6.75ZM14.75 6.75l4.5-2v12.5l-4.5 2V6.75ZM14.75 6.75l-5.5-2v12.5l5.5 2V6.75Z"></path>
</svg>
Expand Down
4 changes: 2 additions & 2 deletions _site/docs/master/CONTRIBUTING.html
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ <h6>Embedded Analytics</h6>

<div class="Button btn btn-transparent px-3 py-2 button-desktop" id="features-nav-button-desktop" tabindex="0">
<div class="fs-13 d-flex align-items-center">
Features
<a href="/features">Features</a>
<svg class="nav-button-chevron" fill="none" height="7" viewBox="0 0 11 7" width="11" xmlns="http://www.w3.org/2000/svg">
<path d="M1.5 1L5.5 5L9.5 1" stroke-width="1.5" stroke="#509EE3"></path>
</svg>
Expand Down Expand Up @@ -552,7 +552,7 @@ <h6>Embedded Analytics</h6>
</div>
<div class="menu-footer buttons">
<a href="/releases"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path stroke="#509EE3" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16.283 12.26 15.5 15l-.783-2.74a4.333 4.333 0 0 0-2.975-2.976L9 8.5l2.74-.783a4.333 4.333 0 0 0 2.976-2.975L15.5 2l.783 2.74a4.333 4.333 0 0 0 2.975 2.976L22 8.5l-2.74.783a4.334 4.334 0 0 0-2.976 2.975l-.001.001ZM6.5 22l.591-1.774a3.375 3.375 0 0 1 2.135-2.135L11 17.5l-1.774-.591a3.375 3.375 0 0 1-2.135-2.134L6.5 13l-.591 1.774a3.375 3.375 0 0 1-2.134 2.135L2 17.5l1.775.591a3.375 3.375 0 0 1 2.134 2.134L6.5 22Z"></path></svg>
Whats new</a>
What's new</a>
<a href="/roadmap"><svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path stroke="#8D93A5" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m4.75 6.75 4.5-2v12.5l-4.5 2V6.75ZM14.75 6.75l4.5-2v12.5l-4.5 2V6.75ZM14.75 6.75l-5.5-2v12.5l5.5 2V6.75Z"></path>
</svg>
Expand Down
4 changes: 2 additions & 2 deletions _site/docs/master/actions/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ <h6>Embedded Analytics</h6>

<div class="Button btn btn-transparent px-3 py-2 button-desktop" id="features-nav-button-desktop" tabindex="0">
<div class="fs-13 d-flex align-items-center">
Features
<a href="/features">Features</a>
<svg class="nav-button-chevron" fill="none" height="7" viewBox="0 0 11 7" width="11" xmlns="http://www.w3.org/2000/svg">
<path d="M1.5 1L5.5 5L9.5 1" stroke-width="1.5" stroke="#509EE3"></path>
</svg>
Expand Down Expand Up @@ -552,7 +552,7 @@ <h6>Embedded Analytics</h6>
</div>
<div class="menu-footer buttons">
<a href="/releases"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path stroke="#509EE3" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16.283 12.26 15.5 15l-.783-2.74a4.333 4.333 0 0 0-2.975-2.976L9 8.5l2.74-.783a4.333 4.333 0 0 0 2.976-2.975L15.5 2l.783 2.74a4.333 4.333 0 0 0 2.975 2.976L22 8.5l-2.74.783a4.334 4.334 0 0 0-2.976 2.975l-.001.001ZM6.5 22l.591-1.774a3.375 3.375 0 0 1 2.135-2.135L11 17.5l-1.774-.591a3.375 3.375 0 0 1-2.135-2.134L6.5 13l-.591 1.774a3.375 3.375 0 0 1-2.134 2.135L2 17.5l1.775.591a3.375 3.375 0 0 1 2.134 2.134L6.5 22Z"></path></svg>
Whats new</a>
What's new</a>
<a href="/roadmap"><svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path stroke="#8D93A5" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m4.75 6.75 4.5-2v12.5l-4.5 2V6.75ZM14.75 6.75l4.5-2v12.5l-4.5 2V6.75ZM14.75 6.75l-5.5-2v12.5l5.5 2V6.75Z"></path>
</svg>
Expand Down
4 changes: 2 additions & 2 deletions _site/docs/master/actions/custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ <h6>Embedded Analytics</h6>

<div class="Button btn btn-transparent px-3 py-2 button-desktop" id="features-nav-button-desktop" tabindex="0">
<div class="fs-13 d-flex align-items-center">
Features
<a href="/features">Features</a>
<svg class="nav-button-chevron" fill="none" height="7" viewBox="0 0 11 7" width="11" xmlns="http://www.w3.org/2000/svg">
<path d="M1.5 1L5.5 5L9.5 1" stroke-width="1.5" stroke="#509EE3"></path>
</svg>
Expand Down Expand Up @@ -552,7 +552,7 @@ <h6>Embedded Analytics</h6>
</div>
<div class="menu-footer buttons">
<a href="/releases"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path stroke="#509EE3" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16.283 12.26 15.5 15l-.783-2.74a4.333 4.333 0 0 0-2.975-2.976L9 8.5l2.74-.783a4.333 4.333 0 0 0 2.976-2.975L15.5 2l.783 2.74a4.333 4.333 0 0 0 2.975 2.976L22 8.5l-2.74.783a4.334 4.334 0 0 0-2.976 2.975l-.001.001ZM6.5 22l.591-1.774a3.375 3.375 0 0 1 2.135-2.135L11 17.5l-1.774-.591a3.375 3.375 0 0 1-2.135-2.134L6.5 13l-.591 1.774a3.375 3.375 0 0 1-2.134 2.135L2 17.5l1.775.591a3.375 3.375 0 0 1 2.134 2.134L6.5 22Z"></path></svg>
Whats new</a>
What's new</a>
<a href="/roadmap"><svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path stroke="#8D93A5" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m4.75 6.75 4.5-2v12.5l-4.5 2V6.75ZM14.75 6.75l4.5-2v12.5l-4.5 2V6.75ZM14.75 6.75l-5.5-2v12.5l5.5 2V6.75Z"></path>
</svg>
Expand Down
Loading