Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐾 Add a fast Create Plan page - step 7 #899

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

rszwajko
Copy link
Contributor

@rszwajko rszwajko commented Feb 9, 2024

Implements #801
Depends on #898

Changes:

  1. improve layout by wrapping title and info alert with a drawer. Now
    the only component pushing the VM table down is the namespace bar.
  2. disable all edits when create action is triggered
    a) for description items - hide pencil icon
    b) for form components - propagate isDisabled flag
  3. remove 'Create and start' button
  4. rename 'Create and edit' to 'Create'
  5. re-generate storage map name in case of naming conflict
  6. add advanced validations:
    a) NICs with empty network profile (oVirt only)
    b) VM has multiple NICs on the same network
    c) VM has multiple NICs mapped to Pod Networking
    d) VM has unmmaped networks
    e) VM has unmapped storages
  7. display loading indicator(dots) until main queries are done
  8. move/add responsibility to useFetchEffect() hook
    a) handle API errors from data queries
    b) handle loading state (skip dispatch)
    c) block queries when editing is done
  9. move responsibility from action handlers to generic handler
    a) block processing actions when editing is done
    b) log actions with payload
    c) track if actions were dispatched (initial loading)

Signed-off-by: Radoslaw Szwajkowski rszwajko@redhat.com

@rszwajko
Copy link
Contributor Author

rszwajko commented Feb 9, 2024

Disabled form after an API error (new buttons visible)

Screenshot from 2024-02-09 17-27-37

Drawer before the change

Unnecessary scrollbar is displayed. The buttons are not visible.
Screenshot from 2024-02-09 17-25-50

Drawer with selected VMs after the change

The drawer wraps the items above the form which drags the whole table higher (only the namespace bar is left)

Screenshot from 2024-02-09 17-21-08
Screenshot from 2024-02-09 18-06-09

@rszwajko rszwajko force-pushed the migrateBtnV15 branch 2 times, most recently from 5026f2c to 3a9ca56 Compare February 9, 2024 18:07
@yaacov yaacov added the enhancement Categorizes issue or PR as related to a new feature. label Feb 11, 2024
@yaacov yaacov added this to the 2.6.0 milestone Feb 11, 2024
@yaacov yaacov changed the title Add a fast Create Plan page - step 7 🐾 Add a fast Create Plan page - step 7 Feb 11, 2024
@rszwajko
Copy link
Contributor Author

rszwajko commented Feb 12, 2024

Validations

Incomplete mapping

Implemented based on backend check as discussed here and here

Screenshot from 2024-02-12 19-26-03
image

Multiple NICs mapped to Pod Networking / NICs with empty NIC profile

Multiple NICs mapped to Pod Networking is based in backend check as discussed here
NICs with empty NIC profile is a special case of incomplete mapping (oVirt specific) - NIC without a profile cannot be mapped.
Screenshot from 2024-02-12 19-25-38

Multiple NICs on the same network

This is a special case of incorrect network setup - it may trigger Multiple NICs mapped to Pod Networking.
Screenshot from 2024-02-12 19-24-47

@rszwajko rszwajko force-pushed the migrateBtnV15 branch 3 times, most recently from 640e540 to e4fe64b Compare February 13, 2024 12:22
Changes:
1. improve layout by wrapping title and info alert with a drawer. Now
   the only component pushing the VM table down is the namespace bar.
2. disable all edits when create action is triggered
   a) for description items - hide pencil icon
   b) for form components - propagate isDisabled flag
3. remove 'Create and start' button
4. rename 'Create and edit' to 'Create'
5. re-generate storage map name in case of naming conflict
6. add advanced validations:
   a) NICs with empty network profile (oVirt only)
   b) VM has multiple NICs on the same network
   c) VM has multiple NICs mapped to Pod Networking
   d) VM has unmmaped networks
   e) VM has unmapped storages
7. display loading indicator(dots) until main queries are done
8. move/add responsibility to useFetchEffect() hook
   a) handle API errors from data queries
   b) handle loading state (skip dispatch)
   c) block queries when editing is done
9. move responsibility from action handlers to generic handler
   a) block processing actions when editing is done
   b) log actions with payload
   c) track if actions were dispatched (initial loading)

Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
@rszwajko rszwajko marked this pull request as ready for review February 13, 2024 12:29
Copy link

sonarcloud bot commented Feb 13, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@yaacov yaacov merged commit e4568b8 into kubev2v:main Feb 13, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants