Path: blob/1.0-develop/resources/views/admin/databases/view.blade.php
7460 views
@extends('layouts.admin')12@section('title')3Database Hosts → View → {{ $host->name }}4@endsection56@section('content-header')7<h1>{{ $host->name }}<small>Viewing associated databases and details for this database host.</small></h1>8<ol class="breadcrumb">9<li><a href="{{ route('admin.index') }}">Admin</a></li>10<li><a href="{{ route('admin.databases') }}">Database Hosts</a></li>11<li class="active">{{ $host->name }}</li>12</ol>13@endsection1415@section('content')16<form action="{{ route('admin.databases.view', $host->id) }}" method="POST">17<div class="row">18<div class="col-sm-6">19<div class="box box-primary">20<div class="box-header with-border">21<h3 class="box-title">Host Details</h3>22</div>23<div class="box-body">24<div class="form-group">25<label for="pName" class="form-label">Name</label>26<input type="text" id="pName" name="name" class="form-control" value="{{ old('name', $host->name) }}" />27</div>28<div class="form-group">29<label for="pHost" class="form-label">Host</label>30<input type="text" id="pHost" name="host" class="form-control" value="{{ old('host', $host->host) }}" />31<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>32</div>33<div class="form-group">34<label for="pPort" class="form-label">Port</label>35<input type="text" id="pPort" name="port" class="form-control" value="{{ old('port', $host->port) }}" />36<p class="text-muted small">The port that MySQL is running on for this host.</p>37</div>38<div class="form-group">39<label for="pNodeId" class="form-label">Linked Node</label>40<select name="node_id" id="pNodeId" class="form-control">41<option value="">None</option>42@foreach($locations as $location)43<optgroup label="{{ $location->short }}">44@foreach($location->nodes as $node)45<option value="{{ $node->id }}" {{ $host->node_id !== $node->id ?: 'selected' }}>{{ $node->name }}</option>46@endforeach47</optgroup>48@endforeach49</select>50<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>51</div>52</div>53</div>54</div>55<div class="col-sm-6">56<div class="box box-primary">57<div class="box-header with-border">58<h3 class="box-title">User Details</h3>59</div>60<div class="box-body">61<div class="form-group">62<label for="pUsername" class="form-label">Username</label>63<input type="text" name="username" id="pUsername" class="form-control" value="{{ old('username', $host->username) }}" />64<p class="text-muted small">The username of an account that has enough permissions to create new users and databases on the system.</p>65</div>66<div class="form-group">67<label for="pPassword" class="form-label">Password</label>68<input type="password" name="password" id="pPassword" class="form-control" />69<p class="text-muted small">The password to the account defined. Leave blank to continue using the assigned password.</p>70</div>71<hr />72<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>73</div>74<div class="box-footer">75{!! csrf_field() !!}76<button name="_method" value="PATCH" class="btn btn-sm btn-primary pull-right">Save</button>77<button name="_method" value="DELETE" class="btn btn-sm btn-danger pull-left muted muted-hover"><i class="fa fa-trash-o"></i></button>78</div>79</div>80</div>81</div>82</form>83<div class="row">84<div class="col-xs-12">85<div class="box">86<div class="box-header with-border">87<h3 class="box-title">Databases</h3>88</div>89<div class="box-body table-responsive no-padding">90<table class="table table-hover">91<tr>92<th>Server</th>93<th>Database Name</th>94<th>Username</th>95<th>Connections From</th>96<th>Max Connections</th>97<th></th>98</tr>99@foreach($databases as $database)100<tr>101<td class="middle"><a href="{{ route('admin.servers.view', $database->getRelation('server')->id) }}">{{ $database->getRelation('server')->name }}</a></td>102<td class="middle">{{ $database->database }}</td>103<td class="middle">{{ $database->username }}</td>104<td class="middle">{{ $database->remote }}</td>105@if($database->max_connections != null)106<td class="middle">{{ $database->max_connections }}</td>107@else108<td class="middle">Unlimited</td>109@endif110<td class="text-center">111<a href="{{ route('admin.servers.view.database', $database->getRelation('server')->id) }}">112<button class="btn btn-xs btn-primary">Manage</button>113</a>114</td>115</tr>116@endforeach117</table>118</div>119@if($databases->hasPages())120<div class="box-footer with-border">121<div class="col-md-12 text-center">{!! $databases->render() !!}</div>122</div>123@endif124</div>125</div>126</div>127@endsection128129@section('footer-scripts')130@parent131<script>132$('#pNodeId').select2();133</script>134@endsection135136137