fix: multiple server deployments

feat: custom preview deployment fqdn
ui: improvements here and there
This commit is contained in:
Andras Bacsai
2024-05-30 12:28:29 +02:00
parent 07e801f44d
commit 68d3cea528
14 changed files with 314 additions and 151 deletions

View File

@@ -43,6 +43,11 @@ class GetLogs extends Component
$this->showTimeStamps = $this->resource->is_include_timestamps;
}
}
if ($this->resource?->getMorphClass() === 'App\Models\Application') {
if (str($this->container)->contains('-pr-')) {
$this->pull_request = "Pull Request: " . str($this->container)->afterLast('-pr-')->beforeLast('_')->value();
}
}
}
}
public function doSomethingWithThisChunkOfOutput($output)
@@ -77,13 +82,6 @@ class GetLogs extends Component
if (!$this->server->isFunctional()) {
return;
}
if ($this->resource?->getMorphClass() === 'App\Models\Application') {
if (str($this->container)->contains('-pr-')) {
$this->pull_request = "Pull Request: " . str($this->container)->afterLast('-pr-')->beforeLast('_')->value();
} else {
$this->pull_request = 'branch';
}
}
if (!$refresh && ($this->resource?->getMorphClass() === 'App\Models\Service' || str($this->container)->contains('-pr-'))) return;
if (!$this->numberOfLines) {
$this->numberOfLines = 1000;

View File

@@ -103,6 +103,14 @@ class Logs extends Component
}
}
$this->containers = $this->containers->sort();
if (data_get($this->query,'pull_request_id')) {
$this->containers = $this->containers->filter(function ($container) {
return str_contains($container, $this->query['pull_request_id']);
});
ray($this->containers);
}
$this->loadMetrics();
} catch (\Exception $e) {
return handleError($e, $this);