File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
app/Http/Controllers/Admin Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,13 @@ public function index()
226226 */
227227 public function create ()
228228 {
229+ $ nodes = $ this ->nodeRepository ->all ();
230+ if (count ($ nodes ) < 1 ) {
231+ $ this ->alert ->warning (trans ('admin/server.alerts.node_required ' ))->flash ();
232+
233+ return redirect ()->route ('admin.nodes ' );
234+ }
235+
229236 $ services = $ this ->serviceRepository ->getWithOptions ();
230237
231238 Javascript::put ([
Original file line number Diff line number Diff line change 4141 'server_reinstalled ' => 'This server has been queued for a reinstallation beginning now. ' ,
4242 'details_updated ' => 'Server details have been successfully updated. ' ,
4343 'docker_image_updated ' => 'Successfully changed the default Docker image to use for this server. A reboot is required to apply this change. ' ,
44+ 'node_required ' => 'You must have at least one node configured before you can add a server to this panel. ' ,
4445 ],
4546];
You can’t perform that action at this time.
0 commit comments