eschutho commented on a change in pull request #11755:
URL: 
https://github.com/apache/incubator-superset/pull/11755#discussion_r529868116



##########
File path: superset-frontend/src/SqlLab/components/ResultSet.tsx
##########
@@ -95,11 +117,33 @@ export default class ResultSet extends React.PureComponent<
     this.toggleExploreResultsButton = this.toggleExploreResultsButton.bind(
       this,
     );
+    this.handleSaveInDataset = this.handleSaveInDataset.bind(this);
+    this.handleHideSaveModal = this.handleHideSaveModal.bind(this);
+    this.handleDatasetNameChange = this.handleDatasetNameChange.bind(this);
+    this.handleSaveDatasetRadioBtnState = 
this.handleSaveDatasetRadioBtnState.bind(this);
+    this.handleOverwriteCancel = this.handleOverwriteCancel.bind(this);
+    this.handleOverwriteDataset = this.handleOverwriteDataset.bind(this);
+    this.handleOverwriteDatasetOption = 
this.handleOverwriteDatasetOption.bind(this);
   }
 
   componentDidMount() {
     // only do this the first time the component is rendered/mounted
     this.reRunQueryIfSessionTimeoutErrorOnMount();
+
+    // Hack: waiting for talks with tai to pull data out of the initial state
+    const appContainer = document.getElementById('app');
+    const bootstrapData = 
JSON.parse(appContainer.getAttribute('data-bootstrap'));
+
+    // Todo: figure out how to get user information to properly query datasets 
they own
+    // Todo: move this to actions file
+    SupersetClient.get({
+      endpoint: 
`/api/v1/dataset/?q=(filters:!((col:owners,opr:rel_m_m,value:${bootstrapData.user.userId}),(col:table_name,opr:ct,value:%27%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0)`,
+    }).then(data => {
+      const userDatasetsOwned = data.json.result.map(r => {
+        return { dataSetName: r.table_name, dataSetId: r.id };
+      });
+      this.setState({ userDatasetsOwned });
+    });

Review comment:
       should we review these todos yet or no?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to