diff --git a/public/themes/pterodactyl/js/admin/functions.js b/public/themes/pterodactyl/js/admin/functions.js new file mode 100644 index 00000000..26115cd4 --- /dev/null +++ b/public/themes/pterodactyl/js/admin/functions.js @@ -0,0 +1,23 @@ +// Copyright (c) 2015 - 2017 Dane Everitt +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +$.urlParam=function(name){var results=new RegExp("[\\?&]"+name+"=([^&#]*)").exec(decodeURIComponent(window.location.href));if(results==null){return null}else{return results[1]||0}};function getPageName(url){var index=url.lastIndexOf("/")+1;var filenameWithExtension=url.substr(index);var filename=filenameWithExtension.split(".")[0];return filename} +// Remeber Active Tab and Navigate to it on Reload +for(var queryParameters={},queryString=location.search.substring(1),re=/([^&=]+)=([^&]*)/g,m;m=re.exec(queryString);)queryParameters[decodeURIComponent(m[1])]=decodeURIComponent(m[2]);$("a[data-toggle='tab']").click(function(){queryParameters.tab=$(this).attr("href").substring(1),window.history.pushState(null,null,location.pathname+"?"+$.param(queryParameters))}); +if($.urlParam('tab') != null){$('.nav.nav-tabs a[href="#' + $.urlParam('tab') + '"]').tab('show');} diff --git a/resources/themes/pterodactyl/admin/servers/view.blade.php b/resources/themes/pterodactyl/admin/servers/view.blade.php index 85a74536..5818f951 100644 --- a/resources/themes/pterodactyl/admin/servers/view.blade.php +++ b/resources/themes/pterodactyl/admin/servers/view.blade.php @@ -293,13 +293,70 @@ {{-- End Database / Start Manage --}} @if($server->installed !== 2)
- Manage +
+
+
+ {!! csrf_field() !!} + +

This will toggle the install status for the server.

+
+
+
+
+ {!! csrf_field() !!} + +

This will trigger a rebuild of the server container when it next starts up. This is useful if you modified the server configuration file manually, or something just didn't work out correctly.

+
+
+
+ @if(! $server->suspended) +
+ {!! csrf_field() !!} + +

This will suspend the server, stop any running processes, and immediately block the user from being able to access their files or otherwise manage the server through the panel or API.

+
+ @else +
+ {!! csrf_field() !!} + +

This will unsuspend the server and restore normal user access.

+
+ @endif +
+
@endif {{-- End Manage / Start Delete --}} @if(! $server->trashed())
- Delete +
+ @if($server->installed) +
+
+ {!! csrf_field() !!} + {!! method_field('DELETE') !!} + +
+

+

+ Deleting a server is an irreversible action. All data will be immediately removed relating to this server. +
+

+
+ @endif +
+
+ {!! csrf_field() !!} + {!! method_field('DELETE') !!} + +
+

+

+ This is the same as deleting a server, however, if an error is returned by the daemon it is ignored and the server is still removed from the panel. +
+

+
+
@endif {{-- End Delete --}} @@ -312,6 +369,20 @@ @section('footer-scripts') @parent