From 69f0340c481b86067c656c37720ba669ddc2db16 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Tue, 5 Jan 2016 00:52:20 -0500 Subject: [PATCH] Add very basic node information view Adds a servers tab with 30 second interval data from the daemon for each displayed server. --- .../Controllers/Admin/NodesController.php | 6 +- resources/views/admin/nodes/view.blade.php | 140 ++++++++++++++++++ 2 files changed, 145 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Admin/NodesController.php b/app/Http/Controllers/Admin/NodesController.php index 415300ebb..44e902037 100644 --- a/app/Http/Controllers/Admin/NodesController.php +++ b/app/Http/Controllers/Admin/NodesController.php @@ -68,7 +68,11 @@ class NodesController extends Controller { $node = Models\Node::findOrFail($id); return view('admin.nodes.view', [ - 'node' => $node + 'node' => $node, + 'servers' => Models\Server::select('servers.*', 'users.email as a_ownerEmail', 'services.name as a_serviceName') + ->join('users', 'users.id', '=', 'servers.owner') + ->join('services', 'services.id', '=', 'servers.service') + ->where('node', $id)->paginate(10) ]); } diff --git a/resources/views/admin/nodes/view.blade.php b/resources/views/admin/nodes/view.blade.php index e69de29bb..dac4b8f6b 100644 --- a/resources/views/admin/nodes/view.blade.php +++ b/resources/views/admin/nodes/view.blade.php @@ -0,0 +1,140 @@ +@extends('layouts.admin') + +@section('title') + Managing Node: {{ $node->name }} +@endsection + +@section('content') +
+ + +
+
+
+
+
+ About Node +
+
+
+
+
+
+
+ Settings +
+
+
+
+
+
+
+ Allocations +
+
+
+
+
+
+
+
+ The data below is updated every 30 seconds, or on page load. CPU usage is displayed relative to the assigned CPU allocation. For example, if a server is assigned 10% and the CPU usage below displays 90% that means the server is using 9% of the total system CPU. +
+ + + + + + + + + + + + + + @foreach($servers as $server) + + + + + + + + + + @endforeach + +
NameOwnerServiceMemoryDiskCPUStatus
{{ $server->name }}{{ $server->a_ownerEmail }}{{ $server->a_serviceName }}-- / {{ $server->memory }} MB{{ $server->disk }} MB-- %--
+
+
{!! $servers->appends(['tab' => 'tab_servers'])->render() !!}
+
+
+
+
+
+
+
+
+ Delete +
+
+
+
+
+ +@endsection