From 874c63a9cca429558f7287a1f2641dc4303bf5ca Mon Sep 17 00:00:00 2001 From: Andrey Borysenko Date: Tue, 1 Jul 2025 23:31:06 +0300 Subject: [PATCH] feat: daemon selection support during ExApp installation from UI Signed-off-by: Andrey Borysenko --- appinfo/routes.php | 4 ++-- lib/Controller/ExAppsPageController.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/appinfo/routes.php b/appinfo/routes.php index e7f917f4..0759c593 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -34,8 +34,8 @@ // ExApps actions ['name' => 'ExAppsPage#listCategories', 'url' => '/apps/categories', 'verb' => 'GET' , 'root' => ''], ['name' => 'ExAppsPage#listApps', 'url' => '/apps/list', 'verb' => 'GET' , 'root' => ''], - ['name' => 'ExAppsPage#enableApp', 'url' => '/apps/enable/{appId}', 'verb' => 'GET' , 'root' => ''], - ['name' => 'ExAppsPage#enableApp', 'url' => '/apps/enable/{appId}', 'verb' => 'POST' , 'root' => ''], + ['name' => 'ExAppsPage#enableApp', 'url' => '/apps/enable/{appId}/{daemonId}', 'verb' => 'GET' , 'root' => ''], + ['name' => 'ExAppsPage#enableApp', 'url' => '/apps/enable/{appId}/{daemonId}', 'verb' => 'POST' , 'root' => ''], ['name' => 'ExAppsPage#getAppStatus', 'url' => '/apps/status/{appId}', 'verb' => 'GET' , 'root' => ''], ['name' => 'ExAppsPage#getAppLogs', 'url' => '/apps/logs/{appId}', 'verb' => 'GET' , 'root' => ''], ['name' => 'ExAppsPage#getAppDeployOptions', 'url' => '/apps/deploy-options/{appId}', 'verb' => 'GET' , 'root' => ''], diff --git a/lib/Controller/ExAppsPageController.php b/lib/Controller/ExAppsPageController.php index 0727ec61..4c8f5274 100644 --- a/lib/Controller/ExAppsPageController.php +++ b/lib/Controller/ExAppsPageController.php @@ -314,7 +314,7 @@ private function buildLocalAppsList(array $apps, array $exApps): array { } #[PasswordConfirmationRequired] - public function enableApp(string $appId, array $deployOptions = []): JSONResponse { + public function enableApp(string $appId, string $daemonId, array $deployOptions = []): JSONResponse { $updateRequired = false; $exApp = $this->exAppService->getExApp($appId); @@ -341,6 +341,7 @@ public function enableApp(string $appId, array $deployOptions = []): JSONRespons 'app_api:app:register', '--silent', $appId, + $daemonId, ], $envArgs, $mountArgs