fix(container): sort containers alphabetically by name in ExecuteContainerCommand and update filtering in Terminal Index

This commit is contained in:
Andras Bacsai
2025-07-23 20:49:12 +02:00
parent 103a9c2df2
commit cc5abc093d
2 changed files with 7 additions and 1 deletions

View File

@@ -132,6 +132,12 @@ class ExecuteContainerCommand extends Component
}); });
} }
} }
// Sort containers alphabetically by name
$this->containers = $this->containers->sortBy(function ($container) {
return data_get($container, 'container.Names');
});
if ($this->containers->count() === 1) { if ($this->containers->count() === 1) {
$this->selected_container = data_get($this->containers->first(), 'container.Names'); $this->selected_container = data_get($this->containers->first(), 'container.Names');
} }

View File

@@ -59,7 +59,7 @@ class Index extends Component
return null; return null;
})->filter(); })->filter();
}); })->sortBy('name');
} }
public function updatedSelectedUuid() public function updatedSelectedUuid()