Skip to content
Snippets Groups Projects
Unverified Commit 8d4d9aab authored by Tom Robinson's avatar Tom Robinson
Browse files

Merge branch 'master' of github.com:metabase/metabase into embed-resizing

parents 4d29a2a9 738bff05
No related tags found
No related merge requests found
Showing
with 77 additions and 32 deletions
......@@ -2,7 +2,7 @@
"rules": {
"strict": [2, "never"],
"no-undef": 2,
"no-unused-vars": [1, {"vars": "all", "args": "none", "varsIgnorePattern": "^(React|PropTypes|Component)$"}],
"no-unused-vars": [1, {"vars": "all", "args": "none"}],
"import/no-commonjs": 1,
"quotes": 0,
"camelcase": 0,
......
......@@ -9,10 +9,10 @@
#import "TaskHealthChecker.h"
/// Check out health every this many seconds
static const CGFloat HealthCheckIntervalSeconds = 1.2f;
static const CGFloat HealthCheckIntervalSeconds = 2.0f;
/// This number should be lower than HealthCheckIntervalSeconds so requests don't end up piling up
static const CGFloat HealthCheckRequestTimeout = 0.25f;
static const CGFloat HealthCheckRequestTimeout = 1.75f;
/// After this many seconds of being unhealthy, consider the task timed out so it can be killed
static const CFTimeInterval TimeoutIntervalSeconds = 60.0f;
......@@ -50,7 +50,7 @@ static const CFTimeInterval TimeoutIntervalSeconds = 60.0f;
[self resetTimeout];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
self.healthCheckTimer = [NSTimer timerWithTimeInterval:HealthCheckIntervalSeconds target:self selector:@selector(checkHealth) userInfo:nil repeats:YES];
self.healthCheckTimer.tolerance = HealthCheckIntervalSeconds / 2.0f;
[[NSRunLoop mainRunLoop] addTimer:self.healthCheckTimer forMode:NSRunLoopCommonModes];
......@@ -91,8 +91,9 @@ static const CFTimeInterval TimeoutIntervalSeconds = 60.0f;
}
- (void)checkHealth {
// run the health check on the high-priorty GCD queue because it's imperative that it complete so we can get an accurate picture of Mac App health
__weak TaskHealthChecker *weakSelf = self;
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
[weakSelf checkHealth:^(BOOL healthy) {
if (!healthy) NSLog(@"😷");
if (healthy && !weakSelf.healthy) NSLog(@"✅");
......
......@@ -37,6 +37,7 @@ For more information check out [metabase.com](http://www.metabase.com)
- CrateDB
- Oracle
- Vertica
- Presto
Don't see your favorite database? File an issue to let us know.
......
......@@ -19,11 +19,15 @@ node-1() {
run_step lein-test
}
node-2() {
is_enabled "drivers" && export ENGINES="h2,postgres,sqlite" || export ENGINES="h2"
is_enabled "drivers" && export ENGINES="h2,postgres,sqlite,presto" || export ENGINES="h2"
if is_engine_enabled "crate"; then
run_step install-crate
fi
if is_engine_enabled "presto"; then
run_step install-presto
fi
MB_ENCRYPTION_SECRET_KEY='Orw0AAyzkO/kPTLJRxiyKoBHXa/d6ZcO+p+gpZO/wSQ=' MB_DB_TYPE=mysql MB_DB_DBNAME=circle_test MB_DB_PORT=3306 MB_DB_USER=ubuntu MB_DB_HOST=localhost \
MB_PRESTO_HOST=localhost MB_PRESTO_PORT=8080 \
run_step lein-test
}
node-3() {
......@@ -91,6 +95,11 @@ install-vertica() {
sleep 60
}
install-presto() {
docker run --detach --publish 8080:8080 wiill/presto-mb-ci
sleep 10
}
lein-test() {
lein test
}
......
......@@ -15,4 +15,8 @@ Starting in v0.18.0 Metabase provides a driver for connecting to CrateDB directl
3. Click the `Save` button. Done.
Metabase will now begin inspecting your CrateDB Dataset and finding any tables and fields to build up a sense for the schema. Give it a little bit of time to do its work and then you're all set to start querying.
\ No newline at end of file
Metabase will now begin inspecting your CrateDB Dataset and finding any tables and fields to build up a sense for the schema. Give it a little bit of time to do its work and then you're all set to start querying.
### Known limitations
* Columns/Fields of type `object_array` are deactivated and not exposed. However, their nested fields are listed and also supported for queries.
\ No newline at end of file
# API Documentation for Metabase v0.23.0-snapshot
# API Documentation for Metabase v0.24.0-snapshot
## `GET /api/activity/`
......@@ -150,6 +150,8 @@ Run the query associated with a Card.
* **`parameters`**
* **`ignore_cache`** value may be nil, or if non-nil, value must be a boolean.
## `POST /api/card/:card-id/query/csv`
......@@ -193,7 +195,7 @@ Update a `Card`.
* **`visualization_settings`** value may be nil, or if non-nil, value must be a map.
* **`description`** value may be nil, or if non-nil, value must be a non-blank string.
* **`description`** value may be nil, or if non-nil, value must be a string.
* **`archived`** value may be nil, or if non-nil, value must be a boolean.
......@@ -420,7 +422,7 @@ Update a `Dashboard`.
* **`points_of_interest`** value may be nil, or if non-nil, value must be a non-blank string.
* **`description`** value may be nil, or if non-nil, value must be a non-blank string.
* **`description`** value may be nil, or if non-nil, value must be a string.
* **`show_in_getting_started`** value may be nil, or if non-nil, value must be a non-blank string.
......@@ -587,7 +589,7 @@ You must be a superuser to do this.
## `POST /api/dataset/`
Execute an MQL query and retrieve the results as JSON.
Execute a query and retrieve the results in the usual format.
##### PARAMS:
......@@ -1286,6 +1288,8 @@ Create a new `Pulse`.
* **`channels`** value must be an array. Each value must be a map. The array cannot be empty.
* **`skip_if_empty`** value must be a boolean.
## `POST /api/pulse/test`
......@@ -1299,6 +1303,8 @@ Test send an unsaved pulse.
* **`channels`** value must be an array. Each value must be a map. The array cannot be empty.
* **`skip_if_empty`** value must be a boolean.
## `PUT /api/pulse/:id`
......@@ -1314,6 +1320,8 @@ Update a `Pulse` with ID.
* **`channels`** value must be an array. Each value must be a map. The array cannot be empty.
* **`skip_if_empty`** value must be a boolean.
## `GET /api/revision/`
......@@ -1482,8 +1490,6 @@ Send a reset email when user has forgotten their password.
* **`remote-address`**
* **`request`**
## `POST /api/session/google_auth`
......@@ -1561,8 +1567,6 @@ Special endpoint for creating the first user during setup.
* **`first_name`** value must be a non-blank string.
* **`request`**
* **`password`** Insufficient password strength
* **`name`**
......@@ -1786,7 +1790,7 @@ Update a user's password.
## `PUT /api/user/:id/qbnewb`
Indicate that a user has been informed about the vast intricacies of 'the' QueryBuilder.
Indicate that a user has been informed about the vast intricacies of 'the' Query Builder.
##### PARAMS:
......
......@@ -98,6 +98,21 @@ If this happens, setting a few JVM options should fix your issue:
Alternatively, you can upgrade to Java 8 instead, which will fix the issue as well.
### Metabase fails to connect to H2 Database on Windows 10
In some situations the Metabase JAR needs to be unblocked so it has permissions to create local files for the application database.
On Windows 10, if you see an error message like
Exception in thread "main" java.lang.AssertionError: Assert failed: Unable to connect to Metabase DB.
when running the JAR, you can unblock the file by right-clicking, clicking "Properties", and then clicking "Unblock".
See Microsoft's documentation [here](https://blogs.msdn.microsoft.com/delay/p/unblockingdownloadedfile/) for more details on unblocking downloaded files.
There are a few other reasons why Metabase might not be able to connect to your H2 DB. Metabase connects to the DB over a TCP port, and it's possible
that something in your `ipconfig` configuration is blocking the H2 port. See the discussion [here](https://github.com/metabase/metabase/issues/1871) for
details on how to resolve this issue.
# Configuring the Metabase Application Database
......
/* @flow weak */
import React, { Component, PropTypes } from "react";
import React, { Component } from "react";
import { connect } from "react-redux";
import Navbar from "metabase/nav/containers/Navbar.jsx";
......
import React, { Component, PropTypes } from "react";
import React, { Component } from "react";
import PropTypes from "prop-types";
import { Link } from "react-router";
import ModalContent from "metabase/components/ModalContent.jsx";
import * as Urls from "metabase/lib/urls";
export default class CreatedDatabaseModal extends Component {
static propTypes = {
databaseId: PropTypes.number.isRequired,
......@@ -22,7 +25,7 @@ export default class CreatedDatabaseModal extends Component {
We're analyzing its schema now to make some educated guesses about its
metadata. <Link to={"/admin/datamodel/database/"+databaseId}>View this
database</Link> in the Data Model section to see what we've found and to
make edits, or <Link to={"/q#?db="+databaseId}>ask a question</Link> about
make edits, or <Link to={Urls.question(null, `?db=${databaseId}`)}>ask a question</Link> about
this database.
</p>
</div>
......
import React, { Component, PropTypes } from "react";
import React, { Component } from "react";
import PropTypes from "prop-types";
import cx from "classnames";
import LoadingAndErrorWrapper from "metabase/components/LoadingAndErrorWrapper.jsx";
import DatabaseDetailsForm from "metabase/components/DatabaseDetailsForm.jsx";
......
import React, { Component, PropTypes } from "react";
import React, { Component } from "react";
import PropTypes from "prop-types";
import ModalContent from "metabase/components/ModalContent.jsx";
......
/* eslint "react/prop-types": "warn" */
import React, { Component, PropTypes } from "react";
import React, { Component } from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import MetabaseSettings from "metabase/lib/settings";
......
import React, { Component, PropTypes } from "react";
import React, { Component } from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import { Link } from "react-router";
......
import React, { Component, PropTypes } from "react";
import React, { Component } from "react";
import cx from "classnames";
import { formDomOnlyProps } from "metabase/lib/redux";
......
import React, { Component, PropTypes } from "react";
import React, { Component } from "react";
import PropTypes from "prop-types";
export default class FormLabel extends Component {
static propTypes = {
......
import React, { Component, PropTypes } from "react";
import React, { Component } from "react";
import cx from "classnames";
......
import React, { Component, PropTypes } from "react";
import React, { Component } from "react";
import PropTypes from "prop-types";
import { Link } from "react-router";
import Icon from "metabase/components/Icon.jsx";
......
import React, { Component, PropTypes } from "react";
import React, { Component } from "react";
import ReactDOM from "react-dom";
import ActionButton from "metabase/components/ActionButton.jsx";
......
import React, { Component, PropTypes } from "react";
import React, { Component } from "react";
import PropTypes from "prop-types";
import GuiQueryEditor from "metabase/query_builder/components/GuiQueryEditor.jsx";
import { serializeCardForUrl } from "metabase/lib/card";
import * as Urls from "metabase/lib/urls";
import cx from "classnames";
......@@ -56,7 +57,7 @@ export default class PartialQueryBuilder extends Component {
}
}
};
let previewUrl = "/q#" + serializeCardForUrl(previewCard);
let previewUrl = Urls.question(null, previewCard);
const onChange = (query) => {
this.props.onChange(query);
......
import React, { Component, PropTypes } from "react";
import React, { Component } from "react";
import PropTypes from "prop-types";
import Input from "metabase/components/Input.jsx";
import Select from "metabase/components/Select.jsx";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment