mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-18 05:20:43 +00:00
feat(storage): add read-only volume handling and UI notifications
- Introduced `isReadOnlyVolume` method in `LocalFileVolume` and `LocalPersistentVolume` models to determine if a volume is read-only based on Docker Compose configuration. - Updated `FileStorage` and `Show` components to set `isReadOnly` state during mounting. - Enhanced UI to display notifications for read-only volumes, preventing modification actions in the interface. - Refactored file storage and directory management forms to conditionally enable or disable actions based on read-only status.
This commit is contained in:
@@ -34,6 +34,8 @@ class FileStorage extends Component
|
||||
|
||||
public bool $permanently_delete = true;
|
||||
|
||||
public bool $isReadOnly = false;
|
||||
|
||||
protected $rules = [
|
||||
'fileStorage.is_directory' => 'required',
|
||||
'fileStorage.fs_path' => 'required',
|
||||
@@ -52,6 +54,8 @@ class FileStorage extends Component
|
||||
$this->workdir = null;
|
||||
$this->fs_path = $this->fileStorage->fs_path;
|
||||
}
|
||||
|
||||
$this->isReadOnly = $this->fileStorage->isReadOnlyVolume();
|
||||
}
|
||||
|
||||
public function convertToDirectory()
|
||||
|
||||
Reference in New Issue
Block a user