Skip to content

Commit

Permalink
Fixing namespaces for Forge SDK + Other bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aglipanci committed Sep 17, 2020
1 parent cd0f622 commit 1d7d22a
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 36 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aglipanci/laravel-dashboard-forge-tile1",
"description": "1.1.0",
"name": "aglipanci/laravel-dashboard-forge-tile",
"description": "2.2.0",
"license": "MIT",
"authors": [
{
Expand All @@ -13,7 +13,7 @@
"require": {
"php": "^7.4",
"spatie/laravel-dashboard": "^2.0",
"themsaid/forge-sdk": "^2.1"
"laravel/forge-sdk": "^3.1"
},
"require-dev": {
"phpunit/phpunit": "^9.0"
Expand Down
37 changes: 23 additions & 14 deletions resources/views/recent-events.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,30 @@
</div>
<div class="h-full overflow-scroll">
<ul wire:poll.{{ $refreshIntervalInSeconds }}s class="self-center divide-y-2 divide-canvas">
@foreach($events as $event)
<li class="py-1">
<div class="my-2">
<div class="font-medium text-sm">
{{ \Carbon\Carbon::parse($event['createdAt'])->format('F j, g:m:i A') }}
@if(count($events))
@foreach($events as $event)
<li class="py-1">
<div class="my-2">
<div class="font-medium text-sm">
{{ \Carbon\Carbon::parse($event['createdAt'])->format('F j, g:m:i A') }}
</div>
<div class="text-xs text-gray-600 mb-1">
{{ $event['serverName'] }}
</div>
<div class="text-xs">
{{ $event['description'] }}
</div>
</div>
<div class="text-xs text-gray-600 mb-1">
{{ $event['serverName'] }}
</div>
<div class="text-xs">
{{ $event['description'] }}
</div>
</div>
</li>
@endforeach
</li>
@endforeach
@else
<div class="bg-yellow-300 pl-2 p-2 rounded-md">
<span class="inline-block">
<div class="rounded-full h-4 w-4 flex items-center justify-center bg-yellow-900 text-white text-xs inline-block">!</div>
</span>
<span class="text-xs text-yellow-900 leading-none break-words">Currently there are no events. Make sure you have configured the background command.</span>
</div>
@endif
</ul>
</div>
</div>
Expand Down
41 changes: 25 additions & 16 deletions resources/views/servers.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,32 @@

<div class="h-full overflow-scroll">
<ul wire:poll.{{ $refreshIntervalInSeconds }}s class="self-center divide-y-2 divide-canvas">
@foreach($servers as $server)
<li class="py-1">
<div class="my-2">
<div class="font-medium">
<span class="rounded-full h-3 w-3 inline-block mr-1 @if($server['isReady']) bg-green-200 @else bg-gray-200 @endif"></span>
{{ $server['name'] }}
@if(count($servers))
@foreach($servers as $server)
<li class="py-1">
<div class="my-2">
<div class="font-medium">
<span class="rounded-full h-3 w-3 inline-block mr-1 @if($server['isReady']) bg-green-200 @else bg-gray-200 @endif"></span>
{{ $server['name'] }}
</div>
<div class="text-gray-700 text-sm">{{ $server['provider'] }}</div>
<div class="text-gray-700 text-sm">{{ $server['ipAddress'] }}</div>
<div class="mt-1">
@foreach($server['tags'] as $tag)
<span class="bg-gray-200 rounded p-1 text-xs text-gray-600 mb-1 inline-block">{{ $tag['name'] }}</span>
@endforeach
</div>
</div>
<div class="text-gray-700 text-sm">{{ $server['provider'] }}</div>
<div class="text-gray-700 text-sm">{{ $server['ipAddress'] }}</div>
<div class="mt-1">
@foreach($server['tags'] as $tag)
<span class="bg-gray-200 rounded p-1 text-xs text-gray-600 mb-1 inline-block">{{ $tag['name'] }}</span>
@endforeach
</div>
</div>
</li>
@endforeach
</li>
@endforeach
@else
<div class="bg-yellow-300 pl-2 p-2 rounded-md">
<span class="inline-block">
<div class="rounded-full h-4 w-4 flex items-center justify-center bg-yellow-900 text-white text-xs inline-block">!</div>
</span>
<span class="text-xs text-yellow-900 leading-none break-words">Currently there are no servers. Make sure you have configured the background command.</span>
</div>
@endif
</ul>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/FetchForgeRecentEventsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use aglipanci\ForgeTile\ForgeStore;
use Illuminate\Console\Command;
use Themsaid\Forge\Forge;
use Laravel\Forge\Forge;

class FetchForgeRecentEventsCommand extends Command
{
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/FetchForgeServersCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use aglipanci\ForgeTile\ForgeStore;
use Illuminate\Console\Command;
use Themsaid\Forge\Forge;
use Laravel\Forge\Forge;

class FetchForgeServersCommand extends Command
{
Expand Down
2 changes: 1 addition & 1 deletion src/ForgeTileServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use aglipanci\ForgeTile\Components\ForgeServersComponent;
use Illuminate\Support\ServiceProvider;
use Livewire\Livewire;
use Themsaid\Forge\Forge;
use Laravel\Forge\Forge;

class ForgeTileServiceProvider extends ServiceProvider
{
Expand Down

0 comments on commit 1d7d22a

Please sign in to comment.