From 58999913ba38b89ac9cb7c39ed3ba797abeb942d Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Thu, 23 Feb 2017 22:52:05 -0500 Subject: [PATCH] More improvements to add server page. --- .../Controllers/Admin/ServersController.php | 8 +- public/themes/pterodactyl/css/pterodactyl.css | 51 +++++- .../pterodactyl/admin/servers/new.blade.php | 165 ++++++++++++------ 3 files changed, 164 insertions(+), 60 deletions(-) diff --git a/app/Http/Controllers/Admin/ServersController.php b/app/Http/Controllers/Admin/ServersController.php index 195a66314..ba4e5d1cb 100644 --- a/app/Http/Controllers/Admin/ServersController.php +++ b/app/Http/Controllers/Admin/ServersController.php @@ -120,13 +120,13 @@ class ServersController extends Controller $nodes = Models\Node::with('allocations')->where('location_id', $request->input('location'))->get(); return $nodes->map(function ($item) { $filtered = $item->allocations->map(function($map) { - return collect($map)->only(['ip', 'port']); + return collect($map)->only(['id', 'ip', 'port']); }); - $item->ports = $filtered->unique('ip')->map(function ($map) use ($item) { + $item->ports = $filtered->map(function ($map) use ($item) { return [ - 'ip' => $map['ip'], - 'ports' => $item->allocations->where('ip', $map['ip'])->pluck('port')->all(), + 'id' => $map['id'], + 'text' => $map['ip'] . ':' . $map['port'], ]; })->values(); diff --git a/public/themes/pterodactyl/css/pterodactyl.css b/public/themes/pterodactyl/css/pterodactyl.css index 13e50047b..4a3fe3bf2 100644 --- a/public/themes/pterodactyl/css/pterodactyl.css +++ b/public/themes/pterodactyl/css/pterodactyl.css @@ -141,11 +141,60 @@ li.select2-results__option--highlighted[aria-selected="false"] > .user-block > . color: #eee; } +.select2-search--inline .select2-search__field:focus { + outline: none; + border: 0 !important; +} + .img-bordered-xs { border: 1px solid #d2d6de; padding: 1px; } -span[aria-labelledby="select2-pOwner-container"] { +span[aria-labelledby="select2-pUserId-container"] { padding-left: 2px !important; } + +.callout-slim a { + color: #555 !important; +} + +.callout.callout-info.callout-slim { + border: 1px solid #0097bc !important; + border-left: 5px solid #0097bc !important; + border-right: 5px solid #0097bc !important; + color: #777 !important; + background: transparent !important; +} + +.callout.callout-danger.callout-slim { + border: 1px solid #c23321 !important; + border-left: 5px solid #c23321 !important; + border-right: 5px solid #c23321 !important; + color: #777 !important; + background: transparent !important; +} + +.callout.callout-warning.callout-slim { + border: 1px solid #c87f0a !important; + border-left: 5px solid #c87f0a !important; + border-right: 5px solid #c87f0a !important; + color: #777 !important; + background: transparent !important; +} + +.callout.callout-success.callout-slim { + border: 1px solid #00733e !important; + border-left: 5px solid #00733e !important; + border-right: 5px solid #00733e !important; + color: #777 !important; + background: transparent !important; +} + +.callout.callout-default.callout-slim { + border: 1px solid #eee !important; + border-left: 5px solid #eee !important; + border-right: 5px solid #eee !important; + color: #777 !important; + background: transparent !important; +} diff --git a/resources/themes/pterodactyl/admin/servers/new.blade.php b/resources/themes/pterodactyl/admin/servers/new.blade.php index 84e45dfa9..ad9256e33 100644 --- a/resources/themes/pterodactyl/admin/servers/new.blade.php +++ b/resources/themes/pterodactyl/admin/servers/new.blade.php @@ -36,7 +36,7 @@
-
+

Core Details

@@ -62,36 +62,29 @@

Allocation Management

-
+

The location in which this server will be deployed.

-
+
- +

The node which this server will be deployed to.

-
- - -

The IP address that this server will be allocated to.

+
+ + +

The main allocation that will be assigned to this server.

-
- - -

The port that this server will be allocated to.

+
+ + +

Additional allocations to assign to this server on creation.

+
+
+
+
+

Resource Management

+
+
+
+ +
+ + MB +
+
+
+ +
+ + MB +
+
+
+ +
+ + + + +
+
+
+ +
+
+ +
+ + GB +
+
+
+ +
+ + % +
+
+
+ +
+ + I/O +
+
+
+ +
+
+
@endsection @@ -110,10 +170,18 @@ @parent