Skip to content

Commit

Permalink
Add show metadata button back to the explore view
Browse files Browse the repository at this point in the history
- Add the show metadta button, accidentally removed from PR apache#6046, back to the explore view
- Remove dead code that is no longer reachable from DataSourceModal.jsx.
  • Loading branch information
xtinec committed Feb 19, 2019
1 parent 30cd0e3 commit 6de7a3f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
5 changes: 0 additions & 5 deletions superset/assets/src/datasource/DatasourceModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class DatasourceModal extends React.PureComponent {
showDatasource: false,
datasource: props.datasource,
};
this.toggleShowDatasource = this.toggleShowDatasource.bind(this);
this.setSearchRef = this.setSearchRef.bind(this);
this.onDatasourceChange = this.onDatasourceChange.bind(this);
this.onClickSave = this.onClickSave.bind(this);
Expand Down Expand Up @@ -111,10 +110,6 @@ class DatasourceModal extends React.PureComponent {
this.dialog = ref;
}

toggleShowDatasource() {
this.setState({ showDatasource: !this.state.showDatasource });
}

renderSaveDialog() {
return (
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,21 @@ class DatasourceControl extends React.PureComponent {
{this.props.datasource.name}
</Label>
</OverlayTrigger>
<OverlayTrigger
placement="right"
overlay={
<Tooltip id={'toggle-datasource-tooltip'}>
{t('Expand/collapse datasource configuration')}
</Tooltip>
}
>
<a href="#">
<i
className={`fa fa-${this.state.showDatasource ? 'minus' : 'plus'}-square m-r-5`}
onClick={this.toggleShowDatasource}
/>
</a>
</OverlayTrigger>
{this.props.datasource.type === 'table' &&
<OverlayTrigger
placement="right"
Expand Down

0 comments on commit 6de7a3f

Please sign in to comment.