-
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-1769] Add Project field to migration plan/provider wizards #1409
Conversation
87f0ce2
to
bb71fbb
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1409 +/- ##
==========================================
- Coverage 36.81% 36.21% -0.60%
==========================================
Files 158 159 +1
Lines 2548 2579 +31
Branches 599 615 +16
==========================================
- Hits 938 934 -4
- Misses 1428 1450 +22
- Partials 182 195 +13 ☔ View full report in Codecov by Sentry. |
e8703d2
to
e7084ff
Compare
Signed-off-by: Jeff Puzzo <[email protected]>
e7084ff
to
640ac2d
Compare
Quality Gate passedIssues Measures |
...forklift-console-plugin/src/modules/Providers/views/create/components/ProviderCreateForm.tsx
Show resolved
Hide resolved
Few comments:
|
const defaultNamespace = process?.env?.DEFAULT_NAMESPACE || 'default'; | ||
const projectName = activeNamespace === '#ALL_NS#' ? 'openshift-mtv' : activeNamespace; |
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.
Default namespace for u/s is : 'konveyor-forklift'
let validationError: ValidationMsg = { type: 'default' }; | ||
|
||
if (!value) { | ||
validationError = { type: 'error', msg: 'Missing project name' }; |
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.
@@ -39,24 +41,26 @@ export const ProvidersCreatePage: React.FC<{ | |||
const { t } = useForkliftTranslation(); | |||
const history = useHistory(); | |||
const [isLoading, toggleIsLoading] = useToggle(); | |||
|
|||
const [activeNamespace, setActiveNamespace] = useActiveNamespace(); |
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.
Why do we need both activeNamespace
and namespace
?
Reference: kubev2v#1409 (comment) - comment num 1. - Enable the ProjectNameSelect component to run on Kind (non OCP) installaiton, the same as supported for the console namespaces menu. -Fix the namespace default value for upstream. Signed-off-by: Sharon Gratch <[email protected]>
Reference: kubev2v#1409 (comment) - comment num 1. - Enable the ProjectNameSelect component to run on Kind (non OCP) installaiton, the same as supported for the console namespaces menu. -Fix the namespace default value for upstream. Signed-off-by: Sharon Gratch <[email protected]>
Reference: kubev2v#1409 (comment) - comment num 1. - Enable the ProjectNameSelect component to run on Kind (non OCP) installaiton, the same as supported for the console namespaces menu. -Fix the namespace default value for upstream. Signed-off-by: Sharon Gratch <[email protected]>
Reference: kubev2v#1409 (comment) - comment num 1. - Enable the ProjectNameSelect component to run on Kind (non OCP) installaiton, the same as supported for the console namespaces menu. -Fix the namespace default value for upstream. Signed-off-by: Sharon Gratch <[email protected]>
Reference: kubev2v#1409 (comment) - comment num 1. - Enable the ProjectNameSelect component to run on Kind (non OCP) installaiton, the same as supported for the console namespaces menu. -Fix the namespace default value for upstream. Signed-off-by: Sharon Gratch <[email protected]>
https://issues.redhat.com/browse/MTV-1769
Summary
Updated the Provider & Plan create wizards to include a "Project" name typeahead select, where in the create plan wizard the options for this typeahead select are limited by the namespaces of the possible providers to choose from, and the create provider wizard simply gets all namespaces.
On submission of both wizards, the global (active) namespace is toggled to the selected "Project" namespace from the form (which could differ from the global/active namespace that was originally chosen upon entry of either wizard).
Further details of the logic implemented for the few fields re-arranged/in-play here are described in the acceptance criteria of this design story:
https://issues.redhat.com/browse/HPUX-259
Added a new TypeaheadSelect component that uses PFv5 components to the common internal library.
Create plan wizard
Create provider wizard