Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/resources/views/admin/servers/view/manage.blade.php
7461 views
1
@extends('layouts.admin')
2
3
@section('title')
4
Server — {{ $server->name }}: Manage
5
@endsection
6
7
@section('content-header')
8
<h1>{{ $server->name }}<small>Additional actions to control this server.</small></h1>
9
<ol class="breadcrumb">
10
<li><a href="{{ route('admin.index') }}">Admin</a></li>
11
<li><a href="{{ route('admin.servers') }}">Servers</a></li>
12
<li><a href="{{ route('admin.servers.view', $server->id) }}">{{ $server->name }}</a></li>
13
<li class="active">Manage</li>
14
</ol>
15
@endsection
16
17
@section('content')
18
@include('admin.servers.partials.navigation')
19
<div class="row">
20
<div class="col-sm-4">
21
<div class="box box-danger">
22
<div class="box-header with-border">
23
<h3 class="box-title">Reinstall Server</h3>
24
</div>
25
<div class="box-body">
26
<p>This will reinstall the server with the assigned service scripts. <strong>Danger!</strong> This could overwrite server data.</p>
27
</div>
28
<div class="box-footer">
29
@if($server->isInstalled())
30
<form action="{{ route('admin.servers.view.manage.reinstall', $server->id) }}" method="POST">
31
{!! csrf_field() !!}
32
<button type="submit" class="btn btn-danger">Reinstall Server</button>
33
</form>
34
@else
35
<button class="btn btn-danger disabled">Server Must Install Properly to Reinstall</button>
36
@endif
37
</div>
38
</div>
39
</div>
40
<div class="col-sm-4">
41
<div class="box box-primary">
42
<div class="box-header with-border">
43
<h3 class="box-title">Install Status</h3>
44
</div>
45
<div class="box-body">
46
<p>If you need to change the install status from uninstalled to installed, or vice versa, you may do so with the button below.</p>
47
</div>
48
<div class="box-footer">
49
<form action="{{ route('admin.servers.view.manage.toggle', $server->id) }}" method="POST">
50
{!! csrf_field() !!}
51
<button type="submit" class="btn btn-primary">Toggle Install Status</button>
52
</form>
53
</div>
54
</div>
55
</div>
56
57
@if(! $server->isSuspended())
58
<div class="col-sm-4">
59
<div class="box box-warning">
60
<div class="box-header with-border">
61
<h3 class="box-title">Suspend Server</h3>
62
</div>
63
<div class="box-body">
64
<p>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.</p>
65
</div>
66
<div class="box-footer">
67
<form action="{{ route('admin.servers.view.manage.suspension', $server->id) }}" method="POST">
68
{!! csrf_field() !!}
69
<input type="hidden" name="action" value="suspend" />
70
<button type="submit" class="btn btn-warning @if(! is_null($server->transfer)) disabled @endif">Suspend Server</button>
71
</form>
72
</div>
73
</div>
74
</div>
75
@else
76
<div class="col-sm-4">
77
<div class="box box-success">
78
<div class="box-header with-border">
79
<h3 class="box-title">Unsuspend Server</h3>
80
</div>
81
<div class="box-body">
82
<p>This will unsuspend the server and restore normal user access.</p>
83
</div>
84
<div class="box-footer">
85
<form action="{{ route('admin.servers.view.manage.suspension', $server->id) }}" method="POST">
86
{!! csrf_field() !!}
87
<input type="hidden" name="action" value="unsuspend" />
88
<button type="submit" class="btn btn-success">Unsuspend Server</button>
89
</form>
90
</div>
91
</div>
92
</div>
93
@endif
94
95
@if(is_null($server->transfer))
96
<div class="col-sm-4">
97
<div class="box box-success">
98
<div class="box-header with-border">
99
<h3 class="box-title">Transfer Server</h3>
100
</div>
101
<div class="box-body">
102
<p>
103
Transfer this server to another node connected to this panel.
104
<strong>Warning!</strong> This feature has not been fully tested and may have bugs.
105
</p>
106
</div>
107
108
<div class="box-footer">
109
@if($canTransfer)
110
<button class="btn btn-success" data-toggle="modal" data-target="#transferServerModal">Transfer Server</button>
111
@else
112
<button class="btn btn-success disabled">Transfer Server</button>
113
<p style="padding-top: 1rem;">Transferring a server requires more than one node to be configured on your panel.</p>
114
@endif
115
</div>
116
</div>
117
</div>
118
@else
119
<div class="col-sm-4">
120
<div class="box box-success">
121
<div class="box-header with-border">
122
<h3 class="box-title">Transfer Server</h3>
123
</div>
124
<div class="box-body">
125
<p>
126
This server is currently being transferred to another node.
127
Transfer was initiated at <strong>{{ $server->transfer->created_at }}</strong>
128
</p>
129
</div>
130
131
<div class="box-footer">
132
<button class="btn btn-success disabled">Transfer Server</button>
133
</div>
134
</div>
135
</div>
136
@endif
137
</div>
138
139
<div class="modal fade" id="transferServerModal" tabindex="-1" role="dialog">
140
<div class="modal-dialog" role="document">
141
<div class="modal-content">
142
<form action="{{ route('admin.servers.view.manage.transfer', $server->id) }}" method="POST">
143
<div class="modal-header">
144
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
145
<h4 class="modal-title">Transfer Server</h4>
146
</div>
147
148
<div class="modal-body">
149
<div class="row">
150
<div class="form-group col-md-12">
151
<label for="pNodeId">Node</label>
152
<select name="node_id" id="pNodeId" class="form-control">
153
@foreach($locations as $location)
154
<optgroup label="{{ $location->long }} ({{ $location->short }})">
155
@foreach($location->nodes as $node)
156
157
@if($node->id != $server->node_id)
158
<option value="{{ $node->id }}"
159
@if($location->id === old('location_id')) selected @endif
160
>{{ $node->name }}</option>
161
@endif
162
163
@endforeach
164
</optgroup>
165
@endforeach
166
</select>
167
<p class="small text-muted no-margin">The node which this server will be transferred to.</p>
168
</div>
169
170
<div class="form-group col-md-12">
171
<label for="pAllocation">Default Allocation</label>
172
<select name="allocation_id" id="pAllocation" class="form-control"></select>
173
<p class="small text-muted no-margin">The main allocation that will be assigned to this server.</p>
174
</div>
175
176
<div class="form-group col-md-12">
177
<label for="pAllocationAdditional">Additional Allocation(s)</label>
178
<select name="allocation_additional[]" id="pAllocationAdditional" class="form-control" multiple></select>
179
<p class="small text-muted no-margin">Additional allocations to assign to this server on creation.</p>
180
</div>
181
</div>
182
</div>
183
184
<div class="modal-footer">
185
{!! csrf_field() !!}
186
<button type="button" class="btn btn-default btn-sm pull-left" data-dismiss="modal">Cancel</button>
187
<button type="submit" class="btn btn-success btn-sm">Confirm</button>
188
</div>
189
</form>
190
</div>
191
</div>
192
</div>
193
@endsection
194
195
@section('footer-scripts')
196
@parent
197
{!! Theme::js('vendor/lodash/lodash.js') !!}
198
199
@if($canTransfer)
200
{!! Theme::js('js/admin/server/transfer.js') !!}
201
@endif
202
@endsection
203
204