Don't allow access to manage page if server failed installing

This commit is contained in:
Dane Everitt 2018-05-23 22:23:26 -07:00
parent db9b80fe78
commit 0e1b4661ce
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
8 changed files with 13 additions and 7 deletions

View File

@ -376,9 +376,15 @@ class ServersController extends Controller
*
* @param \Pterodactyl\Models\Server $server
* @return \Illuminate\View\View
*
* @throws \Pterodactyl\Exceptions\DisplayException
*/
public function viewManage(Server $server)
{
if ($server->installed > 1) {
throw new DisplayException('This server is in a failed installation state and must be deleted and recreated.');
}
return view('admin.servers.view.manage', ['server' => $server]);
}

View File

@ -30,8 +30,8 @@
<li class="active"><a href="{{ route('admin.servers.view.build', $server->id) }}">Build Configuration</a></li>
<li><a href="{{ route('admin.servers.view.startup', $server->id) }}">Startup</a></li>
<li><a href="{{ route('admin.servers.view.database', $server->id) }}">Database</a></li>
<li><a href="{{ route('admin.servers.view.manage', $server->id) }}">Manage</a></li>
@endif
<li><a href="{{ route('admin.servers.view.manage', $server->id) }}">Manage</a></li>
<li class="tab-danger"><a href="{{ route('admin.servers.view.delete', $server->id) }}">Delete</a></li>
<li class="tab-success"><a href="{{ route('server.index', $server->uuidShort) }}"><i class="fa fa-external-link"></i></a></li>
</ul>

View File

@ -30,8 +30,8 @@
<li><a href="{{ route('admin.servers.view.build', $server->id) }}">Build Configuration</a></li>
<li><a href="{{ route('admin.servers.view.startup', $server->id) }}">Startup</a></li>
<li class="active"><a href="{{ route('admin.servers.view.database', $server->id) }}">Database</a></li>
<li><a href="{{ route('admin.servers.view.manage', $server->id) }}">Manage</a></li>
@endif
<li><a href="{{ route('admin.servers.view.manage', $server->id) }}">Manage</a></li>
<li class="tab-danger"><a href="{{ route('admin.servers.view.delete', $server->id) }}">Delete</a></li>
<li class="tab-success"><a href="{{ route('server.index', $server->uuidShort) }}"><i class="fa fa-external-link"></i></a></li>
</ul>

View File

@ -30,8 +30,8 @@
<li><a href="{{ route('admin.servers.view.build', $server->id) }}">Build Configuration</a></li>
<li><a href="{{ route('admin.servers.view.startup', $server->id) }}">Startup</a></li>
<li><a href="{{ route('admin.servers.view.database', $server->id) }}">Database</a></li>
<li><a href="{{ route('admin.servers.view.manage', $server->id) }}">Manage</a></li>
@endif
<li><a href="{{ route('admin.servers.view.manage', $server->id) }}">Manage</a></li>
<li class="tab-danger active"><a href="{{ route('admin.servers.view.delete', $server->id) }}">Delete</a></li>
<li class="tab-success"><a href="{{ route('server.index', $server->uuidShort) }}"><i class="fa fa-external-link"></i></a></li>
</ul>

View File

@ -30,8 +30,8 @@
<li><a href="{{ route('admin.servers.view.build', $server->id) }}">Build Configuration</a></li>
<li><a href="{{ route('admin.servers.view.startup', $server->id) }}">Startup</a></li>
<li><a href="{{ route('admin.servers.view.database', $server->id) }}">Database</a></li>
<li><a href="{{ route('admin.servers.view.manage', $server->id) }}">Manage</a></li>
@endif
<li><a href="{{ route('admin.servers.view.manage', $server->id) }}">Manage</a></li>
<li class="tab-danger"><a href="{{ route('admin.servers.view.delete', $server->id) }}">Delete</a></li>
<li class="tab-success"><a href="{{ route('server.index', $server->uuidShort) }}"><i class="fa fa-external-link"></i></a></li>
</ul>

View File

@ -29,8 +29,8 @@
<li><a href="{{ route('admin.servers.view.build', $server->id) }}">Build Configuration</a></li>
<li><a href="{{ route('admin.servers.view.startup', $server->id) }}">Startup</a></li>
<li><a href="{{ route('admin.servers.view.database', $server->id) }}">Database</a></li>
<li><a href="{{ route('admin.servers.view.manage', $server->id) }}">Manage</a></li>
@endif
<li><a href="{{ route('admin.servers.view.manage', $server->id) }}">Manage</a></li>
<li class="tab-danger"><a href="{{ route('admin.servers.view.delete', $server->id) }}">Delete</a></li>
<li class="tab-success"><a href="{{ route('server.index', $server->uuidShort) }}"><i class="fa fa-external-link"></i></a></li>
</ul>

View File

@ -30,8 +30,8 @@
<li><a href="{{ route('admin.servers.view.build', $server->id) }}">Build Configuration</a></li>
<li><a href="{{ route('admin.servers.view.startup', $server->id) }}">Startup</a></li>
<li><a href="{{ route('admin.servers.view.database', $server->id) }}">Database</a></li>
<li class="active"><a href="{{ route('admin.servers.view.manage', $server->id) }}">Manage</a></li>
@endif
<li class="active"><a href="{{ route('admin.servers.view.manage', $server->id) }}">Manage</a></li>
<li class="tab-danger"><a href="{{ route('admin.servers.view.delete', $server->id) }}">Delete</a></li>
<li class="tab-success"><a href="{{ route('server.index', $server->uuidShort) }}"><i class="fa fa-external-link"></i></a></li>
</ul>

View File

@ -30,8 +30,8 @@
<li><a href="{{ route('admin.servers.view.build', $server->id) }}">Build Configuration</a></li>
<li class="active"><a href="{{ route('admin.servers.view.startup', $server->id) }}">Startup</a></li>
<li><a href="{{ route('admin.servers.view.database', $server->id) }}">Database</a></li>
<li><a href="{{ route('admin.servers.view.manage', $server->id) }}">Manage</a></li>
@endif
<li><a href="{{ route('admin.servers.view.manage', $server->id) }}">Manage</a></li>
<li class="tab-danger"><a href="{{ route('admin.servers.view.delete', $server->id) }}">Delete</a></li>
<li class="tab-success"><a href="{{ route('server.index', $server->uuidShort) }}"><i class="fa fa-external-link"></i></a></li>
</ul>