Skip to content

Commit

Permalink
Add datasource to the SliceAddView modal (apache#3884)
Browse files Browse the repository at this point in the history
  • Loading branch information
alanmcruickshank committed Nov 17, 2017
1 parent f0acc11 commit c871b08
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion superset/assets/javascripts/dashboard/components/SliceAdder.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ class SliceAdder extends React.Component {
const slices = response.result.map(slice => ({
id: slice.id,
sliceName: slice.slice_name,
vizType: slice.vizType,
vizType: slice.viz_type,
datasourceLink: slice.datasource_link,
modified: slice.modified,
}));

Expand Down Expand Up @@ -165,6 +166,14 @@ class SliceAdder extends React.Component {
>
{t('Viz')}
</TableHeaderColumn>
<TableHeaderColumn
dataField="datasourceLink"
dataSort
// Will cause react-bootstrap-table to interpret the HTML returned
dataFormat={datasourceLink => datasourceLink}
>
{t('Datasource')}
</TableHeaderColumn>
<TableHeaderColumn
dataField="modified"
dataSort
Expand Down
2 changes: 1 addition & 1 deletion superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ class SliceAsync(SliceModelView): # noqa
class SliceAddView(SliceModelView): # noqa
list_columns = [
'id', 'slice_name', 'slice_link', 'viz_type',
'owners', 'modified', 'changed_on']
'datasource_link', 'owners', 'modified', 'changed_on']


appbuilder.add_view_no_menu(SliceAddView)
Expand Down

0 comments on commit c871b08

Please sign in to comment.