Skip to content
Snippets Groups Projects
Unverified Commit ddae0bc9 authored by Kyle Doherty's avatar Kyle Doherty Committed by GitHub
Browse files

Add Explore results button to saved SQL questions (#15984)

* add Explore results button

* lint
parent 742ebf75
No related merge requests found
......@@ -10,6 +10,7 @@ import ButtonBar from "metabase/components/ButtonBar";
import CollectionBadge from "metabase/questions/components/CollectionBadge";
import ViewSection, { ViewHeading, ViewSubHeading } from "./ViewSection";
import ViewButton from "metabase/query_builder/components/view/ViewButton";
import QuestionDataSource from "./QuestionDataSource";
import QuestionDescription from "./QuestionDescription";
......@@ -261,6 +262,19 @@ export class ViewTitleHeader extends React.Component {
/>
</Box>
)}
{question.query().database() && isNative && isSaved && (
<Link
to={question
.composeThisQuery()
.setDisplay("table")
.setSettings({})
.getUrl()}
>
<ViewButton medium p={[2, 1]} icon="insight" labelBreakpoint="sm">
{t`Explore results`}
</ViewButton>
</Link>
)}
{isRunnable && !isNativeEditorOpen && (
<RunButtonWithTooltip
className={cx("text-brand-hover hide", {
......
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