Skip to content

Commit 9b9c42e

Browse files
committed
network: Add sessionStorage event informing about NetworkManager Checkpoint
Resolves: COCKPIT-1417
1 parent 2a6169d commit 9b9c42e

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
@@ -1670,6 +1670,9 @@ export function with_checkpoint(model, modify, options) {
16701670
return;
16711671
}
16721672

1673+
// Signal that a checkpoint is active for anaconda-webui
1674+
window.sessionStorage.setItem("cockpit_has_checkpoint", "true");
1675+
16731676
show_curtain();
16741677
modify()
16751678
.then(function () {
@@ -1681,7 +1684,12 @@ export function with_checkpoint(model, modify, options) {
16811684
action: syn_click(model, modify)
16821685
});
16831686
})
1684-
.finally(hide_curtain);
1687+
.finally(function() {
1688+
hide_curtain();
1689+
1690+
// Clear checkpoint status when done
1691+
window.sessionStorage.setItem("cockpit_has_checkpoint", "false");
1692+
});
16851693
}, settle_time * 1000);
16861694
})
16871695
.catch(function () {
@@ -1701,6 +1709,9 @@ export function with_checkpoint(model, modify, options) {
17011709
manager.checkpoint_rollback(cp);
17021710
else
17031711
manager.checkpoint_destroy(cp);
1712+
1713+
// Clear checkpoint status on failure
1714+
window.sessionStorage.setItem("cockpit_has_checkpoint", "false");
17041715
});
17051716
});
17061717
}

0 commit comments

Comments
 (0)