Error handling
This commit is contained in:
@@ -155,6 +155,8 @@ class Configuration extends Component {
|
||||
OriginalItemList: itemListCopy,
|
||||
OriginalObjectLookup: objectLookupCopy,
|
||||
});
|
||||
} else {
|
||||
this.props.errorHandler(arg.data.Error);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -168,6 +170,10 @@ class Configuration extends Component {
|
||||
StorageType: this.props.storageType,
|
||||
Version: this.props.version,
|
||||
});
|
||||
} else {
|
||||
this.props.errorHandler(arg.data.Error, () => {
|
||||
this.props.closed();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -218,7 +224,7 @@ class Configuration extends Component {
|
||||
<h1 style={{width: '100%', textAlign: 'center'}}>Save Changes?</h1>
|
||||
<table width='100%'><tbody>
|
||||
<tr>
|
||||
<td align='center' width='50%'><Button clicked={this.saveAndClose} disabled={this.state.Saving} >Yes</Button></td>
|
||||
<td align='center' width='50%'><Button clicked={this.saveAndClose} disabled={this.state.Saving}>Yes</Button></td>
|
||||
<td align='center' width='50%'><Button clicked={this.props.closed} disabled={this.state.Saving}>No</Button></td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
@@ -227,7 +233,7 @@ class Configuration extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
let configurationItems = this.state.ItemList
|
||||
const configurationItems = this.state.ItemList
|
||||
.map((k, i) => {
|
||||
return (
|
||||
((this.state.ShowAdvanced && k.advanced) || !k.advanced) ?
|
||||
|
||||
Reference in New Issue
Block a user