Completed model updates for Services
This commit is contained in:
parent
09d23deed6
commit
323f1d943f
26 changed files with 299 additions and 167 deletions
|
@ -44,7 +44,7 @@
|
|||
<tr>
|
||||
<td><a href="{{ route('admin.services.service', $service->id) }}">{{ $service->name }}</a></td>
|
||||
<td>{!! $service->description !!}</td>
|
||||
<td class="text-center">{{ $service->c_servers }}</td>
|
||||
<td class="text-center">{{ $service->servers_count }}</td>
|
||||
<td class="text-center align-middle"><a href="{{ route('admin.services.service.config', $service->id) }}"><button class="btn btn-xxs btn-primary"><i class="fa fa-wrench"></i> Configure</button></a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
|
|
@ -28,12 +28,12 @@
|
|||
<ul class="breadcrumb">
|
||||
<li><a href="/admin">Admin Control</a></li>
|
||||
<li><a href="/admin/services">Services</a></li>
|
||||
<li><a href="{{ route('admin.services.service', $service->id) }}">{{ $service->name }}</a></li>
|
||||
<li><a href="{{ route('admin.services.option', [$service->id, $option->id]) }}">{{ $option->name }}</a></li>
|
||||
<li><a href="{{ route('admin.services.service', $option->service->id) }}">{{ $option->service->name }}</a></li>
|
||||
<li><a href="{{ route('admin.services.option', [$option->service->id, $option->id]) }}">{{ $option->name }}</a></li>
|
||||
<li class="active">New Variable</li>
|
||||
</ul>
|
||||
<h3>New Option Variable</h3><hr />
|
||||
<form action="{{ route('admin.services.option.variable.new', [$service->id, $option->id]) }}" method="POST">
|
||||
<form action="{{ route('admin.services.option.variable.new', [$option->service->id, $option->id]) }}" method="POST">
|
||||
<div class="well">
|
||||
<div class="row">
|
||||
<div class="col-md-12 form-group">
|
||||
|
|
|
@ -28,12 +28,12 @@
|
|||
<ul class="breadcrumb">
|
||||
<li><a href="/admin">Admin Control</a></li>
|
||||
<li><a href="/admin/services">Services</a></li>
|
||||
<li><a href="{{ route('admin.services.service', $service->id) }}">{{ $service->name }}</a></li>
|
||||
<li><a href="{{ route('admin.services.service', $option->service->id) }}">{{ $option->service->name }}</a></li>
|
||||
<li class="active">{{ $option->name }}</li>
|
||||
</ul>
|
||||
<div class="alert alert-warning"><strong>Warning!</strong> This page contains advanced settings that the panel and daemon use to control servers. Modifying information on this page is not recommended unless you are absolutely sure of what you are doing.</div>
|
||||
<h3>Settings</h3><hr />
|
||||
<form action="{{ route('admin.services.option', [$service->id, $option->id]) }}" method="POST">
|
||||
<form action="{{ route('admin.services.option', [$option->service->id, $option->id]) }}" method="POST">
|
||||
<div class="row">
|
||||
<div class="col-md-6 form-group">
|
||||
<label class="control-label">Name:</label>
|
||||
|
@ -74,7 +74,7 @@
|
|||
<div class="col-md-12 form-group">
|
||||
<label class="control-label">Default Startup Command:</label>
|
||||
<div>
|
||||
<input type="text" name="startup" value="{{ old('startup', $option->startup) }}" class="form-control" />
|
||||
<input type="text" name="startup" value="{{ old('startup', $option->startup) }}" placeholder="{{ $option->service->startup }}" class="form-control" />
|
||||
<p class="text-muted"><small>To use the default startup of the parent service simply leave this field blank.</small></p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -88,9 +88,9 @@
|
|||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<h3>Variables <small><a href="{{ route('admin.services.option.variable.new', [$service->id, $option->id]) }}"><i class="fa fa-plus"></i></a></small></h3><hr />
|
||||
@foreach($variables as $variable)
|
||||
<form action="{{ route('admin.services.option.variable', [$service->id, $option->id, $variable->id]) }}" method="POST">
|
||||
<h3>Variables <small><a href="{{ route('admin.services.option.variable.new', [$option->service->id, $option->id]) }}"><i class="fa fa-plus"></i></a></small></h3><hr />
|
||||
@foreach($option->variables as $variable)
|
||||
<form action="{{ route('admin.services.option.variable', [$option->service->id, $option->id, $variable->id]) }}" method="POST">
|
||||
<div class="well">
|
||||
<div class="row">
|
||||
<div class="col-md-6 form-group">
|
||||
|
@ -158,7 +158,7 @@
|
|||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{!! csrf_field() !!}
|
||||
<a href="{{ route('admin.services.option.variable.delete', [$service->id, $option->id, $variable->id]) }}"><button type="button" class="btn btn-sm btn-danger pull-right"><i class="fa fa-times"></i></button></a>
|
||||
<a href="{{ route('admin.services.option.variable.delete', [$option->service->id, $option->id, $variable->id]) }}"><button type="button" class="btn btn-sm btn-danger pull-right"><i class="fa fa-times"></i></button></a>
|
||||
<input type="submit" class="btn btn-sm btn-success" value="Update Variable" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -175,16 +175,19 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($servers as $server)
|
||||
@foreach ($option->servers as $server)
|
||||
<tr>
|
||||
<td><a href="{{ route('admin.servers.view', $server->id) }}">{{ $server->name }}</a></td>
|
||||
<td><a href="{{ route('admin.users.view', $server->owner_id) }}">{{ $server->a_ownerEmail }}</a></td>
|
||||
<td><a href="{{ route('admin.users.view', $server->owner_id) }}">{{ $server->user->email }}</a></td>
|
||||
<td>{{ $server->updated_at }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<form action="{{ route('admin.services.option', [$service->id, $option->id]) }}" method="POST">
|
||||
<div class="text-center">
|
||||
{!! $option->servers->render() !!}
|
||||
</div>
|
||||
<form action="{{ route('admin.services.option', [$option->service->id, $option->id]) }}" method="POST">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-danger">
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<li><a href="/admin">Admin Control</a></li>
|
||||
<li><a href="/admin/services">Services</a></li>
|
||||
<li><a href="{{ route('admin.services.packs') }}">Packs</a></li>
|
||||
<li><a href="{{ route('admin.services.packs.service', $service->id) }}">{{ $service->name }}</a></li>
|
||||
<li><a href="{{ route('admin.services.packs.service', $option->service->id) }}">{{ $option->service->name }}</a></li>
|
||||
<li class="active">{{ $option->name }}</li>
|
||||
</ul>
|
||||
<h3 class="nopad">Service Packs</h3><hr />
|
||||
|
@ -44,7 +44,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($packs as $pack)
|
||||
@foreach ($option->packs as $pack)
|
||||
<tr>
|
||||
<td><a href="{{ route('admin.services.packs.edit', $pack->id) }}">{{ $pack->name }}</a></td>
|
||||
<td><code>{{ $pack->version }}</code></td>
|
||||
|
|
|
@ -40,10 +40,10 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($options as $option)
|
||||
@foreach ($service->options as $option)
|
||||
<tr>
|
||||
<td><a href="{{ route('admin.services.packs.option', $option->id) }}">{{ $option->name }}</a></td>
|
||||
<td>{{ $option->p_count }}</td>
|
||||
<td>{{ $option->packs->count() }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
<li><a href="/admin">Admin Control</a></li>
|
||||
<li><a href="/admin/services">Services</a></li>
|
||||
<li><a href="{{ route('admin.services.packs') }}">Packs</a></li>
|
||||
<li><a href="{{ route('admin.services.packs.service', $service->id) }}">{{ $service->name }}</a></li>
|
||||
<li><a href="{{ route('admin.services.packs.option', $option->id) }}">{{ $option->name }}</a></li>
|
||||
<li><a href="{{ route('admin.services.packs.service', $pack->option->service->id) }}">{{ $pack->option->service->name }}</a></li>
|
||||
<li><a href="{{ route('admin.services.packs.option', $pack->option->id) }}">{{ $pack->option->name }}</a></li>
|
||||
<li class="active">{{ $pack->name }} ({{ $pack->version }})</li>
|
||||
</ul>
|
||||
<h3 class="nopad">Manage Service Pack</h3><hr />
|
||||
|
@ -62,10 +62,10 @@
|
|||
<div class="col-md-6">
|
||||
<label class="control-label">Associated Service Option:</label>
|
||||
<select name="option" class="form-control">
|
||||
@foreach($services as $service => $options)
|
||||
<option disabled>{{ $service }}</option>
|
||||
@foreach($options as $option)
|
||||
<option value="{{ $option['id'] }}" @if($pack->option === (int) $option['id'])selected="selected"@endif> -- {{ $option['name'] }}</option>
|
||||
@foreach($services as $service)
|
||||
<option disabled>{{ $service->name }}</option>
|
||||
@foreach($service->options as $option)
|
||||
<option value="{{ $option->id }}" @if($pack->option_id === $option->id)selected="selected"@endif> -- {{ $option->name }}</option>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</select>
|
||||
|
|
|
@ -59,10 +59,10 @@
|
|||
<div class="col-md-6">
|
||||
<label class="control-label">Associated Service Option:</label>
|
||||
<select name="option" class="form-control">
|
||||
@foreach($services as $service => $options)
|
||||
<option disabled>{{ $service }}</option>
|
||||
@foreach($options as $option)
|
||||
<option value="{{ $option['id'] }}" @if((int) $packFor === (int) $option['id'])selected="selected"@endif> -- {{ $option['name'] }}</option>
|
||||
@foreach($services as $service)
|
||||
<option disabled>{{ $service->name }}</option>
|
||||
@foreach($service->options as $option)
|
||||
<option value="{{ $option->id }}" @if((int) request()->option === $option->id)selected="selected"@endif> -- {{ $option->name }}</option>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</select>
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
<div class="col-md-12">
|
||||
<label class="control-label">Associated Service Option:</label>
|
||||
<select name="option" class="form-control">
|
||||
@foreach($services as $service => $options)
|
||||
<option disabled>{{ $service }}</option>
|
||||
@foreach($options as $option)
|
||||
<option value="{{ $option['id'] }}" @if((int) $for === (int) $option['id'])selected="selected"@endif> -- {{ $option['name'] }}</option>
|
||||
@foreach($services as $service)
|
||||
<option disabled>{{ $service->name }}</option>
|
||||
@foreach($service->options as $option)
|
||||
<option value="{{ $option->id }}" @if((int) request()->option === $option->id)selected="selected"@endif> -- {{ $option->name }}</option>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</select>
|
||||
|
|
|
@ -41,12 +41,12 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($options as $option)
|
||||
@foreach($service->options as $option)
|
||||
<tr>
|
||||
<td><a href="{{ route('admin.services.option', [ $service->id, $option->id]) }}">{{ $option->name }}</a></td>
|
||||
<td>{!! $option->description !!}</td>
|
||||
<td><code>{{ $option->tag }}</code></td>
|
||||
<td class="text-center">{{ $option->c_servers }}</td>
|
||||
<td class="text-center">{{ $option->servers->count() }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue