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
2 changed files with 8 additions and 0 deletions
|
@ -226,6 +226,13 @@ class ServersController extends Controller
|
|||
*/
|
||||
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();
|
||||
|
||||
Javascript::put([
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue