Repository navigation
ui: list resources of project-owned instances outside project view - #14581
DaanHoogland wants to merge 5 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.20 #14581 +/- ##
============================================
+ Coverage 16.44% 16.45% +0.01%
- Complexity 13686 13688 +2
============================================
Files 5669 5669
Lines 501683 501686 +3
Branches 60944 60950 +6
============================================
+ Hits 82480 82540 +60
+ Misses 409965 409898 -67
- Partials 9238 9248 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
@1fanwang, please review my version of your fix here. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19901 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-17490)
|
|
Unsure if it's something wrong on my setup but I cannot see templates on the "Default view" anymore without the following patch. diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue
index 72cb74399d..dba8501023 100644
--- a/ui/src/views/compute/DeployVM.vue
+++ b/ui/src/views/compute/DeployVM.vue
@@ -1007,7 +1007,7 @@ export default {
groups: false
},
owner: {
- projectid: store.getters.project?.id,
+ projectid: store.getters.project?.id || null,
domainid: store.getters.project?.id ? null : store.getters.userInfo.domainid,
account: store.getters.project?.id ? null : store.getters.userInfo.account
},The rest seems to work. I can see the resources from the default view while they are owned by a project. |
|
@bddvlpr , thanks for the finding, I'll look into that and update. |
2dacf7d to
34cb371
Compare
|
@bddvlpr, it wasn't you/your env, but a conflict with an old PR. I added a fix. hope all works now. |
|
@DaanHoogland a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
|
UI build: ✔️ |
|



Description
When a project-owned instance is opened outside its project (Default view, or another project selected), several lists on the instance page come up empty or show the caller's own resources instead of the project's. The list APIs skip project resources unless the request names a project, and these calls did not send one.
Each call now sends the instance's own
projectid:listVolumes)listNetworks)listSecurityGroups);SecurityGroupSelectiongets an optionalprojectIdprop, so the deploy wizards keep using the selected projectlistInstanceGroups)The instance's own project is used rather than
projectid=-1, because-1only reaches the caller's own account and the projects the caller is a member of, which would hide other accounts' resources from a domain admin. An instance outside any project sends noprojectid, so its requests are unchanged. The project view keeps working as before: the request interceptor only adds the selected project when a call has none.The Add network dialog also no longer throws when there is no network left to offer.
The VolumesTab spec comes from #14158 (without its GiB label test, which depends on a change that is not on 4.20).
Fixes #14572
Fixes #14573
Fixes #14070
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
VolumesTab.spec.jscovers root admin and domain admin callers in Default view, in the instance's project and in another project, plus instances outside any project and system VMs. Without the fix, the three cases for a project instance outside its project fail.projectid: the Volumes tab sendsprojectid=<project>; for an instance outside any project the request is unchanged.How did you try to break this feature and the system with this change?
Checked that an explicit
projectidwins over the selected project in the request interceptor and that an undefined one falls back to it, so the project view and instances outside any project send the same requests as before.SecurityGroupSelectiondropsaccount/domainidwhen a project is passed, since the API rejectsaccounttogether withprojectid.🤖 Generated with Claude Code