feat: add environment_uuid support and update API documentation

- Introduced `environment_uuid` as a required field in various API endpoints and schemas.
- Updated descriptions to clarify that either `environment_name` or `environment_uuid` must be provided.
- Modified routes and controller methods to accommodate the new UUID parameter.
- Adjusted frontend components to utilize `environment_uuid` for better consistency and clarity.
- Removed deprecated fields related to environment handling.

This change enhances the API's flexibility in identifying environments, improving overall usability.
This commit is contained in:
Andras Bacsai
2024-12-17 13:42:16 +01:00
parent 0ce01238d7
commit 9e3467578f
24 changed files with 421 additions and 525 deletions

View File

@@ -17,6 +17,8 @@ class StatusChanged extends CustomEmailNotification
public string $environment_uuid;
public string $environment_name;
public ?string $resource_url = null;
public ?string $fqdn;
@@ -27,6 +29,7 @@ class StatusChanged extends CustomEmailNotification
$this->resource_name = data_get($resource, 'name');
$this->project_uuid = data_get($resource, 'environment.project.uuid');
$this->environment_uuid = data_get($resource, 'environment.uuid');
$this->environment_name = data_get($resource, 'environment.name');
$this->fqdn = data_get($resource, 'fqdn', null);
if (str($this->fqdn)->explode(',')->count() > 1) {
$this->fqdn = str($this->fqdn)->explode(',')->first();
@@ -80,7 +83,7 @@ class StatusChanged extends CustomEmailNotification
public function toPushover(): PushoverMessage
{
$message = $this->resource_name . ' has been stopped.';
$message = $this->resource_name.' has been stopped.';
return new PushoverMessage(
title: 'Application stopped',