ui: allow viewing hosts from management server connected agents#12149
ui: allow viewing hosts from management server connected agents#12149borisstoyanov merged 1 commit intoapache:4.22from
Conversation
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
|
@shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.22 #12149 +/- ##
=========================================
Coverage 17.55% 17.56%
- Complexity 15536 15544 +8
=========================================
Files 5909 5910 +1
Lines 529118 529123 +5
Branches 64627 64627
=========================================
+ Hits 92902 92914 +12
+ Misses 425761 425757 -4
+ Partials 10455 10452 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@shwstppr , the needs-functional-definition is because it shows hosts and not SVMs, right? I think we can handle this with a hover-text hint. If this is not desired (user input required) we should just remove the link. |
|
@DaanHoogland the problem is, API/UI will return say 4 agentscount but of these 4, 2 will be hypervisor host agents and 2 system VM agents. If I add a link for either the hosts view or the system VMs view, it can be confusing. Currently, we don't have a combined view for agents' list |
yes, and I see the need to deal with that, but I think for now we can remove any link or just leave as is (within this PR). We do have to create a new issue and maybe even a design discussion. I feel it should not block this fix. /me creating an issue for it. |
|
@DaanHoogland a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
|
UI build: ✔️ |
|
works in ui |
There was a problem hiding this comment.
Pull request overview
This PR adds clickable functionality to the agent count displayed in the management server list view, allowing users to navigate directly to a filtered list of connected hosts for that management server.
Changes:
- Made the
agentscountcolumn clickable in the management server list view, linking to the host page with amanagementserveridquery parameter for filtering
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <template v-if="['agentscount'].includes(column.key)"> | ||
| <router-link | ||
| v-if="['managementserver'].includes($route.path.split('/')[1]) && $router.resolve('/host').matched[0].redirect !== '/exception/404'" |
There was a problem hiding this comment.
Using .includes() with single-element arrays is less efficient than direct equality comparison. For checking a single value, consider using column.key === 'agentscount' instead of ['agentscount'].includes(column.key) for better performance and consistency with the majority of column checks in this file (e.g., lines 207, 210, 227, 230, 280, etc.). The same applies to the route path check on line 870 which could use $route.path.split('/')[1] === 'managementserver'.
…he#12149) Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Description
Clicking Number of connected agents shows list of connected hosts for the management server.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?