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:
@@ -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',
|
||||
|
Reference in New Issue
Block a user