Skip to content

ui: handle empty network offerings without Request failed (#14377) - #14399

Open
nabassa1323 wants to merge 1 commit into
apache:mainfrom
nabassa1323:fix-14377-add-network-empty-offerings
Open

nabassa1323 wants to merge 1 commit into
apache:mainfrom
nabassa1323:fix-14377-add-network-empty-offerings

Conversation

@nabassa1323

Copy link
Copy Markdown

Description

Fixes the Add Network UI showing "Request failed" when Isolated/Shared
have no enabled network offerings (empty/null listNetworkOfferings response).

Shows a clear warning instead. Does not hide guest-type tabs (separate
enhancement from #14377).

Fixes: #14377 (UI error handling part only)

Types of changes

  • Bug fix
  • New feature

How to test

  1. Disable all Isolated and Shared network offerings; keep L2 enabled
  2. Open Guest Networks → Add Network
  3. Isolated / Shared: no "Request failed"; empty list + warning
  4. L2: offerings still listed and usable

Co-authored-by: Cursor <cursoragent@cursor.com>
@boring-cyborg

boring-cyborg Bot commented Oct 14, 2026

Copy link
Copy Markdown

Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
Here are some useful points:

this.networkOfferings = json.listnetworkofferingsresponse.networkoffering || []
this.networkOfferings = this.networkOfferings.filter(offering => offering.fornsx === this.selectedZone.isnsxenabled)
if (!this.selectedZone.routedmodeenabled) {
const offerings = json?.listnetworkofferingsresponse?.networkoffering || []

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.

looks like #13503 already fixed the crash on the isolated tab for 4.22 and main. does it still show request failed on main without this change?

this.networkOfferings = []
getAPI('listNetworkOfferings', params).then(json => {
this.networkOfferings = json.listnetworkofferingsresponse.networkoffering || []
const offerings = json?.listnetworkofferingsresponse?.networkoffering || []

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.

the shared tab already handles an empty list here in 4.22.1.0. which request fails on that tab in the browser network tab?

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.

Add Network: no way to disable Isolated/Shared + "Request failed" on those tabs

2 participants