Load container status into iframe as streamed response

Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
Pablo Zmdl 2026-02-11 15:54:41 +01:00
parent dd989ee87f
commit b95eb8b8ed
8 changed files with 226 additions and 12 deletions

View file

@ -79,6 +79,17 @@ function showPassword(id) {
for (const form of forms) {
initForm(form);
}
const overlayLogForms = document.querySelectorAll('form[target="overlay-log"]')
for (const form of overlayLogForms) {
form.onsubmit = function() {
enableSpinner();
document.getElementById('overlay-log')?.classList.add('visible');
// Reload the page after the response was fully loaded into the iframe.
document.querySelector('iframe[name="overlay-log"]').addEventListener('load', () => {
location.reload();
});
};
}
}
if (document.readyState === 'loading') {

View file

@ -471,6 +471,26 @@ input[type="checkbox"]:disabled:not(:checked) + label {
display: block;
}
#overlay #overlay-log.visible {
visibility: visible;
opacity: 1;
transition: opacity 1s ease-in;
}
#overlay #overlay-log {
visibility: hidden;
opacity: 0;
position: absolute;
top: calc(50% + 120px);
width: 20%;
height: 5rem;
margin: 0 39%;
padding: 1rem 1.5rem;
border-radius: 10px;
border: solid thin rgb(192, 192, 192);
background-color: rgba(128, 128, 128);
}
.loader {
border: 16px solid var(--color-loader);
border-radius: 50%;
@ -705,4 +725,4 @@ input[type="checkbox"]:disabled:not(:checked) + label {
.office-suite-cards {
grid-template-columns: 1fr;
}
}
}