misc_pterodactyl-panel/resources/themes/pterodactyl/admin/servers/view/delete.blade.php
2017-03-04 19:03:49 -05:00

141 lines
7.4 KiB
PHP

{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
{{-- 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. --}}
@extends('layouts.admin')
@section('title')
Server {{ $server->name }}: Delete
@endsection
@section('content-header')
<h1>{{ $server->name }}<small>Delete this server from the panel.</small></h1>
<ol class="breadcrumb">
<li><a href="{{ route('admin.index') }}">Admin</a></li>
<li><a href="{{ route('admin.servers') }}">Servers</a></li>
<li><a href="{{ route('admin.servers.view', $server->id) }}">{{ $server->name }}</a></li>
<li class="active">Delete</li>
</ol>
@endsection
@section('content')
<div class="row">
<div class="col-xs-12">
<div class="nav-tabs-custom nav-tabs-floating">
<ul class="nav nav-tabs">
<li><a href="{{ route('admin.servers.view', $server->id) }}">About</a></li>
@if(! $server->trashed() && $server->installed === 1)
<li><a href="{{ route('admin.servers.view.details', $server->id) }}">Details</a></li>
<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>
@endif
@if(! $server->trashed())
<li><a href="{{ route('admin.servers.view.manage', $server->id) }}">Manage</a></li>
@endif
<li class="tab-danger active"><a href="{{ route('admin.servers.view.delete', $server->id) }}">Delete</a></li>
</ul>
</div>
</div>
</div>
<div class="row">
@if($server->trashed())
<div class="col-xs-12">
<div class="box box-danger">
<div class="box-header with-border">
<h3 class="box-title">Marked for Deletion</h3>
</div>
<div class="box-body">
<p>This server is currently marked for deletion by the system <strong>{{ Carbon::parse($server->deleted_at)->addMinutes(env('APP_DELETE_MINUTES', 10))->diffForHumans() }}</strong>.</p>
<p class="text-danger small">Deleting a server is an irreversible action. <strong>All server data</strong> (including files and users) will be removed from the system.</p>
</div>
<div class="box-footer">
<form action="{{ route('admin.servers.view.delete.cancel', $server->id) }}" method="POST" style="display:inline;">
{!! csrf_field() !!}
<button type="submit" class="btn btn-default btn-sm">Cancel Deletion Request</button>
</form>
<form data-action="delete" action="{{ route('admin.servers.view.delete.continue', ['id' => $server->id, 'force' => 'force']) }}" method="POST" style="display:inline;">
{!! csrf_field() !!}
<button type="submit" class="btn btn-danger btn-sm pull-right"><strong>Forcibly</strong> Delete Now</button>
</form>
<form data-action="delete" action="{{ route('admin.servers.view.delete.continue', $server->id) }}" method="POST" style="display:inline">
{!! csrf_field() !!}
<button type="submit" class="btn btn-danger btn-sm pull-right" style="margin-right:10px;">Safely Delete Now</button>
</form>
</div>
</div>
</div>
@endif
<div class="col-xs-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">Safely Delete Server</h3>
</div>
<div class="box-body">
<p>This action will attempt to delete the server from both the panel and daemon. If either one reports an error the action will be cancelled.</p>
<p class="text-danger small">Deleting a server is an irreversible action. <strong>All server data</strong> (including files and users) will be removed from the system.</p>
</div>
<div class="box-footer">
<form action="{{ route('admin.servers.view.delete', $server->id) }}" method="POST">
{!! csrf_field() !!}
<input type="hidden" name="is_force" value="0" />
<button type="submit" class="btn btn-danger">Safely Delete This Server</button>
</form>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="box box-danger">
<div class="box-header with-border">
<h3 class="box-title">Force Delete Server</h3>
</div>
<div class="box-body">
<p>This action will attempt to delete the server from both the panel and daemon. The the daemon does not respond, or reports an error the deletion will continue.</p>
<p class="text-danger small">Deleting a server is an irreversible action. <strong>All server data</strong> (including files and users) will be removed from the system. This method may leave dangling files on your daemon if it reports an error.</p>
</div>
<div class="box-footer">
<form action="{{ route('admin.servers.view.delete', $server->id) }}" method="POST">
{!! csrf_field() !!}
<input type="hidden" name="is_force" value="1" />
<button type="submit" class="btn btn-danger">Forcibly Delete This Server</button>
</form>
</div>
</div>
</div>
</div>
@endsection
@section('footer-scripts')
@parent
<script>
$('form[data-action="delete"]').submit(function (event) {
event.preventDefault();
swal({
title: '',
type: 'warning',
text: 'Are you sure that you want to delete this server? There is no going back, all data will immediately be removed.',
showCancelButton: true,
confirmButtonText: 'Delete',
confirmButtonColor: '#d9534f',
closeOnConfirm: false
}, function () {
event.target.submit();
});
});
</script>
@endsection