Error handling

This commit is contained in:
Scott E. Graves
2018-10-02 22:59:33 -05:00
parent 7e82690f5e
commit c55020fe0f
11 changed files with 158 additions and 64 deletions

View File

@@ -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) ?