mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-14 09:40:15 +00:00
aio-interface: show sub-steps for starting containers
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
e9108e3660
commit
b51943d8a1
5 changed files with 127 additions and 0 deletions
|
|
@ -142,6 +142,20 @@ $app->get('/containers', function (Request $request, Response $response, array $
|
|||
'bypass_container_update' => $bypass_container_update,
|
||||
]);
|
||||
})->setName('profile');
|
||||
|
||||
// Server-Sent Events endpoint for container events (container-start)
|
||||
$app->get('/events/containers', function (Request $request, Response $response, array $args) use ($container) {
|
||||
// Only allow authenticated sessions to access SSE
|
||||
$authManager = $container->get(\AIO\Auth\AuthManager::class);
|
||||
if (!$authManager->IsAuthenticated()) {
|
||||
return $response->withStatus(401);
|
||||
}
|
||||
|
||||
// Delegate streaming logic to the DockerController
|
||||
$dockerController = $container->get(\AIO\Controller\DockerController::class);
|
||||
return $dockerController->StreamContainerEvents($response);
|
||||
});
|
||||
|
||||
$app->get('/login', function (Request $request, Response $response, array $args) use ($container) {
|
||||
$view = Twig::fromRequest($request);
|
||||
/** @var \AIO\Docker\DockerActionManager $dockerActionManager */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue