[L6] Move all of the template files into the new correct location
This commit is contained in:
parent
1c5b9dbb87
commit
c97461d602
83 changed files with 0 additions and 0 deletions
135
resources/views/admin/databases/index.blade.php
Normal file
135
resources/views/admin/databases/index.blade.php
Normal file
|
@ -0,0 +1,135 @@
|
|||
{{-- Pterodactyl - Panel --}}
|
||||
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
|
||||
|
||||
{{-- This software is licensed under the terms of the MIT license. --}}
|
||||
{{-- https://opensource.org/licenses/MIT --}}
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title')
|
||||
Database Hosts
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>Database Hosts<small>Database hosts that servers can have databases created on.</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('admin.index') }}">Admin</a></li>
|
||||
<li class="active">Database Hosts</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Host List</h3>
|
||||
<div class="box-tools">
|
||||
<button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#newHostModal">Create New</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>Host</th>
|
||||
<th>Port</th>
|
||||
<th>Username</th>
|
||||
<th class="text-center">Databases</th>
|
||||
<th class="text-center">Node</th>
|
||||
</tr>
|
||||
@foreach ($hosts as $host)
|
||||
<tr>
|
||||
<td><code>{{ $host->id }}</code></td>
|
||||
<td><a href="{{ route('admin.databases.view', $host->id) }}">{{ $host->name }}</a></td>
|
||||
<td><code>{{ $host->host }}</code></td>
|
||||
<td><code>{{ $host->port }}</code></td>
|
||||
<td>{{ $host->username }}</td>
|
||||
<td class="text-center">{{ $host->databases_count }}</td>
|
||||
<td class="text-center">
|
||||
@if(! is_null($host->node))
|
||||
<a href="{{ route('admin.nodes.view', $host->node->id) }}">{{ $host->node->name }}</a>
|
||||
@else
|
||||
<span class="label label-default">None</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="newHostModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<form action="{{ route('admin.databases') }}" method="POST">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Create New Database Host</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="pName" class="form-label">Name</label>
|
||||
<input type="text" name="name" id="pName" class="form-control" />
|
||||
<p class="text-muted small">A short identifier used to distinguish this location from others. Must be between 1 and 60 characters, for example, <code>us.nyc.lvl3</code>.</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label for="pHost" class="form-label">Host</label>
|
||||
<input type="text" name="host" id="pHost" class="form-control" />
|
||||
<p class="text-muted small">The IP address or FQDN that should be used when attempting to connect to this MySQL host <em>from the panel</em> to add new databases.</p>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="pPort" class="form-label">Port</label>
|
||||
<input type="text" name="port" id="pPort" class="form-control" value="3306"/>
|
||||
<p class="text-muted small">The port that MySQL is running on for this host.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label for="pUsername" class="form-label">Username</label>
|
||||
<input type="text" name="username" id="pUsername" class="form-control" />
|
||||
<p class="text-muted small">The username of an account that has enough permissions to create new users and databases on the system.</p>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="pPassword" class="form-label">Password</label>
|
||||
<input type="password" name="password" id="pPassword" class="form-control" />
|
||||
<p class="text-muted small">The password to the account defined.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pNodeId" class="form-label">Linked Node</label>
|
||||
<select name="node_id" id="pNodeId" class="form-control">
|
||||
<option value="">None</option>
|
||||
@foreach($locations as $location)
|
||||
<optgroup label="{{ $location->short }}">
|
||||
@foreach($location->nodes as $node)
|
||||
<option value="{{ $node->id }}">{{ $node->name }}</option>
|
||||
@endforeach
|
||||
</optgroup>
|
||||
@endforeach
|
||||
</select>
|
||||
<p class="text-muted small">This setting does nothing other than default to this database host when adding a database to a server on the selected node.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<p class="text-danger small text-left">The account defined for this database host <strong>must</strong> have the <code>WITH GRANT OPTION</code> permission. If the defined account does not have this permission requests to create databases <em>will</em> fail. <strong>Do not use the same account details for MySQL that you have defined for this panel.</strong></p>
|
||||
{!! csrf_field() !!}
|
||||
<button type="button" class="btn btn-default btn-sm pull-left" data-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-success btn-sm">Create</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
<script>
|
||||
$('#pNodeId').select2();
|
||||
</script>
|
||||
@endsection
|
134
resources/views/admin/databases/view.blade.php
Normal file
134
resources/views/admin/databases/view.blade.php
Normal file
|
@ -0,0 +1,134 @@
|
|||
{{-- Pterodactyl - Panel --}}
|
||||
{{-- Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com> --}}
|
||||
|
||||
{{-- This software is licensed under the terms of the MIT license. --}}
|
||||
{{-- https://opensource.org/licenses/MIT --}}
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title')
|
||||
Database Hosts → View → {{ $host->name }}
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>{{ $host->name }}<small>Viewing associated databases and details for this database host.</small></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('admin.index') }}">Admin</a></li>
|
||||
<li><a href="{{ route('admin.databases') }}">Database Hosts</a></li>
|
||||
<li class="active">{{ $host->name }}</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<form action="{{ route('admin.databases.view', $host->id) }}" method="POST">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Host Details</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="pName" class="form-label">Name</label>
|
||||
<input type="text" id="pName" name="name" class="form-control" value="{{ old('name', $host->name) }}" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pHost" class="form-label">Host</label>
|
||||
<input type="text" id="pHost" name="host" class="form-control" value="{{ old('host', $host->host) }}" />
|
||||
<p class="text-muted small">The IP address or FQDN that should be used when attempting to connect to this MySQL host <em>from the panel</em> to add new databases.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pPort" class="form-label">Port</label>
|
||||
<input type="text" id="pPort" name="port" class="form-control" value="{{ old('port', $host->port) }}" />
|
||||
<p class="text-muted small">The port that MySQL is running on for this host.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pNodeId" class="form-label">Linked Node</label>
|
||||
<select name="node_id" id="pNodeId" class="form-control">
|
||||
<option value="0">None</option>
|
||||
@foreach($locations as $location)
|
||||
<optgroup label="{{ $location->short }}">
|
||||
@foreach($location->nodes as $node)
|
||||
<option value="{{ $node->id }}" {{ $host->node_id !== $node->id ?: 'selected' }}>{{ $node->name }}</option>
|
||||
@endforeach
|
||||
</optgroup>
|
||||
@endforeach
|
||||
</select>
|
||||
<p class="text-muted small">This setting does nothing other than default to this database host when adding a database to a server on the selected node.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">User Details</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="pUsername" class="form-label">Username</label>
|
||||
<input type="text" name="username" id="pUsername" class="form-control" value="{{ old('username', $host->username) }}" />
|
||||
<p class="text-muted small">The username of an account that has enough permissions to create new users and databases on the system.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pPassword" class="form-label">Password</label>
|
||||
<input type="password" name="password" id="pPassword" class="form-control" />
|
||||
<p class="text-muted small">The password to the account defined. Leave blank to continue using the assigned password.</p>
|
||||
</div>
|
||||
<hr />
|
||||
<p class="text-danger small text-left">The account defined for this database host <strong>must</strong> have the <code>WITH GRANT OPTION</code> permission. If the defined account does not have this permission requests to create databases <em>will</em> fail. <strong>Do not use the same account details for MySQL that you have defined for this panel.</strong></p>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! csrf_field() !!}
|
||||
<button name="_method" value="PATCH" class="btn btn-sm btn-primary pull-right">Save</button>
|
||||
<button name="_method" value="DELETE" class="btn btn-sm btn-danger pull-left muted muted-hover"><i class="fa fa-trash-o"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Databases</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<th>Server</th>
|
||||
<th>Database Name</th>
|
||||
<th>Username</th>
|
||||
<th>Connections From</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@foreach($databases as $database)
|
||||
<tr>
|
||||
<td class="middle"><a href="{{ route('admin.servers.view', $database->getRelation('server')->id) }}">{{ $database->getRelation('server')->name }}</a></td>
|
||||
<td class="middle">{{ $database->database }}</td>
|
||||
<td class="middle">{{ $database->username }}</td>
|
||||
<td class="middle">{{ $database->remote }}</td>
|
||||
<td class="text-center">
|
||||
<a href="{{ route('admin.servers.view.database', $database->getRelation('server')->id) }}">
|
||||
<button class="btn btn-xs btn-primary">Manage</button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
@if($databases->hasPages())
|
||||
<div class="box-footer with-border">
|
||||
<div class="col-md-12 text-center">{!! $databases->render() !!}</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
<script>
|
||||
$('#pNodeId').select2();
|
||||
</script>
|
||||
@endsection
|
Reference in a new issue