Move services onto new services system, includes tests

This commit is contained in:
Dane Everitt 2017-08-15 22:21:47 -05:00
parent e91079d128
commit 90bbe57148
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
26 changed files with 899 additions and 272 deletions

View file

@ -34,6 +34,7 @@ return [
'cidr_out_of_range' => 'CIDR notation only allows masks between /25 and /32.',
],
'service' => [
'delete_has_servers' => 'A service with active servers attached to it cannot be deleted from the Panel.',
'options' => [
'delete_has_servers' => 'A service option with active servers attached to it cannot be deleted from the Panel.',
'invalid_copy_id' => 'The service option selected for copying a script from either does not exist, or is copying a script itself.',

View file

@ -23,8 +23,15 @@
*/
return [
'notices' => [
'service_created' => 'A new service, :name, has been successfully created.',
'service_deleted' => 'Successfully deleted the requested service from the Panel.',
'service_updated' => 'Successfully updated the service configuration options.',
'functions_updated' => 'The service functions file has been updated. You will need to reboot your Nodes in order for these changes to be applied.',
],
'options' => [
'notices' => [
'option_deleted' => 'Successfully deleted the requested service option from the Panel.',
'option_updated' => 'Service option configuration has been updated successfully.',
'script_updated' => 'Service option install script has been updated and will run whenever servers are installed.',
'option_created' => 'New service option was created successfully. You will need to restart any running daemons to apply this new service.',

View file

@ -50,15 +50,14 @@
<div class="box-header with-border">
<h3 class="box-title">Functions Control</h3>
</div>
<form action="{{ route('admin.services.view', $service->id) }}" method="POST">
<form action="{{ route('admin.services.view.functions', $service->id) }}" method="POST">
<div class="box-body no-padding">
<div id="editor_index"style="height:500px">{{ $service->index_file }}</div>
<textarea name="index_file" class="hidden"></textarea>
</div>
<div class="box-footer">
{!! csrf_field() !!}
<input type="hidden" name="redirect_to" value="functions" />
<button type="submit" name="action" value="edit" class="btn btn-sm btn-success pull-right">Save File</button>
<button type="submit" name="_method" value="PATCH" class="btn btn-sm btn-success pull-right">Save File</button>
</div>
</form>
</div>