Skip to content

Commit

Permalink
Add Explore results button to saved SQL questions (metabase#15984)
Browse files Browse the repository at this point in the history
* add Explore results button

* lint
  • Loading branch information
kdoh authored May 10, 2021
1 parent 742ebf7 commit ddae0bc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions frontend/src/metabase/query_builder/components/view/ViewHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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", {
Expand Down

0 comments on commit ddae0bc

Please sign in to comment.