-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(add-flow): add perma link on tree view
- Loading branch information
1 parent
3cd0a65
commit ca4e617
Showing
3 changed files
with
27 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const Helpers = { | ||
processFlow: function (flow) { | ||
const {job, children} = flow; | ||
const queueName = job.queueName; | ||
|
||
if (children && children.length > 0) { | ||
return { | ||
job: {...job, queueName}, | ||
children: children.map((child) => this.processFlow(child)), | ||
}; | ||
} else { | ||
return { | ||
job: {...job, queueName}, | ||
}; | ||
} | ||
}, | ||
}; | ||
|
||
module.exports = Helpers; |