From c715479fa2406ec1f6b300df268e90ff7251cb89 Mon Sep 17 00:00:00 2001 From: IceToast Date: Thu, 23 Dec 2021 14:48:04 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20Added=20Nodename=20to=20ser?= =?UTF-8?q?ver=20card=20->=20info=20icon=20popover?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Classes/Pterodactyl.php | 5 ++--- app/Http/Controllers/ServerController.php | 2 ++ resources/views/servers/index.blade.php | 5 ++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/Classes/Pterodactyl.php b/app/Classes/Pterodactyl.php index 0abe05f7..20caa00a 100644 --- a/app/Classes/Pterodactyl.php +++ b/app/Classes/Pterodactyl.php @@ -17,7 +17,7 @@ class Pterodactyl /** * @description per_page option to pull more than the default 50 from pterodactyl */ - public CONST PER_PAGE = 200; + public const PER_PAGE = 200; //TODO: Extend error handling (maybe logger for more errors when debugging) @@ -193,7 +193,6 @@ class Pterodactyl "default" => $allocationId ] ]); - } public static function suspendServer(Server $server) @@ -245,7 +244,7 @@ class Pterodactyl public static function getServerAttributes(string $pterodactylId) { try { - $response = self::client()->get("/application/servers/{$pterodactylId}?include=egg,nest,location"); + $response = self::client()->get("/application/servers/{$pterodactylId}?include=egg,node,nest,location"); } catch (Exception $e) { throw self::getException(); } diff --git a/app/Http/Controllers/ServerController.php b/app/Http/Controllers/ServerController.php index b217ff4c..ff096502 100644 --- a/app/Http/Controllers/ServerController.php +++ b/app/Http/Controllers/ServerController.php @@ -43,6 +43,8 @@ class ServerController extends Controller $server->egg = $serverRelationships['egg']['attributes']['name']; $server->nest = $serverRelationships['nest']['attributes']['name']; + $server->node = $serverRelationships['node']['attributes']['name']; + //get productname by product_id for server $product = Product::find($server->product_id); diff --git a/resources/views/servers/index.blade.php b/resources/views/servers/index.blade.php index 200c1677..ec49d2cf 100644 --- a/resources/views/servers/index.blade.php +++ b/resources/views/servers/index.blade.php @@ -81,8 +81,11 @@
{{ __('Location') }}:
-
+
{{ $server->location }} +