From e6aec7d95a9ce307a5d277971d96d2c8af3bf059 Mon Sep 17 00:00:00 2001 From: tristan Date: Mon, 6 Apr 2026 14:38:34 +0200 Subject: [PATCH] fix : use MalioButton/MalioButtonIcon everywhere, fix env count and fixture URLs - Replace all native HTML buttons with MalioButton and MalioButtonIcon components - Add app:read group on environments relation to fix 0 count in list - Fix fixture URLs (http for apps, https for gitea) - Maintenance icons: alert-outline (activate) / shield-check-outline (deactivate) Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/components/ui/AppModal.vue | 28 ++++----- frontend/pages/applications/[slug].vue | 86 ++++++++++++++------------ frontend/pages/applications/index.vue | 10 +-- src/DataFixtures/AppFixtures.php | 8 +-- src/Entity/Application.php | 2 +- 5 files changed, 68 insertions(+), 66 deletions(-) diff --git a/frontend/components/ui/AppModal.vue b/frontend/components/ui/AppModal.vue index 01f2d4f..da2dff0 100644 --- a/frontend/components/ui/AppModal.vue +++ b/frontend/components/ui/AppModal.vue @@ -20,12 +20,13 @@

- + /> @@ -38,19 +39,16 @@
- + - {{ submitLabel }} - + />
diff --git a/frontend/pages/applications/[slug].vue b/frontend/pages/applications/[slug].vue index 39f393b..1ca25c8 100644 --- a/frontend/pages/applications/[slug].vue +++ b/frontend/pages/applications/[slug].vue @@ -161,18 +161,20 @@ onMounted(loadApplication)

{{ application.description }}

- - + />
@@ -196,12 +198,11 @@ onMounted(loadApplication)

{{ t('environments.title') }}

- + />
@@ -235,31 +236,18 @@ onMounted(loadApplication)
- - + : t('environments.maintenance.activate')" + :variant="env.maintenance ? 'danger' : 'primary'" + :icon-name="env.maintenance ? 'mdi:shield-check-outline' : 'mdi:alert-outline'" + icon-position="left" + :loading="!!pendingMaintenanceByEnvId[env.id!]" + @click="handleToggleMaintenance(env)" + />
@@ -271,6 +259,22 @@ onMounted(loadApplication) {{ lf.path }} +
+ + +
@@ -364,15 +368,15 @@ onMounted(loadApplication) + {{ t('environments.logFiles.addButton') }} -
- - +
+ +
diff --git a/frontend/pages/applications/index.vue b/frontend/pages/applications/index.vue index 6ffa504..c9711a2 100644 --- a/frontend/pages/applications/index.vue +++ b/frontend/pages/applications/index.vue @@ -53,12 +53,12 @@ onMounted(loadApplications)

{{ t('applications.title') }}

- + />
diff --git a/src/DataFixtures/AppFixtures.php b/src/DataFixtures/AppFixtures.php index 2495eb9..3f7ab39 100644 --- a/src/DataFixtures/AppFixtures.php +++ b/src/DataFixtures/AppFixtures.php @@ -61,7 +61,7 @@ class AppFixtures extends Fixture $sirhProd->setContainerName('sirh-app'); $sirhProd->setDeployScriptPath('/home/m-tristan/workspace/SIRH/deploy/docker/deploy.sh'); $sirhProd->setMaintenanceFilePath('/home/m-tristan/workspace/SIRH/deploy/docker/maintenance.on'); - $sirhProd->setAppUrl('https://sirh.malio-dev.fr'); + $sirhProd->setAppUrl('http://sirh.malio-dev.fr'); $sirh->addEnvironment($sirhProd); $sirhProdLog = new LogFile(); @@ -88,7 +88,7 @@ class AppFixtures extends Fixture $lesstimeProd->setContainerName('lesstime-app'); $lesstimeProd->setDeployScriptPath('/home/m-tristan/workspace/lesstime/deploy/docker/deploy.sh'); $lesstimeProd->setMaintenanceFilePath('/home/m-tristan/workspace/lesstime/deploy/docker/maintenance.on'); - $lesstimeProd->setAppUrl('https://lesstime.malio-dev.fr'); + $lesstimeProd->setAppUrl('http://lesstime.malio-dev.fr'); $lesstime->addEnvironment($lesstimeProd); $manager->persist($lesstime); @@ -105,7 +105,7 @@ class AppFixtures extends Fixture $inventoryProd->setContainerName('inventory-app'); $inventoryProd->setDeployScriptPath('/home/m-tristan/workspace/inventory/deploy/docker/deploy.sh'); $inventoryProd->setMaintenanceFilePath('/home/m-tristan/workspace/inventory/deploy/docker/maintenance.on'); - $inventoryProd->setAppUrl('https://inventory.malio-dev.fr'); + $inventoryProd->setAppUrl('http://inventory.malio-dev.fr'); $inventory->addEnvironment($inventoryProd); $inventoryRecette = new Environment(); @@ -113,7 +113,7 @@ class AppFixtures extends Fixture $inventoryRecette->setContainerName('inventory-test-app'); $inventoryRecette->setDeployScriptPath('/home/m-tristan/workspace/inventory/deploy/docker/deploy-test.sh'); $inventoryRecette->setMaintenanceFilePath('/home/m-tristan/workspace/inventory/deploy/docker/maintenance-test.on'); - $inventoryRecette->setAppUrl('https://inventory-test.malio-dev.fr'); + $inventoryRecette->setAppUrl('http://inventory-test.malio-dev.fr'); $inventory->addEnvironment($inventoryRecette); $manager->persist($inventory); diff --git a/src/Entity/Application.php b/src/Entity/Application.php index dbac593..4959169 100644 --- a/src/Entity/Application.php +++ b/src/Entity/Application.php @@ -81,7 +81,7 @@ class Application /** @var Collection */ #[ORM\OneToMany(targetEntity: Environment::class, mappedBy: 'application', cascade: ['persist', 'remove'], orphanRemoval: true)] - #[Groups(['app:detail'])] + #[Groups(['app:read', 'app:detail'])] private Collection $environments; public function __construct()