Sort containers when loading and mounting in Logs.php

This commit is contained in:
Andras Bacsai 2024-04-16 09:19:30 +02:00
parent fcf4c5f328
commit 52c794a259

View File

@ -44,7 +44,7 @@ public function loadContainers($server_id)
} else { } else {
$containers = getCurrentApplicationContainerStatus($server, $this->resource->id, includePullrequests: true); $containers = getCurrentApplicationContainerStatus($server, $this->resource->id, includePullrequests: true);
} }
$server->containers = $containers; $server->containers = $containers->sort();
} catch (\Exception $e) { } catch (\Exception $e) {
return handleError($e, $this); return handleError($e, $this);
} }
@ -94,6 +94,7 @@ public function mount()
$this->servers = $this->servers->push($this->resource->server); $this->servers = $this->servers->push($this->resource->server);
} }
} }
$this->containers = $this->containers->sort();
} catch (\Exception $e) { } catch (\Exception $e) {
return handleError($e, $this); return handleError($e, $this);
} }