williaster commented on a change in pull request #4962: Markdown for dashboard
URL:
https://github.com/apache/incubator-superset/pull/4962#discussion_r187423289
##########
File path: superset/assets/src/dashboard/actions/sliceEntities.js
##########
@@ -29,22 +29,31 @@ export function fetchAllSlices(userId) {
success: response => {
const slices = {};
response.result.forEach(slice => {
- const form_data = JSON.parse(slice.params);
- slices[slice.id] = {
- slice_id: slice.id,
- slice_url: slice.slice_url,
- slice_name: slice.slice_name,
- edit_url: slice.edit_url,
- form_data,
- datasource: form_data.datasource,
- datasource_name: slice.datasource_name_text,
- datasource_link: slice.datasource_link,
- changed_on: new Date(slice.changed_on).getTime(),
- description: slice.description,
- description_markdown: slice.description_markeddown,
- viz_type: slice.viz_type,
- modified: slice.modified,
- };
+ let form_data = JSON.parse(slice.params);
+ let datasource = form_data.datasource;
+ if (!datasource) {
+ datasource = `${slice.datasource_id}__${slice.datasource_type}`;
Review comment:
is there a utility to create this instead of manually concatenating? (not a
blocker, but if so would be nice to use)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]