Skip to content

Commit

Permalink
When committing fails, dialog should go to previous state
Browse files Browse the repository at this point in the history
And not stay in the `progress` state - where `Commit` button is disabled
and spinner is visible.
  • Loading branch information
marusak committed Jan 7, 2020
1 parent 77255f2 commit b1bf370
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ContainerCommitModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ class ContainerCommitModal extends React.Component {
.catch(ex => {
this.setState({
dialogError: cockpit.format(_("Failed to commit container $0"), this.props.container.names),
dialogErrorDetail: cockpit.format("$0: $1", ex.error, ex.parameters && ex.parameters.reason)
dialogErrorDetail: cockpit.format("$0: $1", ex.error, ex.parameters && ex.parameters.reason),
commitInProgress: false
});
});
}
Expand Down
1 change: 1 addition & 0 deletions test/check-application
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ class TestApplication(testlib.MachineCase):
b.wait_present('.modal-dialog div:contains("io.podman.ErrorOccurred")')
b.click(".modal-dialog div .pf-c-alert .pf-c-button")
b.wait_not_present(".modal-dialog div .alert")
b.wait_present(".modal-dialog div .btn-ctr-commit:not([disabled])")

b.click(".btn-ctr-cancel-commit")

Expand Down

0 comments on commit b1bf370

Please sign in to comment.