mengw15 commented on code in PR #3751:
URL: https://github.com/apache/texera/pull/3751#discussion_r2366875227


##########
core/gui/src/app/dashboard/service/user/download/download.service.ts:
##########
@@ -58,8 +58,8 @@ export class DownloadService {
 
   downloadWorkflow(id: number, name: string): Observable<DownloadableItem> {
     return this.workflowPersistService.retrieveWorkflow(id).pipe(
-      map(({ wid, creationTime, lastModifiedTime, ...workflowCopy }) => {
-        const workflowJson = JSON.stringify({ ...workflowCopy, readonly: false 
});
+      map(({ wid, creationTime, lastModifiedTime, content, ...workflowCopy }) 
=> {
+        const workflowJson = JSON.stringify({ ...workflowCopy, ...(content || 
{}), readonly: false }, null, 2);

Review Comment:
   I saw the function in menu.component.ts as:
   `const workflowContentJson = JSON.stringify(workflowContent, null, 2);`
   
   should we keep the style as the same here? as:
   `const workflowJson = JSON.stringify(content, null, 2);`
   
   I tested your version, the json works, but has more info than the export 
workflow json from the canvas page. 



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to