-
Notifications
You must be signed in to change notification settings - Fork 22
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
MTV-1726: Edit VMs list in migration plan #1414
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,149 @@ | |||
import React, { useState } from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is basically a copy of packages/forklift-console-plugin/src/components/page/StandardPageWithSelection.tsx but without selection, only expansion
This variation is needed for Edit VMs case since there should be no checkboxes, just expandable rows.
@@ -0,0 +1 @@ | |||
export type PlanEditAction = 'PLAN' | 'VMS'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will allow us next (with small changes like this) to edit plans too
loadError: unknown; | ||
loaded?: boolean; | ||
loadError?: unknown; | ||
planMappingsState: PlanMappingsSectionState; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I lifted the state up so that we can reuse planmappings from Edit VMs case
|
||
import '../create/PlanCreatePage.style.css'; | ||
|
||
export const PlanEditPage: React.FC<{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initially copied from PlanCreatePage, but there were enough changes to make it its own component
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1414 +/- ##
==========================================
- Coverage 36.81% 36.36% -0.46%
==========================================
Files 158 157 -1
Lines 2548 2533 -15
Branches 599 597 -2
==========================================
- Hits 938 921 -17
- Misses 1428 1430 +2
Partials 182 182 ☔ View full report in Codecov by Sentry. |
[MTV-1686] Simplify/update migration plan status cell Signed-off-by: Joachim Schuler <[email protected]>
999f277
to
003bc27
Compare
Signed-off-by: Joachim Schuler <[email protected]>
Signed-off-by: Joachim Schuler <[email protected]>
Signed-off-by: Joachim Schuler <[email protected]>
Signed-off-by: Joachim Schuler <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jschuler
I went over the PR, following our best practices, and I didn't comment on everything as I trust that you will understand from the comments that I did add and adjust in all the places that it fit. If something isn't clear, just let me know over Slack
packages/forklift-console-plugin/src/modules/Providers/views/migrate/useUpdateEffect.ts
Outdated
Show resolved
Hide resolved
packages/forklift-console-plugin/src/modules/Providers/views/migrate/useUpdateEffect.ts
Outdated
Show resolved
Hide resolved
packages/forklift-console-plugin/src/modules/Providers/views/migrate/useUpdateEffect.ts
Outdated
Show resolved
Hide resolved
packages/forklift-console-plugin/src/modules/Providers/views/migrate/useUpdateEffect.ts
Outdated
Show resolved
Hide resolved
...es/forklift-console-plugin/src/modules/Providers/views/migrate/reducer/createInitialState.ts
Show resolved
Hide resolved
packages/forklift-console-plugin/src/modules/Plans/views/details/tabs/Mappings/PlanMappings.tsx
Outdated
Show resolved
Hide resolved
) : ( | ||
<Button | ||
onClick={onClick} | ||
variant="plain" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
u can use ButtonVariant from PF
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pre-existing code? I would say these kinds of changes are generally out-of-scope
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, but its a process of bringing this project to a better level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on second thought, is it necessary? we have typescript types
packages/forklift-console-plugin/src/components/page/StandardPageWithExpansion.tsx
Outdated
Show resolved
Hide resolved
packages/forklift-console-plugin/src/components/page/StandardPageWithExpansion.tsx
Outdated
Show resolved
Hide resolved
packages/forklift-console-plugin/src/components/page/StandardPageWithExpansion.tsx
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
@@ -0,0 +1,117 @@ | |||
import React from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally from here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lifted up since it's used in multiple locations now
https://issues.redhat.com/browse/MTV-1726
Design story:
https://issues.redhat.com/browse/HPUX-166
Provide users the possibility to add more VMs (not just delete) to an existing plan.
For the mappings section, I reused the plan details mappings tab section, since it can patch existing mappings
The user can only edit the VMs in an existing plan when the plan is in
Ready
state (so not running/failed/error etc.)See video of before (green border)/after:
Screen.Recording.2024-12-13.at.12.04.40.PM.mov