From edaae40df939bd6ad182e8bd7fa135202ef512b7 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 26 Nov 2016 18:23:10 -0500 Subject: [PATCH] Add some quick daemon information when viewing nodes --- resources/views/admin/nodes/index.blade.php | 37 +++++++++++---------- resources/views/admin/nodes/view.blade.php | 30 +++++++++++++++++ 2 files changed, 50 insertions(+), 17 deletions(-) diff --git a/resources/views/admin/nodes/index.blade.php b/resources/views/admin/nodes/index.blade.php index 689a9dda4..114f3a0cf 100644 --- a/resources/views/admin/nodes/index.blade.php +++ b/resources/views/admin/nodes/index.blade.php @@ -70,24 +70,27 @@ @endsection diff --git a/resources/views/admin/nodes/view.blade.php b/resources/views/admin/nodes/view.blade.php index cf71bd691..b67505c3b 100644 --- a/resources/views/admin/nodes/view.blade.php +++ b/resources/views/admin/nodes/view.blade.php @@ -69,6 +69,18 @@
+ + + + + + + + + + + + @@ -777,6 +789,24 @@ $(document).ready(function () { element.parent().removeClass('has-error has-success'); } + (function getInformation() { + $.ajax({ + method: 'GET', + url: '{{ $node->scheme }}://{{ $node->fqdn }}:{{ $node->daemonListen }}', + timeout: 5000, + headers: { + 'X-Access-Token': '{{ $node->daemonSecret }}' + }, + }).done(function (data) { + $('[data-attr="info-version"]').html(data.version); + $('[data-attr="info-system"]').html(data.system.type + '(' + data.system.arch + ') ' + data.system.release + ''); + $('[data-attr="info-cpus"]').html(data.system.cpus); + }).fail(function (jqXHR) { + + }).always(function() { + setTimeout(getInformation, 10000); + }); + })(); }); @endsection
Daemon Version
System Information
Total CPU Cores
Total Servers {{ count($servers) }}