redirect if no locations
This commit is contained in:
parent
2e88c51ac7
commit
16222d1bd7
2 changed files with 6 additions and 0 deletions
|
@ -12,6 +12,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
|
|||
### Changed
|
||||
* Prevent clicking server start button until server is completely off, not just stopping.
|
||||
* Upon successful creation of a node it will redirect to the allocation tab and display a clearer message to add allocations.
|
||||
* Trying to add a new node if no location exists redirects user to location management page and alerts them to add a location first.
|
||||
|
||||
### Fixed
|
||||
* Team Fortress named 'Insurgency' in panel in database seeder. ([#96](https://github.com/Pterodactyl/Panel/issues/96), PR by [@MeltedLux](https://github.com/MeltedLux))
|
||||
|
|
|
@ -65,6 +65,11 @@ class NodesController extends Controller
|
|||
|
||||
public function getNew(Request $request)
|
||||
{
|
||||
if (!Models\Location::all()->count()) {
|
||||
Alert::warning('You must add a location before you can add a new node.')->flash();
|
||||
return redirect()->route('admin.locations');
|
||||
}
|
||||
|
||||
return view('admin.nodes.new', [
|
||||
'locations' => Models\Location::all()
|
||||
]);
|
||||
|
|
Loading…
Reference in a new issue