Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
Reviewed-on: #3 Co-authored-by: tristan <tristan@yuno.malio.fr> Co-committed-by: tristan <tristan@yuno.malio.fr>
32 lines
742 B
PHP
32 lines
742 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\ApiResource;
|
|
|
|
use ApiPlatform\Metadata\ApiResource;
|
|
use ApiPlatform\Metadata\Get;
|
|
use App\State\DockerLogProvider;
|
|
use App\State\SymfonyLogProvider;
|
|
|
|
#[ApiResource(
|
|
operations: [
|
|
new Get(
|
|
uriTemplate: '/environments/{id}/logs/docker',
|
|
security: "is_granted('ROLE_ADMIN')",
|
|
provider: DockerLogProvider::class,
|
|
),
|
|
new Get(
|
|
uriTemplate: '/environments/{id}/logs/symfony/{logFileId}',
|
|
security: "is_granted('ROLE_ADMIN')",
|
|
provider: SymfonyLogProvider::class,
|
|
),
|
|
],
|
|
)]
|
|
final class LogOutput
|
|
{
|
|
public string $content = '';
|
|
public int $lines = 0;
|
|
public string $source = '';
|
|
}
|