|
|
@@ -107,7 +107,7 @@ type State = {
|
|
|
@observer
|
|
|
class EditReplica extends React.Component<Props, State> {
|
|
|
state = {
|
|
|
- selectedPanel: null,
|
|
|
+ selectedPanel: 'source_options',
|
|
|
destinationData: {},
|
|
|
sourceData: {},
|
|
|
updateDisabled: false,
|
|
|
@@ -121,8 +121,6 @@ class EditReplica extends React.Component<Props, State> {
|
|
|
|
|
|
componentWillMount() {
|
|
|
this.loadData(true)
|
|
|
-
|
|
|
- this.setState({ selectedPanel: this.hasSourceOptions() ? 'source_options' : 'dest_options' })
|
|
|
}
|
|
|
|
|
|
async loadData(useCache: boolean) {
|
|
|
@@ -148,9 +146,8 @@ class EditReplica extends React.Component<Props, State> {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (this.hasSourceOptions()) {
|
|
|
- loadAllOptions('source')
|
|
|
- }
|
|
|
+
|
|
|
+ loadAllOptions('source')
|
|
|
loadAllOptions('destination')
|
|
|
}
|
|
|
|
|
|
@@ -214,10 +211,6 @@ class EditReplica extends React.Component<Props, State> {
|
|
|
: false
|
|
|
}
|
|
|
|
|
|
- hasSourceOptions(): boolean {
|
|
|
- return Boolean(configLoader.config.sourceOptionsProviders.find(p => p === this.props.sourceEndpoint.type))
|
|
|
- }
|
|
|
-
|
|
|
isUpdateDisabled() {
|
|
|
let isLoadingDestOptions = this.state.selectedPanel === 'dest_options'
|
|
|
&& (providerStore.destinationSchemaLoading || providerStore.destinationOptionsPrimaryLoading)
|
|
|
@@ -586,6 +579,12 @@ class EditReplica extends React.Component<Props, State> {
|
|
|
|
|
|
render() {
|
|
|
let navigationItems: NavigationItem[] = [
|
|
|
+ {
|
|
|
+ value: 'source_options',
|
|
|
+ label: 'Source Options',
|
|
|
+ disabled: this.state.sourceFailed,
|
|
|
+ title: this.state.sourceFailed ? 'There are source platform errors, source options can\'t be updated' : '',
|
|
|
+ },
|
|
|
{ value: 'dest_options', label: 'Target Options' },
|
|
|
{ value: 'network_mapping', label: 'Network Mapping' },
|
|
|
]
|
|
|
@@ -594,15 +593,6 @@ class EditReplica extends React.Component<Props, State> {
|
|
|
navigationItems.push({ value: 'storage_mapping', label: 'Storage Mapping' })
|
|
|
}
|
|
|
|
|
|
- if (this.hasSourceOptions()) {
|
|
|
- navigationItems.splice(0, 0, {
|
|
|
- value: 'source_options',
|
|
|
- label: 'Source Options',
|
|
|
- disabled: this.state.sourceFailed,
|
|
|
- title: this.state.sourceFailed ? 'There are source platform errors, source options can\'t be updated' : '',
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
return (
|
|
|
<Modal
|
|
|
isOpen={this.props.isOpen}
|