Correctly expose OOM disable state for a server

This commit is contained in:
Dane Everitt 2021-09-13 21:02:12 -07:00
parent f5a1ce13b8
commit 5fdb0a5909
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
4 changed files with 9 additions and 1 deletions

View file

@ -6,7 +6,8 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
## v1.6.1 ## v1.6.1
### Fixed ### Fixed
* Fixes server build modifications not being properly persisted to the database when edited. * Fixes server build modifications not being properly persisted to the database when edited.
* Correctly exposes the `oom_disabled` field in the `build` limits block for a server build so that Wings can pick it up.
*
## v1.6.0 ## v1.6.0
### Fixed ### Fixed
* Fixes array merging logic for server transfers that would cause a 500 error to occur in some scenarios. * Fixes array merging logic for server transfers that would cause a 500 error to occur in some scenarios.

View file

@ -58,9 +58,13 @@ class ServerConfigurationStructureService
'cpu_limit' => $server->cpu, 'cpu_limit' => $server->cpu,
'threads' => $server->threads, 'threads' => $server->threads,
'disk_space' => $server->disk, 'disk_space' => $server->disk,
'oom_disabled' => $server->oom_disabled,
], ],
'container' => [ 'container' => [
'image' => $server->image, 'image' => $server->image,
// This field is deprecated — use the value in the "build" block.
//
// TODO: remove this key in V2.
'oom_disabled' => $server->oom_disabled, 'oom_disabled' => $server->oom_disabled,
'requires_rebuild' => false, 'requires_rebuild' => false,
], ],

View file

@ -69,6 +69,7 @@ class ServerTransformer extends BaseTransformer
'io' => $server->io, 'io' => $server->io,
'cpu' => $server->cpu, 'cpu' => $server->cpu,
'threads' => $server->threads, 'threads' => $server->threads,
'oom_disabled' => $server->oom_disabled,
], ],
'feature_limits' => [ 'feature_limits' => [
'databases' => $server->database_limit, 'databases' => $server->database_limit,

View file

@ -55,6 +55,8 @@ class ServerTransformer extends BaseClientTransformer
'disk' => $server->disk, 'disk' => $server->disk,
'io' => $server->io, 'io' => $server->io,
'cpu' => $server->cpu, 'cpu' => $server->cpu,
'threads' => $server->threads,
'oom_disabled' => $server->oom_disabled,
], ],
'invocation' => $service->handle($server, !$this->getUser()->can(Permission::ACTION_STARTUP_READ, $server)), 'invocation' => $service->handle($server, !$this->getUser()->can(Permission::ACTION_STARTUP_READ, $server)),
'docker_image' => $server->image, 'docker_image' => $server->image,