Skip to content

ui: fix account list on domain change in filterview - #9345

Merged
sureshanaparti merged 4 commits into
apache:4.19from
shapeblue:ui-fix-searchviewacc
Jul 8, 2024
Merged

sureshanaparti merged 4 commits into
apache:4.19from
shapeblue:ui-fix-searchviewacc

Conversation

@shwstppr

@shwstppr shwstppr commented Jul 5, 2024 •

Copy link
Copy Markdown
Contributor

Description

Fixes #9274

Fixes the following issues with filter widget in the UI

  • Account element loading
  • Account filtering usage based on name and not with UUID
  • Listing accounts for only the selected domain
  • Labels for primary storage element

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

Primary storage list labels,
Before
Screenshot from 2024-07-08 14-35-39
After
Screenshot from 2024-07-08 14-36-00

Account filtering after fix,

list-acc-filtering.mp4

How Has This Been Tested?

How did you try to break this feature and the system with this change?

Fixes apache#9274

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr

shwstppr commented Jul 5, 2024

Copy link
Copy Markdown
Contributor Author

@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@codecov

codecov Bot commented Jul 5, 2024 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 4.27%. Comparing base (b080215) to head (4fc3606).
Report is 1 commits behind head on 4.19.

Additional details and impacted files
@@           Coverage Diff            @@
##            4.19   #9345      +/-   ##
========================================
- Coverage   4.27%   4.27%   -0.01%     
========================================
  Files        365     365              
  Lines      29492   29505      +13     
  Branches    5154    5161       +7     
========================================
  Hits        1261    1261              
- Misses     28088   28101      +13     
  Partials     143     143              
Flag Coverage Δ
uitests 4.27% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9345 (QA-JID-396)

@yadvr yadvr added this to the 4.19.1.0 milestone Jul 6, 2024

@DaanHoogland DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

code looks good , but some more test info would be useful. I suppose this is in the deploy instance dialog. This would not be clear to the outsider.

@weizhouapache

Copy link
Copy Markdown
Member

quicly tested it
the account list contains the accounts in the domain and sub-domains, not sure if it is correct.

the second issue in #9274 is not fixed

cc @shwstppr @sureshanaparti

@shwstppr

shwstppr commented Jul 8, 2024

Copy link
Copy Markdown
Contributor Author

Thanks @weizhouapache. I'll check

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr

shwstppr commented Jul 8, 2024

Copy link
Copy Markdown
Contributor Author

@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@shwstppr

shwstppr commented Jul 8, 2024

Copy link
Copy Markdown
Contributor Author

@weizhouapache added a fix
@DaanHoogland added PR desc and screenshots

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9345 (QA-JID-397)

@weizhouapache

Copy link
Copy Markdown
Member

thanks @shwstppr

tested some actions

  • switch from ROOT domain to a sub-domain, the account list is updated. looks good
  • switch from sub-domain to ROOT domain, the account list is updated, which contains all accounts (in ROOT domain and sub-domain)
  • search by ROOT domain and an account in ROOT domain, it works
  • search by sub-domain and an account in the sub-domain, it works
  • search by ROOT domain and an account in the sub-domain, it throws an exception

maybe we do not need to list the accounts in the sub-domains of selected domain.
cc @sureshanaparti @shwstppr

@vishesh92

Copy link
Copy Markdown
Member

code looks good to me.

@vishesh92

Copy link
Copy Markdown
Member

thanks @shwstppr

tested some actions

* switch from ROOT domain to a sub-domain, the account list is updated. looks good

* switch from sub-domain to ROOT domain, the account list is updated, which contains all accounts (in ROOT domain and sub-domain)

* search by ROOT domain and an account in ROOT domain, it works

* search by sub-domain and an account in the sub-domain, it works

* search by ROOT domain and an account in the sub-domain, it throws an exception

maybe we do not need to list the accounts in the sub-domains of selected domain. cc @sureshanaparti @shwstppr

Agree with @weizhouapache . AFAIK, for all the list queries for a resource, when we specify domainid, it lists resources for that specific domainid and not the subdomains.

@shwstppr

shwstppr commented Jul 8, 2024

Copy link
Copy Markdown
Contributor Author

@weizhouapache cc @vishesh92 I guess that needs an API change,

(qaserver) 🐱 > list accounts domainid=b32b3316-6c14-11ed-86c2-1e0093003d07 filter=id,name,domainid
{
  "account": [
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "fda39ec5-6c14-11ed-86c2-1e0093003d07",
      "name": "admin"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "ef45928c-b2cb-4f9d-93cd-a484e761d4f9",
      "name": "baremetal-system-account"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "cd9ebe99-e02c-4385-b6ae-bac1ea677489",
      "name": "rohit"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "4e9e632c-ee02-49c1-9868-b53700246c73",
      "name": "euler"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "36b4c0a4-b339-40f0-9991-b17282a686a9",
      "name": "rick"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "04efc774-1777-4056-9cd7-21e27aa52a72",
      "name": "testy"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "705e654b-d85d-456d-8e51-cbe6a14865ad",
      "name": "user"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "f79af173-32c1-4f0b-bb0a-6acb433aabb3",
      "name": "capc"
    },
    {
      "domainid": "ae613512-769e-48cd-bd93-a685b9ac9c0a",
      "id": "3dd88047-73dd-4795-833d-da87e13c0698",
      "name": "test"
    }
  ],
  "count": 9
}
(qaserver) 🐱 > list accounts domainid=b32b3316-6c14-11ed-86c2-1e0093003d07 filter=id,name,domainid isrecursive=false 
{
  "account": [
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "fda39ec5-6c14-11ed-86c2-1e0093003d07",
      "name": "admin"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "ef45928c-b2cb-4f9d-93cd-a484e761d4f9",
      "name": "baremetal-system-account"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "cd9ebe99-e02c-4385-b6ae-bac1ea677489",
      "name": "rohit"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "4e9e632c-ee02-49c1-9868-b53700246c73",
      "name": "euler"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "36b4c0a4-b339-40f0-9991-b17282a686a9",
      "name": "rick"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "04efc774-1777-4056-9cd7-21e27aa52a72",
      "name": "testy"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "705e654b-d85d-456d-8e51-cbe6a14865ad",
      "name": "user"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "f79af173-32c1-4f0b-bb0a-6acb433aabb3",
      "name": "capc"
    },
    {
      "domainid": "ae613512-769e-48cd-bd93-a685b9ac9c0a",
      "id": "3dd88047-73dd-4795-833d-da87e13c0698",
      "name": "test"
    }
  ],
  "count": 9
}
(qaserver) 🐱 > list accounts domainid=b32b3316-6c14-11ed-86c2-1e0093003d07 filter=id,name,domainid isrecursive=false listall=false 
{
  "account": [
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "fda39ec5-6c14-11ed-86c2-1e0093003d07",
      "name": "admin"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "ef45928c-b2cb-4f9d-93cd-a484e761d4f9",
      "name": "baremetal-system-account"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "cd9ebe99-e02c-4385-b6ae-bac1ea677489",
      "name": "rohit"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "4e9e632c-ee02-49c1-9868-b53700246c73",
      "name": "euler"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "36b4c0a4-b339-40f0-9991-b17282a686a9",
      "name": "rick"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "04efc774-1777-4056-9cd7-21e27aa52a72",
      "name": "testy"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "705e654b-d85d-456d-8e51-cbe6a14865ad",
      "name": "user"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "f79af173-32c1-4f0b-bb0a-6acb433aabb3",
      "name": "capc"
    },
    {
      "domainid": "ae613512-769e-48cd-bd93-a685b9ac9c0a",
      "id": "3dd88047-73dd-4795-833d-da87e13c0698",
      "name": "test"
    }
  ],
  "count": 9
}

@weizhouapache

Copy link
Copy Markdown
Member

@weizhouapache cc @vishesh92 I guess that needs an API change,

(qaserver) 🐱 > list accounts domainid=b32b3316-6c14-11ed-86c2-1e0093003d07 filter=id,name,domainid
{
  "account": [
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "fda39ec5-6c14-11ed-86c2-1e0093003d07",
      "name": "admin"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "ef45928c-b2cb-4f9d-93cd-a484e761d4f9",
      "name": "baremetal-system-account"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "cd9ebe99-e02c-4385-b6ae-bac1ea677489",
      "name": "rohit"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "4e9e632c-ee02-49c1-9868-b53700246c73",
      "name": "euler"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "36b4c0a4-b339-40f0-9991-b17282a686a9",
      "name": "rick"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "04efc774-1777-4056-9cd7-21e27aa52a72",
      "name": "testy"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "705e654b-d85d-456d-8e51-cbe6a14865ad",
      "name": "user"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "f79af173-32c1-4f0b-bb0a-6acb433aabb3",
      "name": "capc"
    },
    {
      "domainid": "ae613512-769e-48cd-bd93-a685b9ac9c0a",
      "id": "3dd88047-73dd-4795-833d-da87e13c0698",
      "name": "test"
    }
  ],
  "count": 9
}
(qaserver) 🐱 > list accounts domainid=b32b3316-6c14-11ed-86c2-1e0093003d07 filter=id,name,domainid isrecursive=false 
{
  "account": [
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "fda39ec5-6c14-11ed-86c2-1e0093003d07",
      "name": "admin"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "ef45928c-b2cb-4f9d-93cd-a484e761d4f9",
      "name": "baremetal-system-account"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "cd9ebe99-e02c-4385-b6ae-bac1ea677489",
      "name": "rohit"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "4e9e632c-ee02-49c1-9868-b53700246c73",
      "name": "euler"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "36b4c0a4-b339-40f0-9991-b17282a686a9",
      "name": "rick"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "04efc774-1777-4056-9cd7-21e27aa52a72",
      "name": "testy"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "705e654b-d85d-456d-8e51-cbe6a14865ad",
      "name": "user"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "f79af173-32c1-4f0b-bb0a-6acb433aabb3",
      "name": "capc"
    },
    {
      "domainid": "ae613512-769e-48cd-bd93-a685b9ac9c0a",
      "id": "3dd88047-73dd-4795-833d-da87e13c0698",
      "name": "test"
    }
  ],
  "count": 9
}
(qaserver) 🐱 > list accounts domainid=b32b3316-6c14-11ed-86c2-1e0093003d07 filter=id,name,domainid isrecursive=false listall=false 
{
  "account": [
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "fda39ec5-6c14-11ed-86c2-1e0093003d07",
      "name": "admin"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "ef45928c-b2cb-4f9d-93cd-a484e761d4f9",
      "name": "baremetal-system-account"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "cd9ebe99-e02c-4385-b6ae-bac1ea677489",
      "name": "rohit"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "4e9e632c-ee02-49c1-9868-b53700246c73",
      "name": "euler"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "36b4c0a4-b339-40f0-9991-b17282a686a9",
      "name": "rick"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "04efc774-1777-4056-9cd7-21e27aa52a72",
      "name": "testy"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "705e654b-d85d-456d-8e51-cbe6a14865ad",
      "name": "user"
    },
    {
      "domainid": "b32b3316-6c14-11ed-86c2-1e0093003d07",
      "id": "f79af173-32c1-4f0b-bb0a-6acb433aabb3",
      "name": "capc"
    },
    {
      "domainid": "ae613512-769e-48cd-bd93-a685b9ac9c0a",
      "id": "3dd88047-73dd-4795-833d-da87e13c0698",
      "name": "test"
    }
  ],
  "count": 9
}

@shwstppr
as a workaround, can we filter the accounts by domainid or domain path on UI ?

@shwstppr

shwstppr commented Jul 8, 2024

Copy link
Copy Markdown
Contributor Author

@weizhouapache done

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

verified ok

thanks @shwstppr for the fix

@shwstppr

shwstppr commented Jul 8, 2024

Copy link
Copy Markdown
Contributor Author

@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@sureshanaparti a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9345 (QA-JID-398)

@sureshanaparti
sureshanaparti merged commit c35ba60 into apache:4.19 Jul 8, 2024
@sureshanaparti sureshanaparti linked an issue Jul 8, 2024 that may be closed by this pull request
@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9345 (QA-JID-399)

@vishesh92
vishesh92 deleted the ui-fix-searchviewacc branch July 8, 2024 12:08
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jul 15, 2024
* ui: fix account list on domain change in filterview

Fixes apache#9274

* fix

* filter accounts for selected domain

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Search filter does not work for domain/account

7 participants