fix: show real storage name on services

This commit is contained in:
Andras Bacsai
2023-09-25 17:14:19 +02:00
parent 0b11093d18
commit ee20c3339e
4 changed files with 15 additions and 6 deletions

View File

@@ -11,6 +11,7 @@ class Show extends Component
public LocalPersistentVolume $storage;
public bool $isReadOnly = false;
public ?string $modalId = null;
public ?string $realName = null;
protected $rules = [
'storage.name' => 'required|string',
@@ -25,6 +26,11 @@ class Show extends Component
public function mount()
{
if ($this->storage->resource_type === 'App\Models\ServiceApplication' || $this->storage->resource_type === 'App\Models\ServiceDatabase') {
$this->realName = "{$this->storage->service->service->uuid}_{$this->storage->name}";
} else {
$this->realName = $this->storage->name;
}
$this->modalId = new Cuid2(7);
}