Файловое хранилище готово

This commit is contained in:
2026-01-26 11:08:18 +03:00
parent a542e7d2df
commit edf9286071
35 changed files with 377 additions and 497 deletions

View File

@@ -9,18 +9,19 @@
### User Story 1 - File Management Dashboard (Priority: P1)
Users need a visual interface to manage the artifacts generated by the system (dashboard backups, exported repositories) without needing direct server access. This ensures that non-technical users or users without SSH access can still retrieve or clean up data.
Users need a visual interface to manage the artifacts generated by the system (dashboard backups, exported repositories) without needing direct server access. Users must be able to navigate through the folder structure (e.g., `backups/SS2/Sales Dashboard`) to locate specific files.
**Why this priority**: Core functionality requested. Without the UI, the storage mechanism is opaque and hard to use.
**Independent Test**: Can be fully tested by opening the new "File Storage" page, uploading a test file, verifying it appears in the list with correct metadata, downloading it, and then deleting it.
**Independent Test**: Can be fully tested by opening the new "File Storage" page, navigating into a subdirectory, uploading a test file, verifying it appears in the list, downloading it, and then deleting it.
**Acceptance Scenarios**:
1. **Given** the File Storage page is open, **When** I view the list, **Then** I see all files in the configured storage directory with their names, sizes, and creation dates.
2. **Given** a file exists in the list, **When** I click "Download", **Then** the file is downloaded to my local machine.
3. **Given** a file exists in the list, **When** I click "Delete" and confirm, **Then** the file is removed from the list and the server filesystem.
4. **Given** I have a file locally, **When** I drag and drop it or use the "Upload" button, **Then** the file is uploaded to the server storage and appears in the list.
1. **Given** the File Storage page is open, **When** I view the list, **Then** I see the top-level folders (e.g., `backups`, `repositories`) or files.
2. **Given** I am viewing a folder, **When** I click a subfolder name, **Then** the view updates to show the contents of that subfolder.
3. **Given** I am in a subfolder, **When** I click "Download" on a file, **Then** the file is downloaded to my local machine.
4. **Given** a file exists in the list, **When** I click "Delete" and confirm, **Then** the file is removed from the list and the server filesystem.
5. **Given** I have a file locally, **When** I drag and drop it or use the "Upload" button, **Then** the file is uploaded to the current directory and appears in the list.
---
@@ -64,11 +65,13 @@ Administrators need to control where potentially large or sensitive files are st
- **FR-001**: System MUST allow configuring a local filesystem root path for storing artifacts.
- **FR-002**: The default storage path MUST be configured such that it does not interfere with the application's git repository (e.g., a directory outside the workspace or explicitly git-ignored).
- **FR-003**: System MUST enforce a directory structure within the storage root: `backups/` for dashboard backups and `repositories/` for exported repositories.
- **FR-004**: System MUST provide a Web UI to list files, organized by their type (Backup vs Repository).
- **FR-004**: System MUST provide a Web UI to list files and folders, organized by their type (Backup vs Repository).
- **FR-005**: System MUST display file metadata in the UI: Filename, Size, Creation Date.
- **FR-006**: System MUST allow users to download files from the storage directory via the Web UI.
- **FR-006**: System MUST allow users to download files from the storage directory (including subdirectories) via the Web UI.
- **FR-007**: System MUST allow users to delete files from the storage directory via the Web UI.
- **FR-008**: System MUST allow users to upload files to the storage directory via the Web UI, requiring them to select the target category (Backup or Repository).
- **FR-008**: System MUST allow users to upload files to the specific folder in the storage directory via the Web UI.
- **FR-013**: System MUST support navigating through the directory hierarchy within the allowed categories.
- **FR-014**: System MUST display breadcrumbs or similar navigation aid to show current path.
- **FR-009**: System MUST validate that the configured storage path is accessible and writable.
- **FR-010**: System MUST prevent access to files outside the configured storage directory (Path Traversal protection).
- **FR-011**: System MUST allow configuring the directory structure pattern for backups and repositories (e.g., `{environment}/{dashboard_name}/`).