Skip to content

Commit

Permalink
Merge branch 'master' of github.com:metabase/metabase into non-root-p…
Browse files Browse the repository at this point in the history
…ath-v2
  • Loading branch information
tlrobinson committed May 10, 2017
2 parents 4fe2354 + ae4f33b commit 448012e
Show file tree
Hide file tree
Showing 243 changed files with 5,341 additions and 1,864 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ Metabase is the easy, open source way for everyone in your company to ask questi

# Features
- 5 minute [setup](http://www.metabase.com/docs/latest/setting-up-metabase) (We're not kidding)
- Let anyone on your team [ask questions](http://www.metabase.com/docs/latest/users-guide/03-asking-questions) without knowing SQL
- Rich beautiful [dashboards](http://www.metabase.com/docs/latest/users-guide/05-sharing-answers) with auto refresh and fullscreen
- Let anyone on your team [ask questions](http://www.metabase.com/docs/latest/users-guide/04-asking-questions) without knowing SQL
- Rich beautiful [dashboards](http://www.metabase.com/docs/latest/users-guide/06-sharing-answers) with auto refresh and fullscreen
- SQL Mode for analysts and data pros
- Create canonical [segments and metrics](http://www.metabase.com/docs/latest/administration-guide/07-segments-and-metrics) for your team to use
- Send data to Slack or email on a schedule with [Pulses](http://www.metabase.com/docs/latest/users-guide/09-pulses)
- View data in Slack anytime with [MetaBot](http://www.metabase.com/docs/latest/users-guide/10-metabot)
- Send data to Slack or email on a schedule with [Pulses](http://www.metabase.com/docs/latest/users-guide/10-pulses)
- View data in Slack anytime with [MetaBot](http://www.metabase.com/docs/latest/users-guide/11-metabot)
- [Humanize data](http://www.metabase.com/docs/latest/administration-guide/03-metadata-editing) for your team by renaming, annotating and hiding fields

For more information check out [metabase.com](http://www.metabase.com)
Expand Down
1 change: 0 additions & 1 deletion bin/ci
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ node-5() {
run_step lein eastwood
run_step yarn run lint
run_step yarn run test
run_step yarn run test-jest
run_step yarn run flow
}
node-6() {
Expand Down
4 changes: 3 additions & 1 deletion bin/osx-release
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,10 @@ sub create_dmg_from_source_dir {
'-fs', 'HFS+',
'-fsargs', '-c c=64,a=16,e=16',
'-format', 'UDRW',
'-size', '256MB', # it looks like this can be whatever size we want; compression slims it down
'-size', '512MB', # has to be big enough to hold everything uncompressed, but doesn't matter if there's extra space -- compression slims it down
$dmg_filename) == 0 or die $!;

announce "$dmg_filename created.";
}

# Mount the disk image, return the device name
Expand Down
2 changes: 1 addition & 1 deletion bin/version
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

VERSION="v0.24.0-snapshot"
VERSION="v0.25.0-snapshot"

# dynamically pull more interesting stuff from latest git commit
HASH=$(git show-ref --head --hash=7 head) # first 7 letters of hash should be enough; that's what GitHub uses
Expand Down
23 changes: 10 additions & 13 deletions docs/administration-guide/13-embedding.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Metabase includes a powerful application embedding feature that allows you to em
### Key Concepts

#### Applications
An important distinction to keep in mind is the difference between Metabase and the embedding application. The charts and dashboards you will be embedding live in the Metabase application, and will be embedded in your application (i.e. the embedding application).
An important distinction to keep in mind is the difference between Metabase and the embedding application. The charts and dashboards you will be embedding live in the Metabase application, and will be embedded in your application (i.e. the embedding application).

#### Parameters
#### Parameters
Some dashboards and questions have the ability to accept parameters. In dashboards, these are synonymous with dashboard filters. For example, if you have a dashboard with a filter on Publisher ID, this can be specified as a parameter when embedding, so that you could insert the dashboard filtered down to a specific Publisher ID.

SQL based questions with template variables can also accept parameters for each variable. So for a query like
Expand All @@ -18,41 +18,41 @@ WHERE product_id = {{productID}}
you could specify a specific productID when embedding the question.

#### Signed parameters
In general, when embedding a chart or dashboard, the server of your embedding application will need to sign a request for that resource.
In general, when embedding a chart or dashboard, the server of your embedding application will need to sign a request for that resource.

If you choose to sign a specific parameter value, that means the user can't modify that, nor is a filter widget displayed for that parameter. For example, if the "Publisher ID" is assigned a value and the request signed, that means the front-end client that renders that dashboard on behalf of a given logged-in user can only see information for that publisher ID.
If you choose to sign a specific parameter value, that means the user can't modify that, nor is a filter widget displayed for that parameter. For example, if the "Publisher ID" is assigned a value and the request signed, that means the front-end client that renders that dashboard on behalf of a given logged-in user can only see information for that publisher ID.

### Enabling embedding
To enable embedding, go to the Admin Panel and under Settings, go to the "Embedding in other applications" tab. From there, click "Enable." Here you will see a secret signing key you can use later to sign requests. If you ever need to invalidate that key and generate a new one, just click on "Regenerate Key".
To enable embedding, go to the Admin Panel and under Settings, go to the "Embedding in other applications" tab. From there, click "Enable." Here you will see a secret signing key you can use later to sign requests. If you ever need to invalidate that key and generate a new one, just click on "Regenerate Key".
![Enabling Embedding](images/embedding/01-enabling.png)

You can also see all questions and dashboards that have been marked as "Embeddable" here, as well as revoke any questions or dashboards that should no longer be embeddable in other applications.
You can also see all questions and dashboards that have been marked as "Embeddable" here, as well as revoke any questions or dashboards that should no longer be embeddable in other applications.

Once you've enabled the embedding feature on your Metabase instance, you should then go to the individual questions and dashboards you wish to embed to set them up for embedding.

### Embedding Charts and Dashboards

To mark a given question or dashboard, click on the sharing icon
To mark a given question or dashboard, click on the sharing icon

![Share icon](images/embedding/02-share-icon.png)

Then select "Embed this question in an application"

![Enable sharing for a question](images/embedding/03-enable-question.png)

Here you will see a preview of the question or dashboard as it will appear in your application, as well as a panel that shows you the code you will need to insert in your application.
Here you will see a preview of the question or dashboard as it will appear in your application, as well as a panel that shows you the code you will need to insert in your application.

![Preview](images/embedding/04-preview.png)

Importantly, you will need to hit "Publish" when you first set up a chart or dashboard for embedding and each time you change your embedding settings. Also, any changes you make to the resource might require you to update the code in your own application to the latest code sample in the "Code Pane".
Importantly, you will need to hit "Publish" when you first set up a chart or dashboard for embedding and each time you change your embedding settings. Also, any changes you make to the resource might require you to update the code in your own application to the latest code sample in the "Code Pane".

![Code samples for embedding](images/embedding/05-code.png)

We provide code samples for common front end template languages as well as some common back-end web frameworks and languages. You may also use these as starting points for writing your own versions in other platforms.


### Embedding Charts and Dashboards with locked parameters
If you wish to have a parameter locked down to prevent your embedding application's end users from seeing other users' data, you can mark parameters as "Locked."Once a parameter is marked as Locked, it is not displayed as a filter widget, and must be set by the embedding application's server code.
If you wish to have a parameter locked down to prevent your embedding application's end users from seeing other users' data, you can mark parameters as "Locked."Once a parameter is marked as Locked, it is not displayed as a filter widget, and must be set by the embedding application's server code.

![Locked parameters](images/embedding/06-locked.png)

Expand All @@ -65,6 +65,3 @@ Dashboards are a fixed aspect ratio, so if you'd like to ensure they're automati

### Reference applications
To see concrete examples of how to embed Metabase in applications under a number of common frameworks, check out our [reference implementations](https://github.com/metabase/embedding-reference-apps) on Github.

## That’s it!
If you still have questions, or want to share Metabase tips and tricks, head over to our [discussion board](http://discourse.metabase.com/). See you there!
21 changes: 21 additions & 0 deletions docs/administration-guide/14-caching.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Caching query results in Metabase
Metabase now gives you the ability to automatically cache the results of queries that take a long time to run.

### Enabling caching
To start caching your queries, head to the Settings section of the Admin Panel, and click on the `Caching` tab at the bottom of the side navigation. Then turn the caching toggle to `Enabled`.

![Caching](images/caching.png)

End-users will see a timestamp on cached questions in the top right of the question detail page showing the time when that question was last updated (i.e., the time when the current result was cached). Clicking on the `Refresh` button on a question page will manually rerun the query and override the cached result with the new result.

### Caching settings
In Metabase, rather than setting cache settings manually on a per-query basis, we give you two parameters to set to automatically cache the results of long queries: the minimum average query duration, and the cache TTL multiplier.

#### Minimum query duration
Your Metabase instance keeps track of the average query execution times of your queries, and it will cache the results of all saved questions with an average query execution time longer than the number you put in this box (in seconds).

#### Cache Time-to-live (TTL)
Instead of setting an absolute number of minutes or seconds for a cached result to persist, Metabase lets you put in a multiplier to determine the cache's TTL. Each query's cache TTL is computed by multiplying its average execution time by the number you put in this box. So if you put in `10`, a query that takes 5 seconds on average to execute will have its cache last for 50 seconds; and a query that takes 10 minutes will have a cached result lasting 100 minutes. This way, each query's cache is proportional to its execution time.

#### Max cache entry size
Lastly, you can set the maximum size of each question's cache in kilobytes, to prevent them from taking up too much space on your server.
Binary file added docs/administration-guide/images/caching.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/administration-guide/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Are you in charge of managing Metabase for your organization? Then you're in the
* [Creating a Getting Started Guide for your team](11-getting-started-guide.md)
* [Sharing dashboards and questions with public links](12-public-links.md)
* [Embedding Metabase in other Applications](13-embedding.md)
* [Caching query results](14-caching.md)

First things first, you'll need to install Metabase. If you haven’t done that yet, our [Installation Guide](../operations-guide/start.md#installing-and-running-metabase) will help you through the process.

Expand Down
Loading

0 comments on commit 448012e

Please sign in to comment.