Add skip scripting option
This commit is contained in:
parent
c8f1335a09
commit
3fe5d162f5
3 changed files with 10 additions and 2 deletions
|
@ -41,8 +41,7 @@ class OptionController extends Controller
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'scripts' => [
|
'scripts' => [
|
||||||
'install' => str_replace(["\r\n", "\n", "\r"], "\n", $server->option->script_install),
|
'install' => (! $server->option->script_install) ? null : str_replace(["\r\n", "\n", "\r"], "\n", $server->option->script_install),
|
||||||
// 'upgrade' => str_replace(["\r\n", "\n", "\r"], "\n", $server->option->script_upgrade),
|
|
||||||
'privileged' => $server->option->script_is_privileged,
|
'privileged' => $server->option->script_is_privileged,
|
||||||
],
|
],
|
||||||
'env' => $environment->merge([
|
'env' => $environment->merge([
|
||||||
|
|
|
@ -103,6 +103,7 @@ class ServerRepository
|
||||||
'startup' => 'string',
|
'startup' => 'string',
|
||||||
'auto_deploy' => 'sometimes|required|accepted',
|
'auto_deploy' => 'sometimes|required|accepted',
|
||||||
'custom_id' => 'sometimes|required|numeric|unique:servers,id',
|
'custom_id' => 'sometimes|required|numeric|unique:servers,id',
|
||||||
|
'skip_scripting' => 'sometimes|required|boolean',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$validator->sometimes('node_id', 'required|numeric|min:1|exists:nodes,id', function ($input) {
|
$validator->sometimes('node_id', 'required|numeric|min:1|exists:nodes,id', function ($input) {
|
||||||
|
@ -326,6 +327,7 @@ class ServerRepository
|
||||||
'type' => $service->folder,
|
'type' => $service->folder,
|
||||||
'option' => $option->tag,
|
'option' => $option->tag,
|
||||||
'pack' => (isset($pack)) ? $pack->uuid : null,
|
'pack' => (isset($pack)) ? $pack->uuid : null,
|
||||||
|
'skip_scripting' => isset($data['skip_scripting']),
|
||||||
],
|
],
|
||||||
'keys' => [
|
'keys' => [
|
||||||
(string) $server->daemonSecret => $this->daemonPermissions,
|
(string) $server->daemonSecret => $this->daemonPermissions,
|
||||||
|
|
|
@ -212,6 +212,13 @@
|
||||||
<select name="pack_id" id="pPackId" class="form-control"></select>
|
<select name="pack_id" id="pPackId" class="form-control"></select>
|
||||||
<p class="small text-muted no-margin">Select a service pack to be automatically installed on this server when first created.</p>
|
<p class="small text-muted no-margin">Select a service pack to be automatically installed on this server when first created.</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group col-xs-12">
|
||||||
|
<div class="checkbox checkbox-primary no-margin-bottom">
|
||||||
|
<input id="pSkipScripting" name="skip_scripting" type="checkbox" value="1" />
|
||||||
|
<label for="pSkipScripting" class="strong">Skip Service Option Install Script</label>
|
||||||
|
</div>
|
||||||
|
<p class="small text-muted no-margin">If the selected <code>Option</code> has an install script attached to it, the script will run during install after the pack is installed. If you would like to skip this step, check this box.</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue