Skip to content

Commit

Permalink
Pass checkpoint restore form arguments
Browse files Browse the repository at this point in the history
We never passed the ignoreStaticIP or ignoreStaticMAC options to the
restore rest call.
  • Loading branch information
jelly committed Nov 30, 2022
1 parent 341a30b commit 8a58218
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/ContainerRestoreModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@ const ContainerRestoreModal = ({ containerWillRestore, onAddNotification }) => {
const [ignoreStaticIP, setIgnoreStaticIP] = useState(false);
const [ignoreStaticMAC, setIgnoreStaticMAC] = useState(false);

const handleRestoreContainer = (args) => {
const handleRestoreContainer = () => {
setInProgress(true);
client.postContainer(containerWillRestore.isSystem, "restore", containerWillRestore.Id, args)
client.postContainer(containerWillRestore.isSystem, "restore", containerWillRestore.Id, {
keep,
tcpEstablished,
ignoreStaticIP,
ignoreStaticMAC,
})
.catch(ex => {
const error = cockpit.format(_("Failed to restore container $0"), containerWillRestore.Names);
onAddNotification({ type: 'danger', error, errorDetail: ex.message });
Expand All @@ -37,12 +42,7 @@ const ContainerRestoreModal = ({ containerWillRestore, onAddNotification }) => {
footer={<>
<Button variant="primary" isDisabled={inProgress}
isLoading={inProgress}
onClick={() => {
handleRestoreContainer({
keep: keep,
tcpEstablished: tcpEstablished,
});
}}>
onClick={handleRestoreContainer}>
{_("Restore")}
</Button>
<Button variant="link" isDisabled={inProgress}
Expand Down

0 comments on commit 8a58218

Please sign in to comment.