feat(service): warn when required environment variables are missing

Surface unset required service env vars in the configuration checker
popup and sidebar, refresh on env updates, and keep the env table
horizontally scrollable with correct managed/hardcoded pagination order.
This commit is contained in:
Andras Bacsai
2026-08-07 12:24:09 +02:00
parent 64d73b6922
commit fd6dbd5863
12 changed files with 209 additions and 66 deletions
+10 -10
View File
@@ -1640,16 +1640,16 @@ class Service extends BaseModel
protected function isDeployable(): Attribute
{
return Attribute::make(
get: function () {
$envs = $this->environment_variables()->where('is_required', true)->get();
foreach ($envs as $env) {
if ($env->is_really_required) {
return false;
}
}
return true;
}
get: fn (): bool => $this->missingRequiredEnvironmentVariables()->isEmpty()
);
}
public function missingRequiredEnvironmentVariables(): Collection
{
return $this->environment_variables()
->where('is_required', true)
->get()
->filter(fn (EnvironmentVariable $environmentVariable): bool => $environmentVariable->is_really_required)
->values();
}
}