Add IP Aliasing (#72)
* complete support for IP Alias's throughout panel Includes a database change and probably better allocation handling anyways closes #37
This commit is contained in:
parent
f1a3008a50
commit
e8c175f385
14 changed files with 206 additions and 76 deletions
|
@ -195,11 +195,8 @@ class ServerController extends Controller
|
|||
public function getSettings(Request $request, $uuid)
|
||||
{
|
||||
$server = Models\Server::getByUUID($uuid);
|
||||
// $variables = Models\ServiceVariables::select('service_variables.*', 'server_variables.variable_value as a_serverValue')
|
||||
// ->join('server_variables', 'server_variables.variable_id', '=', 'service_variables.id')
|
||||
// ->where('service_variables.option_id', $server->option)
|
||||
// ->where('server_variables.server_id', $server->id)
|
||||
// ->get();
|
||||
$allocation = Models\Allocation::findOrFail($server->allocation);
|
||||
|
||||
$variables = Models\ServiceVariables::select(
|
||||
'service_variables.*',
|
||||
DB::raw('COALESCE(server_variables.variable_value, service_variables.default_value) as a_serverValue')
|
||||
|
@ -217,8 +214,8 @@ class ServerController extends Controller
|
|||
|
||||
$serverVariables = [
|
||||
'{{SERVER_MEMORY}}' => $server->memory,
|
||||
'{{SERVER_IP}}' => $server->ip,
|
||||
'{{SERVER_PORT}}' => $server->port,
|
||||
'{{SERVER_IP}}' => $allocation->ip,
|
||||
'{{SERVER_PORT}}' => $allocation->port,
|
||||
];
|
||||
|
||||
$processed = str_replace(array_keys($serverVariables), array_values($serverVariables), $server->startup);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue