Add mounts page to server admin view
This commit is contained in:
parent
34f718a8b1
commit
fa902cc074
9 changed files with 151 additions and 17 deletions
|
@ -29,6 +29,11 @@
|
|||
|
||||
<form action="{{ route('admin.mounts.view', $mount->id) }}" method="POST">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="PUniqueID" class="form-label">Unique ID</label>
|
||||
<input type="text" id="PUniqueID" class="form-control" value="{{ $mount->uuid }}" disabled />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="pName" class="form-label">Name</label>
|
||||
<input type="text" id="pName" name="name" class="form-control" value="{{ $mount->name }}" />
|
||||
|
@ -117,8 +122,8 @@
|
|||
|
||||
@foreach ($mount->eggs as $egg)
|
||||
<tr>
|
||||
<td><code>{{ $egg->id }}</code></td>
|
||||
<td><a href="{{ route('admin.nests.egg.view', $egg->id) }}">{{ $egg->name }}</a></td>
|
||||
<td class="col-sm-2 middle"><code>{{ $egg->id }}</code></td>
|
||||
<td class="middle"><a href="{{ route('admin.nests.egg.view', $egg->id) }}">{{ $egg->name }}</a></td>
|
||||
<td class="col-sm-1 middle">
|
||||
<button data-action="detach-egg" data-id="{{ $egg->id }}" class="btn btn-sm btn-danger"><i class="fa fa-trash-o"></i></button>
|
||||
</td>
|
||||
|
@ -148,9 +153,9 @@
|
|||
|
||||
@foreach ($mount->nodes as $node)
|
||||
<tr>
|
||||
<td><code>{{ $node->id }}</code></td>
|
||||
<td><a href="{{ route('admin.nodes.view', $node->id) }}">{{ $node->name }}</a></td>
|
||||
<td><code>{{ $node->fqdn }}</code></td>
|
||||
<td class="col-sm-2 middle"><code>{{ $node->id }}</code></td>
|
||||
<td class="middle"><a href="{{ route('admin.nodes.view', $node->id) }}">{{ $node->name }}</a></td>
|
||||
<td class="middle"><code>{{ $node->fqdn }}</code></td>
|
||||
<td class="col-sm-1 middle">
|
||||
<button data-action="detach-node" data-id="{{ $node->id }}" class="btn btn-sm btn-danger"><i class="fa fa-trash-o"></i></button>
|
||||
</td>
|
||||
|
@ -254,7 +259,7 @@
|
|||
@section('footer-scripts')
|
||||
@parent
|
||||
|
||||
<script type="application/javascript">
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#pEggs').select2({
|
||||
placeholder: 'Select eggs..',
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
<li class="{{ $router->currentRouteNamed('admin.servers.view.database') ? 'active' : '' }}">
|
||||
<a href="{{ route('admin.servers.view.database', $server->id) }}">Database</a>
|
||||
</li>
|
||||
<li class="{{ $router->currentRouteNamed('admin.servers.view.mounts') ? 'active' : '' }}">
|
||||
<a href="{{ route('admin.servers.view.mounts', $server->id) }}">Mounts</a>
|
||||
</li>
|
||||
@endif
|
||||
<li class="{{ $router->currentRouteNamed('admin.servers.view.manage') ? 'active' : '' }}">
|
||||
<a href="{{ route('admin.servers.view.manage', $server->id) }}">Manage</a>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<th>Username</th>
|
||||
<th>Connections From</th>
|
||||
<th>Host</th>
|
||||
<th>Max Conenctions</th>
|
||||
<th>Max Connections</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@foreach($server->databases as $database)
|
||||
|
|
70
resources/views/admin/servers/view/mounts.blade.php
Normal file
70
resources/views/admin/servers/view/mounts.blade.php
Normal file
|
@ -0,0 +1,70 @@
|
|||
@extends('layouts.admin')
|
||||
|
||||
@section('title')
|
||||
Server — {{ $server->name }}: Mounts
|
||||
@endsection
|
||||
|
||||
@section('content-header')
|
||||
<h1>{{ $server->name }}<small>Manage server mounts.</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">Mounts</li>
|
||||
</ol>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
@include('admin.servers.partials.navigation')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Available Mounts</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-body table-responsible no-padding">
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>Source</th>
|
||||
<th>Target</th>
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@foreach ($mounts as $mount)
|
||||
<tr>
|
||||
<td class="col-sm-1 middle"><code>{{ $mount->id }}</code></td>
|
||||
<td class="middle"><a href="{{ route('admin.mounts.view', $mount->id) }}">{{ $mount->name }}</a></td>
|
||||
<td class="middle"><code>{{ $mount->source }}</code></td>
|
||||
<td class="col-sm-2 middle"><code>{{ $mount->target }}</code></td>
|
||||
<td class="col-sm-2 middle">
|
||||
@if ($mount->id == 2)
|
||||
<span class="label label-primary">Unmounted</span>
|
||||
@else
|
||||
<span class="label label-success">Mounted</span>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td class="col-sm-1 middle">
|
||||
@if ($mount->id == 2)
|
||||
<button data-action="mount" data-id="{{ $mount->id }}" class="btn btn-xs btn-success"><i class="fa fa-plus"></i></button>
|
||||
@else
|
||||
<button data-action="unmount" data-id="{{ $mount->id }}" class="btn btn-xs btn-danger"><i class="fa fa-times"></i></button>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
@endsection
|
Loading…
Add table
Add a link
Reference in a new issue