feat: Major VTL System Upgrade (Auth, Monitoring, CLI, Installer)

- Web UI:
  - Added secure Authentication system (Login, 2 Roles: Admin/Viewer)
  - Added System Monitoring Dashboard (Health, Services, Power Mgmt)
  - Added User Management Interface (Create, Delete, Enable/Disable)
  - Added Device Mapping view in iSCSI tab (lsscsi output)
- Backend:
  - Implemented secure session management (auth.php)
  - Added power management APIs (restart/shutdown appliance)
  - Added device mapping API
- CLI:
  - Created global 'vtl' management tool
  - Added scripts for reliable startup (vtllibrary fix)
- Installer:
  - Updated install.sh with new dependencies (tgt, sudoers, permissions)
  - Included all new components in build-installer.sh
- Docs:
  - Consolidated documentation into docs/ folder
This commit is contained in:
2025-12-09 18:15:36 +00:00
parent 8a0523a265
commit 01080498af
53 changed files with 13399 additions and 425 deletions

View File

@@ -0,0 +1,42 @@
# 📝 Added Device Mapping to iSCSI Tab
## 📅 December 9, 2025
## 📋 Request
The user requested to display the current SCSI device mapping (`lsscsi -g` output) on the iSCSI management tab in the Web UI. This allows for easier identification of which "sg" device corresponds to which tape drive or library.
## 🛠️ Changes Implemented
### 1. Web UI (`index.html`)
- Added a "Device Mapping" card at the top of the **iSCSI** section.
- Included a "Refresh" button for this specific section.
### 2. Backend (`api.php`)
- Added a new API action `device_mapping`.
- Implemented `getDeviceMapping()` function:
- Executes `lsscsi -g`.
- Filters output for `mediumx` (library) and `tape` devices.
- Parses output to extract SCSI ID, Type, Vendor, Model, and Device Path.
- Returns JSON structure.
### 3. Frontend (`script.js`)
- Implement `loadDeviceMapping()` function.
- Fetches data from `device_mapping` API.
- Renders a table with:
- SCSI ID (e.g., `[3:0:0:0]`)
- Type (e.g., `mediumx`, `tape`)
- Vendor/Product (e.g., `ADASTRA HEPHAESTUS-V`)
- Device Path (e.g., `/dev/sg6`) - **Highlighted** as this is crucial for LUN mapping.
## ✅ Verification
- The feature relies on `lsscsi` being available (which is standard in this environment).
- The `vtl` CLI tool also uses similar logic.
- The UI now clearly shows which `/dev/sgX` path to use when creating iSCSI LUNs.
## 📁 Files Modified
- `/builder/adastra-vtl/web-ui/index.html`
- `/builder/adastra-vtl/web-ui/api.php`
- `/builder/adastra-vtl/web-ui/script.js`
## 🚀 Status
Feature deployed to `/var/www/html/mhvtl-config/`.