-
Notifications
You must be signed in to change notification settings - Fork 192
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
Select agents and add/remove groups #6274
Select agents and add/remove groups #6274
Conversation
23ebaf7
to
63446b0
Compare
60bcfa7
to
36fe172
Compare
UIGeneral
Details 🟢 Select agents and change filters. Selection must clearedChrome - 🟢 Video_2024-02-26_11-26-39.mp4Firefox - 🟢 Video_2024-02-26_11-27-19.mp4Safari - 🟢 Video_2024-02-26_11-29-45.mp4🟢 Select agents and change page. Selection must clearedChrome - 🟢 Video_2024-02-26_11-32-01.mp4Firefox - 🟢 Video_2024-02-26_11-32-23.mp4Safari - 🟢 Video_2024-02-26_11-32-47.mp4🟢 Select agents and sort data. Selection must clearedChrome - 🟢 Video_2024-02-26_11-34-55.mp4Firefox - 🟢 Video_2024-02-26_11-35-33.mp4Safari - 🟢 Video_2024-02-26_11-35-59.mp4🟢 With a read only user, select some agents. Global actions must be disabledChrome - 🟢 Firefox - 🟢 Safari - 🟢 Select some agents
Details 🟢 Go to Add/Remove groups -> Add groups to agents. Select groups, save, and check the results. Test with different agents and groupsChrome - 🟢 Video_2024-02-26_12-09-43.mp4Firefox - 🟢 Video_2024-02-26_12-11-53.mp4Safari - 🟢 Video_2024-02-26_12-13-37.mp4🟢 Go to Add/Remove groups -> Remove groups from agents. Select groups, save, and check the results. Test with different agents and groupsChrome - 🟢 Video_2024-02-26_12-10-34.mp4Firefox - 🟢 Video_2024-02-26_12-12-41.mp4Safari - 🟢 Video_2024-02-26_12-14-26.mp4Select all filtered agents
Details 🟢 Go to Add/Remove groups -> Add groups to agents. A callout should be displayed warning that the changes will be applied to all filtered agentsChrome - 🟢 Firefox - 🟢 Safari - 🟢 🟢 Go to Add/Remove groups -> Add groups to agents. Select groups, save, and check the results. Test with different groupsChrome - 🟢 Firefox - 🟢 Safari - 🟢 🟢 Go to Add/Remove groups -> Remove groups from agents. A callout should be displayed warning that the changes will be applied to all filtered agentsChrome - 🟢 Firefox - 🟢 Safari - 🟢 🟢 Remove groups from agents. Select groups, save, and check the results. Test with different groupsChrome - 🟢 Firefox - 🟢 Safari - 🟢 Paginate requestsThe following request must be paginated:
The default pagination is set to 1000. To test, it is necessary to modify the default value, for example, to 2.
Value modified to 2
Details 🟢 Select agents > Go to Add/Remove groups -> Add groups to agents. Check the groups list and the network requestsChrome - 🟢 Firefox - 🟢 Safari - 🟢 |
CR: ✔️UIGeneral
Details 🟢 Select agents and change filters. Selection must clearedChrome - 🟢 3_evidence_chrome.webmFirefox - 🟢 3_evidence_firefox.webmSafari - ⚫ 🟢 Select agents and change page. Selection must clearedChrome - 🟢 4_evidence_chrome.webmFirefox - 🟢 4_evidence_firefox.webmSafari - ⚫ 🟢 Select agents and sort data. Selection must clearedChrome - 🟢 5_evidence_chrome.webmFirefox - 🟢 5_evidence_firefox.webmSafari - ⚫ 🟢 With a read only user, select some agents. Global actions must be disabledChrome - 🟢 Firefox - 🟢 Safari - ⚫ Select some agents
Details 🟢 Go to Add/Remove groups -> Add groups to agents. Select groups, save, and check the results. Test with different agents and groupsChrome - 🟢 6_evidence_chrome.webmFirefox - 🟢 6_evidence_firefox.webmSafari - ⚫ 🟢 Go to Add/Remove groups -> Remove groups from agents. Select groups, save, and check the results. Test with different agents and groupsChrome - 🟢 7_evidence_chrome.webmFirefox - 🟢 7_evidence_firefox.webmSafari - ⚫ COMMENT 7_evidence_chrome_yellow.webmSelect all filtered agents
Details 🟢 Go to Add/Remove groups -> Add groups to agents. A callout should be displayed warning that the changes will be applied to all filtered agentsChrome - 🟢 Firefox - 🟢 Safari - ⚫ 🟢 Go to Add/Remove groups -> Add groups to agents. Select groups, save, and check the results. Test with different groupsChrome - 🟢 Firefox - 🟢 Safari - ⚫ 🟢 Go to Add/Remove groups -> Remove groups from agents. A callout should be displayed warning that the changes will be applied to all filtered agentsChrome - 🟢 Firefox - 🟢 Safari - ⚫ 🟢 Remove groups from agents. Select groups, save, and check the results. Test with different groupsChrome - 🟢 Firefox - 🟢 Safari - ⚫ Paginate requestsThe following request must be paginated:
The default pagination is set to 1000. To test, it is necessary to modify the default value, for example, to 2.
Details 🟢 Select agents > Go to Add/Remove groups -> Add groups to agents. Check the groups list and the network requestsChrome - 🟢 Firefox - 🟢 Safari - ⚫ |
plugins/main/public/components/endpoints-summary/services/paginated-agents-group.test.tsx
Outdated
Show resolved
Hide resolved
|
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test ✅
CR ✅
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
This PR adds global actions to the agent's table to allow the user to add agents to groups or remove agents from groups.
To achieve this, a selector was added to the table, and the TableWzAPI component had to be modified. Global actions to edit agent groups open a modal from which groups to add or remove can be selected. Upon saving, the progress of the process is displayed, first retrieving agent information and then applying changes to each group.
Finally, the result of the transactions is shown, providing information to the user about agents that were successfully assigned or removed from groups and indicating the cause of any failures if they occurred.
In summary, the following modifications were made:
TableWzAPI
component to add selection options after the title on the table.TableWzAPI
header for better visibility across various screen widths.ref
prop inTableWithSearchBar
to reset the selection when the table is refreshed, sorted, or the page is changed.apiReq
method in theWzRequest
class by introducing an optional parameterreturnOriginalResponse
. This parameter allows the method to return all affected and failed items when adding agents to groups or removing agents from groups.Issues Resolved
#6257
Evidence
Select some agents
Select all filtered agents
Test
Test
Legend:
⚫: none
🟢: pass
🟡: warning
🔴: fail
⚪: not applicable
UI
General
Details
⚫ Without select agents global actions must be disabled
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Select some agents. Global actions must be enabled
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Select agents and change filters. Selection must cleared
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Select agents and change page. Selection must cleared
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Select agents and sort data. Selection must cleared
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ With a read only user, select some agents. Global actions must be disabled
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
Select some agents
Details
⚫ Go to Add/Remove groups -> Add groups to agents. Select groups, save, and check the results. Test with different agents and groups
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Go to Add/Remove groups -> Remove groups from agents. Select groups, save, and check the results. Test with different agents and groups
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
Select all filtered agents
Details
⚫ Go to Add/Remove groups -> Add groups to agents. A callout should be displayed warning that the changes will be applied to all filtered agents
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Go to Add/Remove groups -> Add groups to agents. Select groups, save, and check the results. Test with different groups
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Go to Add/Remove groups -> Remove groups from agents. A callout should be displayed warning that the changes will be applied to all filtered agents
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Remove groups from agents. Select groups, save, and check the results. Test with different groups
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
Paginate requests
The following request must be paginated:
The default pagination is set to 1000. To test, it is necessary to modify the default value, for example, to 2.
plugins/main/public/components/endpoints-summary/services/get-agents.tsx
: Line 9.plugins/main/public/components/endpoints-summary/services/get-groups.tsx
: Line 9.plugins/main/public/components/endpoints-summary/services/paginated-agents-group.tsx
: Line 17.Details
⚫ Select agents > Go to Add/Remove groups -> Add groups to agents. Check the groups list and the network requests
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Select all filtered agents > Go to Add/Remove groups -> Add groups to agents. Select groups and save. Check the network requests to get the agents and add the groups. Check the displayed result
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
Check List
yarn test:jest