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:
		| @@ -117,11 +117,12 @@ class ApplicationsController extends Controller | |||||||
|                     mediaType: 'application/json', |                     mediaType: 'application/json', | ||||||
|                     schema: new OA\Schema( |                     schema: new OA\Schema( | ||||||
|                         type: 'object', |                         type: 'object', | ||||||
|                         required: ['project_uuid', 'server_uuid', 'environment_name', 'git_repository', 'git_branch', 'build_pack', 'ports_exposes'], |                         required: ['project_uuid', 'server_uuid', 'environment_name', 'environment_uuid', 'git_repository', 'git_branch', 'build_pack', 'ports_exposes'], | ||||||
|                         properties: [ |                         properties: [ | ||||||
|                             'project_uuid' => ['type' => 'string', 'description' => 'The project UUID.'], |                             'project_uuid' => ['type' => 'string', 'description' => 'The project UUID.'], | ||||||
|                             'server_uuid' => ['type' => 'string', 'description' => 'The server UUID.'], |                             'server_uuid' => ['type' => 'string', 'description' => 'The server UUID.'], | ||||||
|                             'environment_name' => ['type' => 'string', 'description' => 'The environment name.'], |                             'environment_name' => ['type' => 'string', 'description' => 'The environment name. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|  |                             'environment_uuid' => ['type' => 'string', 'description' => 'The environment UUID. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|                             'git_repository' => ['type' => 'string', 'description' => 'The git repository URL.'], |                             'git_repository' => ['type' => 'string', 'description' => 'The git repository URL.'], | ||||||
|                             'git_branch' => ['type' => 'string', 'description' => 'The git branch.'], |                             'git_branch' => ['type' => 'string', 'description' => 'The git branch.'], | ||||||
|                             'build_pack' => ['type' => 'string', 'enum' => ['nixpacks', 'static', 'dockerfile', 'dockercompose'], 'description' => 'The build pack type.'], |                             'build_pack' => ['type' => 'string', 'enum' => ['nixpacks', 'static', 'dockerfile', 'dockercompose'], 'description' => 'The build pack type.'], | ||||||
| @@ -223,11 +224,12 @@ class ApplicationsController extends Controller | |||||||
|                     mediaType: 'application/json', |                     mediaType: 'application/json', | ||||||
|                     schema: new OA\Schema( |                     schema: new OA\Schema( | ||||||
|                         type: 'object', |                         type: 'object', | ||||||
|                         required: ['project_uuid', 'server_uuid', 'environment_name', 'github_app_uuid', 'git_repository', 'git_branch', 'build_pack', 'ports_exposes'], |                         required: ['project_uuid', 'server_uuid', 'environment_name', 'environment_uuid', 'github_app_uuid', 'git_repository', 'git_branch', 'build_pack', 'ports_exposes'], | ||||||
|                         properties: [ |                         properties: [ | ||||||
|                             'project_uuid' => ['type' => 'string', 'description' => 'The project UUID.'], |                             'project_uuid' => ['type' => 'string', 'description' => 'The project UUID.'], | ||||||
|                             'server_uuid' => ['type' => 'string', 'description' => 'The server UUID.'], |                             'server_uuid' => ['type' => 'string', 'description' => 'The server UUID.'], | ||||||
|                             'environment_name' => ['type' => 'string', 'description' => 'The environment name.'], |                             'environment_name' => ['type' => 'string', 'description' => 'The environment name. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|  |                             'environment_uuid' => ['type' => 'string', 'description' => 'The environment UUID. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|                             'github_app_uuid' => ['type' => 'string', 'description' => 'The Github App UUID.'], |                             'github_app_uuid' => ['type' => 'string', 'description' => 'The Github App UUID.'], | ||||||
|                             'git_repository' => ['type' => 'string', 'description' => 'The git repository URL.'], |                             'git_repository' => ['type' => 'string', 'description' => 'The git repository URL.'], | ||||||
|                             'git_branch' => ['type' => 'string', 'description' => 'The git branch.'], |                             'git_branch' => ['type' => 'string', 'description' => 'The git branch.'], | ||||||
| @@ -329,11 +331,12 @@ class ApplicationsController extends Controller | |||||||
|                     mediaType: 'application/json', |                     mediaType: 'application/json', | ||||||
|                     schema: new OA\Schema( |                     schema: new OA\Schema( | ||||||
|                         type: 'object', |                         type: 'object', | ||||||
|                         required: ['project_uuid', 'server_uuid', 'environment_name', 'private_key_uuid', 'git_repository', 'git_branch', 'build_pack', 'ports_exposes'], |                         required: ['project_uuid', 'server_uuid', 'environment_name', 'environment_uuid', 'private_key_uuid', 'git_repository', 'git_branch', 'build_pack', 'ports_exposes'], | ||||||
|                         properties: [ |                         properties: [ | ||||||
|                             'project_uuid' => ['type' => 'string', 'description' => 'The project UUID.'], |                             'project_uuid' => ['type' => 'string', 'description' => 'The project UUID.'], | ||||||
|                             'server_uuid' => ['type' => 'string', 'description' => 'The server UUID.'], |                             'server_uuid' => ['type' => 'string', 'description' => 'The server UUID.'], | ||||||
|                             'environment_name' => ['type' => 'string', 'description' => 'The environment name.'], |                             'environment_name' => ['type' => 'string', 'description' => 'The environment name. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|  |                             'environment_uuid' => ['type' => 'string', 'description' => 'The environment UUID. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|                             'private_key_uuid' => ['type' => 'string', 'description' => 'The private key UUID.'], |                             'private_key_uuid' => ['type' => 'string', 'description' => 'The private key UUID.'], | ||||||
|                             'git_repository' => ['type' => 'string', 'description' => 'The git repository URL.'], |                             'git_repository' => ['type' => 'string', 'description' => 'The git repository URL.'], | ||||||
|                             'git_branch' => ['type' => 'string', 'description' => 'The git branch.'], |                             'git_branch' => ['type' => 'string', 'description' => 'The git branch.'], | ||||||
| @@ -435,11 +438,12 @@ class ApplicationsController extends Controller | |||||||
|                     mediaType: 'application/json', |                     mediaType: 'application/json', | ||||||
|                     schema: new OA\Schema( |                     schema: new OA\Schema( | ||||||
|                         type: 'object', |                         type: 'object', | ||||||
|                         required: ['project_uuid', 'server_uuid', 'environment_name', 'dockerfile'], |                         required: ['project_uuid', 'server_uuid', 'environment_name', 'environment_uuid', 'dockerfile'], | ||||||
|                         properties: [ |                         properties: [ | ||||||
|                             'project_uuid' => ['type' => 'string', 'description' => 'The project UUID.'], |                             'project_uuid' => ['type' => 'string', 'description' => 'The project UUID.'], | ||||||
|                             'server_uuid' => ['type' => 'string', 'description' => 'The server UUID.'], |                             'server_uuid' => ['type' => 'string', 'description' => 'The server UUID.'], | ||||||
|                             'environment_name' => ['type' => 'string', 'description' => 'The environment name.'], |                             'environment_name' => ['type' => 'string', 'description' => 'The environment name. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|  |                             'environment_uuid' => ['type' => 'string', 'description' => 'The environment UUID. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|                             'dockerfile' => ['type' => 'string', 'description' => 'The Dockerfile content.'], |                             'dockerfile' => ['type' => 'string', 'description' => 'The Dockerfile content.'], | ||||||
|                             'build_pack' => ['type' => 'string', 'enum' => ['nixpacks', 'static', 'dockerfile', 'dockercompose'], 'description' => 'The build pack type.'], |                             'build_pack' => ['type' => 'string', 'enum' => ['nixpacks', 'static', 'dockerfile', 'dockercompose'], 'description' => 'The build pack type.'], | ||||||
|                             'ports_exposes' => ['type' => 'string', 'description' => 'The ports to expose.'], |                             'ports_exposes' => ['type' => 'string', 'description' => 'The ports to expose.'], | ||||||
| @@ -525,11 +529,12 @@ class ApplicationsController extends Controller | |||||||
|                     mediaType: 'application/json', |                     mediaType: 'application/json', | ||||||
|                     schema: new OA\Schema( |                     schema: new OA\Schema( | ||||||
|                         type: 'object', |                         type: 'object', | ||||||
|                         required: ['project_uuid', 'server_uuid', 'environment_name', 'docker_registry_image_name', 'ports_exposes'], |                         required: ['project_uuid', 'server_uuid', 'environment_name', 'environment_uuid', 'docker_registry_image_name', 'ports_exposes'], | ||||||
|                         properties: [ |                         properties: [ | ||||||
|                             'project_uuid' => ['type' => 'string', 'description' => 'The project UUID.'], |                             'project_uuid' => ['type' => 'string', 'description' => 'The project UUID.'], | ||||||
|                             'server_uuid' => ['type' => 'string', 'description' => 'The server UUID.'], |                             'server_uuid' => ['type' => 'string', 'description' => 'The server UUID.'], | ||||||
|                             'environment_name' => ['type' => 'string', 'description' => 'The environment name.'], |                             'environment_name' => ['type' => 'string', 'description' => 'The environment name. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|  |                             'environment_uuid' => ['type' => 'string', 'description' => 'The environment UUID. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|                             'docker_registry_image_name' => ['type' => 'string', 'description' => 'The docker registry image name.'], |                             'docker_registry_image_name' => ['type' => 'string', 'description' => 'The docker registry image name.'], | ||||||
|                             'docker_registry_image_tag' => ['type' => 'string', 'description' => 'The docker registry image tag.'], |                             'docker_registry_image_tag' => ['type' => 'string', 'description' => 'The docker registry image tag.'], | ||||||
|                             'ports_exposes' => ['type' => 'string', 'description' => 'The ports to expose.'], |                             'ports_exposes' => ['type' => 'string', 'description' => 'The ports to expose.'], | ||||||
| @@ -612,11 +617,12 @@ class ApplicationsController extends Controller | |||||||
|                     mediaType: 'application/json', |                     mediaType: 'application/json', | ||||||
|                     schema: new OA\Schema( |                     schema: new OA\Schema( | ||||||
|                         type: 'object', |                         type: 'object', | ||||||
|                         required: ['project_uuid', 'server_uuid', 'environment_name', 'docker_compose_raw'], |                         required: ['project_uuid', 'server_uuid', 'environment_name', 'environment_uuid', 'docker_compose_raw'], | ||||||
|                         properties: [ |                         properties: [ | ||||||
|                             'project_uuid' => ['type' => 'string', 'description' => 'The project UUID.'], |                             'project_uuid' => ['type' => 'string', 'description' => 'The project UUID.'], | ||||||
|                             'server_uuid' => ['type' => 'string', 'description' => 'The server UUID.'], |                             'server_uuid' => ['type' => 'string', 'description' => 'The server UUID.'], | ||||||
|                             'environment_name' => ['type' => 'string', 'description' => 'The environment name.'], |                             'environment_name' => ['type' => 'string', 'description' => 'The environment name. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|  |                             'environment_uuid' => ['type' => 'string', 'description' => 'The environment UUID. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|                             'docker_compose_raw' => ['type' => 'string', 'description' => 'The Docker Compose raw content.'], |                             'docker_compose_raw' => ['type' => 'string', 'description' => 'The Docker Compose raw content.'], | ||||||
|                             'destination_uuid' => ['type' => 'string', 'description' => 'The destination UUID if the server has more than one destinations.'], |                             'destination_uuid' => ['type' => 'string', 'description' => 'The destination UUID if the server has more than one destinations.'], | ||||||
|                             'name' => ['type' => 'string', 'description' => 'The application name.'], |                             'name' => ['type' => 'string', 'description' => 'The application name.'], | ||||||
| @@ -650,7 +656,7 @@ class ApplicationsController extends Controller | |||||||
| 
 | 
 | ||||||
|     private function create_application(Request $request, $type) |     private function create_application(Request $request, $type) | ||||||
|     { |     { | ||||||
|         $allowedFields = ['project_uuid', 'environment_name', 'server_uuid', 'destination_uuid', 'type', 'name', 'description', 'is_static', 'domains', 'git_repository', 'git_branch', 'git_commit_sha', 'private_key_uuid', 'docker_registry_image_name', 'docker_registry_image_tag', 'build_pack', 'install_command', 'build_command', 'start_command', 'ports_exposes', 'ports_mappings', 'base_directory', 'publish_directory', 'health_check_enabled', 'health_check_path', 'health_check_port', 'health_check_host', 'health_check_method', 'health_check_return_code', 'health_check_scheme', 'health_check_response_text', 'health_check_interval', 'health_check_timeout', 'health_check_retries', 'health_check_start_period', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares', 'custom_labels', 'custom_docker_run_options', 'post_deployment_command', 'post_deployment_command_container', 'pre_deployment_command', 'pre_deployment_command_container',  'manual_webhook_secret_github', 'manual_webhook_secret_gitlab', 'manual_webhook_secret_bitbucket', 'manual_webhook_secret_gitea', 'redirect', 'github_app_uuid', 'instant_deploy', 'dockerfile', 'docker_compose_location', 'docker_compose_raw', 'docker_compose_custom_start_command', 'docker_compose_custom_build_command', 'docker_compose_domains', 'watch_paths', 'use_build_server', 'static_image', 'custom_nginx_configuration']; |         $allowedFields = ['project_uuid', 'environment_name', 'environment_uuid', 'server_uuid', 'destination_uuid', 'type', 'name', 'description', 'is_static', 'domains', 'git_repository', 'git_branch', 'git_commit_sha', 'private_key_uuid', 'docker_registry_image_name', 'docker_registry_image_tag', 'build_pack', 'install_command', 'build_command', 'start_command', 'ports_exposes', 'ports_mappings', 'base_directory', 'publish_directory', 'health_check_enabled', 'health_check_path', 'health_check_port', 'health_check_host', 'health_check_method', 'health_check_return_code', 'health_check_scheme', 'health_check_response_text', 'health_check_interval', 'health_check_timeout', 'health_check_retries', 'health_check_start_period', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares', 'custom_labels', 'custom_docker_run_options', 'post_deployment_command', 'post_deployment_command_container', 'pre_deployment_command', 'pre_deployment_command_container',  'manual_webhook_secret_github', 'manual_webhook_secret_gitlab', 'manual_webhook_secret_bitbucket', 'manual_webhook_secret_gitea', 'redirect', 'github_app_uuid', 'instant_deploy', 'dockerfile', 'docker_compose_location', 'docker_compose_raw', 'docker_compose_custom_start_command', 'docker_compose_custom_build_command', 'docker_compose_domains', 'watch_paths', 'use_build_server', 'static_image', 'custom_nginx_configuration']; | ||||||
|         $teamId = getTeamIdFromToken(); |         $teamId = getTeamIdFromToken(); | ||||||
|         if (is_null($teamId)) { |         if (is_null($teamId)) { | ||||||
|             return invalidTokenResponse(); |             return invalidTokenResponse(); | ||||||
| @@ -664,7 +670,8 @@ class ApplicationsController extends Controller | |||||||
|             'name' => 'string|max:255', |             'name' => 'string|max:255', | ||||||
|             'description' => 'string|nullable', |             'description' => 'string|nullable', | ||||||
|             'project_uuid' => 'string|required', |             'project_uuid' => 'string|required', | ||||||
|             'environment_name' => 'string|required', |             'environment_name' => 'string|nullable', | ||||||
|  |             'environment_uuid' => 'string|nullable', | ||||||
|             'server_uuid' => 'string|required', |             'server_uuid' => 'string|required', | ||||||
|             'destination_uuid' => 'string', |             'destination_uuid' => 'string', | ||||||
|         ]); |         ]); | ||||||
| @@ -684,6 +691,11 @@ class ApplicationsController extends Controller | |||||||
|             ], 422); |             ], 422); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |         $environmentUuid = $request->environment_uuid; | ||||||
|  |         $environmentName = $request->environment_name; | ||||||
|  |         if (blank($environmentUuid) && blank($environmentName)) { | ||||||
|  |             return response()->json(['message' => 'You need to provide at least one of environment_name or environment_uuid.'], 422); | ||||||
|  |         } | ||||||
|         $serverUuid = $request->server_uuid; |         $serverUuid = $request->server_uuid; | ||||||
|         $fqdn = $request->domains; |         $fqdn = $request->domains; | ||||||
|         $instantDeploy = $request->instant_deploy; |         $instantDeploy = $request->instant_deploy; | ||||||
| @@ -716,7 +728,10 @@ class ApplicationsController extends Controller | |||||||
|         if (! $project) { |         if (! $project) { | ||||||
|             return response()->json(['message' => 'Project not found.'], 404); |             return response()->json(['message' => 'Project not found.'], 404); | ||||||
|         } |         } | ||||||
|         $environment = $project->environments()->where('name', $request->environment_name)->first(); |         $environment = $project->environments()->where('name', $environmentName)->first(); | ||||||
|  |         if (! $environment) { | ||||||
|  |             $environment = $project->environments()->where('uuid', $environmentUuid)->first(); | ||||||
|  |         } | ||||||
|         if (! $environment) { |         if (! $environment) { | ||||||
|             return response()->json(['message' => 'Environment not found.'], 404); |             return response()->json(['message' => 'Environment not found.'], 404); | ||||||
|         } |         } | ||||||
| @@ -733,12 +748,6 @@ class ApplicationsController extends Controller | |||||||
|         } |         } | ||||||
|         $destination = $destinations->first(); |         $destination = $destinations->first(); | ||||||
|         if ($type === 'public') { |         if ($type === 'public') { | ||||||
|             if (! $request->has('name')) { |  | ||||||
|                 $request->offsetSet('name', generate_application_name($request->git_repository, $request->git_branch)); |  | ||||||
|             } |  | ||||||
|             if ($request->build_pack === 'dockercompose') { |  | ||||||
|                 $request->offsetSet('ports_exposes', '80'); |  | ||||||
|             } |  | ||||||
|             $validationRules = [ |             $validationRules = [ | ||||||
|                 'git_repository' => 'string|required', |                 'git_repository' => 'string|required', | ||||||
|                 'git_branch' => 'string|required', |                 'git_branch' => 'string|required', | ||||||
| @@ -748,7 +757,7 @@ class ApplicationsController extends Controller | |||||||
|                 'docker_compose_raw' => 'string|nullable', |                 'docker_compose_raw' => 'string|nullable', | ||||||
|                 'docker_compose_domains' => 'array|nullable', |                 'docker_compose_domains' => 'array|nullable', | ||||||
|             ]; |             ]; | ||||||
|             $validationRules = array_merge($validationRules, sharedDataApplications()); |             $validationRules = array_merge(sharedDataApplications(), $validationRules); | ||||||
|             $validator = customApiValidator($request->all(), $validationRules); |             $validator = customApiValidator($request->all(), $validationRules); | ||||||
|             if ($validator->fails()) { |             if ($validator->fails()) { | ||||||
|                 return response()->json([ |                 return response()->json([ | ||||||
| @@ -756,6 +765,12 @@ class ApplicationsController extends Controller | |||||||
|                     'errors' => $validator->errors(), |                     'errors' => $validator->errors(), | ||||||
|                 ], 422); |                 ], 422); | ||||||
|             } |             } | ||||||
|  |             if (! $request->has('name')) { | ||||||
|  |                 $request->offsetSet('name', generate_application_name($request->git_repository, $request->git_branch)); | ||||||
|  |             } | ||||||
|  |             if ($request->build_pack === 'dockercompose') { | ||||||
|  |                 $request->offsetSet('ports_exposes', '80'); | ||||||
|  |             } | ||||||
| 
 | 
 | ||||||
|             $return = $this->validateDataApplications($request, $server); |             $return = $this->validateDataApplications($request, $server); | ||||||
|             if ($return instanceof \Illuminate\Http\JsonResponse) { |             if ($return instanceof \Illuminate\Http\JsonResponse) { | ||||||
| @@ -820,12 +835,6 @@ class ApplicationsController extends Controller | |||||||
|                 'domains' => data_get($application, 'domains'), |                 'domains' => data_get($application, 'domains'), | ||||||
|             ])); |             ])); | ||||||
|         } elseif ($type === 'private-gh-app') { |         } elseif ($type === 'private-gh-app') { | ||||||
|             if (! $request->has('name')) { |  | ||||||
|                 $request->offsetSet('name', generate_application_name($request->git_repository, $request->git_branch)); |  | ||||||
|             } |  | ||||||
|             if ($request->build_pack === 'dockercompose') { |  | ||||||
|                 $request->offsetSet('ports_exposes', '80'); |  | ||||||
|             } |  | ||||||
|             $validationRules = [ |             $validationRules = [ | ||||||
|                 'git_repository' => 'string|required', |                 'git_repository' => 'string|required', | ||||||
|                 'git_branch' => 'string|required', |                 'git_branch' => 'string|required', | ||||||
| @@ -836,7 +845,7 @@ class ApplicationsController extends Controller | |||||||
|                 'docker_compose_location' => 'string', |                 'docker_compose_location' => 'string', | ||||||
|                 'docker_compose_raw' => 'string|nullable', |                 'docker_compose_raw' => 'string|nullable', | ||||||
|             ]; |             ]; | ||||||
|             $validationRules = array_merge($validationRules, sharedDataApplications()); |             $validationRules = array_merge(sharedDataApplications(), $validationRules); | ||||||
| 
 | 
 | ||||||
|             $validator = customApiValidator($request->all(), $validationRules); |             $validator = customApiValidator($request->all(), $validationRules); | ||||||
|             if ($validator->fails()) { |             if ($validator->fails()) { | ||||||
| @@ -845,6 +854,14 @@ class ApplicationsController extends Controller | |||||||
|                     'errors' => $validator->errors(), |                     'errors' => $validator->errors(), | ||||||
|                 ], 422); |                 ], 422); | ||||||
|             } |             } | ||||||
|  | 
 | ||||||
|  |             if (! $request->has('name')) { | ||||||
|  |                 $request->offsetSet('name', generate_application_name($request->git_repository, $request->git_branch)); | ||||||
|  |             } | ||||||
|  |             if ($request->build_pack === 'dockercompose') { | ||||||
|  |                 $request->offsetSet('ports_exposes', '80'); | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|             $return = $this->validateDataApplications($request, $server); |             $return = $this->validateDataApplications($request, $server); | ||||||
|             if ($return instanceof \Illuminate\Http\JsonResponse) { |             if ($return instanceof \Illuminate\Http\JsonResponse) { | ||||||
|                 return $return; |                 return $return; | ||||||
| @@ -919,12 +936,6 @@ class ApplicationsController extends Controller | |||||||
|                 'domains' => data_get($application, 'domains'), |                 'domains' => data_get($application, 'domains'), | ||||||
|             ])); |             ])); | ||||||
|         } elseif ($type === 'private-deploy-key') { |         } elseif ($type === 'private-deploy-key') { | ||||||
|             if (! $request->has('name')) { |  | ||||||
|                 $request->offsetSet('name', generate_application_name($request->git_repository, $request->git_branch)); |  | ||||||
|             } |  | ||||||
|             if ($request->build_pack === 'dockercompose') { |  | ||||||
|                 $request->offsetSet('ports_exposes', '80'); |  | ||||||
|             } |  | ||||||
| 
 | 
 | ||||||
|             $validationRules = [ |             $validationRules = [ | ||||||
|                 'git_repository' => 'string|required', |                 'git_repository' => 'string|required', | ||||||
| @@ -937,7 +948,7 @@ class ApplicationsController extends Controller | |||||||
|                 'docker_compose_raw' => 'string|nullable', |                 'docker_compose_raw' => 'string|nullable', | ||||||
|             ]; |             ]; | ||||||
| 
 | 
 | ||||||
|             $validationRules = array_merge($validationRules, sharedDataApplications()); |             $validationRules = array_merge(sharedDataApplications(), $validationRules); | ||||||
|             $validator = customApiValidator($request->all(), $validationRules); |             $validator = customApiValidator($request->all(), $validationRules); | ||||||
| 
 | 
 | ||||||
|             if ($validator->fails()) { |             if ($validator->fails()) { | ||||||
| @@ -946,6 +957,13 @@ class ApplicationsController extends Controller | |||||||
|                     'errors' => $validator->errors(), |                     'errors' => $validator->errors(), | ||||||
|                 ], 422); |                 ], 422); | ||||||
|             } |             } | ||||||
|  |             if (! $request->has('name')) { | ||||||
|  |                 $request->offsetSet('name', generate_application_name($request->git_repository, $request->git_branch)); | ||||||
|  |             } | ||||||
|  |             if ($request->build_pack === 'dockercompose') { | ||||||
|  |                 $request->offsetSet('ports_exposes', '80'); | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|             $return = $this->validateDataApplications($request, $server); |             $return = $this->validateDataApplications($request, $server); | ||||||
|             if ($return instanceof \Illuminate\Http\JsonResponse) { |             if ($return instanceof \Illuminate\Http\JsonResponse) { | ||||||
|                 return $return; |                 return $return; | ||||||
| @@ -1015,14 +1033,10 @@ class ApplicationsController extends Controller | |||||||
|                 'domains' => data_get($application, 'domains'), |                 'domains' => data_get($application, 'domains'), | ||||||
|             ])); |             ])); | ||||||
|         } elseif ($type === 'dockerfile') { |         } elseif ($type === 'dockerfile') { | ||||||
|             if (! $request->has('name')) { |  | ||||||
|                 $request->offsetSet('name', 'dockerfile-'.new Cuid2); |  | ||||||
|             } |  | ||||||
| 
 |  | ||||||
|             $validationRules = [ |             $validationRules = [ | ||||||
|                 'dockerfile' => 'string|required', |                 'dockerfile' => 'string|required', | ||||||
|             ]; |             ]; | ||||||
|             $validationRules = array_merge($validationRules, sharedDataApplications()); |             $validationRules = array_merge(sharedDataApplications(), $validationRules); | ||||||
|             $validator = customApiValidator($request->all(), $validationRules); |             $validator = customApiValidator($request->all(), $validationRules); | ||||||
| 
 | 
 | ||||||
|             if ($validator->fails()) { |             if ($validator->fails()) { | ||||||
| @@ -1031,6 +1045,10 @@ class ApplicationsController extends Controller | |||||||
|                     'errors' => $validator->errors(), |                     'errors' => $validator->errors(), | ||||||
|                 ], 422); |                 ], 422); | ||||||
|             } |             } | ||||||
|  |             if (! $request->has('name')) { | ||||||
|  |                 $request->offsetSet('name', 'dockerfile-'.new Cuid2); | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|             $return = $this->validateDataApplications($request, $server); |             $return = $this->validateDataApplications($request, $server); | ||||||
|             if ($return instanceof \Illuminate\Http\JsonResponse) { |             if ($return instanceof \Illuminate\Http\JsonResponse) { | ||||||
|                 return $return; |                 return $return; | ||||||
| @@ -1100,15 +1118,12 @@ class ApplicationsController extends Controller | |||||||
|                 'domains' => data_get($application, 'domains'), |                 'domains' => data_get($application, 'domains'), | ||||||
|             ])); |             ])); | ||||||
|         } elseif ($type === 'dockerimage') { |         } elseif ($type === 'dockerimage') { | ||||||
|             if (! $request->has('name')) { |  | ||||||
|                 $request->offsetSet('name', 'docker-image-'.new Cuid2); |  | ||||||
|             } |  | ||||||
|             $validationRules = [ |             $validationRules = [ | ||||||
|                 'docker_registry_image_name' => 'string|required', |                 'docker_registry_image_name' => 'string|required', | ||||||
|                 'docker_registry_image_tag' => 'string', |                 'docker_registry_image_tag' => 'string', | ||||||
|                 'ports_exposes' => 'string|regex:/^(\d+)(,\d+)*$/|required', |                 'ports_exposes' => 'string|regex:/^(\d+)(,\d+)*$/|required', | ||||||
|             ]; |             ]; | ||||||
|             $validationRules = array_merge($validationRules, sharedDataApplications()); |             $validationRules = array_merge(sharedDataApplications(), $validationRules); | ||||||
|             $validator = customApiValidator($request->all(), $validationRules); |             $validator = customApiValidator($request->all(), $validationRules); | ||||||
| 
 | 
 | ||||||
|             if ($validator->fails()) { |             if ($validator->fails()) { | ||||||
| @@ -1117,6 +1132,9 @@ class ApplicationsController extends Controller | |||||||
|                     'errors' => $validator->errors(), |                     'errors' => $validator->errors(), | ||||||
|                 ], 422); |                 ], 422); | ||||||
|             } |             } | ||||||
|  |             if (! $request->has('name')) { | ||||||
|  |                 $request->offsetSet('name', 'docker-image-'.new Cuid2); | ||||||
|  |             } | ||||||
|             $return = $this->validateDataApplications($request, $server); |             $return = $this->validateDataApplications($request, $server); | ||||||
|             if ($return instanceof \Illuminate\Http\JsonResponse) { |             if ($return instanceof \Illuminate\Http\JsonResponse) { | ||||||
|                 return $return; |                 return $return; | ||||||
| @@ -1164,7 +1182,7 @@ class ApplicationsController extends Controller | |||||||
|                 'domains' => data_get($application, 'domains'), |                 'domains' => data_get($application, 'domains'), | ||||||
|             ])); |             ])); | ||||||
|         } elseif ($type === 'dockercompose') { |         } elseif ($type === 'dockercompose') { | ||||||
|             $allowedFields = ['project_uuid', 'environment_name', 'server_uuid', 'destination_uuid', 'type', 'name', 'description', 'instant_deploy', 'docker_compose_raw']; |             $allowedFields = ['project_uuid', 'environment_name', 'environment_uuid', 'server_uuid', 'destination_uuid', 'type', 'name', 'description', 'instant_deploy', 'docker_compose_raw']; | ||||||
| 
 | 
 | ||||||
|             $extraFields = array_diff(array_keys($request->all()), $allowedFields); |             $extraFields = array_diff(array_keys($request->all()), $allowedFields); | ||||||
|             if ($validator->fails() || ! empty($extraFields)) { |             if ($validator->fails() || ! empty($extraFields)) { | ||||||
| @@ -1186,7 +1204,7 @@ class ApplicationsController extends Controller | |||||||
|             $validationRules = [ |             $validationRules = [ | ||||||
|                 'docker_compose_raw' => 'string|required', |                 'docker_compose_raw' => 'string|required', | ||||||
|             ]; |             ]; | ||||||
|             $validationRules = array_merge($validationRules, sharedDataApplications()); |             $validationRules = array_merge(sharedDataApplications(), $validationRules); | ||||||
|             $validator = customApiValidator($request->all(), $validationRules); |             $validator = customApiValidator($request->all(), $validationRules); | ||||||
| 
 | 
 | ||||||
|             if ($validator->fails()) { |             if ($validator->fails()) { | ||||||
| @@ -1554,7 +1572,7 @@ class ApplicationsController extends Controller | |||||||
|             'docker_compose_custom_build_command' => 'string|nullable', |             'docker_compose_custom_build_command' => 'string|nullable', | ||||||
|             'custom_nginx_configuration' => 'string|nullable', |             'custom_nginx_configuration' => 'string|nullable', | ||||||
|         ]; |         ]; | ||||||
|         $validationRules = array_merge($validationRules, sharedDataApplications()); |         $validationRules = array_merge(sharedDataApplications(), $validationRules); | ||||||
|         $validator = customApiValidator($request->all(), $validationRules); |         $validator = customApiValidator($request->all(), $validationRules); | ||||||
| 
 | 
 | ||||||
|         // Validate ports_exposes
 |         // Validate ports_exposes
 | ||||||
|   | |||||||
| @@ -523,11 +523,12 @@ class DatabasesController extends Controller | |||||||
|                 mediaType: 'application/json', |                 mediaType: 'application/json', | ||||||
|                 schema: new OA\Schema( |                 schema: new OA\Schema( | ||||||
|                     type: 'object', |                     type: 'object', | ||||||
|                     required: ['server_uuid', 'project_uuid', 'environment_name'], |                     required: ['server_uuid', 'project_uuid', 'environment_name', 'environment_uuid'], | ||||||
|                     properties: [ |                     properties: [ | ||||||
|                         'server_uuid' => ['type' => 'string', 'description' => 'UUID of the server'], |                         'server_uuid' => ['type' => 'string', 'description' => 'UUID of the server'], | ||||||
|                         'project_uuid' => ['type' => 'string', 'description' => 'UUID of the project'], |                         'project_uuid' => ['type' => 'string', 'description' => 'UUID of the project'], | ||||||
|                         'environment_name' => ['type' => 'string', 'description' => 'Name of the environment'], |                         'environment_name' => ['type' => 'string', 'description' => 'Name of the environment. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|  |                         'environment_uuid' => ['type' => 'string', 'description' => 'UUID of the environment. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|                         'postgres_user' => ['type' => 'string', 'description' => 'PostgreSQL user'], |                         'postgres_user' => ['type' => 'string', 'description' => 'PostgreSQL user'], | ||||||
|                         'postgres_password' => ['type' => 'string', 'description' => 'PostgreSQL password'], |                         'postgres_password' => ['type' => 'string', 'description' => 'PostgreSQL password'], | ||||||
|                         'postgres_db' => ['type' => 'string', 'description' => 'PostgreSQL database'], |                         'postgres_db' => ['type' => 'string', 'description' => 'PostgreSQL database'], | ||||||
| @@ -589,11 +590,12 @@ class DatabasesController extends Controller | |||||||
|                 mediaType: 'application/json', |                 mediaType: 'application/json', | ||||||
|                 schema: new OA\Schema( |                 schema: new OA\Schema( | ||||||
|                     type: 'object', |                     type: 'object', | ||||||
|                     required: ['server_uuid', 'project_uuid', 'environment_name'], |                     required: ['server_uuid', 'project_uuid', 'environment_name', 'environment_uuid'], | ||||||
|                     properties: [ |                     properties: [ | ||||||
|                         'server_uuid' => ['type' => 'string', 'description' => 'UUID of the server'], |                         'server_uuid' => ['type' => 'string', 'description' => 'UUID of the server'], | ||||||
|                         'project_uuid' => ['type' => 'string', 'description' => 'UUID of the project'], |                         'project_uuid' => ['type' => 'string', 'description' => 'UUID of the project'], | ||||||
|                         'environment_name' => ['type' => 'string', 'description' => 'Name of the environment'], |                         'environment_name' => ['type' => 'string', 'description' => 'Name of the environment. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|  |                         'environment_uuid' => ['type' => 'string', 'description' => 'UUID of the environment. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|                         'destination_uuid' => ['type' => 'string',  'description' => 'UUID of the destination if the server has multiple destinations'], |                         'destination_uuid' => ['type' => 'string',  'description' => 'UUID of the destination if the server has multiple destinations'], | ||||||
|                         'clickhouse_admin_user' => ['type' => 'string', 'description' => 'Clickhouse admin user'], |                         'clickhouse_admin_user' => ['type' => 'string', 'description' => 'Clickhouse admin user'], | ||||||
|                         'clickhouse_admin_password' => ['type' => 'string', 'description' => 'Clickhouse admin password'], |                         'clickhouse_admin_password' => ['type' => 'string', 'description' => 'Clickhouse admin password'], | ||||||
| @@ -651,11 +653,12 @@ class DatabasesController extends Controller | |||||||
|                 mediaType: 'application/json', |                 mediaType: 'application/json', | ||||||
|                 schema: new OA\Schema( |                 schema: new OA\Schema( | ||||||
|                     type: 'object', |                     type: 'object', | ||||||
|                     required: ['server_uuid', 'project_uuid', 'environment_name'], |                     required: ['server_uuid', 'project_uuid', 'environment_name', 'environment_uuid'], | ||||||
|                     properties: [ |                     properties: [ | ||||||
|                         'server_uuid' => ['type' => 'string', 'description' => 'UUID of the server'], |                         'server_uuid' => ['type' => 'string', 'description' => 'UUID of the server'], | ||||||
|                         'project_uuid' => ['type' => 'string', 'description' => 'UUID of the project'], |                         'project_uuid' => ['type' => 'string', 'description' => 'UUID of the project'], | ||||||
|                         'environment_name' => ['type' => 'string', 'description' => 'Name of the environment'], |                         'environment_name' => ['type' => 'string', 'description' => 'Name of the environment. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|  |                         'environment_uuid' => ['type' => 'string', 'description' => 'UUID of the environment. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|                         'destination_uuid' => ['type' => 'string', 'description' => 'UUID of the destination if the server has multiple destinations'], |                         'destination_uuid' => ['type' => 'string', 'description' => 'UUID of the destination if the server has multiple destinations'], | ||||||
|                         'dragonfly_password' => ['type' => 'string', 'description' => 'DragonFly password'], |                         'dragonfly_password' => ['type' => 'string', 'description' => 'DragonFly password'], | ||||||
|                         'name' => ['type' => 'string', 'description' => 'Name of the database'], |                         'name' => ['type' => 'string', 'description' => 'Name of the database'], | ||||||
| @@ -712,11 +715,12 @@ class DatabasesController extends Controller | |||||||
|                 mediaType: 'application/json', |                 mediaType: 'application/json', | ||||||
|                 schema: new OA\Schema( |                 schema: new OA\Schema( | ||||||
|                     type: 'object', |                     type: 'object', | ||||||
|                     required: ['server_uuid', 'project_uuid', 'environment_name'], |                     required: ['server_uuid', 'project_uuid', 'environment_name', 'environment_uuid'], | ||||||
|                     properties: [ |                     properties: [ | ||||||
|                         'server_uuid' => ['type' => 'string', 'description' => 'UUID of the server'], |                         'server_uuid' => ['type' => 'string', 'description' => 'UUID of the server'], | ||||||
|                         'project_uuid' => ['type' => 'string', 'description' => 'UUID of the project'], |                         'project_uuid' => ['type' => 'string', 'description' => 'UUID of the project'], | ||||||
|                         'environment_name' => ['type' => 'string', 'description' => 'Name of the environment'], |                         'environment_name' => ['type' => 'string', 'description' => 'Name of the environment. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|  |                         'environment_uuid' => ['type' => 'string', 'description' => 'UUID of the environment. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|                         'destination_uuid' => ['type' => 'string', 'description' => 'UUID of the destination if the server has multiple destinations'], |                         'destination_uuid' => ['type' => 'string', 'description' => 'UUID of the destination if the server has multiple destinations'], | ||||||
|                         'redis_password' => ['type' => 'string', 'description' => 'Redis password'], |                         'redis_password' => ['type' => 'string', 'description' => 'Redis password'], | ||||||
|                         'redis_conf' => ['type' => 'string', 'description' => 'Redis conf'], |                         'redis_conf' => ['type' => 'string', 'description' => 'Redis conf'], | ||||||
| @@ -774,11 +778,12 @@ class DatabasesController extends Controller | |||||||
|                 mediaType: 'application/json', |                 mediaType: 'application/json', | ||||||
|                 schema: new OA\Schema( |                 schema: new OA\Schema( | ||||||
|                     type: 'object', |                     type: 'object', | ||||||
|                     required: ['server_uuid', 'project_uuid', 'environment_name'], |                     required: ['server_uuid', 'project_uuid', 'environment_name', 'environment_uuid'], | ||||||
|                     properties: [ |                     properties: [ | ||||||
|                         'server_uuid' => ['type' => 'string', 'description' => 'UUID of the server'], |                         'server_uuid' => ['type' => 'string', 'description' => 'UUID of the server'], | ||||||
|                         'project_uuid' => ['type' => 'string', 'description' => 'UUID of the project'], |                         'project_uuid' => ['type' => 'string', 'description' => 'UUID of the project'], | ||||||
|                         'environment_name' => ['type' => 'string', 'description' => 'Name of the environment'], |                         'environment_name' => ['type' => 'string', 'description' => 'Name of the environment. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|  |                         'environment_uuid' => ['type' => 'string', 'description' => 'UUID of the environment. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|                         'destination_uuid' => ['type' => 'string', 'description' => 'UUID of the destination if the server has multiple destinations'], |                         'destination_uuid' => ['type' => 'string', 'description' => 'UUID of the destination if the server has multiple destinations'], | ||||||
|                         'keydb_password' => ['type' => 'string', 'description' => 'KeyDB password'], |                         'keydb_password' => ['type' => 'string', 'description' => 'KeyDB password'], | ||||||
|                         'keydb_conf' => ['type' => 'string', 'description' => 'KeyDB conf'], |                         'keydb_conf' => ['type' => 'string', 'description' => 'KeyDB conf'], | ||||||
| @@ -836,11 +841,12 @@ class DatabasesController extends Controller | |||||||
|                 mediaType: 'application/json', |                 mediaType: 'application/json', | ||||||
|                 schema: new OA\Schema( |                 schema: new OA\Schema( | ||||||
|                     type: 'object', |                     type: 'object', | ||||||
|                     required: ['server_uuid', 'project_uuid', 'environment_name'], |                     required: ['server_uuid', 'project_uuid', 'environment_name', 'environment_uuid'], | ||||||
|                     properties: [ |                     properties: [ | ||||||
|                         'server_uuid' => ['type' => 'string', 'description' => 'UUID of the server'], |                         'server_uuid' => ['type' => 'string', 'description' => 'UUID of the server'], | ||||||
|                         'project_uuid' => ['type' => 'string', 'description' => 'UUID of the project'], |                         'project_uuid' => ['type' => 'string', 'description' => 'UUID of the project'], | ||||||
|                         'environment_name' => ['type' => 'string', 'description' => 'Name of the environment'], |                         'environment_name' => ['type' => 'string', 'description' => 'Name of the environment. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|  |                         'environment_uuid' => ['type' => 'string', 'description' => 'UUID of the environment. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|                         'destination_uuid' => ['type' => 'string', 'description' => 'UUID of the destination if the server has multiple destinations'], |                         'destination_uuid' => ['type' => 'string', 'description' => 'UUID of the destination if the server has multiple destinations'], | ||||||
|                         'mariadb_conf' => ['type' => 'string', 'description' => 'MariaDB conf'], |                         'mariadb_conf' => ['type' => 'string', 'description' => 'MariaDB conf'], | ||||||
|                         'mariadb_root_password' => ['type' => 'string', 'description' => 'MariaDB root password'], |                         'mariadb_root_password' => ['type' => 'string', 'description' => 'MariaDB root password'], | ||||||
| @@ -901,11 +907,12 @@ class DatabasesController extends Controller | |||||||
|                 mediaType: 'application/json', |                 mediaType: 'application/json', | ||||||
|                 schema: new OA\Schema( |                 schema: new OA\Schema( | ||||||
|                     type: 'object', |                     type: 'object', | ||||||
|                     required: ['server_uuid', 'project_uuid', 'environment_name'], |                     required: ['server_uuid', 'project_uuid', 'environment_name', 'environment_uuid'], | ||||||
|                     properties: [ |                     properties: [ | ||||||
|                         'server_uuid' => ['type' => 'string', 'description' => 'UUID of the server'], |                         'server_uuid' => ['type' => 'string', 'description' => 'UUID of the server'], | ||||||
|                         'project_uuid' => ['type' => 'string', 'description' => 'UUID of the project'], |                         'project_uuid' => ['type' => 'string', 'description' => 'UUID of the project'], | ||||||
|                         'environment_name' => ['type' => 'string', 'description' => 'Name of the environment'], |                         'environment_name' => ['type' => 'string', 'description' => 'Name of the environment. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|  |                         'environment_uuid' => ['type' => 'string', 'description' => 'UUID of the environment. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|                         'destination_uuid' => ['type' => 'string', 'description' => 'UUID of the destination if the server has multiple destinations'], |                         'destination_uuid' => ['type' => 'string', 'description' => 'UUID of the destination if the server has multiple destinations'], | ||||||
|                         'mysql_root_password' => ['type' => 'string', 'description' => 'MySQL root password'], |                         'mysql_root_password' => ['type' => 'string', 'description' => 'MySQL root password'], | ||||||
|                         'mysql_password' => ['type' => 'string', 'description' => 'MySQL password'], |                         'mysql_password' => ['type' => 'string', 'description' => 'MySQL password'], | ||||||
| @@ -966,11 +973,12 @@ class DatabasesController extends Controller | |||||||
|                 mediaType: 'application/json', |                 mediaType: 'application/json', | ||||||
|                 schema: new OA\Schema( |                 schema: new OA\Schema( | ||||||
|                     type: 'object', |                     type: 'object', | ||||||
|                     required: ['server_uuid', 'project_uuid', 'environment_name'], |                     required: ['server_uuid', 'project_uuid', 'environment_name', 'environment_uuid'], | ||||||
|                     properties: [ |                     properties: [ | ||||||
|                         'server_uuid' => ['type' => 'string', 'description' => 'UUID of the server'], |                         'server_uuid' => ['type' => 'string', 'description' => 'UUID of the server'], | ||||||
|                         'project_uuid' => ['type' => 'string', 'description' => 'UUID of the project'], |                         'project_uuid' => ['type' => 'string', 'description' => 'UUID of the project'], | ||||||
|                         'environment_name' => ['type' => 'string', 'description' => 'Name of the environment'], |                         'environment_name' => ['type' => 'string', 'description' => 'Name of the environment. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|  |                         'environment_uuid' => ['type' => 'string', 'description' => 'UUID of the environment. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|                         'destination_uuid' => ['type' => 'string', 'description' => 'UUID of the destination if the server has multiple destinations'], |                         'destination_uuid' => ['type' => 'string', 'description' => 'UUID of the destination if the server has multiple destinations'], | ||||||
|                         'mongo_conf' => ['type' => 'string', 'description' => 'MongoDB conf'], |                         'mongo_conf' => ['type' => 'string', 'description' => 'MongoDB conf'], | ||||||
|                         'mongo_initdb_root_username' => ['type' => 'string', 'description' => 'MongoDB initdb root username'], |                         'mongo_initdb_root_username' => ['type' => 'string', 'description' => 'MongoDB initdb root username'], | ||||||
| @@ -1013,7 +1021,7 @@ class DatabasesController extends Controller | |||||||
| 
 | 
 | ||||||
|     public function create_database(Request $request, NewDatabaseTypes $type) |     public function create_database(Request $request, NewDatabaseTypes $type) | ||||||
|     { |     { | ||||||
|         $allowedFields = ['name', 'description', 'image', 'public_port', 'is_public', 'project_uuid', 'environment_name', 'server_uuid', 'destination_uuid', 'instant_deploy', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares', 'postgres_user', 'postgres_password', 'postgres_db', 'postgres_initdb_args', 'postgres_host_auth_method', 'postgres_conf', 'clickhouse_admin_user', 'clickhouse_admin_password', 'dragonfly_password', 'redis_password', 'redis_conf', 'keydb_password', 'keydb_conf', 'mariadb_conf', 'mariadb_root_password', 'mariadb_user', 'mariadb_password', 'mariadb_database', 'mongo_conf', 'mongo_initdb_root_username', 'mongo_initdb_root_password', 'mongo_initdb_database', 'mysql_root_password', 'mysql_password', 'mysql_user', 'mysql_database', 'mysql_conf']; |         $allowedFields = ['name', 'description', 'image', 'public_port', 'is_public', 'project_uuid', 'environment_name', 'environment_uuid', 'server_uuid', 'destination_uuid', 'instant_deploy', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares', 'postgres_user', 'postgres_password', 'postgres_db', 'postgres_initdb_args', 'postgres_host_auth_method', 'postgres_conf', 'clickhouse_admin_user', 'clickhouse_admin_password', 'dragonfly_password', 'redis_password', 'redis_conf', 'keydb_password', 'keydb_conf', 'mariadb_conf', 'mariadb_root_password', 'mariadb_user', 'mariadb_password', 'mariadb_database', 'mongo_conf', 'mongo_initdb_root_username', 'mongo_initdb_root_password', 'mongo_initdb_database', 'mysql_root_password', 'mysql_password', 'mysql_user', 'mysql_database', 'mysql_conf']; | ||||||
| 
 | 
 | ||||||
|         $teamId = getTeamIdFromToken(); |         $teamId = getTeamIdFromToken(); | ||||||
|         if (is_null($teamId)) { |         if (is_null($teamId)) { | ||||||
| @@ -1039,6 +1047,11 @@ class DatabasesController extends Controller | |||||||
|                 'errors' => $errors, |                 'errors' => $errors, | ||||||
|             ], 422); |             ], 422); | ||||||
|         } |         } | ||||||
|  |         $environmentUuid = $request->environment_uuid; | ||||||
|  |         $environmentName = $request->environment_name; | ||||||
|  |         if (blank($environmentUuid) && blank($environmentName)) { | ||||||
|  |             return response()->json(['message' => 'You need to provide at least one of environment_name or environment_uuid.'], 422); | ||||||
|  |         } | ||||||
|         $serverUuid = $request->server_uuid; |         $serverUuid = $request->server_uuid; | ||||||
|         $instantDeploy = $request->instant_deploy ?? false; |         $instantDeploy = $request->instant_deploy ?? false; | ||||||
|         if ($request->is_public && ! $request->public_port) { |         if ($request->is_public && ! $request->public_port) { | ||||||
| @@ -1048,9 +1061,12 @@ class DatabasesController extends Controller | |||||||
|         if (! $project) { |         if (! $project) { | ||||||
|             return response()->json(['message' => 'Project not found.'], 404); |             return response()->json(['message' => 'Project not found.'], 404); | ||||||
|         } |         } | ||||||
|         $environment = $project->environments()->where('name', $request->environment_name)->first(); |         $environment = $project->environments()->where('name', $environmentName)->first(); | ||||||
|         if (! $environment) { |         if (! $environment) { | ||||||
|             return response()->json(['message' => 'Environment not found.'], 404); |             $environment = $project->environments()->where('uuid', $environmentUuid)->first(); | ||||||
|  |         } | ||||||
|  |         if (! $environment) { | ||||||
|  |             return response()->json(['message' => 'You need to provide a valid environment_name or environment_uuid.'], 422); | ||||||
|         } |         } | ||||||
|         $server = Server::whereTeamId($teamId)->whereUuid($serverUuid)->first(); |         $server = Server::whereTeamId($teamId)->whereUuid($serverUuid)->first(); | ||||||
|         if (! $server) { |         if (! $server) { | ||||||
| @@ -1074,7 +1090,8 @@ class DatabasesController extends Controller | |||||||
|             'description' => 'string|nullable', |             'description' => 'string|nullable', | ||||||
|             'image' => 'string', |             'image' => 'string', | ||||||
|             'project_uuid' => 'string|required', |             'project_uuid' => 'string|required', | ||||||
|             'environment_name' => 'string|required', |             'environment_name' => 'string|nullable', | ||||||
|  |             'environment_uuid' => 'string|nullable', | ||||||
|             'server_uuid' => 'string|required', |             'server_uuid' => 'string|required', | ||||||
|             'destination_uuid' => 'string', |             'destination_uuid' => 'string', | ||||||
|             'is_public' => 'boolean', |             'is_public' => 'boolean', | ||||||
| @@ -1105,7 +1122,7 @@ class DatabasesController extends Controller | |||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         if ($type === NewDatabaseTypes::POSTGRESQL) { |         if ($type === NewDatabaseTypes::POSTGRESQL) { | ||||||
|             $allowedFields = ['name', 'description', 'image', 'public_port', 'is_public', 'project_uuid', 'environment_name', 'server_uuid', 'destination_uuid', 'instant_deploy', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares', 'postgres_user', 'postgres_password', 'postgres_db', 'postgres_initdb_args', 'postgres_host_auth_method', 'postgres_conf']; |             $allowedFields = ['name', 'description', 'image', 'public_port', 'is_public', 'project_uuid', 'environment_name', 'environment_uuid', 'server_uuid', 'destination_uuid', 'instant_deploy', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares', 'postgres_user', 'postgres_password', 'postgres_db', 'postgres_initdb_args', 'postgres_host_auth_method', 'postgres_conf']; | ||||||
|             $validator = customApiValidator($request->all(), [ |             $validator = customApiValidator($request->all(), [ | ||||||
|                 'postgres_user' => 'string', |                 'postgres_user' => 'string', | ||||||
|                 'postgres_password' => 'string', |                 'postgres_password' => 'string', | ||||||
| @@ -1164,7 +1181,7 @@ class DatabasesController extends Controller | |||||||
| 
 | 
 | ||||||
|             return response()->json(serializeApiResponse($payload))->setStatusCode(201); |             return response()->json(serializeApiResponse($payload))->setStatusCode(201); | ||||||
|         } elseif ($type === NewDatabaseTypes::MARIADB) { |         } elseif ($type === NewDatabaseTypes::MARIADB) { | ||||||
|             $allowedFields = ['name', 'description', 'image', 'public_port', 'is_public', 'project_uuid', 'environment_name', 'server_uuid', 'destination_uuid', 'instant_deploy', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares', 'mariadb_conf', 'mariadb_root_password', 'mariadb_user', 'mariadb_password', 'mariadb_database']; |             $allowedFields = ['name', 'description', 'image', 'public_port', 'is_public', 'project_uuid', 'environment_name', 'environment_uuid', 'server_uuid', 'destination_uuid', 'instant_deploy', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares', 'mariadb_conf', 'mariadb_root_password', 'mariadb_user', 'mariadb_password', 'mariadb_database']; | ||||||
|             $validator = customApiValidator($request->all(), [ |             $validator = customApiValidator($request->all(), [ | ||||||
|                 'clickhouse_admin_user' => 'string', |                 'clickhouse_admin_user' => 'string', | ||||||
|                 'clickhouse_admin_password' => 'string', |                 'clickhouse_admin_password' => 'string', | ||||||
| @@ -1220,7 +1237,7 @@ class DatabasesController extends Controller | |||||||
| 
 | 
 | ||||||
|             return response()->json(serializeApiResponse($payload))->setStatusCode(201); |             return response()->json(serializeApiResponse($payload))->setStatusCode(201); | ||||||
|         } elseif ($type === NewDatabaseTypes::MYSQL) { |         } elseif ($type === NewDatabaseTypes::MYSQL) { | ||||||
|             $allowedFields = ['name', 'description', 'image', 'public_port', 'is_public', 'project_uuid', 'environment_name', 'server_uuid', 'destination_uuid', 'instant_deploy', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares', 'mysql_root_password', 'mysql_password', 'mysql_user', 'mysql_database', 'mysql_conf']; |             $allowedFields = ['name', 'description', 'image', 'public_port', 'is_public', 'project_uuid', 'environment_name', 'environment_uuid', 'server_uuid', 'destination_uuid', 'instant_deploy', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares', 'mysql_root_password', 'mysql_password', 'mysql_user', 'mysql_database', 'mysql_conf']; | ||||||
|             $validator = customApiValidator($request->all(), [ |             $validator = customApiValidator($request->all(), [ | ||||||
|                 'mysql_root_password' => 'string', |                 'mysql_root_password' => 'string', | ||||||
|                 'mysql_password' => 'string', |                 'mysql_password' => 'string', | ||||||
| @@ -1279,7 +1296,7 @@ class DatabasesController extends Controller | |||||||
| 
 | 
 | ||||||
|             return response()->json(serializeApiResponse($payload))->setStatusCode(201); |             return response()->json(serializeApiResponse($payload))->setStatusCode(201); | ||||||
|         } elseif ($type === NewDatabaseTypes::REDIS) { |         } elseif ($type === NewDatabaseTypes::REDIS) { | ||||||
|             $allowedFields = ['name', 'description', 'image', 'public_port', 'is_public', 'project_uuid', 'environment_name', 'server_uuid', 'destination_uuid', 'instant_deploy', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares', 'redis_password', 'redis_conf']; |             $allowedFields = ['name', 'description', 'image', 'public_port', 'is_public', 'project_uuid', 'environment_name', 'environment_uuid', 'server_uuid', 'destination_uuid', 'instant_deploy', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares', 'redis_password', 'redis_conf']; | ||||||
|             $validator = customApiValidator($request->all(), [ |             $validator = customApiValidator($request->all(), [ | ||||||
|                 'redis_password' => 'string', |                 'redis_password' => 'string', | ||||||
|                 'redis_conf' => 'string', |                 'redis_conf' => 'string', | ||||||
| @@ -1335,7 +1352,7 @@ class DatabasesController extends Controller | |||||||
| 
 | 
 | ||||||
|             return response()->json(serializeApiResponse($payload))->setStatusCode(201); |             return response()->json(serializeApiResponse($payload))->setStatusCode(201); | ||||||
|         } elseif ($type === NewDatabaseTypes::DRAGONFLY) { |         } elseif ($type === NewDatabaseTypes::DRAGONFLY) { | ||||||
|             $allowedFields = ['name', 'description', 'image', 'public_port', 'is_public', 'project_uuid', 'environment_name', 'server_uuid', 'destination_uuid', 'instant_deploy', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares',  'dragonfly_password']; |             $allowedFields = ['name', 'description', 'image', 'public_port', 'is_public', 'project_uuid', 'environment_name', 'environment_uuid', 'server_uuid', 'destination_uuid', 'instant_deploy', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares',  'dragonfly_password']; | ||||||
|             $validator = customApiValidator($request->all(), [ |             $validator = customApiValidator($request->all(), [ | ||||||
|                 'dragonfly_password' => 'string', |                 'dragonfly_password' => 'string', | ||||||
|             ]); |             ]); | ||||||
| @@ -1365,7 +1382,7 @@ class DatabasesController extends Controller | |||||||
|                 'uuid' => $database->uuid, |                 'uuid' => $database->uuid, | ||||||
|             ]))->setStatusCode(201); |             ]))->setStatusCode(201); | ||||||
|         } elseif ($type === NewDatabaseTypes::KEYDB) { |         } elseif ($type === NewDatabaseTypes::KEYDB) { | ||||||
|             $allowedFields = ['name', 'description', 'image', 'public_port', 'is_public', 'project_uuid', 'environment_name', 'server_uuid', 'destination_uuid', 'instant_deploy', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares', 'keydb_password', 'keydb_conf']; |             $allowedFields = ['name', 'description', 'image', 'public_port', 'is_public', 'project_uuid', 'environment_name', 'environment_uuid', 'server_uuid', 'destination_uuid', 'instant_deploy', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares', 'keydb_password', 'keydb_conf']; | ||||||
|             $validator = customApiValidator($request->all(), [ |             $validator = customApiValidator($request->all(), [ | ||||||
|                 'keydb_password' => 'string', |                 'keydb_password' => 'string', | ||||||
|                 'keydb_conf' => 'string', |                 'keydb_conf' => 'string', | ||||||
| @@ -1421,7 +1438,7 @@ class DatabasesController extends Controller | |||||||
| 
 | 
 | ||||||
|             return response()->json(serializeApiResponse($payload))->setStatusCode(201); |             return response()->json(serializeApiResponse($payload))->setStatusCode(201); | ||||||
|         } elseif ($type === NewDatabaseTypes::CLICKHOUSE) { |         } elseif ($type === NewDatabaseTypes::CLICKHOUSE) { | ||||||
|             $allowedFields = ['name', 'description', 'image', 'public_port', 'is_public', 'project_uuid', 'environment_name', 'server_uuid', 'destination_uuid', 'instant_deploy', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares',  'clickhouse_admin_user', 'clickhouse_admin_password']; |             $allowedFields = ['name', 'description', 'image', 'public_port', 'is_public', 'project_uuid', 'environment_name', 'environment_uuid', 'server_uuid', 'destination_uuid', 'instant_deploy', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares',  'clickhouse_admin_user', 'clickhouse_admin_password']; | ||||||
|             $validator = customApiValidator($request->all(), [ |             $validator = customApiValidator($request->all(), [ | ||||||
|                 'clickhouse_admin_user' => 'string', |                 'clickhouse_admin_user' => 'string', | ||||||
|                 'clickhouse_admin_password' => 'string', |                 'clickhouse_admin_password' => 'string', | ||||||
| @@ -1457,7 +1474,7 @@ class DatabasesController extends Controller | |||||||
| 
 | 
 | ||||||
|             return response()->json(serializeApiResponse($payload))->setStatusCode(201); |             return response()->json(serializeApiResponse($payload))->setStatusCode(201); | ||||||
|         } elseif ($type === NewDatabaseTypes::MONGODB) { |         } elseif ($type === NewDatabaseTypes::MONGODB) { | ||||||
|             $allowedFields = ['name', 'description', 'image', 'public_port', 'is_public', 'project_uuid', 'environment_name', 'server_uuid', 'destination_uuid', 'instant_deploy', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares', 'mongo_conf', 'mongo_initdb_root_username', 'mongo_initdb_root_password', 'mongo_initdb_database']; |             $allowedFields = ['name', 'description', 'image', 'public_port', 'is_public', 'project_uuid', 'environment_name', 'environment_uuid', 'server_uuid', 'destination_uuid', 'instant_deploy', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares', 'mongo_conf', 'mongo_initdb_root_username', 'mongo_initdb_root_password', 'mongo_initdb_database']; | ||||||
|             $validator = customApiValidator($request->all(), [ |             $validator = customApiValidator($request->all(), [ | ||||||
|                 'mongo_conf' => 'string', |                 'mongo_conf' => 'string', | ||||||
|                 'mongo_initdb_root_username' => 'string', |                 'mongo_initdb_root_username' => 'string', | ||||||
|   | |||||||
| @@ -102,16 +102,16 @@ class ProjectController extends Controller | |||||||
| 
 | 
 | ||||||
|     #[OA\Get(
 |     #[OA\Get(
 | ||||||
|         summary: 'Environment', |         summary: 'Environment', | ||||||
|         description: 'Get environment by name.', |         description: 'Get environment by name or UUID.', | ||||||
|         path: '/projects/{uuid}/{environment_name}', |         path: '/projects/{uuid}/{environment_name_or_uuid}', | ||||||
|         operationId: 'get-environment-by-name', |         operationId: 'get-environment-by-name-or-uuid', | ||||||
|         security: [ |         security: [ | ||||||
|             ['bearerAuth' => []], |             ['bearerAuth' => []], | ||||||
|         ], |         ], | ||||||
|         tags: ['Projects'], |         tags: ['Projects'], | ||||||
|         parameters: [ |         parameters: [ | ||||||
|             new OA\Parameter(name: 'uuid', in: 'path', required: true, description: 'Project UUID', schema: new OA\Schema(type: 'string')), |             new OA\Parameter(name: 'uuid', in: 'path', required: true, description: 'Project UUID', schema: new OA\Schema(type: 'string')), | ||||||
|             new OA\Parameter(name: 'environment_name', in: 'path', required: true, description: 'Environment name', schema: new OA\Schema(type: 'string')), |             new OA\Parameter(name: 'environment_name_or_uuid', in: 'path', required: true, description: 'Environment name or UUID', schema: new OA\Schema(type: 'string')), | ||||||
|         ], |         ], | ||||||
|         responses: [ |         responses: [ | ||||||
|             new OA\Response( |             new OA\Response( | ||||||
| @@ -141,14 +141,17 @@ class ProjectController extends Controller | |||||||
|         if (! $request->uuid) { |         if (! $request->uuid) { | ||||||
|             return response()->json(['message' => 'UUID is required.'], 422); |             return response()->json(['message' => 'UUID is required.'], 422); | ||||||
|         } |         } | ||||||
|         if (! $request->environment_name) { |         if (! $request->environment_name_or_uuid) { | ||||||
|             return response()->json(['message' => 'Environment name is required.'], 422); |             return response()->json(['message' => 'Environment name or UUID is required.'], 422); | ||||||
|         } |         } | ||||||
|         $project = Project::whereTeamId($teamId)->whereUuid($request->uuid)->first(); |         $project = Project::whereTeamId($teamId)->whereUuid($request->uuid)->first(); | ||||||
|         if (! $project) { |         if (! $project) { | ||||||
|             return response()->json(['message' => 'Project not found.'], 404); |             return response()->json(['message' => 'Project not found.'], 404); | ||||||
|         } |         } | ||||||
|         $environment = $project->environments()->whereName($request->environment_name)->first(); |         $environment = $project->environments()->whereName($request->environment_name_or_uuid)->first(); | ||||||
|  |         if (! $environment) { | ||||||
|  |             $environment = $project->environments()->whereUuid($request->environment_name_or_uuid)->first(); | ||||||
|  |         } | ||||||
|         if (! $environment) { |         if (! $environment) { | ||||||
|             return response()->json(['message' => 'Environment not found.'], 404); |             return response()->json(['message' => 'Environment not found.'], 404); | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -102,7 +102,7 @@ class ServicesController extends Controller | |||||||
|                 mediaType: 'application/json', |                 mediaType: 'application/json', | ||||||
|                 schema: new OA\Schema( |                 schema: new OA\Schema( | ||||||
|                     type: 'object', |                     type: 'object', | ||||||
|                     required: ['server_uuid', 'project_uuid', 'environment_name', 'type'], |                     required: ['server_uuid', 'project_uuid', 'environment_name', 'environment_uuid', 'type'], | ||||||
|                     properties: [ |                     properties: [ | ||||||
|                         'type' => [ |                         'type' => [ | ||||||
|                             'description' => 'The one-click service type', |                             'description' => 'The one-click service type', | ||||||
| @@ -199,7 +199,8 @@ class ServicesController extends Controller | |||||||
|                         'name' => ['type' => 'string', 'maxLength' => 255, 'description' => 'Name of the service.'], |                         'name' => ['type' => 'string', 'maxLength' => 255, 'description' => 'Name of the service.'], | ||||||
|                         'description' => ['type' => 'string', 'nullable' => true, 'description' => 'Description of the service.'], |                         'description' => ['type' => 'string', 'nullable' => true, 'description' => 'Description of the service.'], | ||||||
|                         'project_uuid' => ['type' => 'string', 'description' => 'Project UUID.'], |                         'project_uuid' => ['type' => 'string', 'description' => 'Project UUID.'], | ||||||
|                         'environment_name' => ['type' => 'string', 'description' => 'Environment name.'], |                         'environment_name' => ['type' => 'string', 'description' => 'Environment name. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|  |                         'environment_uuid' => ['type' => 'string', 'description' => 'Environment UUID. You need to provide at least one of environment_name or environment_uuid.'], | ||||||
|                         'server_uuid' => ['type' => 'string', 'description' => 'Server UUID.'], |                         'server_uuid' => ['type' => 'string', 'description' => 'Server UUID.'], | ||||||
|                         'destination_uuid' => ['type' => 'string', 'description' => 'Destination UUID. Required if server has multiple destinations.'], |                         'destination_uuid' => ['type' => 'string', 'description' => 'Destination UUID. Required if server has multiple destinations.'], | ||||||
|                         'instant_deploy' => ['type' => 'boolean', 'default' => false, 'description' => 'Start the service immediately after creation.'], |                         'instant_deploy' => ['type' => 'boolean', 'default' => false, 'description' => 'Start the service immediately after creation.'], | ||||||
| @@ -236,7 +237,7 @@ class ServicesController extends Controller | |||||||
|     )] |     )] | ||||||
|     public function create_service(Request $request) |     public function create_service(Request $request) | ||||||
|     { |     { | ||||||
|         $allowedFields = ['type', 'name', 'description', 'project_uuid', 'environment_name', 'server_uuid', 'destination_uuid', 'instant_deploy']; |         $allowedFields = ['type', 'name', 'description', 'project_uuid', 'environment_name', 'environment_uuid', 'server_uuid', 'destination_uuid', 'instant_deploy']; | ||||||
| 
 | 
 | ||||||
|         $teamId = getTeamIdFromToken(); |         $teamId = getTeamIdFromToken(); | ||||||
|         if (is_null($teamId)) { |         if (is_null($teamId)) { | ||||||
| @@ -250,7 +251,8 @@ class ServicesController extends Controller | |||||||
|         $validator = customApiValidator($request->all(), [ |         $validator = customApiValidator($request->all(), [ | ||||||
|             'type' => 'string|required', |             'type' => 'string|required', | ||||||
|             'project_uuid' => 'string|required', |             'project_uuid' => 'string|required', | ||||||
|             'environment_name' => 'string|required', |             'environment_name' => 'string|nullable', | ||||||
|  |             'environment_uuid' => 'string|nullable', | ||||||
|             'server_uuid' => 'string|required', |             'server_uuid' => 'string|required', | ||||||
|             'destination_uuid' => 'string', |             'destination_uuid' => 'string', | ||||||
|             'name' => 'string|max:255', |             'name' => 'string|max:255', | ||||||
| @@ -272,6 +274,11 @@ class ServicesController extends Controller | |||||||
|                 'errors' => $errors, |                 'errors' => $errors, | ||||||
|             ], 422); |             ], 422); | ||||||
|         } |         } | ||||||
|  |         $environmentUuid = $request->environment_uuid; | ||||||
|  |         $environmentName = $request->environment_name; | ||||||
|  |         if (blank($environmentUuid) && blank($environmentName)) { | ||||||
|  |             return response()->json(['message' => 'You need to provide at least one of environment_name or environment_uuid.'], 422); | ||||||
|  |         } | ||||||
|         $serverUuid = $request->server_uuid; |         $serverUuid = $request->server_uuid; | ||||||
|         $instantDeploy = $request->instant_deploy ?? false; |         $instantDeploy = $request->instant_deploy ?? false; | ||||||
|         if ($request->is_public && ! $request->public_port) { |         if ($request->is_public && ! $request->public_port) { | ||||||
| @@ -281,7 +288,10 @@ class ServicesController extends Controller | |||||||
|         if (! $project) { |         if (! $project) { | ||||||
|             return response()->json(['message' => 'Project not found.'], 404); |             return response()->json(['message' => 'Project not found.'], 404); | ||||||
|         } |         } | ||||||
|         $environment = $project->environments()->where('name', $request->environment_name)->first(); |         $environment = $project->environments()->where('name', $environmentName)->first(); | ||||||
|  |         if (! $environment) { | ||||||
|  |             $environment = $project->environments()->where('uuid', $environmentUuid)->first(); | ||||||
|  |         } | ||||||
|         if (! $environment) { |         if (! $environment) { | ||||||
|             return response()->json(['message' => 'Environment not found.'], 404); |             return response()->json(['message' => 'Environment not found.'], 404); | ||||||
|         } |         } | ||||||
| @@ -349,7 +359,11 @@ class ServicesController extends Controller | |||||||
|                 } |                 } | ||||||
|                 $domains = $service->applications()->get()->pluck('fqdn')->sort(); |                 $domains = $service->applications()->get()->pluck('fqdn')->sort(); | ||||||
|                 $domains = $domains->map(function ($domain) { |                 $domains = $domains->map(function ($domain) { | ||||||
|  |                     if (count(explode(':', $domain)) > 2) { | ||||||
|                         return str($domain)->beforeLast(':')->value(); |                         return str($domain)->beforeLast(':')->value(); | ||||||
|  |                     } | ||||||
|  | 
 | ||||||
|  |                     return $domain; | ||||||
|                 }); |                 }); | ||||||
| 
 | 
 | ||||||
|                 return response()->json([ |                 return response()->json([ | ||||||
|   | |||||||
| @@ -1405,7 +1405,7 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue | |||||||
|                 'project_uuid' => data_get($this->application, 'environment.project.uuid'), |                 'project_uuid' => data_get($this->application, 'environment.project.uuid'), | ||||||
|                 'application_uuid' => data_get($this->application, 'uuid'), |                 'application_uuid' => data_get($this->application, 'uuid'), | ||||||
|                 'deployment_uuid' => $deployment_uuid, |                 'deployment_uuid' => $deployment_uuid, | ||||||
|                 'environment_name' => data_get($this->application, 'environment.name'), |                 'environment_uuid' => data_get($this->application, 'environment.uuid'), | ||||||
|             ])); |             ])); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -21,7 +21,6 @@ class Configuration extends Component | |||||||
| 
 | 
 | ||||||
|     public function mount() |     public function mount() | ||||||
|     { |     { | ||||||
| 
 |  | ||||||
|         $this->currentRoute = request()->route()->getName(); |         $this->currentRoute = request()->route()->getName(); | ||||||
|         $project = currentTeam() |         $project = currentTeam() | ||||||
|             ->projects() |             ->projects() | ||||||
| @@ -29,7 +28,7 @@ class Configuration extends Component | |||||||
|             ->where('uuid', request()->route('project_uuid')) |             ->where('uuid', request()->route('project_uuid')) | ||||||
|             ->firstOrFail(); |             ->firstOrFail(); | ||||||
|         $environment = $project->environments() |         $environment = $project->environments() | ||||||
|             ->select('id', 'name', 'project_id') |             ->select('id', 'uuid', 'name', 'project_id') | ||||||
|             ->where('uuid', request()->route('environment_uuid')) |             ->where('uuid', request()->route('environment_uuid')) | ||||||
|             ->firstOrFail(); |             ->firstOrFail(); | ||||||
|         $application = $environment->applications() |         $application = $environment->applications() | ||||||
| @@ -40,7 +39,6 @@ class Configuration extends Component | |||||||
|         $this->project = $project; |         $this->project = $project; | ||||||
|         $this->environment = $environment; |         $this->environment = $environment; | ||||||
|         $this->application = $application; |         $this->application = $application; | ||||||
| 
 |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public function render() |     public function render() | ||||||
|   | |||||||
| @@ -34,14 +34,6 @@ class Show extends Component | |||||||
|         if (! $application) { |         if (! $application) { | ||||||
|             return redirect()->route('dashboard'); |             return redirect()->route('dashboard'); | ||||||
|         } |         } | ||||||
|         // $activity = Activity::where('properties->type_uuid', '=', $deploymentUuid)->first();
 |  | ||||||
|         // if (!$activity) {
 |  | ||||||
|         //     return redirect()->route('project.application.deployment.index', [
 |  | ||||||
|         //         'project_uuid' => $project->uuid,
 |  | ||||||
|         //         'environment_name' => $environment->name,
 |  | ||||||
|         //         'application_uuid' => $application->uuid,
 |  | ||||||
|         //     ]);
 |  | ||||||
|         // }
 |  | ||||||
|         $application_deployment_queue = ApplicationDeploymentQueue::where('deployment_uuid', $deploymentUuid)->first(); |         $application_deployment_queue = ApplicationDeploymentQueue::where('deployment_uuid', $deploymentUuid)->first(); | ||||||
|         if (! $application_deployment_queue) { |         if (! $application_deployment_queue) { | ||||||
|             return redirect()->route('project.application.deployment.index', [ |             return redirect()->route('project.application.deployment.index', [ | ||||||
|   | |||||||
| @@ -38,7 +38,7 @@ class Heading extends Component | |||||||
|     { |     { | ||||||
|         $this->parameters = [ |         $this->parameters = [ | ||||||
|             'project_uuid' => $this->application->project()->uuid, |             'project_uuid' => $this->application->project()->uuid, | ||||||
|             'environment_name' => $this->application->environment->name, |             'environment_uuid' => $this->application->environment->uuid, | ||||||
|             'application_uuid' => $this->application->uuid, |             'application_uuid' => $this->application->uuid, | ||||||
|         ]; |         ]; | ||||||
|         $lastDeployment = $this->application->get_last_successful_deployment(); |         $lastDeployment = $this->application->get_last_successful_deployment(); | ||||||
|   | |||||||
| @@ -24,7 +24,7 @@ class Configuration extends Component | |||||||
|             ->where('uuid', request()->route('project_uuid')) |             ->where('uuid', request()->route('project_uuid')) | ||||||
|             ->firstOrFail(); |             ->firstOrFail(); | ||||||
|         $environment = $project->environments() |         $environment = $project->environments() | ||||||
|             ->select('id', 'name', 'project_id') |             ->select('id', 'name', 'project_id', 'uuid') | ||||||
|             ->where('uuid', request()->route('environment_uuid')) |             ->where('uuid', request()->route('environment_uuid')) | ||||||
|             ->firstOrFail(); |             ->firstOrFail(); | ||||||
|         $database = $environment->databases() |         $database = $environment->databases() | ||||||
|   | |||||||
| @@ -4,6 +4,7 @@ namespace App\Livewire\Project\Resource; | |||||||
| 
 | 
 | ||||||
| use App\Models\Environment; | use App\Models\Environment; | ||||||
| use App\Models\Project; | use App\Models\Project; | ||||||
|  | use Illuminate\Support\Collection; | ||||||
| use Livewire\Component; | use Livewire\Component; | ||||||
| 
 | 
 | ||||||
| class Index extends Component | class Index extends Component | ||||||
| @@ -12,39 +13,42 @@ class Index extends Component | |||||||
| 
 | 
 | ||||||
|     public Environment $environment; |     public Environment $environment; | ||||||
| 
 | 
 | ||||||
|     public $applications = []; |     public Collection $applications; | ||||||
| 
 | 
 | ||||||
|     public $postgresqls = []; |     public Collection $postgresqls; | ||||||
| 
 | 
 | ||||||
|     public $redis = []; |     public Collection $redis; | ||||||
| 
 | 
 | ||||||
|     public $mongodbs = []; |     public Collection $mongodbs; | ||||||
| 
 | 
 | ||||||
|     public $mysqls = []; |     public Collection $mysqls; | ||||||
| 
 | 
 | ||||||
|     public $mariadbs = []; |     public Collection $mariadbs; | ||||||
| 
 | 
 | ||||||
|     public $keydbs = []; |     public Collection $keydbs; | ||||||
| 
 | 
 | ||||||
|     public $dragonflies = []; |     public Collection $dragonflies; | ||||||
| 
 | 
 | ||||||
|     public $clickhouses = []; |     public Collection $clickhouses; | ||||||
| 
 | 
 | ||||||
|     public $services = []; |     public Collection $services; | ||||||
| 
 | 
 | ||||||
|     public array $parameters; |     public array $parameters; | ||||||
| 
 | 
 | ||||||
|     public function mount() |     public function mount() | ||||||
|     { |     { | ||||||
|  |         $this->applications = $this->postgresqls = $this->redis = $this->mongodbs = $this->mysqls = $this->mariadbs = $this->keydbs = $this->dragonflies = $this->clickhouses = $this->services = collect(); | ||||||
|         $this->parameters = get_route_parameters(); |         $this->parameters = get_route_parameters(); | ||||||
|         $project = currentTeam()->load(['projects'])->projects->where('uuid', request()->route('project_uuid'))->first(); |         $project = currentTeam() | ||||||
|         if (! $project) { |             ->projects() | ||||||
|             return redirect()->route('dashboard'); |             ->select('id', 'uuid', 'team_id', 'name') | ||||||
|         } |             ->where('uuid', request()->route('project_uuid')) | ||||||
|         $environment = $project->load(['environments'])->environments->where('uuid', request()->route('environment_uuid'))->first(); |             ->firstOrFail(); | ||||||
|         if (! $environment) { |         $environment = $project->environments() | ||||||
|             return redirect()->route('dashboard'); |             ->select('id', 'uuid', 'name', 'project_id') | ||||||
|         } |             ->where('uuid', request()->route('environment_uuid')) | ||||||
|  |             ->firstOrFail(); | ||||||
|  | 
 | ||||||
|         $this->project = $project; |         $this->project = $project; | ||||||
|         $this->environment = $environment->loadCount([ |         $this->environment = $environment->loadCount([ | ||||||
|             'applications', |             'applications', | ||||||
| @@ -89,14 +93,6 @@ class Index extends Component | |||||||
|             'clickhouses' => 'clickhouses', |             'clickhouses' => 'clickhouses', | ||||||
|         ]; |         ]; | ||||||
| 
 | 
 | ||||||
|         // Load all server-related data first to prevent duplicate queries
 |  | ||||||
|         $serverData = $this->environment->applications() |  | ||||||
|             ->with(['destination.server.settings']) |  | ||||||
|             ->get() |  | ||||||
|             ->pluck('destination.server') |  | ||||||
|             ->filter() |  | ||||||
|             ->unique('id'); |  | ||||||
| 
 |  | ||||||
|         foreach ($databaseTypes as $property => $relation) { |         foreach ($databaseTypes as $property => $relation) { | ||||||
|             $this->{$property} = $this->environment->{$relation}()->with([ |             $this->{$property} = $this->environment->{$relation}()->with([ | ||||||
|                 'tags', |                 'tags', | ||||||
| @@ -108,6 +104,7 @@ class Index extends Component | |||||||
|                     'database_uuid' => $db->uuid, |                     'database_uuid' => $db->uuid, | ||||||
|                     'environment_uuid' => data_get($this->environment, 'uuid'), |                     'environment_uuid' => data_get($this->environment, 'uuid'), | ||||||
|                 ]); |                 ]); | ||||||
|  | 
 | ||||||
|                 return $db; |                 return $db; | ||||||
|             }); |             }); | ||||||
|         } |         } | ||||||
| @@ -123,6 +120,7 @@ class Index extends Component | |||||||
|                 'environment_uuid' => data_get($service, 'environment.uuid'), |                 'environment_uuid' => data_get($service, 'environment.uuid'), | ||||||
|                 'service_uuid' => data_get($service, 'uuid'), |                 'service_uuid' => data_get($service, 'uuid'), | ||||||
|             ]); |             ]); | ||||||
|  | 
 | ||||||
|             return $service; |             return $service; | ||||||
|         }); |         }); | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -52,8 +52,8 @@ class Configuration extends Component | |||||||
|             ->where('uuid', request()->route('project_uuid')) |             ->where('uuid', request()->route('project_uuid')) | ||||||
|             ->firstOrFail(); |             ->firstOrFail(); | ||||||
|         $environment = $project->environments() |         $environment = $project->environments() | ||||||
|             ->select('id', 'name', 'project_id') |             ->select('id', 'uuid', 'name', 'project_id') | ||||||
|             ->where('name', request()->route('environment_name')) |             ->where('uuid', request()->route('environment_uuid')) | ||||||
|             ->firstOrFail(); |             ->firstOrFail(); | ||||||
|         $this->service = $environment->services()->whereUuid(request()->route('service_uuid'))->firstOrFail(); |         $this->service = $environment->services()->whereUuid(request()->route('service_uuid'))->firstOrFail(); | ||||||
| 
 | 
 | ||||||
|   | |||||||
| @@ -3,7 +3,6 @@ | |||||||
| namespace App\Models; | namespace App\Models; | ||||||
| 
 | 
 | ||||||
| use Illuminate\Database\Eloquent\Casts\Attribute; | use Illuminate\Database\Eloquent\Casts\Attribute; | ||||||
| use Illuminate\Database\Eloquent\Model; |  | ||||||
| use OpenApi\Attributes as OA; | use OpenApi\Attributes as OA; | ||||||
| 
 | 
 | ||||||
| #[OA\Schema(
 | #[OA\Schema(
 | ||||||
| @@ -18,7 +17,7 @@ use OpenApi\Attributes as OA; | |||||||
|         'description' => ['type' => 'string'], |         'description' => ['type' => 'string'], | ||||||
|     ] |     ] | ||||||
| )] | )] | ||||||
| class Environment extends Model | class Environment extends BaseModel | ||||||
| { | { | ||||||
|     protected $guarded = []; |     protected $guarded = []; | ||||||
| 
 | 
 | ||||||
|   | |||||||
| @@ -17,6 +17,8 @@ class StatusChanged extends CustomEmailNotification | |||||||
| 
 | 
 | ||||||
|     public string $environment_uuid; |     public string $environment_uuid; | ||||||
| 
 | 
 | ||||||
|  |     public string $environment_name; | ||||||
|  | 
 | ||||||
|     public ?string $resource_url = null; |     public ?string $resource_url = null; | ||||||
| 
 | 
 | ||||||
|     public ?string $fqdn; |     public ?string $fqdn; | ||||||
| @@ -27,6 +29,7 @@ class StatusChanged extends CustomEmailNotification | |||||||
|         $this->resource_name = data_get($resource, 'name'); |         $this->resource_name = data_get($resource, 'name'); | ||||||
|         $this->project_uuid = data_get($resource, 'environment.project.uuid'); |         $this->project_uuid = data_get($resource, 'environment.project.uuid'); | ||||||
|         $this->environment_uuid = data_get($resource, 'environment.uuid'); |         $this->environment_uuid = data_get($resource, 'environment.uuid'); | ||||||
|  |         $this->environment_name = data_get($resource, 'environment.name'); | ||||||
|         $this->fqdn = data_get($resource, 'fqdn', null); |         $this->fqdn = data_get($resource, 'fqdn', null); | ||||||
|         if (str($this->fqdn)->explode(',')->count() > 1) { |         if (str($this->fqdn)->explode(',')->count() > 1) { | ||||||
|             $this->fqdn = str($this->fqdn)->explode(',')->first(); |             $this->fqdn = str($this->fqdn)->explode(',')->first(); | ||||||
| @@ -80,7 +83,7 @@ class StatusChanged extends CustomEmailNotification | |||||||
| 
 | 
 | ||||||
|     public function toPushover(): PushoverMessage |     public function toPushover(): PushoverMessage | ||||||
|     { |     { | ||||||
|         $message = $this->resource_name . ' has been stopped.'; |         $message = $this->resource_name.' has been stopped.'; | ||||||
| 
 | 
 | ||||||
|         return new PushoverMessage( |         return new PushoverMessage( | ||||||
|             title: 'Application stopped', |             title: 'Application stopped', | ||||||
|   | |||||||
| @@ -166,6 +166,7 @@ function removeUnnecessaryFieldsFromRequest(Request $request) | |||||||
| { | { | ||||||
|     $request->offsetUnset('project_uuid'); |     $request->offsetUnset('project_uuid'); | ||||||
|     $request->offsetUnset('environment_name'); |     $request->offsetUnset('environment_name'); | ||||||
|  |     $request->offsetUnset('environment_uuid'); | ||||||
|     $request->offsetUnset('destination_uuid'); |     $request->offsetUnset('destination_uuid'); | ||||||
|     $request->offsetUnset('server_uuid'); |     $request->offsetUnset('server_uuid'); | ||||||
|     $request->offsetUnset('type'); |     $request->offsetUnset('type'); | ||||||
|   | |||||||
							
								
								
									
										300
									
								
								openapi.json
									
									
									
									
									
								
							
							
						
						
									
										300
									
								
								openapi.json
									
									
									
									
									
								
							| @@ -65,6 +65,7 @@ | |||||||
|                                     "project_uuid", |                                     "project_uuid", | ||||||
|                                     "server_uuid", |                                     "server_uuid", | ||||||
|                                     "environment_name", |                                     "environment_name", | ||||||
|  |                                     "environment_uuid", | ||||||
|                                     "git_repository", |                                     "git_repository", | ||||||
|                                     "git_branch", |                                     "git_branch", | ||||||
|                                     "build_pack", |                                     "build_pack", | ||||||
| @@ -81,7 +82,11 @@ | |||||||
|                                     }, |                                     }, | ||||||
|                                     "environment_name": { |                                     "environment_name": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
|                                         "description": "The environment name." |                                         "description": "The environment name. You need to provide at least one of environment_name or environment_uuid." | ||||||
|  |                                     }, | ||||||
|  |                                     "environment_uuid": { | ||||||
|  |                                         "type": "string", | ||||||
|  |                                         "description": "The environment UUID. You need to provide at least one of environment_name or environment_uuid." | ||||||
|                                     }, |                                     }, | ||||||
|                                     "git_repository": { |                                     "git_repository": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
| @@ -377,6 +382,7 @@ | |||||||
|                                     "project_uuid", |                                     "project_uuid", | ||||||
|                                     "server_uuid", |                                     "server_uuid", | ||||||
|                                     "environment_name", |                                     "environment_name", | ||||||
|  |                                     "environment_uuid", | ||||||
|                                     "github_app_uuid", |                                     "github_app_uuid", | ||||||
|                                     "git_repository", |                                     "git_repository", | ||||||
|                                     "git_branch", |                                     "git_branch", | ||||||
| @@ -394,7 +400,11 @@ | |||||||
|                                     }, |                                     }, | ||||||
|                                     "environment_name": { |                                     "environment_name": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
|                                         "description": "The environment name." |                                         "description": "The environment name. You need to provide at least one of environment_name or environment_uuid." | ||||||
|  |                                     }, | ||||||
|  |                                     "environment_uuid": { | ||||||
|  |                                         "type": "string", | ||||||
|  |                                         "description": "The environment UUID. You need to provide at least one of environment_name or environment_uuid." | ||||||
|                                     }, |                                     }, | ||||||
|                                     "github_app_uuid": { |                                     "github_app_uuid": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
| @@ -694,6 +704,7 @@ | |||||||
|                                     "project_uuid", |                                     "project_uuid", | ||||||
|                                     "server_uuid", |                                     "server_uuid", | ||||||
|                                     "environment_name", |                                     "environment_name", | ||||||
|  |                                     "environment_uuid", | ||||||
|                                     "private_key_uuid", |                                     "private_key_uuid", | ||||||
|                                     "git_repository", |                                     "git_repository", | ||||||
|                                     "git_branch", |                                     "git_branch", | ||||||
| @@ -711,7 +722,11 @@ | |||||||
|                                     }, |                                     }, | ||||||
|                                     "environment_name": { |                                     "environment_name": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
|                                         "description": "The environment name." |                                         "description": "The environment name. You need to provide at least one of environment_name or environment_uuid." | ||||||
|  |                                     }, | ||||||
|  |                                     "environment_uuid": { | ||||||
|  |                                         "type": "string", | ||||||
|  |                                         "description": "The environment UUID. You need to provide at least one of environment_name or environment_uuid." | ||||||
|                                     }, |                                     }, | ||||||
|                                     "private_key_uuid": { |                                     "private_key_uuid": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
| @@ -1011,6 +1026,7 @@ | |||||||
|                                     "project_uuid", |                                     "project_uuid", | ||||||
|                                     "server_uuid", |                                     "server_uuid", | ||||||
|                                     "environment_name", |                                     "environment_name", | ||||||
|  |                                     "environment_uuid", | ||||||
|                                     "dockerfile" |                                     "dockerfile" | ||||||
|                                 ], |                                 ], | ||||||
|                                 "properties": { |                                 "properties": { | ||||||
| @@ -1024,7 +1040,11 @@ | |||||||
|                                     }, |                                     }, | ||||||
|                                     "environment_name": { |                                     "environment_name": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
|                                         "description": "The environment name." |                                         "description": "The environment name. You need to provide at least one of environment_name or environment_uuid." | ||||||
|  |                                     }, | ||||||
|  |                                     "environment_uuid": { | ||||||
|  |                                         "type": "string", | ||||||
|  |                                         "description": "The environment UUID. You need to provide at least one of environment_name or environment_uuid." | ||||||
|                                     }, |                                     }, | ||||||
|                                     "dockerfile": { |                                     "dockerfile": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
| @@ -1257,6 +1277,7 @@ | |||||||
|                                     "project_uuid", |                                     "project_uuid", | ||||||
|                                     "server_uuid", |                                     "server_uuid", | ||||||
|                                     "environment_name", |                                     "environment_name", | ||||||
|  |                                     "environment_uuid", | ||||||
|                                     "docker_registry_image_name", |                                     "docker_registry_image_name", | ||||||
|                                     "ports_exposes" |                                     "ports_exposes" | ||||||
|                                 ], |                                 ], | ||||||
| @@ -1271,7 +1292,11 @@ | |||||||
|                                     }, |                                     }, | ||||||
|                                     "environment_name": { |                                     "environment_name": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
|                                         "description": "The environment name." |                                         "description": "The environment name. You need to provide at least one of environment_name or environment_uuid." | ||||||
|  |                                     }, | ||||||
|  |                                     "environment_uuid": { | ||||||
|  |                                         "type": "string", | ||||||
|  |                                         "description": "The environment UUID. You need to provide at least one of environment_name or environment_uuid." | ||||||
|                                     }, |                                     }, | ||||||
|                                     "docker_registry_image_name": { |                                     "docker_registry_image_name": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
| @@ -1486,6 +1511,7 @@ | |||||||
|                                     "project_uuid", |                                     "project_uuid", | ||||||
|                                     "server_uuid", |                                     "server_uuid", | ||||||
|                                     "environment_name", |                                     "environment_name", | ||||||
|  |                                     "environment_uuid", | ||||||
|                                     "docker_compose_raw" |                                     "docker_compose_raw" | ||||||
|                                 ], |                                 ], | ||||||
|                                 "properties": { |                                 "properties": { | ||||||
| @@ -1499,7 +1525,11 @@ | |||||||
|                                     }, |                                     }, | ||||||
|                                     "environment_name": { |                                     "environment_name": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
|                                         "description": "The environment name." |                                         "description": "The environment name. You need to provide at least one of environment_name or environment_uuid." | ||||||
|  |                                     }, | ||||||
|  |                                     "environment_uuid": { | ||||||
|  |                                         "type": "string", | ||||||
|  |                                         "description": "The environment UUID. You need to provide at least one of environment_name or environment_uuid." | ||||||
|                                     }, |                                     }, | ||||||
|                                     "docker_compose_raw": { |                                     "docker_compose_raw": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
| @@ -3079,7 +3109,8 @@ | |||||||
|                                 "required": [ |                                 "required": [ | ||||||
|                                     "server_uuid", |                                     "server_uuid", | ||||||
|                                     "project_uuid", |                                     "project_uuid", | ||||||
|                                     "environment_name" |                                     "environment_name", | ||||||
|  |                                     "environment_uuid" | ||||||
|                                 ], |                                 ], | ||||||
|                                 "properties": { |                                 "properties": { | ||||||
|                                     "server_uuid": { |                                     "server_uuid": { | ||||||
| @@ -3092,7 +3123,11 @@ | |||||||
|                                     }, |                                     }, | ||||||
|                                     "environment_name": { |                                     "environment_name": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
|                                         "description": "Name of the environment" |                                         "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." | ||||||
|  |                                     }, | ||||||
|  |                                     "environment_uuid": { | ||||||
|  |                                         "type": "string", | ||||||
|  |                                         "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." | ||||||
|                                     }, |                                     }, | ||||||
|                                     "postgres_user": { |                                     "postgres_user": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
| @@ -3215,7 +3250,8 @@ | |||||||
|                                 "required": [ |                                 "required": [ | ||||||
|                                     "server_uuid", |                                     "server_uuid", | ||||||
|                                     "project_uuid", |                                     "project_uuid", | ||||||
|                                     "environment_name" |                                     "environment_name", | ||||||
|  |                                     "environment_uuid" | ||||||
|                                 ], |                                 ], | ||||||
|                                 "properties": { |                                 "properties": { | ||||||
|                                     "server_uuid": { |                                     "server_uuid": { | ||||||
| @@ -3228,7 +3264,11 @@ | |||||||
|                                     }, |                                     }, | ||||||
|                                     "environment_name": { |                                     "environment_name": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
|                                         "description": "Name of the environment" |                                         "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." | ||||||
|  |                                     }, | ||||||
|  |                                     "environment_uuid": { | ||||||
|  |                                         "type": "string", | ||||||
|  |                                         "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." | ||||||
|                                     }, |                                     }, | ||||||
|                                     "destination_uuid": { |                                     "destination_uuid": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
| @@ -3335,7 +3375,8 @@ | |||||||
|                                 "required": [ |                                 "required": [ | ||||||
|                                     "server_uuid", |                                     "server_uuid", | ||||||
|                                     "project_uuid", |                                     "project_uuid", | ||||||
|                                     "environment_name" |                                     "environment_name", | ||||||
|  |                                     "environment_uuid" | ||||||
|                                 ], |                                 ], | ||||||
|                                 "properties": { |                                 "properties": { | ||||||
|                                     "server_uuid": { |                                     "server_uuid": { | ||||||
| @@ -3348,7 +3389,11 @@ | |||||||
|                                     }, |                                     }, | ||||||
|                                     "environment_name": { |                                     "environment_name": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
|                                         "description": "Name of the environment" |                                         "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." | ||||||
|  |                                     }, | ||||||
|  |                                     "environment_uuid": { | ||||||
|  |                                         "type": "string", | ||||||
|  |                                         "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." | ||||||
|                                     }, |                                     }, | ||||||
|                                     "destination_uuid": { |                                     "destination_uuid": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
| @@ -3451,7 +3496,8 @@ | |||||||
|                                 "required": [ |                                 "required": [ | ||||||
|                                     "server_uuid", |                                     "server_uuid", | ||||||
|                                     "project_uuid", |                                     "project_uuid", | ||||||
|                                     "environment_name" |                                     "environment_name", | ||||||
|  |                                     "environment_uuid" | ||||||
|                                 ], |                                 ], | ||||||
|                                 "properties": { |                                 "properties": { | ||||||
|                                     "server_uuid": { |                                     "server_uuid": { | ||||||
| @@ -3464,7 +3510,11 @@ | |||||||
|                                     }, |                                     }, | ||||||
|                                     "environment_name": { |                                     "environment_name": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
|                                         "description": "Name of the environment" |                                         "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." | ||||||
|  |                                     }, | ||||||
|  |                                     "environment_uuid": { | ||||||
|  |                                         "type": "string", | ||||||
|  |                                         "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." | ||||||
|                                     }, |                                     }, | ||||||
|                                     "destination_uuid": { |                                     "destination_uuid": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
| @@ -3571,7 +3621,8 @@ | |||||||
|                                 "required": [ |                                 "required": [ | ||||||
|                                     "server_uuid", |                                     "server_uuid", | ||||||
|                                     "project_uuid", |                                     "project_uuid", | ||||||
|                                     "environment_name" |                                     "environment_name", | ||||||
|  |                                     "environment_uuid" | ||||||
|                                 ], |                                 ], | ||||||
|                                 "properties": { |                                 "properties": { | ||||||
|                                     "server_uuid": { |                                     "server_uuid": { | ||||||
| @@ -3584,7 +3635,11 @@ | |||||||
|                                     }, |                                     }, | ||||||
|                                     "environment_name": { |                                     "environment_name": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
|                                         "description": "Name of the environment" |                                         "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." | ||||||
|  |                                     }, | ||||||
|  |                                     "environment_uuid": { | ||||||
|  |                                         "type": "string", | ||||||
|  |                                         "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." | ||||||
|                                     }, |                                     }, | ||||||
|                                     "destination_uuid": { |                                     "destination_uuid": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
| @@ -3691,7 +3746,8 @@ | |||||||
|                                 "required": [ |                                 "required": [ | ||||||
|                                     "server_uuid", |                                     "server_uuid", | ||||||
|                                     "project_uuid", |                                     "project_uuid", | ||||||
|                                     "environment_name" |                                     "environment_name", | ||||||
|  |                                     "environment_uuid" | ||||||
|                                 ], |                                 ], | ||||||
|                                 "properties": { |                                 "properties": { | ||||||
|                                     "server_uuid": { |                                     "server_uuid": { | ||||||
| @@ -3704,7 +3760,11 @@ | |||||||
|                                     }, |                                     }, | ||||||
|                                     "environment_name": { |                                     "environment_name": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
|                                         "description": "Name of the environment" |                                         "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." | ||||||
|  |                                     }, | ||||||
|  |                                     "environment_uuid": { | ||||||
|  |                                         "type": "string", | ||||||
|  |                                         "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." | ||||||
|                                     }, |                                     }, | ||||||
|                                     "destination_uuid": { |                                     "destination_uuid": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
| @@ -3823,7 +3883,8 @@ | |||||||
|                                 "required": [ |                                 "required": [ | ||||||
|                                     "server_uuid", |                                     "server_uuid", | ||||||
|                                     "project_uuid", |                                     "project_uuid", | ||||||
|                                     "environment_name" |                                     "environment_name", | ||||||
|  |                                     "environment_uuid" | ||||||
|                                 ], |                                 ], | ||||||
|                                 "properties": { |                                 "properties": { | ||||||
|                                     "server_uuid": { |                                     "server_uuid": { | ||||||
| @@ -3836,7 +3897,11 @@ | |||||||
|                                     }, |                                     }, | ||||||
|                                     "environment_name": { |                                     "environment_name": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
|                                         "description": "Name of the environment" |                                         "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." | ||||||
|  |                                     }, | ||||||
|  |                                     "environment_uuid": { | ||||||
|  |                                         "type": "string", | ||||||
|  |                                         "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." | ||||||
|                                     }, |                                     }, | ||||||
|                                     "destination_uuid": { |                                     "destination_uuid": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
| @@ -3955,7 +4020,8 @@ | |||||||
|                                 "required": [ |                                 "required": [ | ||||||
|                                     "server_uuid", |                                     "server_uuid", | ||||||
|                                     "project_uuid", |                                     "project_uuid", | ||||||
|                                     "environment_name" |                                     "environment_name", | ||||||
|  |                                     "environment_uuid" | ||||||
|                                 ], |                                 ], | ||||||
|                                 "properties": { |                                 "properties": { | ||||||
|                                     "server_uuid": { |                                     "server_uuid": { | ||||||
| @@ -3968,7 +4034,11 @@ | |||||||
|                                     }, |                                     }, | ||||||
|                                     "environment_name": { |                                     "environment_name": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
|                                         "description": "Name of the environment" |                                         "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." | ||||||
|  |                                     }, | ||||||
|  |                                     "environment_uuid": { | ||||||
|  |                                         "type": "string", | ||||||
|  |                                         "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." | ||||||
|                                     }, |                                     }, | ||||||
|                                     "destination_uuid": { |                                     "destination_uuid": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
| @@ -4808,14 +4878,14 @@ | |||||||
|                 ] |                 ] | ||||||
|             } |             } | ||||||
|         }, |         }, | ||||||
|         "\/projects\/{uuid}\/{environment_name}": { |         "\/projects\/{uuid}\/{environment_name_or_uuid}": { | ||||||
|             "get": { |             "get": { | ||||||
|                 "tags": [ |                 "tags": [ | ||||||
|                     "Projects" |                     "Projects" | ||||||
|                 ], |                 ], | ||||||
|                 "summary": "Environment", |                 "summary": "Environment", | ||||||
|                 "description": "Get environment by name.", |                 "description": "Get environment by name or UUID.", | ||||||
|                 "operationId": "get-environment-by-name", |                 "operationId": "get-environment-by-name-or-uuid", | ||||||
|                 "parameters": [ |                 "parameters": [ | ||||||
|                     { |                     { | ||||||
|                         "name": "uuid", |                         "name": "uuid", | ||||||
| @@ -4827,9 +4897,9 @@ | |||||||
|                         } |                         } | ||||||
|                     }, |                     }, | ||||||
|                     { |                     { | ||||||
|                         "name": "environment_name", |                         "name": "environment_name_or_uuid", | ||||||
|                         "in": "path", |                         "in": "path", | ||||||
|                         "description": "Environment name", |                         "description": "Environment name or UUID", | ||||||
|                         "required": true, |                         "required": true, | ||||||
|                         "schema": { |                         "schema": { | ||||||
|                             "type": "string" |                             "type": "string" | ||||||
| @@ -5724,6 +5794,7 @@ | |||||||
|                                     "server_uuid", |                                     "server_uuid", | ||||||
|                                     "project_uuid", |                                     "project_uuid", | ||||||
|                                     "environment_name", |                                     "environment_name", | ||||||
|  |                                     "environment_uuid", | ||||||
|                                     "type" |                                     "type" | ||||||
|                                 ], |                                 ], | ||||||
|                                 "properties": { |                                 "properties": { | ||||||
| @@ -5835,7 +5906,11 @@ | |||||||
|                                     }, |                                     }, | ||||||
|                                     "environment_name": { |                                     "environment_name": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
|                                         "description": "Environment name." |                                         "description": "Environment name. You need to provide at least one of environment_name or environment_uuid." | ||||||
|  |                                     }, | ||||||
|  |                                     "environment_uuid": { | ||||||
|  |                                         "type": "string", | ||||||
|  |                                         "description": "Environment UUID. You need to provide at least one of environment_name or environment_uuid." | ||||||
|                                     }, |                                     }, | ||||||
|                                     "server_uuid": { |                                     "server_uuid": { | ||||||
|                                         "type": "string", |                                         "type": "string", | ||||||
| @@ -7282,13 +7357,10 @@ | |||||||
|                     "uuid": { |                     "uuid": { | ||||||
|                         "type": "string" |                         "type": "string" | ||||||
|                     }, |                     }, | ||||||
|                     "application_id": { |                     "resourceable_type": { | ||||||
|                         "type": "integer" |                         "type": "string" | ||||||
|                     }, |                     }, | ||||||
|                     "service_id": { |                     "resourceable_id": { | ||||||
|                         "type": "integer" |  | ||||||
|                     }, |  | ||||||
|                     "database_id": { |  | ||||||
|                         "type": "integer" |                         "type": "integer" | ||||||
|                     }, |                     }, | ||||||
|                     "is_build_time": { |                     "is_build_time": { | ||||||
| @@ -7684,174 +7756,14 @@ | |||||||
|                         "type": "string", |                         "type": "string", | ||||||
|                         "description": "The date and time the team was last updated." |                         "description": "The date and time the team was last updated." | ||||||
|                     }, |                     }, | ||||||
|                     "smtp_enabled": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether SMTP is enabled or not." |  | ||||||
|                     }, |  | ||||||
|                     "smtp_from_address": { |  | ||||||
|                         "type": "string", |  | ||||||
|                         "description": "The email address to send emails from." |  | ||||||
|                     }, |  | ||||||
|                     "smtp_from_name": { |  | ||||||
|                         "type": "string", |  | ||||||
|                         "description": "The name to send emails from." |  | ||||||
|                     }, |  | ||||||
|                     "smtp_recipients": { |  | ||||||
|                         "type": "string", |  | ||||||
|                         "description": "The email addresses to send emails to." |  | ||||||
|                     }, |  | ||||||
|                     "smtp_host": { |  | ||||||
|                         "type": "string", |  | ||||||
|                         "description": "The SMTP host." |  | ||||||
|                     }, |  | ||||||
|                     "smtp_port": { |  | ||||||
|                         "type": "string", |  | ||||||
|                         "description": "The SMTP port." |  | ||||||
|                     }, |  | ||||||
|                     "smtp_encryption": { |  | ||||||
|                         "type": "string", |  | ||||||
|                         "description": "The SMTP encryption." |  | ||||||
|                     }, |  | ||||||
|                     "smtp_username": { |  | ||||||
|                         "type": "string", |  | ||||||
|                         "description": "The SMTP username." |  | ||||||
|                     }, |  | ||||||
|                     "smtp_password": { |  | ||||||
|                         "type": "string", |  | ||||||
|                         "description": "The SMTP password." |  | ||||||
|                     }, |  | ||||||
|                     "smtp_timeout": { |  | ||||||
|                         "type": "string", |  | ||||||
|                         "description": "The SMTP timeout." |  | ||||||
|                     }, |  | ||||||
|                     "smtp_notifications_test": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether to send test notifications via SMTP." |  | ||||||
|                     }, |  | ||||||
|                     "smtp_notifications_deployments": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether to send deployment notifications via SMTP." |  | ||||||
|                     }, |  | ||||||
|                     "smtp_notifications_status_changes": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether to send status change notifications via SMTP." |  | ||||||
|                     }, |  | ||||||
|                     "smtp_notifications_scheduled_tasks": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether to send scheduled task notifications via SMTP." |  | ||||||
|                     }, |  | ||||||
|                     "smtp_notifications_database_backups": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether to send database backup notifications via SMTP." |  | ||||||
|                     }, |  | ||||||
|                     "smtp_notifications_server_disk_usage": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether to send server disk usage notifications via SMTP." |  | ||||||
|                     }, |  | ||||||
|                     "discord_enabled": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether Discord is enabled or not." |  | ||||||
|                     }, |  | ||||||
|                     "discord_webhook_url": { |  | ||||||
|                         "type": "string", |  | ||||||
|                         "description": "The Discord webhook URL." |  | ||||||
|                     }, |  | ||||||
|                     "discord_notifications_test": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether to send test notifications via Discord." |  | ||||||
|                     }, |  | ||||||
|                     "discord_notifications_deployments": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether to send deployment notifications via Discord." |  | ||||||
|                     }, |  | ||||||
|                     "discord_notifications_status_changes": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether to send status change notifications via Discord." |  | ||||||
|                     }, |  | ||||||
|                     "discord_notifications_database_backups": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether to send database backup notifications via Discord." |  | ||||||
|                     }, |  | ||||||
|                     "discord_notifications_scheduled_tasks": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether to send scheduled task notifications via Discord." |  | ||||||
|                     }, |  | ||||||
|                     "discord_notifications_server_disk_usage": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether to send server disk usage notifications via Discord." |  | ||||||
|                     }, |  | ||||||
|                     "show_boarding": { |                     "show_boarding": { | ||||||
|                         "type": "boolean", |                         "type": "boolean", | ||||||
|                         "description": "Whether to show the boarding screen or not." |                         "description": "Whether to show the boarding screen or not." | ||||||
|                     }, |                     }, | ||||||
|                     "resend_enabled": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether to enable resending or not." |  | ||||||
|                     }, |  | ||||||
|                     "resend_api_key": { |  | ||||||
|                         "type": "string", |  | ||||||
|                         "description": "The resending API key." |  | ||||||
|                     }, |  | ||||||
|                     "use_instance_email_settings": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether to use instance email settings or not." |  | ||||||
|                     }, |  | ||||||
|                     "telegram_enabled": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether Telegram is enabled or not." |  | ||||||
|                     }, |  | ||||||
|                     "telegram_token": { |  | ||||||
|                         "type": "string", |  | ||||||
|                         "description": "The Telegram token." |  | ||||||
|                     }, |  | ||||||
|                     "telegram_chat_id": { |  | ||||||
|                         "type": "string", |  | ||||||
|                         "description": "The Telegram chat ID." |  | ||||||
|                     }, |  | ||||||
|                     "telegram_notifications_test": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether to send test notifications via Telegram." |  | ||||||
|                     }, |  | ||||||
|                     "telegram_notifications_deployments": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether to send deployment notifications via Telegram." |  | ||||||
|                     }, |  | ||||||
|                     "telegram_notifications_status_changes": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether to send status change notifications via Telegram." |  | ||||||
|                     }, |  | ||||||
|                     "telegram_notifications_database_backups": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether to send database backup notifications via Telegram." |  | ||||||
|                     }, |  | ||||||
|                     "telegram_notifications_test_message_thread_id": { |  | ||||||
|                         "type": "string", |  | ||||||
|                         "description": "The Telegram test message thread ID." |  | ||||||
|                     }, |  | ||||||
|                     "telegram_notifications_deployments_message_thread_id": { |  | ||||||
|                         "type": "string", |  | ||||||
|                         "description": "The Telegram deployment message thread ID." |  | ||||||
|                     }, |  | ||||||
|                     "telegram_notifications_status_changes_message_thread_id": { |  | ||||||
|                         "type": "string", |  | ||||||
|                         "description": "The Telegram status change message thread ID." |  | ||||||
|                     }, |  | ||||||
|                     "telegram_notifications_database_backups_message_thread_id": { |  | ||||||
|                         "type": "string", |  | ||||||
|                         "description": "The Telegram database backup message thread ID." |  | ||||||
|                     }, |  | ||||||
|                     "custom_server_limit": { |                     "custom_server_limit": { | ||||||
|                         "type": "string", |                         "type": "string", | ||||||
|                         "description": "The custom server limit." |                         "description": "The custom server limit." | ||||||
|                     }, |                     }, | ||||||
|                     "telegram_notifications_scheduled_tasks": { |  | ||||||
|                         "type": "boolean", |  | ||||||
|                         "description": "Whether to send scheduled task notifications via Telegram." |  | ||||||
|                     }, |  | ||||||
|                     "telegram_notifications_scheduled_tasks_thread_id": { |  | ||||||
|                         "type": "string", |  | ||||||
|                         "description": "The Telegram scheduled task message thread ID." |  | ||||||
|                     }, |  | ||||||
|                     "members": { |                     "members": { | ||||||
|                         "description": "The members of the team.", |                         "description": "The members of the team.", | ||||||
|                         "type": "array", |                         "type": "array", | ||||||
|   | |||||||
							
								
								
									
										228
									
								
								openapi.yaml
									
									
									
									
									
								
							
							
						
						
									
										228
									
								
								openapi.yaml
									
									
									
									
									
								
							| @@ -47,6 +47,7 @@ paths: | |||||||
|                 - project_uuid |                 - project_uuid | ||||||
|                 - server_uuid |                 - server_uuid | ||||||
|                 - environment_name |                 - environment_name | ||||||
|  |                 - environment_uuid | ||||||
|                 - git_repository |                 - git_repository | ||||||
|                 - git_branch |                 - git_branch | ||||||
|                 - build_pack |                 - build_pack | ||||||
| @@ -60,7 +61,10 @@ paths: | |||||||
|                   description: 'The server UUID.' |                   description: 'The server UUID.' | ||||||
|                 environment_name: |                 environment_name: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'The environment name.' |                   description: 'The environment name. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|  |                 environment_uuid: | ||||||
|  |                   type: string | ||||||
|  |                   description: 'The environment UUID. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|                 git_repository: |                 git_repository: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'The git repository URL.' |                   description: 'The git repository URL.' | ||||||
| @@ -272,6 +276,7 @@ paths: | |||||||
|                 - project_uuid |                 - project_uuid | ||||||
|                 - server_uuid |                 - server_uuid | ||||||
|                 - environment_name |                 - environment_name | ||||||
|  |                 - environment_uuid | ||||||
|                 - github_app_uuid |                 - github_app_uuid | ||||||
|                 - git_repository |                 - git_repository | ||||||
|                 - git_branch |                 - git_branch | ||||||
| @@ -286,7 +291,10 @@ paths: | |||||||
|                   description: 'The server UUID.' |                   description: 'The server UUID.' | ||||||
|                 environment_name: |                 environment_name: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'The environment name.' |                   description: 'The environment name. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|  |                 environment_uuid: | ||||||
|  |                   type: string | ||||||
|  |                   description: 'The environment UUID. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|                 github_app_uuid: |                 github_app_uuid: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'The Github App UUID.' |                   description: 'The Github App UUID.' | ||||||
| @@ -501,6 +509,7 @@ paths: | |||||||
|                 - project_uuid |                 - project_uuid | ||||||
|                 - server_uuid |                 - server_uuid | ||||||
|                 - environment_name |                 - environment_name | ||||||
|  |                 - environment_uuid | ||||||
|                 - private_key_uuid |                 - private_key_uuid | ||||||
|                 - git_repository |                 - git_repository | ||||||
|                 - git_branch |                 - git_branch | ||||||
| @@ -515,7 +524,10 @@ paths: | |||||||
|                   description: 'The server UUID.' |                   description: 'The server UUID.' | ||||||
|                 environment_name: |                 environment_name: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'The environment name.' |                   description: 'The environment name. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|  |                 environment_uuid: | ||||||
|  |                   type: string | ||||||
|  |                   description: 'The environment UUID. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|                 private_key_uuid: |                 private_key_uuid: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'The private key UUID.' |                   description: 'The private key UUID.' | ||||||
| @@ -730,6 +742,7 @@ paths: | |||||||
|                 - project_uuid |                 - project_uuid | ||||||
|                 - server_uuid |                 - server_uuid | ||||||
|                 - environment_name |                 - environment_name | ||||||
|  |                 - environment_uuid | ||||||
|                 - dockerfile |                 - dockerfile | ||||||
|               properties: |               properties: | ||||||
|                 project_uuid: |                 project_uuid: | ||||||
| @@ -740,7 +753,10 @@ paths: | |||||||
|                   description: 'The server UUID.' |                   description: 'The server UUID.' | ||||||
|                 environment_name: |                 environment_name: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'The environment name.' |                   description: 'The environment name. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|  |                 environment_uuid: | ||||||
|  |                   type: string | ||||||
|  |                   description: 'The environment UUID. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|                 dockerfile: |                 dockerfile: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'The Dockerfile content.' |                   description: 'The Dockerfile content.' | ||||||
| @@ -906,6 +922,7 @@ paths: | |||||||
|                 - project_uuid |                 - project_uuid | ||||||
|                 - server_uuid |                 - server_uuid | ||||||
|                 - environment_name |                 - environment_name | ||||||
|  |                 - environment_uuid | ||||||
|                 - docker_registry_image_name |                 - docker_registry_image_name | ||||||
|                 - ports_exposes |                 - ports_exposes | ||||||
|               properties: |               properties: | ||||||
| @@ -917,7 +934,10 @@ paths: | |||||||
|                   description: 'The server UUID.' |                   description: 'The server UUID.' | ||||||
|                 environment_name: |                 environment_name: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'The environment name.' |                   description: 'The environment name. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|  |                 environment_uuid: | ||||||
|  |                   type: string | ||||||
|  |                   description: 'The environment UUID. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|                 docker_registry_image_name: |                 docker_registry_image_name: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'The docker registry image name.' |                   description: 'The docker registry image name.' | ||||||
| @@ -1073,6 +1093,7 @@ paths: | |||||||
|                 - project_uuid |                 - project_uuid | ||||||
|                 - server_uuid |                 - server_uuid | ||||||
|                 - environment_name |                 - environment_name | ||||||
|  |                 - environment_uuid | ||||||
|                 - docker_compose_raw |                 - docker_compose_raw | ||||||
|               properties: |               properties: | ||||||
|                 project_uuid: |                 project_uuid: | ||||||
| @@ -1083,7 +1104,10 @@ paths: | |||||||
|                   description: 'The server UUID.' |                   description: 'The server UUID.' | ||||||
|                 environment_name: |                 environment_name: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'The environment name.' |                   description: 'The environment name. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|  |                 environment_uuid: | ||||||
|  |                   type: string | ||||||
|  |                   description: 'The environment UUID. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|                 docker_compose_raw: |                 docker_compose_raw: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'The Docker Compose raw content.' |                   description: 'The Docker Compose raw content.' | ||||||
| @@ -2137,6 +2161,7 @@ paths: | |||||||
|                 - server_uuid |                 - server_uuid | ||||||
|                 - project_uuid |                 - project_uuid | ||||||
|                 - environment_name |                 - environment_name | ||||||
|  |                 - environment_uuid | ||||||
|               properties: |               properties: | ||||||
|                 server_uuid: |                 server_uuid: | ||||||
|                   type: string |                   type: string | ||||||
| @@ -2146,7 +2171,10 @@ paths: | |||||||
|                   description: 'UUID of the project' |                   description: 'UUID of the project' | ||||||
|                 environment_name: |                 environment_name: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'Name of the environment' |                   description: 'Name of the environment. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|  |                 environment_uuid: | ||||||
|  |                   type: string | ||||||
|  |                   description: 'UUID of the environment. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|                 postgres_user: |                 postgres_user: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'PostgreSQL user' |                   description: 'PostgreSQL user' | ||||||
| @@ -2235,6 +2263,7 @@ paths: | |||||||
|                 - server_uuid |                 - server_uuid | ||||||
|                 - project_uuid |                 - project_uuid | ||||||
|                 - environment_name |                 - environment_name | ||||||
|  |                 - environment_uuid | ||||||
|               properties: |               properties: | ||||||
|                 server_uuid: |                 server_uuid: | ||||||
|                   type: string |                   type: string | ||||||
| @@ -2244,7 +2273,10 @@ paths: | |||||||
|                   description: 'UUID of the project' |                   description: 'UUID of the project' | ||||||
|                 environment_name: |                 environment_name: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'Name of the environment' |                   description: 'Name of the environment. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|  |                 environment_uuid: | ||||||
|  |                   type: string | ||||||
|  |                   description: 'UUID of the environment. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|                 destination_uuid: |                 destination_uuid: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'UUID of the destination if the server has multiple destinations' |                   description: 'UUID of the destination if the server has multiple destinations' | ||||||
| @@ -2321,6 +2353,7 @@ paths: | |||||||
|                 - server_uuid |                 - server_uuid | ||||||
|                 - project_uuid |                 - project_uuid | ||||||
|                 - environment_name |                 - environment_name | ||||||
|  |                 - environment_uuid | ||||||
|               properties: |               properties: | ||||||
|                 server_uuid: |                 server_uuid: | ||||||
|                   type: string |                   type: string | ||||||
| @@ -2330,7 +2363,10 @@ paths: | |||||||
|                   description: 'UUID of the project' |                   description: 'UUID of the project' | ||||||
|                 environment_name: |                 environment_name: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'Name of the environment' |                   description: 'Name of the environment. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|  |                 environment_uuid: | ||||||
|  |                   type: string | ||||||
|  |                   description: 'UUID of the environment. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|                 destination_uuid: |                 destination_uuid: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'UUID of the destination if the server has multiple destinations' |                   description: 'UUID of the destination if the server has multiple destinations' | ||||||
| @@ -2404,6 +2440,7 @@ paths: | |||||||
|                 - server_uuid |                 - server_uuid | ||||||
|                 - project_uuid |                 - project_uuid | ||||||
|                 - environment_name |                 - environment_name | ||||||
|  |                 - environment_uuid | ||||||
|               properties: |               properties: | ||||||
|                 server_uuid: |                 server_uuid: | ||||||
|                   type: string |                   type: string | ||||||
| @@ -2413,7 +2450,10 @@ paths: | |||||||
|                   description: 'UUID of the project' |                   description: 'UUID of the project' | ||||||
|                 environment_name: |                 environment_name: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'Name of the environment' |                   description: 'Name of the environment. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|  |                 environment_uuid: | ||||||
|  |                   type: string | ||||||
|  |                   description: 'UUID of the environment. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|                 destination_uuid: |                 destination_uuid: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'UUID of the destination if the server has multiple destinations' |                   description: 'UUID of the destination if the server has multiple destinations' | ||||||
| @@ -2490,6 +2530,7 @@ paths: | |||||||
|                 - server_uuid |                 - server_uuid | ||||||
|                 - project_uuid |                 - project_uuid | ||||||
|                 - environment_name |                 - environment_name | ||||||
|  |                 - environment_uuid | ||||||
|               properties: |               properties: | ||||||
|                 server_uuid: |                 server_uuid: | ||||||
|                   type: string |                   type: string | ||||||
| @@ -2499,7 +2540,10 @@ paths: | |||||||
|                   description: 'UUID of the project' |                   description: 'UUID of the project' | ||||||
|                 environment_name: |                 environment_name: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'Name of the environment' |                   description: 'Name of the environment. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|  |                 environment_uuid: | ||||||
|  |                   type: string | ||||||
|  |                   description: 'UUID of the environment. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|                 destination_uuid: |                 destination_uuid: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'UUID of the destination if the server has multiple destinations' |                   description: 'UUID of the destination if the server has multiple destinations' | ||||||
| @@ -2576,6 +2620,7 @@ paths: | |||||||
|                 - server_uuid |                 - server_uuid | ||||||
|                 - project_uuid |                 - project_uuid | ||||||
|                 - environment_name |                 - environment_name | ||||||
|  |                 - environment_uuid | ||||||
|               properties: |               properties: | ||||||
|                 server_uuid: |                 server_uuid: | ||||||
|                   type: string |                   type: string | ||||||
| @@ -2585,7 +2630,10 @@ paths: | |||||||
|                   description: 'UUID of the project' |                   description: 'UUID of the project' | ||||||
|                 environment_name: |                 environment_name: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'Name of the environment' |                   description: 'Name of the environment. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|  |                 environment_uuid: | ||||||
|  |                   type: string | ||||||
|  |                   description: 'UUID of the environment. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|                 destination_uuid: |                 destination_uuid: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'UUID of the destination if the server has multiple destinations' |                   description: 'UUID of the destination if the server has multiple destinations' | ||||||
| @@ -2671,6 +2719,7 @@ paths: | |||||||
|                 - server_uuid |                 - server_uuid | ||||||
|                 - project_uuid |                 - project_uuid | ||||||
|                 - environment_name |                 - environment_name | ||||||
|  |                 - environment_uuid | ||||||
|               properties: |               properties: | ||||||
|                 server_uuid: |                 server_uuid: | ||||||
|                   type: string |                   type: string | ||||||
| @@ -2680,7 +2729,10 @@ paths: | |||||||
|                   description: 'UUID of the project' |                   description: 'UUID of the project' | ||||||
|                 environment_name: |                 environment_name: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'Name of the environment' |                   description: 'Name of the environment. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|  |                 environment_uuid: | ||||||
|  |                   type: string | ||||||
|  |                   description: 'UUID of the environment. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|                 destination_uuid: |                 destination_uuid: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'UUID of the destination if the server has multiple destinations' |                   description: 'UUID of the destination if the server has multiple destinations' | ||||||
| @@ -2766,6 +2818,7 @@ paths: | |||||||
|                 - server_uuid |                 - server_uuid | ||||||
|                 - project_uuid |                 - project_uuid | ||||||
|                 - environment_name |                 - environment_name | ||||||
|  |                 - environment_uuid | ||||||
|               properties: |               properties: | ||||||
|                 server_uuid: |                 server_uuid: | ||||||
|                   type: string |                   type: string | ||||||
| @@ -2775,7 +2828,10 @@ paths: | |||||||
|                   description: 'UUID of the project' |                   description: 'UUID of the project' | ||||||
|                 environment_name: |                 environment_name: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'Name of the environment' |                   description: 'Name of the environment. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|  |                 environment_uuid: | ||||||
|  |                   type: string | ||||||
|  |                   description: 'UUID of the environment. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|                 destination_uuid: |                 destination_uuid: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'UUID of the destination if the server has multiple destinations' |                   description: 'UUID of the destination if the server has multiple destinations' | ||||||
| @@ -3293,13 +3349,13 @@ paths: | |||||||
|       security: |       security: | ||||||
|         - |         - | ||||||
|           bearerAuth: [] |           bearerAuth: [] | ||||||
|   '/projects/{uuid}/{environment_name}': |   '/projects/{uuid}/{environment_name_or_uuid}': | ||||||
|     get: |     get: | ||||||
|       tags: |       tags: | ||||||
|         - Projects |         - Projects | ||||||
|       summary: Environment |       summary: Environment | ||||||
|       description: 'Get environment by name.' |       description: 'Get environment by name or UUID.' | ||||||
|       operationId: get-environment-by-name |       operationId: get-environment-by-name-or-uuid | ||||||
|       parameters: |       parameters: | ||||||
|         - |         - | ||||||
|           name: uuid |           name: uuid | ||||||
| @@ -3309,9 +3365,9 @@ paths: | |||||||
|           schema: |           schema: | ||||||
|             type: string |             type: string | ||||||
|         - |         - | ||||||
|           name: environment_name |           name: environment_name_or_uuid | ||||||
|           in: path |           in: path | ||||||
|           description: 'Environment name' |           description: 'Environment name or UUID' | ||||||
|           required: true |           required: true | ||||||
|           schema: |           schema: | ||||||
|             type: string |             type: string | ||||||
| @@ -3872,6 +3928,7 @@ paths: | |||||||
|                 - server_uuid |                 - server_uuid | ||||||
|                 - project_uuid |                 - project_uuid | ||||||
|                 - environment_name |                 - environment_name | ||||||
|  |                 - environment_uuid | ||||||
|                 - type |                 - type | ||||||
|               properties: |               properties: | ||||||
|                 type: |                 type: | ||||||
| @@ -3891,7 +3948,10 @@ paths: | |||||||
|                   description: 'Project UUID.' |                   description: 'Project UUID.' | ||||||
|                 environment_name: |                 environment_name: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'Environment name.' |                   description: 'Environment name. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|  |                 environment_uuid: | ||||||
|  |                   type: string | ||||||
|  |                   description: 'Environment UUID. You need to provide at least one of environment_name or environment_uuid.' | ||||||
|                 server_uuid: |                 server_uuid: | ||||||
|                   type: string |                   type: string | ||||||
|                   description: 'Server UUID.' |                   description: 'Server UUID.' | ||||||
| @@ -4856,11 +4916,9 @@ components: | |||||||
|           type: integer |           type: integer | ||||||
|         uuid: |         uuid: | ||||||
|           type: string |           type: string | ||||||
|         application_id: |         resourceable_type: | ||||||
|           type: integer |           type: string | ||||||
|         service_id: |         resourceable_id: | ||||||
|           type: integer |  | ||||||
|         database_id: |  | ||||||
|           type: integer |           type: integer | ||||||
|         is_build_time: |         is_build_time: | ||||||
|           type: boolean |           type: boolean | ||||||
| @@ -5139,132 +5197,12 @@ components: | |||||||
|         updated_at: |         updated_at: | ||||||
|           type: string |           type: string | ||||||
|           description: 'The date and time the team was last updated.' |           description: 'The date and time the team was last updated.' | ||||||
|         smtp_enabled: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether SMTP is enabled or not.' |  | ||||||
|         smtp_from_address: |  | ||||||
|           type: string |  | ||||||
|           description: 'The email address to send emails from.' |  | ||||||
|         smtp_from_name: |  | ||||||
|           type: string |  | ||||||
|           description: 'The name to send emails from.' |  | ||||||
|         smtp_recipients: |  | ||||||
|           type: string |  | ||||||
|           description: 'The email addresses to send emails to.' |  | ||||||
|         smtp_host: |  | ||||||
|           type: string |  | ||||||
|           description: 'The SMTP host.' |  | ||||||
|         smtp_port: |  | ||||||
|           type: string |  | ||||||
|           description: 'The SMTP port.' |  | ||||||
|         smtp_encryption: |  | ||||||
|           type: string |  | ||||||
|           description: 'The SMTP encryption.' |  | ||||||
|         smtp_username: |  | ||||||
|           type: string |  | ||||||
|           description: 'The SMTP username.' |  | ||||||
|         smtp_password: |  | ||||||
|           type: string |  | ||||||
|           description: 'The SMTP password.' |  | ||||||
|         smtp_timeout: |  | ||||||
|           type: string |  | ||||||
|           description: 'The SMTP timeout.' |  | ||||||
|         smtp_notifications_test: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether to send test notifications via SMTP.' |  | ||||||
|         smtp_notifications_deployments: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether to send deployment notifications via SMTP.' |  | ||||||
|         smtp_notifications_status_changes: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether to send status change notifications via SMTP.' |  | ||||||
|         smtp_notifications_scheduled_tasks: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether to send scheduled task notifications via SMTP.' |  | ||||||
|         smtp_notifications_database_backups: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether to send database backup notifications via SMTP.' |  | ||||||
|         smtp_notifications_server_disk_usage: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether to send server disk usage notifications via SMTP.' |  | ||||||
|         discord_enabled: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether Discord is enabled or not.' |  | ||||||
|         discord_webhook_url: |  | ||||||
|           type: string |  | ||||||
|           description: 'The Discord webhook URL.' |  | ||||||
|         discord_notifications_test: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether to send test notifications via Discord.' |  | ||||||
|         discord_notifications_deployments: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether to send deployment notifications via Discord.' |  | ||||||
|         discord_notifications_status_changes: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether to send status change notifications via Discord.' |  | ||||||
|         discord_notifications_database_backups: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether to send database backup notifications via Discord.' |  | ||||||
|         discord_notifications_scheduled_tasks: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether to send scheduled task notifications via Discord.' |  | ||||||
|         discord_notifications_server_disk_usage: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether to send server disk usage notifications via Discord.' |  | ||||||
|         show_boarding: |         show_boarding: | ||||||
|           type: boolean |           type: boolean | ||||||
|           description: 'Whether to show the boarding screen or not.' |           description: 'Whether to show the boarding screen or not.' | ||||||
|         resend_enabled: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether to enable resending or not.' |  | ||||||
|         resend_api_key: |  | ||||||
|           type: string |  | ||||||
|           description: 'The resending API key.' |  | ||||||
|         use_instance_email_settings: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether to use instance email settings or not.' |  | ||||||
|         telegram_enabled: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether Telegram is enabled or not.' |  | ||||||
|         telegram_token: |  | ||||||
|           type: string |  | ||||||
|           description: 'The Telegram token.' |  | ||||||
|         telegram_chat_id: |  | ||||||
|           type: string |  | ||||||
|           description: 'The Telegram chat ID.' |  | ||||||
|         telegram_notifications_test: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether to send test notifications via Telegram.' |  | ||||||
|         telegram_notifications_deployments: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether to send deployment notifications via Telegram.' |  | ||||||
|         telegram_notifications_status_changes: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether to send status change notifications via Telegram.' |  | ||||||
|         telegram_notifications_database_backups: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether to send database backup notifications via Telegram.' |  | ||||||
|         telegram_notifications_test_message_thread_id: |  | ||||||
|           type: string |  | ||||||
|           description: 'The Telegram test message thread ID.' |  | ||||||
|         telegram_notifications_deployments_message_thread_id: |  | ||||||
|           type: string |  | ||||||
|           description: 'The Telegram deployment message thread ID.' |  | ||||||
|         telegram_notifications_status_changes_message_thread_id: |  | ||||||
|           type: string |  | ||||||
|           description: 'The Telegram status change message thread ID.' |  | ||||||
|         telegram_notifications_database_backups_message_thread_id: |  | ||||||
|           type: string |  | ||||||
|           description: 'The Telegram database backup message thread ID.' |  | ||||||
|         custom_server_limit: |         custom_server_limit: | ||||||
|           type: string |           type: string | ||||||
|           description: 'The custom server limit.' |           description: 'The custom server limit.' | ||||||
|         telegram_notifications_scheduled_tasks: |  | ||||||
|           type: boolean |  | ||||||
|           description: 'Whether to send scheduled task notifications via Telegram.' |  | ||||||
|         telegram_notifications_scheduled_tasks_thread_id: |  | ||||||
|           type: string |  | ||||||
|           description: 'The Telegram scheduled task message thread ID.' |  | ||||||
|         members: |         members: | ||||||
|           description: 'The members of the team.' |           description: 'The members of the team.' | ||||||
|           type: array |           type: array | ||||||
|   | |||||||
| @@ -21,7 +21,10 @@ | |||||||
|         <li> |         <li> | ||||||
|             <div class="flex items-center"> |             <div class="flex items-center"> | ||||||
|                 <a class="text-xs truncate lg:text-sm" |                 <a class="text-xs truncate lg:text-sm" | ||||||
|                     href="{{ route('project.resource.index', ['environment_uuid' => $this->parameters['environment_uuid', 'project_uuid' => data_get($resource, 'environment.project.uuid')]) }}">{{ data_get($resource, 'environment.name') }}</a> |                     href="{{ route('project.resource.index', [
 | ||||||
|  |                         'environment_uuid' => data_get($resource, 'environment.uuid'), | ||||||
|  |                         'project_uuid' => data_get($resource, 'environment.project.uuid'), | ||||||
|  |                     ]) }}">{{ data_get($resource, 'environment.name') }}</a>
 | ||||||
|                 <svg aria-hidden="true" class="w-4 h-4 mx-1 font-bold dark:text-warning" fill="currentColor" |                 <svg aria-hidden="true" class="w-4 h-4 mx-1 font-bold dark:text-warning" fill="currentColor" | ||||||
|                     viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> |                     viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> | ||||||
|                     <path fill-rule="evenodd" |                     <path fill-rule="evenodd" | ||||||
|   | |||||||
| @@ -34,11 +34,11 @@ | |||||||
|                                 </div> |                                 </div> | ||||||
|                             </div> |                             </div> | ||||||
|                             <div class="flex items-center justify-center gap-2 text-xs font-bold"> |                             <div class="flex items-center justify-center gap-2 text-xs font-bold"> | ||||||
|                                 @if($project->environments->first()) |                                 @if ($project->environments->first()) | ||||||
|                                     <a class="hover:underline" |                                     <a class="hover:underline" | ||||||
|                                         href="{{ route('project.resource.create', [
 |                                         href="{{ route('project.resource.create', [
 | ||||||
|                                             'project_uuid' => $project->uuid, |                                             'project_uuid' => $project->uuid, | ||||||
|                                             'environment_uuid' => $project->environments->first()->uuid |                                             'environment_uuid' => $project->environments->first()->uuid, | ||||||
|                                         ]) }}">
 |                                         ]) }}">
 | ||||||
|                                         <span class="p-2 font-bold">+ Add Resource</span> |                                         <span class="p-2 font-bold">+ Add Resource</span> | ||||||
|                                     </a> |                                     </a> | ||||||
|   | |||||||
| @@ -9,31 +9,31 @@ | |||||||
|     <div class="flex flex-col h-full gap-8 pt-6 sm:flex-row"> |     <div class="flex flex-col h-full gap-8 pt-6 sm:flex-row"> | ||||||
|         <div class="flex flex-col items-start gap-2 min-w-fit"> |         <div class="flex flex-col items-start gap-2 min-w-fit"> | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.application.configuration', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'application_uuid' => $application->uuid]) }}" |                 href="{{ route('project.application.configuration', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'application_uuid' => $application->uuid]) }}" | ||||||
|                 wire:navigate>General</a> |                 wire:navigate>General</a> | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.application.advanced', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'application_uuid' => $application->uuid]) }}" |                 href="{{ route('project.application.advanced', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'application_uuid' => $application->uuid]) }}" | ||||||
|                 wire:navigate>Advanced</a> |                 wire:navigate>Advanced</a> | ||||||
|             @if ($application->destination->server->isSwarm()) |             @if ($application->destination->server->isSwarm()) | ||||||
|                 <a class="menu-item" |                 <a class="menu-item" | ||||||
|                     wire:current.exact="menu-item-active
 |                     wire:current.exact="menu-item-active
 | ||||||
|                     href="{{ route('project.application.swarm', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'application_uuid' => $application->uuid]) }}" |                     href="{{ route('project.application.swarm', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'application_uuid' => $application->uuid]) }}" | ||||||
|                     wire:navigate>Swarm |                     wire:navigate>Swarm | ||||||
|                     Configuration</a> |                     Configuration</a> | ||||||
|             @endif |             @endif | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.application.environment-variables', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'application_uuid' => $application->uuid]) }}" |                 href="{{ route('project.application.environment-variables', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'application_uuid' => $application->uuid]) }}" | ||||||
|                 wire:navigate>Environment Variables</a> |                 wire:navigate>Environment Variables</a> | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.application.persistent-storage', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'application_uuid' => $application->uuid]) }}" |                 href="{{ route('project.application.persistent-storage', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'application_uuid' => $application->uuid]) }}" | ||||||
|                 wire:navigate>Persistent Storage</a> |                 wire:navigate>Persistent Storage</a> | ||||||
|             @if ($application->git_based()) |             @if ($application->git_based()) | ||||||
|                 <a class='menu-item' wire:current.exact="menu-item-active" |                 <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                     href="{{ route('project.application.source', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'application_uuid' => $application->uuid]) }}" |                     href="{{ route('project.application.source', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'application_uuid' => $application->uuid]) }}" | ||||||
|                     wire:navigate>Git Source</a> |                     wire:navigate>Git Source</a> | ||||||
|             @endif |             @endif | ||||||
|             <a class="menu-item flex items-center gap-2" wire:current.exact="menu-item-active" |             <a class="menu-item flex items-center gap-2" wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.application.servers', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'application_uuid' => $application->uuid]) }}" |                 href="{{ route('project.application.servers', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'application_uuid' => $application->uuid]) }}" | ||||||
|                 wire:navigate>Servers |                 wire:navigate>Servers | ||||||
|                 @if (str($application->status)->contains('degraded')) |                 @if (str($application->status)->contains('degraded')) | ||||||
|                     <span title="Some servers are unavailable"> |                     <span title="Some servers are unavailable"> | ||||||
| @@ -53,35 +53,35 @@ | |||||||
|                 @endif |                 @endif | ||||||
|             </a> |             </a> | ||||||
|             <a class="menu-item" wire:current.exact="menu-item-active" |             <a class="menu-item" wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.application.scheduled-tasks.show', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'application_uuid' => $application->uuid]) }}" |                 href="{{ route('project.application.scheduled-tasks.show', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'application_uuid' => $application->uuid]) }}" | ||||||
|                 wire:navigate>Scheduled Tasks</a> |                 wire:navigate>Scheduled Tasks</a> | ||||||
|             <a class="menu-item" wire:current.exact="menu-item-active" |             <a class="menu-item" wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.application.webhooks', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'application_uuid' => $application->uuid]) }}" |                 href="{{ route('project.application.webhooks', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'application_uuid' => $application->uuid]) }}" | ||||||
|                 wire:navigate>Webhooks</a> |                 wire:navigate>Webhooks</a> | ||||||
|             <a class="menu-item" wire:current.exact="menu-item-active" |             <a class="menu-item" wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.application.preview-deployments', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'application_uuid' => $application->uuid]) }}" |                 href="{{ route('project.application.preview-deployments', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'application_uuid' => $application->uuid]) }}" | ||||||
|                 wire:navigate>Preview Deployments</a> |                 wire:navigate>Preview Deployments</a> | ||||||
|             <a class="menu-item" wire:current.exact="menu-item-active" |             <a class="menu-item" wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.application.healthcheck', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'application_uuid' => $application->uuid]) }}" |                 href="{{ route('project.application.healthcheck', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'application_uuid' => $application->uuid]) }}" | ||||||
|                 wire:navigate>Healthcheck</a> |                 wire:navigate>Healthcheck</a> | ||||||
|             <a class="menu-item" wire:current.exact="menu-item-active" |             <a class="menu-item" wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.application.rollback', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'application_uuid' => $application->uuid]) }}" |                 href="{{ route('project.application.rollback', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'application_uuid' => $application->uuid]) }}" | ||||||
|                 wire:navigate>Rollback</a> |                 wire:navigate>Rollback</a> | ||||||
|             <a class="menu-item" wire:current.exact="menu-item-active" |             <a class="menu-item" wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.application.resource-limits', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'application_uuid' => $application->uuid]) }}" |                 href="{{ route('project.application.resource-limits', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'application_uuid' => $application->uuid]) }}" | ||||||
|                 wire:navigate>Resource Limits</a> |                 wire:navigate>Resource Limits</a> | ||||||
| 
 | 
 | ||||||
|             <a class="menu-item" wire:current.exact="menu-item-active" |             <a class="menu-item" wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.application.resource-operations', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'application_uuid' => $application->uuid]) }}" |                 href="{{ route('project.application.resource-operations', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'application_uuid' => $application->uuid]) }}" | ||||||
|                 wire:navigate>Resource Operations</a> |                 wire:navigate>Resource Operations</a> | ||||||
|             <a class="menu-item" wire:current.exact="menu-item-active" |             <a class="menu-item" wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.application.metrics', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'application_uuid' => $application->uuid]) }}" |                 href="{{ route('project.application.metrics', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'application_uuid' => $application->uuid]) }}" | ||||||
|                 wire:navigate>Metrics</a> |                 wire:navigate>Metrics</a> | ||||||
|             <a class="menu-item" wire:current.exact="menu-item-active" |             <a class="menu-item" wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.application.tags', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'application_uuid' => $application->uuid]) }}" |                 href="{{ route('project.application.tags', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'application_uuid' => $application->uuid]) }}" | ||||||
|                 wire:navigate>Tags</a> |                 wire:navigate>Tags</a> | ||||||
|             <a class="menu-item" wire:current.exact="menu-item-active" |             <a class="menu-item" wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.application.danger', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'application_uuid' => $application->uuid]) }}" |                 href="{{ route('project.application.danger', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'application_uuid' => $application->uuid]) }}" | ||||||
|                 wire:navigate>Danger Zone</a> |                 wire:navigate>Danger Zone</a> | ||||||
|         </div> |         </div> | ||||||
|         <div class="w-full"> |         <div class="w-full"> | ||||||
|   | |||||||
| @@ -8,38 +8,37 @@ | |||||||
|     <div class="flex flex-col h-full gap-8 pt-6 sm:flex-row"> |     <div class="flex flex-col h-full gap-8 pt-6 sm:flex-row"> | ||||||
|         <div class="flex flex-col items-start gap-2 min-w-fit"> |         <div class="flex flex-col items-start gap-2 min-w-fit"> | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.database.configuration', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'database_uuid' => $database->uuid]) }}" |                 href="{{ route('project.database.configuration', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'database_uuid' => $database->uuid]) }}" | ||||||
|                 wire:navigate>General</a> |                 wire:navigate>General</a> | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.database.environment-variables', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'database_uuid' => $database->uuid]) }}" |                 href="{{ route('project.database.environment-variables', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'database_uuid' => $database->uuid]) }}" | ||||||
|                 wire:navigate>Environment Variables</a> |                 wire:navigate>Environment Variables</a> | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.database.servers', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'database_uuid' => $database->uuid]) }}" |                 href="{{ route('project.database.servers', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'database_uuid' => $database->uuid]) }}" | ||||||
|                 wire:navigate>Servers</a> |                 wire:navigate>Servers</a> | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.database.persistent-storage', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'database_uuid' => $database->uuid]) }}" |                 href="{{ route('project.database.persistent-storage', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'database_uuid' => $database->uuid]) }}" | ||||||
|                 wire:navigate>Persistent Storage</a> |                 wire:navigate>Persistent Storage</a> | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.database.import-backups', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'database_uuid' => $database->uuid]) }}" |                 href="{{ route('project.database.import-backups', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'database_uuid' => $database->uuid]) }}" | ||||||
|                 wire:navigate>Import Backups</a> |                 wire:navigate>Import Backups</a> | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.database.webhooks', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'database_uuid' => $database->uuid]) }}" |                 href="{{ route('project.database.webhooks', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'database_uuid' => $database->uuid]) }}" | ||||||
|                 wire:navigate>Webhooks</a> |                 wire:navigate>Webhooks</a> | ||||||
|             <a class="menu-item" wire:current.exact="menu-item-active" |             <a class="menu-item" wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.database.resource-limits', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'database_uuid' => $database->uuid]) }}" |                 href="{{ route('project.database.resource-limits', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'database_uuid' => $database->uuid]) }}" | ||||||
|                 wire:navigate>Resource Limits</a> |                 wire:navigate>Resource Limits</a> | ||||||
| 
 |  | ||||||
|             <a class="menu-item" wire:current.exact="menu-item-active" |             <a class="menu-item" wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.database.resource-operations', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'database_uuid' => $database->uuid]) }}" |                 href="{{ route('project.database.resource-operations', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'database_uuid' => $database->uuid]) }}" | ||||||
|                 wire:navigate>Resource Operations</a> |                 wire:navigate>Resource Operations</a> | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.database.metrics', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'database_uuid' => $database->uuid]) }}" |                 href="{{ route('project.database.metrics', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'database_uuid' => $database->uuid]) }}" | ||||||
|                 wire:navigate>Metrics</a> |                 wire:navigate>Metrics</a> | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.database.tags', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'database_uuid' => $database->uuid]) }}" |                 href="{{ route('project.database.tags', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'database_uuid' => $database->uuid]) }}" | ||||||
|                 wire:navigate>Tags</a> |                 wire:navigate>Tags</a> | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.database.danger', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'database_uuid' => $database->uuid]) }}" |                 href="{{ route('project.database.danger', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'database_uuid' => $database->uuid]) }}" | ||||||
|                 wire:navigate>Danger Zone</a> |                 wire:navigate>Danger Zone</a> | ||||||
|         </div> |         </div> | ||||||
|         <div class="w-full"> |         <div class="w-full"> | ||||||
|   | |||||||
| @@ -211,7 +211,7 @@ | |||||||
|             }, |             }, | ||||||
|             goto(item) { |             goto(item) { | ||||||
|                 const hrefLink = item.hrefLink; |                 const hrefLink = item.hrefLink; | ||||||
|                 window.location.href = `${hrefLink}#tags`; |                 window.location.href = `${hrefLink}/tags`; | ||||||
|             }, |             }, | ||||||
|             filterAndSort(items) { |             filterAndSort(items) { | ||||||
|                 if (this.search === '') { |                 if (this.search === '') { | ||||||
|   | |||||||
| @@ -9,30 +9,30 @@ | |||||||
|             <a class="menu-item sm:min-w-fit" target="_blank" href="{{ $service->documentation() }}">Documentation |             <a class="menu-item sm:min-w-fit" target="_blank" href="{{ $service->documentation() }}">Documentation | ||||||
|                 <x-external-link /></a> |                 <x-external-link /></a> | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.service.configuration', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'service_uuid' => $service->uuid]) }}" |                 href="{{ route('project.service.configuration', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid]) }}" | ||||||
|                 wire:navigate>General</a> |                 wire:navigate>General</a> | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.service.environment-variables', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'service_uuid' => $service->uuid]) }}" |                 href="{{ route('project.service.environment-variables', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid]) }}" | ||||||
|                 wire:navigate>Environment Variables</a> |                 wire:navigate>Environment Variables</a> | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.service.storages', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'service_uuid' => $service->uuid]) }}" |                 href="{{ route('project.service.storages', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid]) }}" | ||||||
|                 wire:navigate>Persistent Storages</a> |                 wire:navigate>Persistent Storages</a> | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.service.scheduled-tasks.show', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'service_uuid' => $service->uuid]) }}" |                 href="{{ route('project.service.scheduled-tasks.show', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid]) }}" | ||||||
|                 wire:navigate>Scheduled Tasks</a> |                 wire:navigate>Scheduled Tasks</a> | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.service.webhooks', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'service_uuid' => $service->uuid]) }}" |                 href="{{ route('project.service.webhooks', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid]) }}" | ||||||
|                 wire:navigate>Webhooks</a> |                 wire:navigate>Webhooks</a> | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.service.resource-operations', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'service_uuid' => $service->uuid]) }}" |                 href="{{ route('project.service.resource-operations', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid]) }}" | ||||||
|                 wire:navigate>Resource Operations</a> |                 wire:navigate>Resource Operations</a> | ||||||
| 
 | 
 | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.service.tags', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'service_uuid' => $service->uuid]) }}" |                 href="{{ route('project.service.tags', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid]) }}" | ||||||
|                 wire:navigate>Tags</a> |                 wire:navigate>Tags</a> | ||||||
| 
 | 
 | ||||||
|             <a class='menu-item' wire:current.exact="menu-item-active" |             <a class='menu-item' wire:current.exact="menu-item-active" | ||||||
|                 href="{{ route('project.service.danger', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'service_uuid' => $service->uuid]) }}" |                 href="{{ route('project.service.danger', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid]) }}" | ||||||
|                 wire:navigate>Danger Zone</a> |                 wire:navigate>Danger Zone</a> | ||||||
|         </div> |         </div> | ||||||
|         <div class="w-full"> |         <div class="w-full"> | ||||||
| @@ -95,7 +95,7 @@ | |||||||
|                                 </div> |                                 </div> | ||||||
|                                 <div class="flex items-center px-4"> |                                 <div class="flex items-center px-4"> | ||||||
|                                     <a class="mx-4 text-xs font-bold hover:underline" |                                     <a class="mx-4 text-xs font-bold hover:underline" | ||||||
|                                         href="{{ route('project.service.index', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'service_uuid' => $service->uuid, 'stack_service_uuid' => $application->uuid]) }}"> |                                         href="{{ route('project.service.index', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid, 'stack_service_uuid' => $application->uuid]) }}"> | ||||||
|                                         Settings |                                         Settings | ||||||
|                                     </a> |                                     </a> | ||||||
|                                     @if (str($application->status)->contains('running')) |                                     @if (str($application->status)->contains('running')) | ||||||
| @@ -143,12 +143,12 @@ | |||||||
|                                 <div class="flex items-center px-4"> |                                 <div class="flex items-center px-4"> | ||||||
|                                     @if ($database->isBackupSolutionAvailable()) |                                     @if ($database->isBackupSolutionAvailable()) | ||||||
|                                         <a class="mx-4 text-xs font-bold hover:underline" |                                         <a class="mx-4 text-xs font-bold hover:underline" | ||||||
|                                             href="{{ route('project.service.index', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'service_uuid' => $service->uuid, 'stack_service_uuid' => $database->uuid]) }}#backups"> |                                             href="{{ route('project.service.index', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid, 'stack_service_uuid' => $database->uuid]) }}#backups"> | ||||||
|                                             Backups |                                             Backups | ||||||
|                                         </a> |                                         </a> | ||||||
|                                     @endif |                                     @endif | ||||||
|                                     <a class="mx-4 text-xs font-bold hover:underline" |                                     <a class="mx-4 text-xs font-bold hover:underline" | ||||||
|                                         href="{{ route('project.service.index', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name, 'service_uuid' => $service->uuid, 'stack_service_uuid' => $database->uuid]) }}"> |                                         href="{{ route('project.service.index', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid, 'stack_service_uuid' => $database->uuid]) }}"> | ||||||
|                                         Settings |                                         Settings | ||||||
|                                     </a> |                                     </a> | ||||||
|                                     @if (str($database->status)->contains('running')) |                                     @if (str($database->status)->contains('running')) | ||||||
|   | |||||||
| @@ -7,7 +7,8 @@ | |||||||
|             $resource->getMorphClass() == 'App\Models\StandaloneKeydb' || |             $resource->getMorphClass() == 'App\Models\StandaloneKeydb' || | ||||||
|             $resource->getMorphClass() == 'App\Models\StandaloneDragonfly' || |             $resource->getMorphClass() == 'App\Models\StandaloneDragonfly' || | ||||||
|             $resource->getMorphClass() == 'App\Models\StandaloneClickhouse' || |             $resource->getMorphClass() == 'App\Models\StandaloneClickhouse' || | ||||||
|             $resource->getMorphClass() == 'App\Models\StandaloneMongodb') |             $resource->getMorphClass() == 'App\Models\StandaloneMongodb' || | ||||||
|  |             $resource->getMorphClass() == 'App\Models\StandaloneMysql') | ||||||
|         <div class="flex items-center gap-2"> |         <div class="flex items-center gap-2"> | ||||||
|             <h2>Storages</h2> |             <h2>Storages</h2> | ||||||
|             <x-helper |             <x-helper | ||||||
|   | |||||||
| @@ -40,7 +40,7 @@ Route::group([ | |||||||
| 
 | 
 | ||||||
|     Route::get('/projects', [ProjectController::class, 'projects'])->middleware(['api.ability:read']); |     Route::get('/projects', [ProjectController::class, 'projects'])->middleware(['api.ability:read']); | ||||||
|     Route::get('/projects/{uuid}', [ProjectController::class, 'project_by_uuid'])->middleware(['api.ability:read']); |     Route::get('/projects/{uuid}', [ProjectController::class, 'project_by_uuid'])->middleware(['api.ability:read']); | ||||||
|     Route::get('/projects/{uuid}/{environment_uuid}', [ProjectController::class, 'environment_details'])->middleware(['api.ability:read']); |     Route::get('/projects/{uuid}/{environment_name_or_uuid}', [ProjectController::class, 'environment_details'])->middleware(['api.ability:read']); | ||||||
| 
 | 
 | ||||||
|     Route::post('/projects', [ProjectController::class, 'create_project'])->middleware(['api.ability:read']); |     Route::post('/projects', [ProjectController::class, 'create_project'])->middleware(['api.ability:read']); | ||||||
|     Route::patch('/projects/{uuid}', [ProjectController::class, 'update_project'])->middleware(['api.ability:write']); |     Route::patch('/projects/{uuid}', [ProjectController::class, 'update_project'])->middleware(['api.ability:write']); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Andras Bacsai
					Andras Bacsai