Untested code to perform an update of server build settings

This commit is contained in:
Dane Everitt 2019-11-24 15:08:54 -08:00
parent c17f9ba8a9
commit 547e8840e2
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
10 changed files with 306 additions and 141 deletions

View file

@ -9,7 +9,6 @@
namespace Pterodactyl\Http\Controllers\Admin;
use Javascript;
use Cake\Chronos\Chronos;
use Illuminate\Http\Request;
use Pterodactyl\Models\Node;
@ -138,19 +137,6 @@ class NodesController extends Controller
$this->versionService = $versionService;
}
/**
* Displays the index page listing all nodes on the panel.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\View\View
*/
public function index(Request $request)
{
return view('admin.nodes.index', [
'nodes' => $this->repository->setSearchTerm($request->input('query'))->getNodeListingData(),
]);
}
/**
* Displays create new node page.
*
@ -184,79 +170,6 @@ class NodesController extends Controller
return redirect()->route('admin.nodes.view.allocation', $node->id);
}
/**
* Shows the index overview page for a specific node.
*
* @param \Pterodactyl\Models\Node $node
* @return \Illuminate\View\View
*/
public function viewIndex(Node $node)
{
return view('admin.nodes.view.index', [
'node' => $this->repository->loadLocationAndServerCount($node),
'stats' => $this->repository->getUsageStats($node),
'version' => $this->versionService,
]);
}
/**
* Shows the settings page for a specific node.
*
* @param \Pterodactyl\Models\Node $node
* @return \Illuminate\View\View
*/
public function viewSettings(Node $node)
{
return view('admin.nodes.view.settings', [
'node' => $node,
'locations' => $this->locationRepository->all(),
]);
}
/**
* Shows the configuration page for a specific node.
*
* @param \Pterodactyl\Models\Node $node
* @return \Illuminate\View\View
*/
public function viewConfiguration(Node $node)
{
return view('admin.nodes.view.configuration', ['node' => $node]);
}
/**
* Shows the allocation page for a specific node.
*
* @param \Pterodactyl\Models\Node $node
* @return \Illuminate\View\View
*/
public function viewAllocation(Node $node)
{
$this->repository->loadNodeAllocations($node);
Javascript::put(['node' => collect($node)->only(['id'])]);
return view('admin.nodes.view.allocation', [
'allocations' => $this->allocationRepository->setColumns(['ip'])->getUniqueAllocationIpsForNode($node->id),
'node' => $node,
]);
}
/**
* Shows the server listing page for a specific node.
*
* @param \Pterodactyl\Models\Node $node
* @return \Illuminate\View\View
*/
public function viewServers(Node $node)
{
$servers = $this->serverRepository->loadAllServersForNode($node->id, 25);
Javascript::put([
'node' => collect($node->makeVisible('daemonSecret'))->only(['scheme', 'fqdn', 'daemonListen', 'daemonSecret']),
]);
return view('admin.nodes.view.servers', ['node' => $node, 'servers' => $servers]);
}
/**
* Updates settings for a node.
*