We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e70fc41 commit 56ff41dCopy full SHA for 56ff41d
src/components/vm/overview/firmware.jsx
@@ -52,11 +52,19 @@ class FirmwareModal extends React.Component {
52
this.setState({ dialogError: text, dialogErrorDetail: detail });
53
}
54
55
- save() {
+ async save() {
56
const Dialogs = this.context;
57
const vm = this.props.vm;
58
- domainSetOSFirmware({ connectionName: vm.connectionName, objPath: vm.id, loaderType: stateToXml(this.state.firmware) })
59
- .then(Dialogs.close, exc => this.dialogErrorSet(_("Failed to change firmware"), exc.message));
+ try {
+ await domainSetOSFirmware({
60
+ connectionName: vm.connectionName,
61
+ objPath: vm.id,
62
+ loaderType: stateToXml(this.state.firmware)
63
+ });
64
+ Dialogs.close();
65
+ } catch (exc) {
66
+ this.dialogErrorSet(_("Failed to change firmware"), exc.message);
67
+ }
68
69
70
render() {
0 commit comments