2020-05-21 19:19:59 +00:00
|
|
|
@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>
|
2020-05-21 20:23:12 +00:00
|
|
|
|
|
|
|
@if (! in_array($mount->id, $server->mounts->pluck('id')->toArray()))
|
|
|
|
<td class="col-sm-2 middle">
|
2020-05-21 19:19:59 +00:00
|
|
|
<span class="label label-primary">Unmounted</span>
|
2020-05-21 20:23:12 +00:00
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="col-sm-1 middle">
|
2022-05-30 15:33:42 +00:00
|
|
|
<form action="{{ route('admin.servers.view.mounts.store', [ 'server' => $server->id ]) }}" method="POST">
|
2020-05-21 20:23:12 +00:00
|
|
|
{!! csrf_field() !!}
|
2022-05-30 15:33:42 +00:00
|
|
|
<input type="hidden" value="{{ $mount->id }}" name="mount_id" />
|
2020-05-21 20:23:12 +00:00
|
|
|
<button type="submit" class="btn btn-xs btn-success"><i class="fa fa-plus"></i></button>
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
@else
|
|
|
|
<td class="col-sm-2 middle">
|
2020-05-21 19:19:59 +00:00
|
|
|
<span class="label label-success">Mounted</span>
|
2020-05-21 20:23:12 +00:00
|
|
|
</td>
|
2020-05-21 19:19:59 +00:00
|
|
|
|
2020-05-21 20:23:12 +00:00
|
|
|
<td class="col-sm-1 middle">
|
2022-05-30 15:33:42 +00:00
|
|
|
<form action="{{ route('admin.servers.view.mounts.delete', [ 'server' => $server->id, 'mount' => $mount->id ]) }}" method="POST">
|
2020-05-21 20:23:12 +00:00
|
|
|
@method('DELETE')
|
|
|
|
{!! csrf_field() !!}
|
|
|
|
|
|
|
|
<button type="submit" class="btn btn-xs btn-danger"><i class="fa fa-times"></i></button>
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
@endif
|
2020-05-21 19:19:59 +00:00
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|