|
@@ -78,6 +78,7 @@ const FieldInputStyled = styled(FieldInput)`
|
|
|
type Props = {
|
|
type Props = {
|
|
|
instances: Instance[],
|
|
instances: Instance[],
|
|
|
loadingInstances: boolean,
|
|
loadingInstances: boolean,
|
|
|
|
|
+ defaultSkipOsMorphing?: ?boolean,
|
|
|
onCancelClick: () => void,
|
|
onCancelClick: () => void,
|
|
|
onMigrateClick: (fields: Field[], uploadedScripts: InstanceScript[]) => void,
|
|
onMigrateClick: (fields: Field[], uploadedScripts: InstanceScript[]) => void,
|
|
|
onResizeUpdate?: (scrollableRef: HTMLElement, scrollOffset?: number) => void,
|
|
onResizeUpdate?: (scrollableRef: HTMLElement, scrollOffset?: number) => void,
|
|
@@ -105,13 +106,21 @@ let defaultFields: Field[] = [
|
|
|
@observer
|
|
@observer
|
|
|
class ReplicaMigrationOptions extends React.Component<Props, State> {
|
|
class ReplicaMigrationOptions extends React.Component<Props, State> {
|
|
|
state = {
|
|
state = {
|
|
|
- fields: [...defaultFields],
|
|
|
|
|
|
|
+ fields: [],
|
|
|
selectedBarButton: 'options',
|
|
selectedBarButton: 'options',
|
|
|
uploadedScripts: [],
|
|
uploadedScripts: [],
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
scrollableRef: HTMLElement
|
|
scrollableRef: HTMLElement
|
|
|
|
|
|
|
|
|
|
+ componentWillMount() {
|
|
|
|
|
+ this.setState({
|
|
|
|
|
+ fields: defaultFields.map(f => f.name === 'skip_os_morphing' ? (
|
|
|
|
|
+ { ...f, value: this.props.defaultSkipOsMorphing || null }
|
|
|
|
|
+ ) : f),
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
componentDidMount() {
|
|
componentDidMount() {
|
|
|
KeyboardManager.onEnter('migration-options', () => { this.migrate() }, 2)
|
|
KeyboardManager.onEnter('migration-options', () => { this.migrate() }, 2)
|
|
|
}
|
|
}
|