feat : ajout de la lecture des logs symfony et docker (#3)
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
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>
This commit was merged in pull request #3.
This commit is contained in:
31
src/ApiResource/LogOutput.php
Normal file
31
src/ApiResource/LogOutput.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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 = '';
|
||||
}
|
||||
Reference in New Issue
Block a user