Skip to content

Add assignVolume API to the GUI - #14215

Open
erikbocks wants to merge 3 commits into
apache:mainfrom
scclouds:add-assignvolume-to-ui
Open

erikbocks wants to merge 3 commits into
apache:mainfrom
scclouds:add-assignvolume-to-ui

Conversation

@erikbocks

Copy link
Copy Markdown
Collaborator

Description

This PR implements support for the assignVolume API in the GUI.

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

Screenshots (if appropriate):

Action button in volume list view image
Volume details page image
Volume assignment form image image

How Has This Been Tested?

  • Created a volume and assigned it to other account.
  • Created a volume in a project and assigned it to another project.
  • Created a volume in an account and assigned it to a project.
  • Created a volume in a project and assigned it to an account.

Copilot AI lite review requested due to automatic review settings September 21, 2026 18:06
@erikbocks erikbocks changed the title Add API assignVolume to the GUI Add assignVolume API to the GUI Sep 21, 2026
@codecov

codecov Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.19%. Comparing base (602d9ec) to head (063c9ae).

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #14215      +/-   ##
============================================
+ Coverage     19.91%   21.19%   +1.27%     
- Complexity    20200    20202       +2     
============================================
  Files          6373     5886     -487     
  Lines        577230   535238   -41992     
  Branches      70696    62754    -7942     
============================================
- Hits         114974   113427    -1547     
+ Misses       449690   409472   -40218     
+ Partials      12566    12339     -227     
Flag Coverage Δ
uitests ?
unittests 21.19% <ø> (+<0.01%) ⬆️

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Clear the stale selected account ID when no matching account is found before submitting an assignment.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Adds GUI support for assigning unattached volumes to accounts or projects via the assignVolume API.

Changes:

  • Adds the volume assignment form and API submission.
  • Registers the assignment action in storage views.
  • Extends ownership selection with account IDs.
  • Adds English and Portuguese localization strings.
File Description
ui/​src/​views/​storage/​AssignVolume.vue Volume assignment form and API call
ui/​src/​views/​compute/​wizard/​OwnershipSelection.vue Account ID selection support
ui/​src/​config/​section/​storage.js Volume action registration
ui/​public/​locales/​pt_BR.json Portuguese localization
ui/​public/​locales/​en.json English labels and messages

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread ui/src/views/compute/wizard/OwnershipSelection.vue
Copilot AI review requested due to automatic review settings September 21, 2026 18:36

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Fix detached-volume action visibility and prevent duplicate ownership-change events.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (1)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Avoid duplicate fetch-owner events during account initialization

ui/​src/​views/​compute/​wizard/​OwnershipSelection.vue:227

handleSelectedAccountId already calls emitChangeEvent() at line 247, so invoking it here and then emitting again on line 227 produces two fetch-owner events whenever accounts are loaded. Consumers such as AssignInstance react by calling fetchNetworks(), resulting in duplicate network-list requests during initialization; emit only once for this path.

Comment thread ui/src/config/section/storage.js Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 21, 2026 18:46

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

A critical stale-selection submission issue and a duplicate event remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (1)

selectedAccountType: this.$store.getters.project?.id ? 'Project' : 'Account',
selectedDomain: null,
selectedAccount: null,
selectedAccountId: null,

This branch has not been deployed

No deployments
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.

2 participants