Skip to content
Snippets Groups Projects
Unverified Commit 48e78559 authored by Alexander Polyankin's avatar Alexander Polyankin Committed by GitHub
Browse files

Add special case for sample dataset exploration (#18832)

parent 4586f081
Branches
Tags
No related merge requests found
......@@ -95,12 +95,15 @@ class CandidateListLoader extends React.Component {
try {
const { databaseId } = this.state;
if (databaseId != null) {
const database = await MetabaseApi.db_get({
dbId: databaseId,
});
const candidates = await AutoApi.db_candidates({
id: databaseId,
});
if (candidates && candidates.length > 0) {
this._clearTimers();
this.setState({ candidates });
this.setState({ candidates, isSample: database.is_sample });
}
}
} catch (e) {
......
import React, { Component } from "react";
import { Link } from "react-router";
import cx from "classnames";
import { t } from "ttag";
import { jt, t } from "ttag";
import fitViewport from "metabase/hoc/FitViewPort";
......@@ -74,12 +74,14 @@ export default class PostSetupApp extends Component {
);
}
return (
<Card px={3} py={1}>
<Card p={3}>
<ExplorePane
candidates={candidates}
description={
isSample
? t`Once you connect your own data, I can show you some automatic explorations called x-rays. Here are some examples with sample data.`
? jt`While we’re syncing your data, you can check out these explorations of our ${(
<strong>{t`Sample Dataset`}</strong>
)}. Hope you like them!`
: t`I took a look at the data you just connected, and I have some explorations of interesting things I found. Hope you like them!`
}
/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment