New models for node and location admin pages.
This commit is contained in:
parent
96d3aa767f
commit
09d23deed6
10 changed files with 152 additions and 78 deletions
|
@ -53,10 +53,10 @@
|
|||
<tr>
|
||||
<td class="text-center text-muted left-icon" data-action="ping" data-secret="{{ $node->daemonSecret }}" data-location="{{ $node->scheme }}://{{ $node->fqdn }}:{{ $node->daemonListen }}"><i class="fa fa-fw fa-refresh fa-spin"></i></td>
|
||||
<td><a href="/admin/nodes/view/{{ $node->id }}">{{ $node->name }}</td>
|
||||
<td>{{ $node->a_locationName }}</td>
|
||||
<td>{{ $node->location->short }}</td>
|
||||
<td class="hidden-xs">{{ $node->memory }} MB</td>
|
||||
<td class="hidden-xs">{{ $node->disk }} MB</td>
|
||||
<td class="text-center hidden-xs">{{ $node->a_serverCount }}</td>
|
||||
<td class="text-center hidden-xs">{{ $node->servers_count }}</td>
|
||||
<td class="text-center" style="color:{{ ($node->scheme === 'https') ? '#50af51' : '#d9534f' }}"><i class="fa fa-{{ ($node->scheme === 'https') ? 'lock' : 'unlock' }}"></i></td>
|
||||
<td class="text-center hidden-xs"><i class="fa fa-{{ ($node->public === 1) ? 'eye' : 'eye-slash' }}"></i></td>
|
||||
</tr>
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<li><a href="#tab_configuration" data-toggle="tab">Configuration</a></li>
|
||||
<li><a href="#tab_allocation" data-toggle="tab">Allocation</a></li>
|
||||
<li><a href="#tab_servers" data-toggle="tab">Servers</a></li>
|
||||
@if(count($servers) === 0)<li><a href="#tab_delete" data-toggle="tab">Delete</a></li>@endif
|
||||
@if(count($node->servers) === 0)<li><a href="#tab_delete" data-toggle="tab">Delete</a></li>@endif
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab_about">
|
||||
|
@ -83,7 +83,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>Total Servers</td>
|
||||
<td>{{ count($servers) }}</td>
|
||||
<td>{{ count($node->servers) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Memory Allocated</td>
|
||||
|
@ -309,7 +309,7 @@
|
|||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-sm btn-primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
@foreach($allocation_ips as $allocation)
|
||||
@foreach($node->allocations->unique('ip')->values()->all() as $allocation)
|
||||
<li data-action="alloc_dropdown_val" data-value="{{ $allocation->ip }}"><a href="#">{{ $allocation->ip }}</a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
@ -355,7 +355,7 @@
|
|||
<td></td>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($allocations as $allocation)
|
||||
@foreach($node->allocations as $allocation)
|
||||
<tr>
|
||||
<td class="col-sm-3 align-middle">{{ $allocation->ip }}</td>
|
||||
<td class="col-sm-3 align-middle">
|
||||
|
@ -376,7 +376,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<div class="col-md-12 text-center">
|
||||
{{ $allocations->appends(['tab' => 'tab_allocation'])->links() }}
|
||||
{{ $node->allocations->appends(['tab' => 'tab_allocation'])->render() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -402,11 +402,11 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($servers as $server)
|
||||
@foreach($node->servers as $server)
|
||||
<tr data-server="{{ $server->uuid }}">
|
||||
<td><a href="/admin/servers/view/{{ $server->id }}">{{ $server->name }}</a></td>
|
||||
<td><a href="/admin/users/view/{{ $server->owner_id }}"><code>{{ $server->a_ownerEmail }}</a></a></td>
|
||||
<td>{{ $server->a_serviceName }}</td>
|
||||
<td><a href="/admin/users/view/{{ $server->owner_id }}"><code>{{ $server->user->email }}</a></a></td>
|
||||
<td>{{ $server->service->name }}</td>
|
||||
<td class="text-center"><span data-action="memory">--</span> / {{ $server->memory === 0 ? '∞' : $server->memory }} MB</td>
|
||||
<td class="text-center">{{ $server->disk }} MB</td>
|
||||
<td class="text-center"><span data-action="cpu" data-cpumax="{{ $server->cpu }}">--</span> %</td>
|
||||
|
@ -415,13 +415,10 @@
|
|||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center">{!! $servers->appends(['tab' => 'tab_servers'])->render() !!}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if(count($servers) === 0)
|
||||
@if(count($node->servers) === 0)
|
||||
<div class="tab-pane" id="tab_delete">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"></div>
|
||||
|
@ -459,7 +456,7 @@
|
|||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<select class="form-control" name="ip">
|
||||
@foreach($allocation_ips as $allocation)
|
||||
@foreach($node->allocations->unique('ip')->values()->all() as $allocation)
|
||||
<option value="{{ $allocation->ip }}">{{ $allocation->ip }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue