Skip to content

UI: fix create vpc private gateway for regular user - #6400

Merged
nvazquez merged 2 commits into
apache:mainfrom
weizhouapache:4.17-ui-fix-create-vpc-pw
May 23, 2022
Merged

nvazquez merged 2 commits into
apache:mainfrom
weizhouapache:4.17-ui-fix-create-vpc-pw

Conversation

@weizhouapache

Copy link
Copy Markdown
Member

Description

This PR fixes ui issues in the form to create vpc private gateway by regular user

This also contains other ui bug fixes below

UI: display 'egree/ipv6/publicip' tabs only for domain/root admin and the owner

please note
(1) isolated networks only .
(2) networks in project are not impacted. the tabs are always visible.
(3) 'network permission' tab is also only visible for domain/root admin and the owner. but not visible in project view.

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)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

…d the owner

please note
(1) isolated networks only .
(2) networks in project are not impacted. the tabs are always visible.
(3) 'network permission' tab is also only visible for domain/root admin and the owner. but not visible in project view.
@acs-robot

Copy link
Copy Markdown

Found UI changes, kicking a new UI QA build
@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6400 (SL-JID-1603)

@utchoang utchoang left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!

@shwstppr shwstppr 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.

Tested on QA server, looks okay

Comment on lines +687 to 700
if (this.isAdmin()) {
this.rules = {
ipaddress: [{ required: true, message: this.$t('label.required') }],
gateway: [{ required: true, message: this.$t('label.required') }],
netmask: [{ required: true, message: this.$t('label.required') }]
}
} else {
this.rules = {
ipaddress: [{ required: true, message: this.$t('label.required') }],
gateway: [{ required: true, message: this.$t('label.required') }],
netmask: [{ required: true, message: this.$t('label.required') }],
associatednetworkid: [{ required: true, message: this.$t('label.required') }]
}
}

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.

Suggested change
if (this.isAdmin()) {
this.rules = {
ipaddress: [{ required: true, message: this.$t('label.required') }],
gateway: [{ required: true, message: this.$t('label.required') }],
netmask: [{ required: true, message: this.$t('label.required') }]
}
} else {
this.rules = {
ipaddress: [{ required: true, message: this.$t('label.required') }],
gateway: [{ required: true, message: this.$t('label.required') }],
netmask: [{ required: true, message: this.$t('label.required') }],
associatednetworkid: [{ required: true, message: this.$t('label.required') }]
}
}
this.rules = {
ipaddress: [{ required: true, message: this.$t('label.required') }],
gateway: [{ required: true, message: this.$t('label.required') }],
netmask: [{ required: true, message: this.$t('label.required') }]
}
if (!this.isAdmin()) {
this.rules.associatednetworkid = [{ required: true, message: this.$t('label.required') }]
}

@weizhouapache can this be simplified?

@nvazquez
nvazquez merged commit 40dabb6 into apache:main May 23, 2022
@weizhouapache
weizhouapache deleted the 4.17-ui-fix-create-vpc-pw branch December 9, 2022 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants