diff --git a/app/Http/Controllers/Admin/PackController.php b/app/Http/Controllers/Admin/PackController.php index abda49c8e..628cd54b8 100644 --- a/app/Http/Controllers/Admin/PackController.php +++ b/app/Http/Controllers/Admin/PackController.php @@ -183,14 +183,6 @@ class PackController extends Controller 'description' => $pack->dscription, 'selectable' => (bool) $pack->selectable, 'visible' => (bool) $pack->visible, - 'build' => [ - 'memory' => $pack->build_memory, - 'swap' => $pack->build_swap, - 'cpu' => $pack->build_cpu, - 'io' => $pack->build_io, - 'container' => $pack->build_container, - 'script' => $pack->build_script, - ], ]; $filename = tempnam(sys_get_temp_dir(), 'pterodactyl_'); diff --git a/app/Repositories/ServiceRepository/Pack.php b/app/Repositories/ServiceRepository/Pack.php index c5dee34a4..3cf8588e4 100644 --- a/app/Repositories/ServiceRepository/Pack.php +++ b/app/Repositories/ServiceRepository/Pack.php @@ -49,12 +49,6 @@ class Pack 'option' => 'required|exists:service_options,id', 'selectable' => 'sometimes|boolean', 'visible' => 'sometimes|boolean', - 'build_memory' => 'required|integer|min:0', - 'build_swap' => 'required|integer|min:0', - 'build_cpu' => 'required|integer|min:0', - 'build_io' => 'required|integer|min:10|max:1000', - 'build_container' => 'required|string', - 'build_script' => 'sometimes|nullable|string', ]); if ($validator->fails()) { @@ -77,12 +71,6 @@ class Pack $pack = Models\ServicePack::create([ 'option' => $data['option'], 'uuid' => $uuid->generate('servers', 'uuid'), - 'build_memory' => $data['build_memory'], - 'build_swap' => $data['build_swap'], - 'build_cpu' => $data['build_swap'], - 'build_io' => $data['build_io'], - 'build_script' => (empty($data['build_script'])) ? null : $data['build_script'], - 'build_container' => $data['build_container'], 'name' => $data['name'], 'version' => $data['version'], 'description' => (empty($data['description'])) ? null : $data['description'], @@ -142,12 +130,6 @@ class Pack 'option' => $data['option'], 'selectable' => $json->selectable, 'visible' => $json->visible, - 'build_memory' => $json->build->memory, - 'build_swap' => $json->build->swap, - 'build_cpu' => $json->build->cpu, - 'build_io' => $json->build->io, - 'build_container' => $json->build->container, - 'build_script' => $json->build->script, ]); $pack = Models\ServicePack::findOrFail($id); @@ -169,12 +151,6 @@ class Pack 'option' => $data['option'], 'selectable' => $json->selectable, 'visible' => $json->visible, - 'build_memory' => $json->build->memory, - 'build_swap' => $json->build->swap, - 'build_cpu' => $json->build->cpu, - 'build_io' => $json->build->io, - 'build_container' => $json->build->container, - 'build_script' => $json->build->script, ]); } } @@ -188,12 +164,6 @@ class Pack 'option' => 'required|exists:service_options,id', 'selectable' => 'sometimes|boolean', 'visible' => 'sometimes|boolean', - 'build_memory' => 'required|integer|min:0', - 'build_swap' => 'required|integer|min:0', - 'build_cpu' => 'required|integer|min:0', - 'build_io' => 'required|integer|min:10|max:1000', - 'build_container' => 'required|string', - 'build_script' => 'sometimes|string', ]); if ($validator->fails()) { @@ -203,12 +173,6 @@ class Pack DB::transaction(function () use ($id, $data) { Models\ServicePack::findOrFail($id)->update([ 'option' => $data['option'], - 'build_memory' => $data['build_memory'], - 'build_swap' => $data['build_swap'], - 'build_cpu' => $data['build_swap'], - 'build_io' => $data['build_io'], - 'build_script' => (empty($data['build_script'])) ? null : $data['build_script'], - 'build_container' => $data['build_container'], 'name' => $data['name'], 'version' => $data['version'], 'description' => (empty($data['description'])) ? null : $data['description'], diff --git a/database/migrations/2016_11_11_220649_add_pack_support.php b/database/migrations/2016_11_11_220649_add_pack_support.php index 87a66b40a..7cb3eb10e 100644 --- a/database/migrations/2016_11_11_220649_add_pack_support.php +++ b/database/migrations/2016_11_11_220649_add_pack_support.php @@ -17,12 +17,6 @@ class AddPackSupport extends Migration $table->increments('id'); $table->unsignedInteger('option'); $table->char('uuid', 36)->unique(); - $table->unsignedInteger('build_memory')->nullable(); - $table->unsignedInteger('build_swap')->nullable(); - $table->unsignedInteger('build_cpu')->nullable(); - $table->unsignedInteger('build_io')->nullable(); - $table->text('build_script')->nullable(); - $table->string('build_container')->default('alpine:latest'); $table->string('name'); $table->string('version'); $table->text('description')->nullable(); diff --git a/resources/views/admin/services/packs/edit.blade.php b/resources/views/admin/services/packs/edit.blade.php index 0cdd80705..dcb67d5df 100644 --- a/resources/views/admin/services/packs/edit.blade.php +++ b/resources/views/admin/services/packs/edit.blade.php @@ -88,64 +88,6 @@
-
-
-
Build Parameters
-
-
-
- -
- - MB -
-
-
- -
- - MB -
-
-
- -
- - % -
-
-
- -
- - I/O -
-
-
-
-

If you would like to set limits on the build container you may do so above. Setting memory, swap, or cpu to 0 will allow unlimited resource utilization. IO must be in a range between 10 to 1000 and is a relative weighting to other container IO usage.

-
-
-
-
-
- -
- -

Provide the docker container image that will be used to build this service pack. This container is only used if a build script is provided below.

-
-
-
- -
{{ $pack->build_script }}
- -

This script will be run inside the container if provided. You should use this script to download any additional dependencies or compile packages as necessary on the node. Your uploaded archive (if provided), will be available in /input as archive.tar.gz or as archive.zip depending on what format you uploaded as. Your completed pack should be saved as package.tar.gz in the /output directory (e.g. /output/package.tar.gz).

-
-
-
-
-
-
Package Archive
@@ -153,7 +95,7 @@
@if(count($files) > 1) -
Warning! Service packs should only contain a single pack archive in either .zip or .tar.gz format. We've detected more than one file for this pack.
+
Warning! Service packs should only contain a single pack archive in .tar.gz format. We've detected more than one file for this pack.
@endif diff --git a/resources/views/admin/services/packs/new.blade.php b/resources/views/admin/services/packs/new.blade.php index 7a5be8f47..82601bc62 100644 --- a/resources/views/admin/services/packs/new.blade.php +++ b/resources/views/admin/services/packs/new.blade.php @@ -85,64 +85,6 @@
-
-
-
Build Parameters
-
-
-
- -
- - MB -
-
-
- -
- - MB -
-
-
- -
- - % -
-
-
- -
- - I/O -
-
-
-
-

If you would like to set limits on the build container you may do so above. Setting memory, swap, or cpu to 0 will allow unlimited resource utilization. IO must be in a range between 10 to 1000 and is a relative weighting to other container IO usage.

-
-
-
-
-
- -
- -

Provide the docker container image that will be used to build this service pack. This container is only used if a build script is provided below.

-
-
-
- -
- -

This script will be run inside the container if provided. You should use this script to download any additional dependencies or compile packages as necessary on the node. Your uploaded archive (if provided), will be available in /input as archive.tar.gz or as archive.zip depending on what format you uploaded as. Your completed pack should be saved as package.tar.gz in the /output directory (e.g. /output/package.tar.gz).

-
-
-
-
-
-
File Upload