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

UI: Fix filtering of templates by account #10425

Open
wants to merge 1 commit into
base: 4.19
Choose a base branch
from

Conversation

bernardodemarco
Copy link
Collaborator

Description

Currently, an account's InfoCard contains buttons that enable the users to view the resources of a given account. However, the View Templates button is not working. When selected, all templates are listed.

This PR proposes to fix this issue by only listing the templates associated to an account when the View Templates button on its InfoCard is selected.


Fixes #10391

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)

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

image

How Has This Been Tested?

Verified that when selecting the View Templates button present on an account's InfoCard, the UI redirects the user to the following path /template?templatefilter=self&account=<account-name>&domainid=<domain-id>. Therefore, only the templates associated with the account are listed.

@bernardodemarco bernardodemarco added this to the 4.19.3 milestone Feb 18, 2025
@bernardodemarco
Copy link
Collaborator Author

@blueorangutan ui

@blueorangutan
Copy link

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

Copy link

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 15.15%. Comparing base (b9ebc7b) to head (69551a0).

Additional details and impacted files
@@             Coverage Diff              @@
##               4.19   #10425      +/-   ##
============================================
- Coverage     15.15%   15.15%   -0.01%     
+ Complexity    11315    11314       -1     
============================================
  Files          5413     5413              
  Lines        474694   474696       +2     
  Branches      57891    57892       +1     
============================================
- Hits          71942    71941       -1     
- Misses       394706   394709       +3     
  Partials       8046     8046              
Flag Coverage Δ
uitests 4.29% <ø> (-0.01%) ⬇️
unittests 15.87% <ø> (-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

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

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm, tested in qa: from an account only the templates for that account are show, from the menu all templates visible to the user are shown.

@DaanHoogland DaanHoogland linked an issue Feb 20, 2025 that may be closed by this pull request
Copy link
Contributor

@Pearl1594 Pearl1594 left a comment

Choose a reason for hiding this comment

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

I was wondering if we should change the filter to 'Mine' when we go from account view -> templates. So that we can switch back to 'All' templatefilter?

@bernardodemarco
Copy link
Collaborator Author

I was wondering if we should change the filter to 'Mine' when we go from account view -> templates. So that we can switch back to 'All' templatefilter?

Great idea, I'll see if that's possible

@DaanHoogland
Copy link
Contributor

good catch, simple workaround is to switch to any other filter and back to 'All' though.

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

Successfully merging this pull request may close these issues.

Account Details - "View Templates" Button Does Not Filter
4 participants