node status in list, closes #124
This commit is contained in:
parent
06422b2055
commit
0fe0f750c4
5 changed files with 45 additions and 7 deletions
|
@ -11,6 +11,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
|
|||
* Support for setting custom `user_id` when using the API to create users.
|
||||
* Support for creating a new server through the API by passing a user ID rather than an email.
|
||||
* Passing `?daemon=true` flag to [`/api/servers/:id`](https://pterodactyl.readme.io/v0.5.0/reference#single-server) will return the daemon stats as well as the `daemon_token` if using HTTPS.
|
||||
* Small check for current node status that shows up to the left of the name when viewing a listing of all nodes.
|
||||
|
||||
### Changed
|
||||
* Support for sub-folders within the `getJavascript()` route for servers.
|
||||
|
|
|
@ -44,6 +44,8 @@ D3.js - [license](https://github.com/mbostock/d3/blob/master/LICENSE) - [homepag
|
|||
|
||||
FontAwesome - [license](http://fontawesome.io/license/) - [homepage](http://fontawesome.io)
|
||||
|
||||
FontAwesome Animations - [license](https://github.com/l-lin/font-awesome-animation#license) - [homepage](https://github.com/l-lin/font-awesome-animation)
|
||||
|
||||
FuelUX - [license](https://github.com/ExactTarget/fuelux/blob/master/LICENSE) - [homepage](http://getfuelux.com)
|
||||
|
||||
jQuery - [license](https://github.com/jquery/jquery/blob/master/LICENSE.txt) - [homepage](http://jquery.com)
|
||||
|
|
6
public/css/vendor/fontawesome/animation.min.css
vendored
Normal file
6
public/css/vendor/fontawesome/animation.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -254,3 +254,12 @@ li.btn.btn-default.pill:active,li.btn.btn-default.pill:focus,li.btn.btn-default.
|
|||
#fileOptionMenu > li.bg-default > a {
|
||||
padding-left: 5px !important;
|
||||
}
|
||||
|
||||
.left-icon {
|
||||
padding: 8px 2px !important;
|
||||
border-right: 0 !important;
|
||||
}
|
||||
|
||||
.left-icon + td {
|
||||
border-left: 0px !important;
|
||||
}
|
||||
|
|
|
@ -23,6 +23,11 @@
|
|||
Node List
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
@parent
|
||||
{!! Theme::css('css/vendor/fontawesome/animation.min.css') !!}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="col-md-12">
|
||||
<ul class="breadcrumb">
|
||||
|
@ -33,27 +38,27 @@
|
|||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th class="visible-lg">Location</th>
|
||||
<th>FQDN</th>
|
||||
<th>Location</th>
|
||||
<th class="hidden-xs">Memory</th>
|
||||
<th class="hidden-xs">Disk</th>
|
||||
<th class="text-center hidden-xs">Servers</th>
|
||||
<th class="text-center">HTTPS</th>
|
||||
<th class="text-center">Public</th>
|
||||
<th class="text-center">SSL</th>
|
||||
<th class="text-center hidden-xs">Public</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($nodes as $node)
|
||||
<tr>
|
||||
<td class="text-center text-muted left-icon" data-action="ping" 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 class="visible-lg">{{ $node->a_locationName }}</td>
|
||||
<td><code>{{ $node->fqdn }}</code></td>
|
||||
<td>{{ $node->a_locationName }}</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" style="color:{{ ($node->scheme === 'https') ? '#50af51' : '#d9534f' }}"><i class="fa fa-{{ ($node->scheme === 'https') ? 'lock' : 'unlock' }}"></i></td>
|
||||
<td class="text-center"><i class="fa fa-{{ ($node->public === 1) ? 'check' : 'times' }}"></i></td>
|
||||
<td class="text-center hidden-xs"><i class="fa fa-{{ ($node->public === 1) ? 'eye' : 'eye-slash' }}"></i></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
@ -65,6 +70,21 @@
|
|||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#sidebar_links').find("a[href='/admin/nodes']").addClass('active');
|
||||
pingNodes();
|
||||
setInterval(pingNodes, 10000);
|
||||
});
|
||||
function pingNodes() {
|
||||
$('td[data-action="ping"]').each(function(i, element) {
|
||||
elem = $(this);
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: elem.data('location'),
|
||||
}).done(function (data) {
|
||||
elem.removeClass('text-muted').find('i').removeClass().addClass('fa fa-fw fa-heartbeat faa-pulse animated').css('color', '#50af51');
|
||||
}).fail(function () {
|
||||
elem.removeClass('text-muted').find('i').removeClass().addClass('fa fa-fw fa-heart-o').css('color', '#d9534f');
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
|
|
Loading…
Reference in a new issue