- Add DISCOVERY_LOG_LEVEL=debug - Add DISCOVERY_SHOW_PROGRESS=true - Temporary changes for debugging InitializerProcessor fixes on production
40 lines
798 B
PHP
40 lines
798 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Framework\Health;
|
|
|
|
enum HealthStatus: string
|
|
{
|
|
case HEALTHY = 'healthy';
|
|
case WARNING = 'warning';
|
|
case UNHEALTHY = 'unhealthy';
|
|
|
|
public function getColor(): string
|
|
{
|
|
return match($this) {
|
|
self::HEALTHY => '#30d158',
|
|
self::WARNING => '#ff9500',
|
|
self::UNHEALTHY => '#ff453a'
|
|
};
|
|
}
|
|
|
|
public function getIcon(): string
|
|
{
|
|
return match($this) {
|
|
self::HEALTHY => '✅',
|
|
self::WARNING => '⚠️',
|
|
self::UNHEALTHY => '❌'
|
|
};
|
|
}
|
|
|
|
public function getPriority(): int
|
|
{
|
|
return match($this) {
|
|
self::UNHEALTHY => 1,
|
|
self::WARNING => 2,
|
|
self::HEALTHY => 3
|
|
};
|
|
}
|
|
}
|