diff --git a/app/Http/Requests/Api/Client/Servers/Network/NewAllocationRequest.php b/app/Http/Requests/Api/Client/Servers/Network/NewAllocationRequest.php
index 7628afaaf..4a29378dd 100644
--- a/app/Http/Requests/Api/Client/Servers/Network/NewAllocationRequest.php
+++ b/app/Http/Requests/Api/Client/Servers/Network/NewAllocationRequest.php
@@ -2,8 +2,6 @@
namespace Pterodactyl\Http\Requests\Api\Client\Servers\Network;
-use Illuminate\Support\Collection;
-use Pterodactyl\Models\Allocation;
use Pterodactyl\Models\Permission;
use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
@@ -16,5 +14,4 @@ class NewAllocationRequest extends ClientApiRequest
{
return Permission::ACTION_ALLOCATION_CREATE;
}
-
}
diff --git a/resources/scripts/components/server/ServerDetailsBlock.tsx b/resources/scripts/components/server/ServerDetailsBlock.tsx
index 321c01943..0d87089c1 100644
--- a/resources/scripts/components/server/ServerDetailsBlock.tsx
+++ b/resources/scripts/components/server/ServerDetailsBlock.tsx
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
-import tw from 'twin.macro';
+import tw, { TwStyle } from 'twin.macro';
import { faCircle, faEthernet, faHdd, faMemory, faMicrochip, faServer } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { bytesToHuman, megabytesToHuman } from '@/helpers';
@@ -13,6 +13,21 @@ interface Stats {
disk: number;
}
+function statusToColor (status: string|null, installing: boolean): TwStyle {
+ if (installing) {
+ status = '';
+ }
+
+ switch (status) {
+ case 'offline':
+ return tw`text-red-500`;
+ case 'running':
+ return tw`text-green-500`;
+ default:
+ return tw`text-yellow-500`;
+ }
+}
+
const ServerDetailsBlock = () => {
const [ stats, setStats ] = useState