Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into snowflake-support
Browse files Browse the repository at this point in the history
  • Loading branch information
iethree committed Oct 29, 2018
2 parents a81e69a + 3681bc2 commit 4d7d0bd
Show file tree
Hide file tree
Showing 70 changed files with 772 additions and 291 deletions.
24 changes: 20 additions & 4 deletions bin/i18n/update-translation-template
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@ fi

POT_NAME="locales/metabase.pot"
POT_BACKEND_NAME="locales/metabase-backend.pot"
# NOTE: hardcoded in .babelrc
POT_FRONTEND_NAME="locales/metabase-frontend.pot"
# NOTE: hardcoded in src/metabase/automagic_dashboards/rules.clj
POT_AUTODASH_NAME="locales/metabase-automatic-dashboards.pot"

mkdir -p "locales"

# update frontend pot
#######################
# update frontend pot #
#######################

# NOTE: about twice as fast to call babel directly rather than a full webpack build
BABEL_ENV=extract ./node_modules/.bin/babel -q -x .js,.jsx -o /dev/null frontend/src
Expand All @@ -29,7 +34,9 @@ BABEL_ENV=extract ./node_modules/.bin/babel -q -x .js,.jsx -o /dev/null frontend
sed -i".bak" -E 's/\$\{ *([0-9]+) *\}/{\1}/g' "$POT_FRONTEND_NAME"
rm "$POT_FRONTEND_NAME.bak"

# update backend pot
######################
# update backend pot #
######################

# xgettext before 0.19 does not understand --add-location=file. Even CentOS
# 7 ships with an older gettext. We will therefore generate full location
Expand All @@ -55,5 +62,14 @@ find src -name "*.clj" | xgettext \
sed -i".bak" 's/charset=CHARSET/charset=UTF-8/' "$POT_BACKEND_NAME"
rm "$POT_BACKEND_NAME.bak"

# merge frontend and backend pots
msgcat "$POT_FRONTEND_NAME" "$POT_BACKEND_NAME" > "$POT_NAME"
########################
# update auto dash pot #
########################

lein generate-automagic-dashboards-pot

##################
# merge all pots #
##################

msgcat "$POT_FRONTEND_NAME" "$POT_BACKEND_NAME" "$POT_AUTODASH_NAME" > "$POT_NAME"
3 changes: 2 additions & 1 deletion docs/administration-guide/03-metadata-editing.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ Common detailed types include:
* Longitude
* Entity Name
* Number
* Currency
* State
* URL
* Zip Code

This is also where you set mark special fields in a table:
This is also where you set special fields in a table:

* Entity Key — the field in this table that uniquely identifies each row. Could be a product ID, serial number, etc.
* Entity Name — different from the entity key, this is the field whose heading represents what each row in the table *is*. For example, in a Users table, the User column might be the entity name.
Expand Down
7 changes: 5 additions & 2 deletions docs/administration-guide/08-configuration-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ The **report timezone** sets the default time zone for displaying times. The tim

*Setting the default timezone will not change the timezone of any data in your database*. If the underlying times in your database aren't assigned to a timezone, Metabase will use the report timezone as the default timezone.

### Enable X-rays
[X-rays](../users-guide/14-x-rays.md) are a great way to allow your users to quickly explore your data or interesting parts of charts, or to see a comparison of different things. But if you're dealing with data sources where allowing users to run x-rays on them would incur burdonsome performance or monetary costs, you can turn them off here.

### Anonymous Tracking
This option turns determines whether or not you allow anonymous data about your usage of Metabase to be sent back to us to help us improve the product. *Your database’s data is never tracked or sent*.

Expand All @@ -23,5 +26,5 @@ To manually fix field or table names if they still look wrong, you can go to the

---

## Next: caching query results
Metabase makes it easy to [automatically cache results](14-caching.md) for queries that take a long time to run.
## Next: setting formatting defaults for dates and numbers
Easily customize how numbers, dates, times, and currencies should be displayed in Metabase with [formatting settings](19-formatting-settings.md).
4 changes: 3 additions & 1 deletion docs/administration-guide/17-data-sandboxes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

Say you have users who you want to be able to log into your Metabase instance, but who should only be able to view data that pertains to them. For example, you might have some customers or partners who you want to let view your Orders table, but you only want them to see their orders. Metabase has a feature called sandboxing that lets you do just that.


The way it works is that you pick a table that you want to sandbox for users in a certain group, then customize how exactly you want to filter that table for those users. For this to work in most cases you’ll first need to add attributes to your users so that Metabase will know how to filter things for them specifically.

### Getting user attributes
Expand Down Expand Up @@ -105,6 +104,9 @@ Now, when I log in as this user and look at the `Orders` table, I only see the c

![Results](images/sandboxing/advanced-example-2-results.png)

#### Current limitations
Currently, a user can only have one sandbox per table. I.e., if a user belongs to two user groups, both of which have been given sandboxed access to the same table, that user will not be able to access data from that table. You will either need to remove that user from one of those groups, or remove the sandboxed access from one of those groups.

---

## Next: sharing and embedding with public links
Expand Down
51 changes: 51 additions & 0 deletions docs/administration-guide/19-formatting-settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
## Setting default formatting

There are lots of Metabase users around the world, each with different preferences for how dates, times, numbers, and currencies should be formatted and displayed. Metabase allows you to customize these formatting options at three different levels:

1. Global formatting defaults in the Admin Panel
2. Field-level formatting overrides in the Data Model section
3. Question-level overrides in visualization settings

### Global formatting defaults
Here are the formatting options available to you from the `Formatting` tab of the `Settings` section in the Admin Panel:

**Dates and Times**
* `Date style:` the way dates should be displayed in tables, axis labels, and tooltips.
* `Date separators:` you can choose between slashes, dashes, and dots here.
* `Abbreviate names of days and months:` whenever a date is displayed with the day of the week and/or the month written out, turning this setting on will display e.g. `January` as `Jan` or `Monday` as `Mon`.
* `Time style:` this lets you choose between a 12-hour or 24-hour clock to display the time by default where applicable.

**Numbers**
* `Separator style:` some folks use commas to separate thousands places, and others use periods. Here's where you can indicate which camp you belong to.

**Currency**
* `Unit of currency:` if you do most of your business in a particular currency, you can specify that here.
* `Currency label style:` whether you want to have your currencies labeled with a symbol, a code (like `USD`), or its full name.
* `Where to display the unit of currency:` this pertains specifically to tables, and lets you choose if you want the currency labels to appear only in the column heading, or next to each value in the column.

### Field-level formatting
You can override the global defaults for a specific field by going to the `Data Model` section of the Admin Panel, selecting the database and table of the field in question, and clicking the gear icon on the far right of the screen next to that field to go to its options page, then clicking on the `Formatting` tab.

The options you'll see here will depend on the field's type. They're generally the same options as in the global formatting settings, with a few additions:

**Dates and Times**
* `Show the time:` this lets you choose if this time field should be displayed by default without the time; with hours and minutes; with hours, minutes, and seconds; or additionally with milliseconds.

**Numbers**
* `Show a mini bar chart:` this only applies to situations where this number is displayed in a table, and if it's on it will show a bar next to each value in this column to show how large or small it is relative to the other values in the column.
* `Style:` lets you choose to display the number as a plain number, a percent, in scientific notation, or as a currency.
* `Separator style:` this gives you various options for how commas and periods are used to separate the number.
* `Minimum number of decimal places:` forces the number to be displayed with exactly this many decimal places.
* `Multiply by a number:` multiplies this number by whatever you type here.
* `Add a prefix/suffix:` lets you put a symbol, word, etc. before or after this number.

**Currency**
Currency field formatting settings include all the same options as in the global formatting section, as well as all the options that Number fields have.

### Question-level formatting
Lastly, you can override all formatting settings in any specific saved question or dashboard card by clicking on the gear to open up the visualization options. To reset any overridden setting to the default, just click on the rotating arrow icon next to the setting's label. This will reset the setting to the field-level setting if there is one; otherwise it will be reset to the global default.

---

## Next: caching query results
Metabase makes it easy to [automatically cache results](14-caching.md) for queries that take a long time to run.
1 change: 1 addition & 0 deletions docs/administration-guide/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Are you in charge of managing Metabase for your organization? Then you're in the
* [Enabling features that send email (SMTP)](02-setting-up-email.md)
* [Setting up Slack integration](09-setting-up-slack.md)
* [Configuring settings](08-configuration-settings.md)
* [Setting formatting defaults for dates and numbers](19-formatting-settings.md)
* [Caching query results](14-caching.md)
* [Customizing how Metabase looks with white labeling<sup>*</sup>](15-whitelabeling.md)

Expand Down
Loading

0 comments on commit 4d7d0bd

Please sign in to comment.