UI tweaks
This commit is contained in:
parent
2f42396317
commit
3b5e1fc7b1
2 changed files with 3 additions and 34 deletions
|
@ -48,7 +48,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
@foreach ($servers as $server)
|
@foreach ($servers as $server)
|
||||||
<tr data-server="{{ $server->uuidShort }}">
|
<tr data-server="{{ $server->uuidShort }}">
|
||||||
<td><code>{{ $server->uuidShort }}</code></td>
|
<td><code title="{{ $server->uuid }}">{{ $server->uuidShort }}</code></td>
|
||||||
<td><a href="{{ route('admin.servers.view', $server->id) }}">{{ $server->name }}</a></td>
|
<td><a href="{{ route('admin.servers.view', $server->id) }}">{{ $server->name }}</a></td>
|
||||||
<td><a href="{{ route('admin.users.view', $server->user->id) }}">{{ $server->user->username }}</a></td>
|
<td><a href="{{ route('admin.users.view', $server->user->id) }}">{{ $server->user->username }}</a></td>
|
||||||
<td><a href="{{ route('admin.nodes.view', $server->node->id) }}">{{ $server->node->name }}</a></td>
|
<td><a href="{{ route('admin.nodes.view', $server->node->id) }}">{{ $server->node->name }}</a></td>
|
||||||
|
|
|
@ -48,12 +48,8 @@
|
||||||
<div class="box-body table-responsive no-padding">
|
<div class="box-body table-responsive no-padding">
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<tr>
|
<tr>
|
||||||
<td>UUID</td>
|
<td>UUID / Docker Container ID</td>
|
||||||
<td>{{ $server->uuid }}</td>
|
<td><code>{{ $server->uuid }}</code></td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Docker Container ID</td>
|
|
||||||
<td data-attr="container-id"><i class="fa fa-fw fa-refresh fa-spin"></i></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Service</td>
|
<td>Service</td>
|
||||||
|
@ -158,30 +154,3 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('footer-scripts')
|
|
||||||
@parent
|
|
||||||
<script>
|
|
||||||
(function checkServerInfo() {
|
|
||||||
$.ajax({
|
|
||||||
type: 'GET',
|
|
||||||
headers: {
|
|
||||||
'X-Access-Token': '{{ $server->daemonSecret }}',
|
|
||||||
'X-Access-Server': '{{ $server->uuid }}'
|
|
||||||
},
|
|
||||||
url: '{{ $server->node->scheme }}://{{ $server->node->fqdn }}:{{ $server->node->daemonListen }}/v1/server',
|
|
||||||
dataType: 'json',
|
|
||||||
timeout: 5000,
|
|
||||||
}).done(function (data) {
|
|
||||||
$('td[data-attr="container-id"]').html('<code>' + data.container.id + '</code>');
|
|
||||||
$('td[data-attr="container-user"]').html('<code>' + data.user + '</code>');
|
|
||||||
}).fail(function (jqXHR) {
|
|
||||||
$('td[data-attr="container-id"]').html('<code>error</code>');
|
|
||||||
$('td[data-attr="container-user"]').html('<code>error</code>');
|
|
||||||
console.error(jqXHR);
|
|
||||||
}).always(function () {
|
|
||||||
setTimeout(checkServerInfo, 60000);
|
|
||||||
})
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
@endsection
|
|
||||||
|
|
Loading…
Reference in a new issue