diff --git a/front/maintenance.php b/front/maintenance.php index f7bc0d04..d9f314a6 100755 --- a/front/maintenance.php +++ b/front/maintenance.php @@ -174,6 +174,12 @@ $db->close();
app.conf file.",
"Maintenance_Tool_DownloadWorkflows": "Workflows export",
"Maintenance_Tool_DownloadWorkflows_text": "Download a full backup of your Workflows stored in the workflows.json file.",
+ "Maintenance_Tool_UnlockFields": "Clear All Device Sources",
+ "Maintenance_Tool_UnlockFields_noti": "Clear All Device Sources",
+ "Maintenance_Tool_UnlockFields_noti_text": "Are you sure you want to clear all source values (LOCKED/USER) for all device fields on all devices? This action cannot be undone.",
+ "Maintenance_Tool_UnlockFields_text": "This tool will remove all source values from every tracked field for all devices, effectively unlocking all fields for plugins and users. Use this with caution, as it will affect your entire device inventory.",
"Maintenance_Tool_ExportCSV": "Devices export (csv)",
"Maintenance_Tool_ExportCSV_noti": "Devices export (csv)",
"Maintenance_Tool_ExportCSV_noti_text": "Are you sure you want to generate a CSV file?",
@@ -433,6 +437,9 @@
"Maintenance_Tool_del_alldev_text": "Before using this function, please make a backup. The deletion cannot be undone. All devices will be deleted from the database.",
"Maintenance_Tool_del_allevents": "Delete Events (Reset Presence)",
"Maintenance_Tool_del_allevents30": "Delete all Events older than 30 days",
+ "Maintenance_Tool_unlockFields_selecteddev": "Unlock device fields",
+ "Maintenance_Tool_unlockFields_selecteddev_noti": "Unlock fields",
+ "Maintenance_Tool_del_unlockFields_selecteddev_text": "This will unlock the LOCKED/USER fields of the selected devices. This action cannot be undone.",
"Maintenance_Tool_del_allevents30_noti": "Delete Events",
"Maintenance_Tool_del_allevents30_noti_text": "Are you sure you want to delete all Events older than 30 days? This resets presence of all devices.",
"Maintenance_Tool_del_allevents30_text": "Before using this function, please make a backup. The deletion cannot be undone. All events older than 30 days in the database will be deleted. At that moment the presence of all devices will be reset. This can lead to invalid sessions. This means that devices are displayed as \"present\" although they are offline. A scan while the device in question is online solves the problem.",
diff --git a/server/api_server/api_server_start.py b/server/api_server/api_server_start.py
index e509ca28..eefdb77a 100755
--- a/server/api_server/api_server_start.py
+++ b/server/api_server/api_server_start.py
@@ -72,7 +72,7 @@ from .openapi.schemas import ( # noqa: E402 [flake8 lint suppression]
BaseResponse, DeviceTotalsResponse,
DeleteDevicesRequest, DeviceImportRequest,
DeviceImportResponse, UpdateDeviceColumnRequest,
- LockDeviceFieldRequest,
+ LockDeviceFieldRequest, UnlockDeviceFieldsRequest,
CopyDeviceRequest, TriggerScanRequest,
OpenPortsRequest,
OpenPortsResponse, WakeOnLanRequest,
@@ -445,6 +445,10 @@ def api_device_update_column(mac, payload=None):
return jsonify(result)
+# --------------------------
+# Field sources and locking
+# --------------------------
+
@app.route("/device/