diff --git a/app/static/js/index.js b/app/static/js/index.js index 9be2b9d..3659925 100644 --- a/app/static/js/index.js +++ b/app/static/js/index.js @@ -926,7 +926,14 @@ ${svc.status === 'running' && svc.host_port ? `Порт: ${svc.host_port}` : ''} } await switchToSingle(svc); }; - els.containerList.appendChild(item); + + // Добавляем контейнер внутрь секции локальных контейнеров + const localContent = document.getElementById('local-content'); + if (localContent) { + localContent.appendChild(item); + } else { + els.containerList.appendChild(item); + } }); } @@ -1040,23 +1047,30 @@ ${svc.last_modified ? `Обновлено: ${new Date(svc.last_modified * 1000). } await switchToSingle(svc); }; - els.containerList.appendChild(item); + + // Добавляем контейнер внутрь секции хоста + const hostContent = document.getElementById(`host-${hostname}-content`); + if (hostContent) { + hostContent.appendChild(item); + } else { + els.containerList.appendChild(item); + } }); - // Закрываем секцию хоста + // Устанавливаем отображение секции хоста const hostContent = document.getElementById(`host-${hostname}-content`); if (hostContent) { hostContent.style.display = 'block'; } }); - // Закрываем секцию удаленных контейнеров + // Устанавливаем отображение секции удаленных контейнеров const remoteContent = document.getElementById('remote-content'); if (remoteContent) { remoteContent.style.display = 'block'; } - // Закрываем секцию локальных контейнеров + // Устанавливаем отображение секции локальных контейнеров const localContent = document.getElementById('local-content'); if (localContent) { localContent.style.display = 'block';