forked from Alex/Pterodactyl-Panel
The nodes create page will redirect you to the locations page if you don't have a location, the concept is the same here (#640)
This commit is contained in:
parent
7c41a6965b
commit
0f07d6bcf5
@ -226,6 +226,13 @@ class ServersController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
|
$nodes = $this->nodeRepository->all();
|
||||||
|
if (count($nodes) < 1) {
|
||||||
|
$this->alert->warning(trans('admin/server.alerts.node_required'))->flash();
|
||||||
|
|
||||||
|
return redirect()->route('admin.nodes');
|
||||||
|
}
|
||||||
|
|
||||||
$services = $this->serviceRepository->getWithOptions();
|
$services = $this->serviceRepository->getWithOptions();
|
||||||
|
|
||||||
Javascript::put([
|
Javascript::put([
|
||||||
|
@ -41,5 +41,6 @@ return [
|
|||||||
'server_reinstalled' => 'This server has been queued for a reinstallation beginning now.',
|
'server_reinstalled' => 'This server has been queued for a reinstallation beginning now.',
|
||||||
'details_updated' => 'Server details have been successfully updated.',
|
'details_updated' => 'Server details have been successfully updated.',
|
||||||
'docker_image_updated' => 'Successfully changed the default Docker image to use for this server. A reboot is required to apply this change.',
|
'docker_image_updated' => 'Successfully changed the default Docker image to use for this server. A reboot is required to apply this change.',
|
||||||
|
'node_required' => 'You must have at least one node configured before you can add a server to this panel.',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user