Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F/277 display flow tree #872

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

ahnwarez
Copy link
Contributor

@ahnwarez ahnwarez commented Jan 6, 2025

Should close #277 and #681

This PR displays a tree-like graph for any job that was generated by a FlowProducer and it allows users to navigate the tree, up or down the tree.

Screen.Recording.2025-01-06.at.5.11.37.PM.mov

The changes made cover api and ui packages.

The CSS and styling in JobTree.module.css are not that great. I admit that my skills aren't great. So, please make the necessary changes to remove any repetition or redundancies.

I'll close #870 because all changes are already included in this PR.

Thanks for the feedback on my previous PR.

- Implemented `getJobTree` method in `BaseAdapter` for retrieving job tree structure.
- Added empty implementation in `BullAdapter` to return an empty array.
- Developed full functionality in `BullMQAdapter` to fetch and map job tree nodes from the queue.

This enhances the API for better job management and visualization.
…dren

Modified the JobTreeNode interface in app.ts to replace the optional children property with jobTree, enhancing the structure for representing job hierarchies in the API.
Updated the getJobState function to extract jobId from the request parameters and retrieve the job tree structure using the new getJobTree method. The response now includes the job tree, improving job management and visualization capabilities in the API.
Updated the BullMQAdapter's mapTree function to handle asynchronous job state retrieval and ensure proper mapping of job trees. The JobTreeNode interface has been modified to include queueName and status properties, improving the representation of job hierarchies in the API.
- Added a new JobTree component to visualize job hierarchies.
- Introduced JobTree.module.css for styling the JobTree component.
- Updated useJob hook to include jobTree state management.
- Modified JobPage to render JobTree with job data.
- Enhanced localization files to include "Children" translations for job tree representation.
- Refactored JobCard and related components to improve layout and structure.

These changes improve the user interface for job management and provide better visualization of job relationships.
Updated JobPage to only display the JobTree component when there are child jobs available. This change improves the user interface by preventing unnecessary rendering of the JobTree when it is empty, enhancing overall performance and user experience.
@felixmosh
Copy link
Owner

I didn't forgot about this PR, I'm a bit busy, I'll review it ASAP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Add support for the new Flow method of bullmq
2 participants