From 377920fcc8cc7c8ec8f14a82864b64fbc9b415f9 Mon Sep 17 00:00:00 2001 From: Vadym Honcharuk Date: Thu, 19 Dec 2024 13:10:59 +0200 Subject: [PATCH] [Core] Feature #3432, code refactoring --- .../{ => Model}/Healthcheck/GhostIndicesCheck.php | 0 .../{ => Model}/Healthcheck/HealthcheckList.php | 0 .../{ => Model}/Healthcheck/ReplicasConfigCheck.php | 2 +- .../{ => Model}/Healthcheck/ShardsConfigCheck.php | 0 ...gAboutClusterMisconfig.php => GenericHealthcheckWarning.php} | 0 5 files changed, 1 insertion(+), 1 deletion(-) rename src/module-elasticsuite-core/{ => Model}/Healthcheck/GhostIndicesCheck.php (100%) rename src/module-elasticsuite-core/{ => Model}/Healthcheck/HealthcheckList.php (100%) rename src/module-elasticsuite-core/{ => Model}/Healthcheck/ReplicasConfigCheck.php (98%) rename src/module-elasticsuite-core/{ => Model}/Healthcheck/ShardsConfigCheck.php (100%) rename src/module-elasticsuite-core/Model/System/Message/{GenericWarningAboutClusterMisconfig.php => GenericHealthcheckWarning.php} (100%) diff --git a/src/module-elasticsuite-core/Healthcheck/GhostIndicesCheck.php b/src/module-elasticsuite-core/Model/Healthcheck/GhostIndicesCheck.php similarity index 100% rename from src/module-elasticsuite-core/Healthcheck/GhostIndicesCheck.php rename to src/module-elasticsuite-core/Model/Healthcheck/GhostIndicesCheck.php diff --git a/src/module-elasticsuite-core/Healthcheck/HealthcheckList.php b/src/module-elasticsuite-core/Model/Healthcheck/HealthcheckList.php similarity index 100% rename from src/module-elasticsuite-core/Healthcheck/HealthcheckList.php rename to src/module-elasticsuite-core/Model/Healthcheck/HealthcheckList.php diff --git a/src/module-elasticsuite-core/Healthcheck/ReplicasConfigCheck.php b/src/module-elasticsuite-core/Model/Healthcheck/ReplicasConfigCheck.php similarity index 98% rename from src/module-elasticsuite-core/Healthcheck/ReplicasConfigCheck.php rename to src/module-elasticsuite-core/Model/Healthcheck/ReplicasConfigCheck.php index 434e517d1..e9909fbf9 100644 --- a/src/module-elasticsuite-core/Healthcheck/ReplicasConfigCheck.php +++ b/src/module-elasticsuite-core/Model/Healthcheck/ReplicasConfigCheck.php @@ -123,7 +123,7 @@ public function getStatus(): string $numberOfReplicas = $this->helper->getNumberOfReplicas(); $numberOfNodes = $this->getNumberOfNodes(); - if ($numberOfReplicas > 1 && $numberOfReplicas > ($numberOfNodes - 1)) { + if ($numberOfReplicas > 0 && $numberOfReplicas > ($numberOfNodes - 1)) { return 'warning'; } diff --git a/src/module-elasticsuite-core/Healthcheck/ShardsConfigCheck.php b/src/module-elasticsuite-core/Model/Healthcheck/ShardsConfigCheck.php similarity index 100% rename from src/module-elasticsuite-core/Healthcheck/ShardsConfigCheck.php rename to src/module-elasticsuite-core/Model/Healthcheck/ShardsConfigCheck.php diff --git a/src/module-elasticsuite-core/Model/System/Message/GenericWarningAboutClusterMisconfig.php b/src/module-elasticsuite-core/Model/System/Message/GenericHealthcheckWarning.php similarity index 100% rename from src/module-elasticsuite-core/Model/System/Message/GenericWarningAboutClusterMisconfig.php rename to src/module-elasticsuite-core/Model/System/Message/GenericHealthcheckWarning.php