Skip to content

fix(dashboard): Update filter logic to use nodes as source [#294]#313

Merged
leeeunkoo merged 4 commits intoeclipse-pullpiri:mainfrom
LGSI-KarumuriHari:main
Sep 30, 2025
Merged

fix(dashboard): Update filter logic to use nodes as source [#294]#313
leeeunkoo merged 4 commits intoeclipse-pullpiri:mainfrom
LGSI-KarumuriHari:main

Conversation

@LGSI-KarumuriHari
Copy link
Contributor

@LGSI-KarumuriHari LGSI-KarumuriHari commented Sep 29, 2025

📝 PR Description
This PR refactors the dashboard workloads logic to remove all mock node data and implements real-time node and pod updates. Nodes are now fetched from the backend API every 5 seconds, ensuring the dashboard reflects the latest cluster state. Pod age and memory usage calculations have been improved for accuracy. The filtering logic has been updated to use nodes as the primary source, mapping pods to nodes after node creation. This change ensures that pods are always associated with the correct, up-to-date node information.

Key Changes
Removed all mock node data from the workloads , dashboard .
Added periodic fetch (every 5 seconds) for nodes from the backend API.
Improved pod age and memory usage calculation logic.
Updated filter logic: nodes are created first, then pods are mapped to nodes.
Enhanced UI to reflect real-time node and pod state.
Cleaned up unused code and comments for clarity.

ScreenShots

Before: Even the node info is available , the filter is expecting from pods/containers data to map the nodes
image

After : Changed the logic to fetch from nodes data to map for filter component , removing dependency from pods , and removed mock data if no pods are available
image

step1 : when only node data is present

Screenshot from 2025-09-29 20-08-17

step2: when we run .helloworld.sh , which is dynamically updated , as the fetch logic is being called every 5 secs for new updates
Screenshot from 2025-09-29 20-09-30

🔗 Related Issue
closes->#294

🧪 Test Method
logs are printed in console on successful fetch

✅ Checklist
[✅] Code conventions are followed
[✅] Tests are added/modified
[✅] Documentation is updated (if necessary)

…/memory logic, update filter logic

- Removed all mock node data from workloads dashboard
- Added periodic fetch (every 5 seconds) for nodes to get latest updates
- Improved pod age and memory usage calculation logic
- Updated filter logic to use nodes as source, then map pods to nodes (nodes created first, pods assigned after)
@LGSI-KarumuriHari
Copy link
Contributor Author

Hey @daeyoung-jeong-lge @youngtaekiim @leeeunkoo
please review these changes and merge
Thanks!!

@daeyoung-jeong-lge
Copy link
Contributor

@chaehee-lim Could you review this PR? Thanks.

Copy link
Contributor

@daeyoung-jeong-lge daeyoung-jeong-lge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chaehee-lim Please check my review comments and give your opinion to Hari. Thanks.

@LGSI-KarumuriHari
Copy link
Contributor Author

LGSI-KarumuriHari commented Sep 30, 2025

@daeyoung-jeong-lge @chaehee-lim

  • Added Accordingly for recentLogs component from both Pods and Nodes info
Screenshot from 2025-09-30 12-55-57
  • Added default Timeout in .env ask requested

Copy link
Contributor

@daeyoung-jeong-lge daeyoung-jeong-lge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@daeyoung-jeong-lge
Copy link
Contributor

@chaehee-lim After review, please request to @leeeunkoo and @youngtaekiim to merge this PR. Thanks.

@chaehee-lim
Copy link
Contributor

@leeeunkoo @youngtaekiim
please merge this PR. Thanks.

@leeeunkoo leeeunkoo merged commit 3aec6f7 into eclipse-pullpiri:main Sep 30, 2025
6 checks passed
@leeeunkoo leeeunkoo added this to the Setting Dashboard milestone Oct 10, 2025
@leeeunkoo leeeunkoo linked an issue Oct 10, 2025 that may be closed by this pull request
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.

[TASK] Implement REST GET API in Dashboard for workloads

4 participants