feat: standalone mongodb
This commit is contained in:
		@@ -5,6 +5,7 @@ namespace App\Http\Livewire\Project\Shared;
 | 
			
		||||
use App\Models\Application;
 | 
			
		||||
use App\Models\Server;
 | 
			
		||||
use App\Models\Service;
 | 
			
		||||
use App\Models\StandaloneMongodb;
 | 
			
		||||
use App\Models\StandalonePostgresql;
 | 
			
		||||
use App\Models\StandaloneRedis;
 | 
			
		||||
use Livewire\Component;
 | 
			
		||||
@@ -12,7 +13,7 @@ use Livewire\Component;
 | 
			
		||||
class Logs extends Component
 | 
			
		||||
{
 | 
			
		||||
    public ?string $type = null;
 | 
			
		||||
    public Application|StandalonePostgresql|Service|StandaloneRedis $resource;
 | 
			
		||||
    public Application|Service|StandalonePostgresql|StandaloneRedis|StandaloneMongodb $resource;
 | 
			
		||||
    public Server $server;
 | 
			
		||||
    public ?string $container = null;
 | 
			
		||||
    public $parameters;
 | 
			
		||||
@@ -38,9 +39,13 @@ class Logs extends Component
 | 
			
		||||
            if (is_null($resource)) {
 | 
			
		||||
                $resource = StandaloneRedis::where('uuid', $this->parameters['database_uuid'])->first();
 | 
			
		||||
                if (is_null($resource)) {
 | 
			
		||||
                    abort(404);
 | 
			
		||||
                    $resource = StandaloneMongodb::where('uuid', $this->parameters['database_uuid'])->first();
 | 
			
		||||
                    if (is_null($resource)) {
 | 
			
		||||
                        abort(404);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            $this->resource = $resource;
 | 
			
		||||
            $this->status = $this->resource->status;
 | 
			
		||||
            $this->server = $this->resource->destination->server;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user