Add usernames and sudo_usernames fields to VM request form

- DB: add usernames/sudo_usernames columns to vm_requests table
- create.php: add form inputs for usernames and sudo_usernames
- send.php: capture, validate, and store both fields in DB
- netbox_integration/netbox_api.php: pass custom_fields to NetBox VM API
- requests.php: show usernames/sudo_usernames in request list
This commit is contained in:
alex
2026-05-09 23:57:36 +02:00
parent d629689473
commit 8c069ee82a
5 changed files with 59 additions and 3 deletions
+2
View File
@@ -20,6 +20,8 @@ CREATE TABLE IF NOT EXISTS vm_requests (
requested_by VARCHAR(50) NOT NULL,
status ENUM('queued', 'building', 'ready', 'failed', 'deployed_to_netbox', 'cancelled') NOT NULL DEFAULT 'queued',
description VARCHAR(500) DEFAULT NULL,
usernames VARCHAR(500) DEFAULT NULL,
sudo_usernames VARCHAR(500) DEFAULT NULL,
netbox_device_id INT UNSIGNED NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
UNIQUE KEY vm_requests_vm_name_unique (vm_name),