-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add live migration to migration plan wizard
Signed-off-by: Alexander Wels <[email protected]>
- Loading branch information
Showing
9 changed files
with
14,349 additions
and
47 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/app/home/pages/PlansPage/components/Wizard/LiveMigrationForm.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Checkbox } from '@patternfly/react-core'; | ||
import { useFormikContext } from 'formik'; | ||
import React from 'react'; | ||
import { IFormValues } from './WizardContainer'; | ||
|
||
const LiveMigrationForm: React.FunctionComponent = () => { | ||
const { handleBlur, setFieldTouched, handleChange, values } = | ||
useFormikContext<IFormValues>(); | ||
const formikSetFieldTouched = (key: any) => () => setFieldTouched(key, true, true); | ||
const formikHandleChange = (_val: any, e: React.FormEvent<HTMLInputElement>) => handleChange(e); | ||
|
||
return <Checkbox | ||
onChange={formikHandleChange} | ||
onInput={formikSetFieldTouched(values.liveMigrate)} | ||
onBlur={handleBlur} | ||
isChecked={values.liveMigrate} | ||
name={'liveMigrate'} | ||
label="At time of plan execution, storage live migrate any running Virtual Machines associated with the selected PVs. Note: The Virtual Machine will be live migrated to a different node, this requires at least 2 nodes." | ||
id="live-migrate" | ||
/>; | ||
|
||
}; | ||
export default LiveMigrationForm; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters