Skip to content

Commit 684979f

Browse files
rvykydalmvollmer
authored andcommitted
network: Add sessionStorage event informing about NetworkManager Checkpoint
Resolves: COCKPIT-1417
1 parent e04e20b commit 684979f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

pkg/networkmanager/interfaces.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1667,6 +1667,9 @@ export function with_checkpoint(model, modify, options) {
16671667
return;
16681668
}
16691669

1670+
// Signal that a checkpoint is active for anaconda-webui
1671+
window.sessionStorage.setItem("cockpit_has_checkpoint", "true");
1672+
16701673
show_curtain();
16711674
modify()
16721675
.then(function () {
@@ -1678,7 +1681,12 @@ export function with_checkpoint(model, modify, options) {
16781681
action: syn_click(model, modify)
16791682
});
16801683
})
1681-
.finally(hide_curtain);
1684+
.finally(function() {
1685+
hide_curtain();
1686+
1687+
// Clear checkpoint status when done
1688+
window.sessionStorage.setItem("cockpit_has_checkpoint", "false");
1689+
});
16821690
}, settle_time * 1000);
16831691
})
16841692
.catch(function () {
@@ -1698,6 +1706,9 @@ export function with_checkpoint(model, modify, options) {
16981706
manager.checkpoint_rollback(cp);
16991707
else
17001708
manager.checkpoint_destroy(cp);
1709+
1710+
// Clear checkpoint status on failure
1711+
window.sessionStorage.setItem("cockpit_has_checkpoint", "false");
17011712
});
17021713
});
17031714
}

0 commit comments

Comments
 (0)