OOM Killer

This commit is contained in:
1day2die 2023-05-07 21:41:26 +02:00
parent 438a3374b0
commit a32d42feab
3 changed files with 18 additions and 3 deletions

View file

@ -91,8 +91,10 @@ class ProductController extends Controller
'oom_killer' => 'nullable',
]);
$disabled = ! is_null($request->input('disabled'));
$product = Product::create(array_merge($request->all(), ['disabled' => $disabled]));
$oomkiller = ! is_null($request->input('oom_killer'));
$product = Product::create(array_merge($request->all(), ['disabled' => $disabled, 'oom_killer' => $oomkiller]));
//link nodes and eggs
$product->eggs()->attach($request->input('eggs'));
@ -165,7 +167,8 @@ class ProductController extends Controller
]);
$disabled = ! is_null($request->input('disabled'));
$product->update(array_merge($request->all(), ['disabled' => $disabled]));
$oomkiller = ! is_null($request->input('oom_killer'));
$product->update(array_merge($request->all(), ['disabled' => $disabled, 'oom_killer' => $oomkiller]));
//link nodes and eggs
$product->eggs()->detach();

View file

@ -103,7 +103,7 @@
<span>{{ $server->product->name }}
</span>
<i data-toggle="popover" data-trigger="hover" data-html="true"
data-content="{{ __('CPU') }}: {{ $server->product->cpu / 100 }} {{ __('vCores') }} <br/>{{ __('RAM') }}: {{ $server->product->memory }} MB <br/>{{ __('Disk') }}: {{ $server->product->disk }} MB <br/>{{ __('Backups') }}: {{ $server->product->backups }} <br/> {{ __('MySQL Databases') }}: {{ $server->product->databases }} <br/> {{ __('Allocations') }}: {{ $server->product->allocations }} <br/>"
data-content="{{ __('CPU') }}: {{ $server->product->cpu / 100 }} {{ __('vCores') }} <br/>{{ __('RAM') }}: {{ $server->product->memory }} MB <br/>{{ __('Disk') }}: {{ $server->product->disk }} MB <br/>{{ __('Backups') }}: {{ $server->product->backups }} <br/> {{ __('MySQL Databases') }}: {{ $server->product->databases }} <br/> {{ __('Allocations') }}: {{ $server->product->allocations }} <br/>{{ __('OOM Killer') }}: {{ $server->product->oom_killer ? __("enabled") : __("disabled") }} <br/>"
class="fas fa-info-circle"></i>
</div>

View file

@ -204,6 +204,18 @@
</div>
</div>
</div>
<div class="col-lg-6">
<div class="row">
<div class="col-lg-4">
<label>{{__('OOM Killer')}}</label>
</div>
<div class="col-lg-8">
<span style="max-width: 250px;" class="d-inline-block text-truncate">
{{ $server->product->oom_killer ? __("enabled") : __("disabled") }}
</span>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="row">
<div class="col-lg-4">