This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 39ee33a Add datasource to the SliceAddView modal (#3884) (#3900)
39ee33a is described below
commit 39ee33aeff6af2e7e26d6bbebd0225303b82924e
Author: Alan Cruickshank <[email protected]>
AuthorDate: Sat Nov 18 04:11:23 2017 +0000
Add datasource to the SliceAddView modal (#3884) (#3900)
---
.../assets/javascripts/dashboard/components/SliceAdder.jsx | 11 ++++++++++-
superset/views/core.py | 2 +-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/superset/assets/javascripts/dashboard/components/SliceAdder.jsx
b/superset/assets/javascripts/dashboard/components/SliceAdder.jsx
index 03e0cb8..6c2ea0e 100644
--- a/superset/assets/javascripts/dashboard/components/SliceAdder.jsx
+++ b/superset/assets/javascripts/dashboard/components/SliceAdder.jsx
@@ -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,
}));
@@ -166,6 +167,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
sortFunc={this.modifiedDateComparator}
diff --git a/superset/views/core.py b/superset/views/core.py
index 17f5151..af2396e 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -451,7 +451,7 @@ appbuilder.add_view_no_menu(SliceAsync)
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)
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].