Skip to content

feat(xo-lite): add network delete action for host internal networks - #10332

Open
amouillard-vates wants to merge 1 commit into
masterfrom
xo6-lite/pool-host-internal-network-delete
Open

feat(xo-lite): add network delete action for host internal networks#10332
amouillard-vates wants to merge 1 commit into
masterfrom
xo6-lite/pool-host-internal-network-delete

Conversation

@amouillard-vates

@amouillard-vates amouillard-vates commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds a delete action for host internal networks in XO Lite

Capture d’écran 2026-09-01 à 11 36 49 Capture d’écran 2026-09-01 à 11 36 51

Checklist

  • Commit
    • Title follows commit conventions
    • Reference the relevant issue (Fixes #007, See xoa-support#42, See https://...)
    • If bug fix, add Introduced by
  • Changelog
    • If visible by XOA users, add changelog entry
    • Update "Packages to release" in CHANGELOG.unreleased.md
  • PR
    • If UI changes, add screenshots
    • If not finished or not tested, open as Draft

Review process

If you are an external contributor, you can skip this part. Simply create the pull request, and we'll get back to you as soon as possible.

This 2-passes review process aims to:

  • develop skills of junior reviewers
  • limit the workload for senior reviewers
  • limit the number of unnecessary changes by the author
  1. The author creates a PR.
  2. Review process:
    1. The author assigns the junior reviewer.
    2. The junior reviewer conducts their review:
      • Resolves their comments if they are addressed.
      • Adds comments if necessary or approves the PR.
    3. The junior reviewer assigns the senior reviewer.
    4. The senior reviewer conducts their review:
      • If there are no unresolved comments on the PR → merge.
      • Otherwise, we continue with 3.
  3. The author responds to comments and/or makes corrections, and we go back to 2.

Notes:

  1. The author can request a review at any time, even if the PR is still a Draft.
  2. In theory, there should not be more than one reviewer at a time.
  3. The author should not make any changes:
    • When a reviewer is assigned.
    • Between the junior and senior reviews.
  4. If the PR relates to a change in the openAPI specification, a member of the DevOps team must also participate in the review.

<MenuItem icon="action:copy" :disabled="!isClipboardSupported" @click="copy()">
{{ t('action:copy-info-json') }}
</MenuItem>
<NetworkDeleteMenuItem v-if="pifsCount === 0" :network />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

To match the mockups more closely, delete should be moved out of "more actions", like here:

Image

@MarieGarde

Copy link
Copy Markdown
Collaborator

You can add screenshots of the modal

## **0.25.0** (2026-08-31)
## **next**

- [Pool/Network] Add the possibility to delete host internal networks

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Missin PR link

"job:migrate:in-progress": "Migrate in progess…",
"job:network-delete:has-n-physical-pif-connected": "The network has one physical PIF connected | The network has {n} physical PIFs connected",
"job:network-delete:has-n-vif-attached": "The network has one VIF attached | The network has {n} VIFs attached",
"job:network-delete:missing-network": "No networks to delete",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"job:network-delete:missing-network": "No networks to delete",
"job:network-delete:missing-network": "No network to delete",

<MenuItem icon="action:copy" :disabled="!isClipboardSupported" @click="copy()">
{{ t('action:copy-info-json') }}
</MenuItem>
<NetworkDeleteMenuItem v-if="pifsCount === 0" :network />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<NetworkDeleteMenuItem v-if="pifsCount === 0" :network />
<NetworkDeleteMenuItem v-if="network.PIFs.length === 0" :network />

This way, it no longer depends on the PIF store loading.

Comment on lines +98 to +108
actions: [
{
label: t('action:delete'),
icon: 'action:delete',
danger: true,
onClick: () => deleteNetworks(),
busy: isDeletingNetworks.value,
disabled: !canDeleteNetworks.value,
hint: deleteNetworksErrorMessage.value,
},
],

@MarieGarde MarieGarde Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
actions: [
{
label: t('action:delete'),
icon: 'action:delete',
danger: true,
onClick: () => deleteNetworks(),
busy: isDeletingNetworks.value,
disabled: !canDeleteNetworks.value,
hint: deleteNetworksErrorMessage.value,
},
],
component: NetworkDeleteMenuItem,
props: { network },

I'd suggest doing the same as in VmsTable: to reduce the amount of code in this file, call NetworkDeleteMenuItem directly and remove the code added to VtsAction.

Comment on lines +86 to +88
const { deleteNetworks, canDeleteNetworks, isDeletingNetworks, deleteNetworksErrorMessage } = useNetworkDelete(
() => [network]
)

@MarieGarde MarieGarde Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const { deleteNetworks, canDeleteNetworks, isDeletingNetworks, deleteNetworksErrorMessage } = useNetworkDelete(
() => [network]
)

See comment below

@@ -85,3 +87,9 @@ function isGroupAction(action: ActionItem): action is GroupActionItem {
return 'children' in action
}
</script>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
</script>

icon?: IconName
disabled?: boolean
busy?: boolean
danger?: boolean

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
danger?: boolean

<MenuItem
v-for="(action, index) of actions"
:key="index"
:class="{ danger: action.danger }"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
:class="{ danger: action.danger }"

See comment on PoolHostInternalNetworksTable.vue

@MarieGarde
MarieGarde requested a review from Elise-FZI September 3, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants