Begin implementation of services for services/service options

This commit is contained in:
Dane Everitt 2017-08-08 23:24:55 -05:00
parent 7277f728a9
commit 2c77d5c44d
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
21 changed files with 567 additions and 408 deletions

View file

@ -33,4 +33,9 @@ return [
'invalid_mapping' => 'The mapping provided for :port was invalid and could not be processed.',
'cidr_out_of_range' => 'CIDR notation only allows masks between /25 and /32.',
],
'service' => [
'options' => [
'must_be_child' => 'The "Configuration From" directive for this option must be a child option for the selected service.',
],
],
];

View file

@ -0,0 +1,36 @@
<?php
/*
* Pterodactyl - Panel
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
return [
'options' => [
'notices' => [
'option_created' => 'New service option was created successfully. You will need to restart any running daemons to apply this new service.',
],
],
'variables' => [
'notices' => [
'variable_created' => 'New variable has successfully been created and assigned to this service option.',
],
],
];

View file

@ -146,7 +146,7 @@
$('#pConfigFrom').select2();
});
$('#pServiceId').on('change', function (event) {
$('#pConfigFrom').html('<option value="0">None</option>').select2({
$('#pConfigFrom').html('<option value="">None</option>').select2({
data: $.map(_.get(Pterodactyl.services, $(this).val() + '.options', []), function (item) {
return {
id: item.id,