From 9784715f0c98ace3bc13516fa4250f41d2fdd904 Mon Sep 17 00:00:00 2001 From: Digby Blair Date: Sat, 31 Jan 2026 17:34:28 +0800 Subject: [PATCH] integrate sensor health pages --- .../API/backend/project-echo-openapi.json | 1104 +++++++++-------- .../HMI/ui/public/admin/add-project.html | 4 +- .../HMI/ui/public/admin/alerts.html | 4 +- .../admin/component/sidebar-component.html | 23 +- .../admin/component/sidebar-component2.html | 24 + .../HMI/ui/public/admin/feedback.html | 37 +- .../HMI/ui/public/admin/js/sidebarmenu.js | 17 +- .../HMI/ui/public/admin/reboot.html | 8 +- .../HMI/ui/public/admin/sensor-health.html | 82 +- .../ui/public/admin/sensor_health/alerts.html | 46 +- .../ui/public/admin/sensor_health/reboot.html | 49 +- .../public/admin/sensor_health/settings.html | 49 +- .../HMI/ui/public/admin/settings.html | 8 +- 13 files changed, 775 insertions(+), 680 deletions(-) diff --git a/src/Components/API/backend/project-echo-openapi.json b/src/Components/API/backend/project-echo-openapi.json index 8610aca01..3ae788af2 100644 --- a/src/Components/API/backend/project-echo-openapi.json +++ b/src/Components/API/backend/project-echo-openapi.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.2", + "openapi": "3.1.0", "info": { "title": "Project Echo API", "description": "\n Project Echo is an IoT-based system designed to record and analyze audio data for species identification and ecosystem monitoring.\n\n This API provides endpoints to:\n - Upload audio files\n - Simulate audio responses\n - Interface with HMI and audio engine modules\n ", @@ -56,8 +56,8 @@ { "required": true, "schema": { - "title": "Timestamp", - "type": "integer" + "type": "integer", + "title": "Timestamp" }, "name": "timestamp", "in": "query" @@ -65,8 +65,8 @@ { "required": true, "schema": { - "title": "Lat", - "type": "number" + "type": "number", + "title": "Lat" }, "name": "lat", "in": "query" @@ -74,8 +74,8 @@ { "required": true, "schema": { - "title": "Lon", - "type": "number" + "type": "number", + "title": "Lon" }, "name": "lon", "in": "query" @@ -114,8 +114,8 @@ { "required": true, "schema": { - "title": "Start", - "type": "string" + "type": "string", + "title": "Start" }, "name": "start", "in": "query" @@ -123,8 +123,8 @@ { "required": true, "schema": { - "title": "End", - "type": "string" + "type": "string", + "title": "End" }, "name": "end", "in": "query" @@ -163,8 +163,8 @@ { "required": true, "schema": { - "title": "Id", - "type": "string" + "type": "string", + "title": "Id" }, "name": "id", "in": "query" @@ -203,8 +203,8 @@ { "required": true, "schema": { - "title": "Start", - "type": "string" + "type": "string", + "title": "Start" }, "name": "start", "in": "query" @@ -212,8 +212,8 @@ { "required": true, "schema": { - "title": "End", - "type": "string" + "type": "string", + "title": "End" }, "name": "end", "in": "query" @@ -334,8 +334,8 @@ { "required": true, "schema": { - "title": "Control", - "type": "string" + "type": "string", + "title": "Control" }, "name": "control", "in": "query" @@ -491,8 +491,8 @@ { "required": true, "schema": { - "title": "Jwttoken", - "type": "string" + "type": "string", + "title": "Jwttoken" }, "name": "jwtToken", "in": "query" @@ -570,8 +570,8 @@ "content": { "application/json": { "schema": { - "title": "Request Dict", - "type": "object" + "type": "object", + "title": "Request Dict" } } }, @@ -615,8 +615,8 @@ "content": { "application/json": { "schema": { - "title": "Request Dict", - "type": "object" + "type": "object", + "title": "Request Dict" } } }, @@ -660,8 +660,8 @@ { "required": true, "schema": { - "title": "Oldpw", - "type": "string" + "type": "string", + "title": "Oldpw" }, "name": "oldpw", "in": "query" @@ -669,8 +669,8 @@ { "required": true, "schema": { - "title": "Newpw", - "type": "string" + "type": "string", + "title": "Newpw" }, "name": "newpw", "in": "query" @@ -678,8 +678,8 @@ { "required": true, "schema": { - "title": "Cfm Newpw", - "type": "string" + "type": "string", + "title": "Cfm Newpw" }, "name": "cfm_newpw", "in": "query" @@ -734,7 +734,10 @@ "description": "Successful Response", "content": { "application/json": { - "schema": {} + "schema": { + "type": "object", + "title": "Response Checkadmin Hmi Admin Dashboard Post" + } } } }, @@ -791,8 +794,8 @@ { "required": true, "schema": { - "title": "Field", - "type": "string" + "type": "string", + "title": "Field" }, "name": "field", "in": "query" @@ -800,8 +803,8 @@ { "required": true, "schema": { - "title": "New", - "type": "string" + "type": "string", + "title": "New" }, "name": "new", "in": "query" @@ -947,8 +950,8 @@ { "required": true, "schema": { - "title": "Algorithm Type", - "type": "string" + "type": "string", + "title": "Algorithm Type" }, "name": "algorithm_type", "in": "path" @@ -987,8 +990,8 @@ { "required": true, "schema": { - "title": "User Id", - "type": "string" + "type": "string", + "title": "User Id" }, "name": "user_id", "in": "path" @@ -1030,8 +1033,8 @@ { "required": true, "schema": { - "title": "User Id", - "type": "string" + "type": "string", + "title": "User Id" }, "name": "user_id", "in": "path" @@ -1085,8 +1088,8 @@ { "required": true, "schema": { - "title": "User Id", - "type": "string" + "type": "string", + "title": "User Id" }, "name": "user_id", "in": "path" @@ -1094,8 +1097,8 @@ { "required": true, "schema": { - "title": "Species", - "type": "string" + "type": "string", + "title": "Species" }, "name": "species", "in": "path" @@ -1158,8 +1161,8 @@ { "required": true, "schema": { - "title": "Username", - "type": "string" + "type": "string", + "title": "Username" }, "name": "username", "in": "path" @@ -1167,8 +1170,8 @@ { "required": false, "schema": { - "title": "Visit Duration", "type": "number", + "title": "Visit Duration", "default": 5.0 }, "name": "visit_duration", @@ -1247,8 +1250,8 @@ { "required": false, "schema": { - "title": "Species", "type": "string", + "title": "Species", "default": "" }, "name": "species", @@ -1257,8 +1260,8 @@ { "required": false, "schema": { - "title": "Event Start", "type": "string", + "title": "Event Start", "default": "" }, "name": "event_start", @@ -1267,8 +1270,8 @@ { "required": false, "schema": { - "title": "Event End", "type": "string", + "title": "Event End", "default": "" }, "name": "event_end", @@ -1277,8 +1280,8 @@ { "required": false, "schema": { - "title": "Microphonella 0", - "type": "number" + "type": "number", + "title": "Microphonella 0" }, "name": "microphoneLLA_0", "in": "query" @@ -1286,8 +1289,8 @@ { "required": false, "schema": { - "title": "Microphonella 1", - "type": "number" + "type": "number", + "title": "Microphonella 1" }, "name": "microphoneLLA_1", "in": "query" @@ -1295,8 +1298,8 @@ { "required": false, "schema": { - "title": "Microphonella 2", - "type": "number" + "type": "number", + "title": "Microphonella 2" }, "name": "microphoneLLA_2", "in": "query" @@ -1393,11 +1396,11 @@ "content": { "application/json": { "schema": { - "title": "Microphones", - "type": "array", "items": { "$ref": "#/components/schemas/MicrophoneSchema" - } + }, + "type": "array", + "title": "Microphones" } } }, @@ -1522,8 +1525,8 @@ { "required": false, "schema": { - "title": "Start Time", - "type": "number" + "type": "number", + "title": "Start Time" }, "name": "start_time", "in": "query" @@ -1531,8 +1534,8 @@ { "required": false, "schema": { - "title": "End Time", - "type": "number" + "type": "number", + "title": "End Time" }, "name": "end_time", "in": "query" @@ -1540,8 +1543,8 @@ { "required": false, "schema": { - "title": "Species", - "type": "string" + "type": "string", + "title": "Species" }, "name": "species", "in": "query" @@ -1549,8 +1552,8 @@ { "required": false, "schema": { - "title": "Microphone Id", - "type": "string" + "type": "string", + "title": "Microphone Id" }, "name": "microphone_id", "in": "query" @@ -1608,8 +1611,8 @@ { "required": true, "schema": { - "title": "Node Id", - "type": "string" + "type": "string", + "title": "Node Id" }, "name": "node_id", "in": "path" @@ -1648,8 +1651,8 @@ { "required": true, "schema": { - "title": "Node Id", - "type": "string" + "type": "string", + "title": "Node Id" }, "name": "node_id", "in": "path" @@ -1688,8 +1691,8 @@ { "required": true, "schema": { - "title": "Node Id", - "type": "string" + "type": "string", + "title": "Node Id" }, "name": "node_id", "in": "path" @@ -1728,8 +1731,8 @@ { "required": true, "schema": { - "title": "Node Id", - "type": "string" + "type": "string", + "title": "Node Id" }, "name": "node_id", "in": "path" @@ -1768,8 +1771,8 @@ { "required": true, "schema": { - "title": "Node Id", - "type": "string" + "type": "string", + "title": "Node Id" }, "name": "node_id", "in": "path" @@ -1808,8 +1811,8 @@ { "required": true, "schema": { - "title": "Node Id", - "type": "string" + "type": "string", + "title": "Node Id" }, "name": "node_id", "in": "path" @@ -2208,8 +2211,8 @@ { "required": false, "schema": { - "title": "Limit", "type": "integer", + "title": "Limit", "default": 10 }, "name": "limit", @@ -2344,8 +2347,8 @@ "description": "Filter by species name (exact match)", "required": false, "schema": { - "title": "Species", "type": "string", + "title": "Species", "description": "Filter by species name (exact match)" }, "name": "species", @@ -2355,10 +2358,10 @@ "description": "Filter detections from this timestamp (inclusive, ISO 8601)", "required": false, "schema": { - "title": "Start Time", "type": "string", - "description": "Filter detections from this timestamp (inclusive, ISO 8601)", - "format": "date-time" + "format": "date-time", + "title": "Start Time", + "description": "Filter detections from this timestamp (inclusive, ISO 8601)" }, "name": "start_time", "in": "query" @@ -2367,10 +2370,10 @@ "description": "Filter detections up to this timestamp (inclusive, ISO 8601)", "required": false, "schema": { - "title": "End Time", "type": "string", - "description": "Filter detections up to this timestamp (inclusive, ISO 8601)", - "format": "date-time" + "format": "date-time", + "title": "End Time", + "description": "Filter detections up to this timestamp (inclusive, ISO 8601)" }, "name": "end_time", "in": "query" @@ -2379,8 +2382,8 @@ "description": "Latitude for location filter (requires lon & radius_km)", "required": false, "schema": { - "title": "Lat", "type": "number", + "title": "Lat", "description": "Latitude for location filter (requires lon & radius_km)" }, "name": "lat", @@ -2390,8 +2393,8 @@ "description": "Longitude for location filter (requires lat & radius_km)", "required": false, "schema": { - "title": "Lon", "type": "number", + "title": "Lon", "description": "Longitude for location filter (requires lat & radius_km)" }, "name": "lon", @@ -2401,8 +2404,8 @@ "description": "Radius in kilometres for location filter (requires lat & lon)", "required": false, "schema": { - "title": "Radius Km", "type": "number", + "title": "Radius Km", "description": "Radius in kilometres for location filter (requires lat & lon)" }, "name": "radius_km", @@ -2412,9 +2415,9 @@ "description": "Page number (1-based)", "required": false, "schema": { - "title": "Page", - "minimum": 1.0, "type": "integer", + "minimum": 1.0, + "title": "Page", "description": "Page number (1-based)", "default": 1 }, @@ -2425,10 +2428,10 @@ "description": "Number of detections per page (max 100)", "required": false, "schema": { - "title": "Page Size", + "type": "integer", "maximum": 100.0, "minimum": 1.0, - "type": "integer", + "title": "Page Size", "description": "Number of detections per page (max 100)", "default": 20 }, @@ -2442,7 +2445,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DetectionListResponse" + "$ref": "#/components/schemas/DetectionListResponses" } } } @@ -2511,8 +2514,8 @@ "description": "MongoDB ObjectId of the detection", "required": true, "schema": { - "title": "Detection Id", "type": "string", + "title": "Detection Id", "description": "MongoDB ObjectId of the detection" }, "name": "detection_id", @@ -2553,8 +2556,8 @@ "description": "MongoDB ObjectId of the detection", "required": true, "schema": { - "title": "Detection Id", "type": "string", + "title": "Detection Id", "description": "MongoDB ObjectId of the detection" }, "name": "detection_id", @@ -2593,8 +2596,8 @@ "description": "MongoDB ObjectId of the detection", "required": true, "schema": { - "title": "Detection Id", "type": "string", + "title": "Detection Id", "description": "MongoDB ObjectId of the detection" }, "name": "detection_id", @@ -2605,8 +2608,8 @@ "content": { "application/json": { "schema": { - "title": "Updates", "type": "object", + "title": "Updates", "description": "Partial update payload" } } @@ -2641,170 +2644,170 @@ "components": { "schemas": { "AddressSchema": { - "title": "AddressSchema", - "required": [ - "country" - ], - "type": "object", "properties": { "country": { - "title": "Country", - "type": "string" + "type": "string", + "title": "Country" }, "state": { - "title": "State", - "type": "string" + "type": "string", + "title": "State" } - } - }, - "AnimalNotificationSchema": { - "title": "AnimalNotificationSchema", + }, + "type": "object", "required": [ - "species", - "confidence", - "common" + "country" ], - "type": "object", + "title": "AddressSchema" + }, + "AnimalNotificationSchema": { "properties": { "species": { - "title": "Species", - "type": "string" + "type": "string", + "title": "Species" }, "confidence": { - "title": "Confidence", - "type": "number" + "type": "number", + "title": "Confidence" }, "common": { - "title": "Common", - "type": "string" + "type": "string", + "title": "Common" } }, + "type": "object", + "required": [ + "species", + "confidence", + "common" + ], + "title": "AnimalNotificationSchema", "example": { "species": "Sus scrofa", "common": "Wild Boar" } }, "Body_predict_predict_post": { - "title": "Body_predict_predict_post", - "required": [ - "audio" - ], - "type": "object", "properties": { "audio": { - "title": "Audio", "type": "string", - "format": "binary" + "format": "binary", + "title": "Audio" }, "upload_id": { - "title": "Upload Id", - "type": "string" + "type": "string", + "title": "Upload Id" }, "user_id": { - "title": "User Id", - "type": "string" + "type": "string", + "title": "User Id" } - } - }, - "Body_upload_audio_api_audio_upload_post": { - "title": "Body_upload_audio_api_audio_upload_post", + }, + "type": "object", "required": [ - "file" + "audio" ], - "type": "object", + "title": "Body_predict_predict_post" + }, + "Body_upload_audio_api_audio_upload_post": { "properties": { "file": { - "title": "File", "type": "string", - "format": "binary" + "format": "binary", + "title": "File" }, "user_id": { - "title": "User Id", - "type": "string" + "type": "string", + "title": "User Id" } - } - }, - "Detection": { - "title": "Detection", + }, + "type": "object", "required": [ - "timestamp", - "sensorId", - "species", - "microphoneLLA", - "animalEstLLA", - "animalTrueLLA", - "animalLLAUncertainty", - "audioClip", - "confidence", - "sampleRate" + "file" ], - "type": "object", + "title": "Body_upload_audio_api_audio_upload_post" + }, + "Detection": { "properties": { "timestamp": { - "title": "Timestamp", "type": "string", - "format": "date-time" + "format": "date-time", + "title": "Timestamp" }, "sensorId": { - "title": "Sensorid", + "type": "string", "minLength": 1, - "type": "string" + "title": "Sensorid" }, "species": { - "title": "Species", + "type": "string", "minLength": 1, - "type": "string" + "title": "Species" }, "microphoneLLA": { - "title": "Microphonella", - "maxItems": 3, - "minItems": 3, - "type": "array", "items": { "type": "number" - } - }, - "animalEstLLA": { - "title": "Animalestlla", + }, + "type": "array", "maxItems": 3, "minItems": 3, - "type": "array", + "title": "Microphonella" + }, + "animalEstLLA": { "items": { "type": "number" - } - }, - "animalTrueLLA": { - "title": "Animaltruella", + }, + "type": "array", "maxItems": 3, "minItems": 3, - "type": "array", + "title": "Animalestlla" + }, + "animalTrueLLA": { "items": { "type": "number" - } + }, + "type": "array", + "maxItems": 3, + "minItems": 3, + "title": "Animaltruella" }, "animalLLAUncertainty": { - "title": "Animalllauncertainty", - "type": "integer" + "type": "integer", + "title": "Animalllauncertainty" }, "audioClip": { - "title": "Audioclip", - "type": "string" + "type": "string", + "title": "Audioclip" }, "confidence": { - "title": "Confidence", + "type": "number", "exclusiveMaximum": 100.0, "exclusiveMinimum": 0.0, - "type": "number" + "title": "Confidence" }, "sampleRate": { - "title": "Samplerate", - "type": "integer" + "type": "integer", + "title": "Samplerate" }, "_id": { - "title": " Id", - "type": "string" + "type": "string", + "title": " Id" } }, + "type": "object", + "required": [ + "timestamp", + "sensorId", + "species", + "microphoneLLA", + "animalEstLLA", + "animalTrueLLA", + "animalLLAUncertainty", + "audioClip", + "confidence", + "sampleRate" + ], + "title": "Detection", "example": { "timestamp": "2023-03-22T13:45:12.000Z", "sensorId": "2", @@ -2831,82 +2834,82 @@ } }, "DetectionCreate": { - "title": "DetectionCreate", - "required": [ - "timestamp", - "sensorId", - "species", - "microphoneLLA", - "animalEstLLA", - "animalTrueLLA", - "animalLLAUncertainty", - "audioClip", - "confidence", - "sampleRate" - ], - "type": "object", "properties": { "timestamp": { - "title": "Timestamp", "type": "string", - "format": "date-time" + "format": "date-time", + "title": "Timestamp" }, "sensorId": { - "title": "Sensorid", + "type": "string", "minLength": 1, - "type": "string" + "title": "Sensorid" }, "species": { - "title": "Species", + "type": "string", "minLength": 1, - "type": "string" + "title": "Species" }, "microphoneLLA": { - "title": "Microphonella", - "maxItems": 3, - "minItems": 3, - "type": "array", "items": { "type": "number" - } - }, - "animalEstLLA": { - "title": "Animalestlla", + }, + "type": "array", "maxItems": 3, "minItems": 3, - "type": "array", + "title": "Microphonella" + }, + "animalEstLLA": { "items": { "type": "number" - } - }, - "animalTrueLLA": { - "title": "Animaltruella", + }, + "type": "array", "maxItems": 3, "minItems": 3, - "type": "array", + "title": "Animalestlla" + }, + "animalTrueLLA": { "items": { "type": "number" - } + }, + "type": "array", + "maxItems": 3, + "minItems": 3, + "title": "Animaltruella" }, "animalLLAUncertainty": { - "title": "Animalllauncertainty", - "type": "integer" + "type": "integer", + "title": "Animalllauncertainty" }, "audioClip": { - "title": "Audioclip", - "type": "string" + "type": "string", + "title": "Audioclip" }, "confidence": { - "title": "Confidence", + "type": "number", "exclusiveMaximum": 100.0, "exclusiveMinimum": 0.0, - "type": "number" + "title": "Confidence" }, "sampleRate": { - "title": "Samplerate", - "type": "integer" + "type": "integer", + "title": "Samplerate" } }, + "type": "object", + "required": [ + "timestamp", + "sensorId", + "species", + "microphoneLLA", + "animalEstLLA", + "animalTrueLLA", + "animalLLAUncertainty", + "audioClip", + "confidence", + "sampleRate" + ], + "title": "DetectionCreate", "example": { "timestamp": "2023-03-22T13:45:12.000Z", "sensorId": "2", @@ -2933,136 +2936,136 @@ } }, "DetectionListResponses": { - "title": "DetectionListResponses", - "required": [ - "items", - "total", - "page", - "page_size" - ], - "type": "object", "properties": { "items": { - "title": "Items", - "type": "array", "items": { "$ref": "#/components/schemas/Detection" - } + }, + "type": "array", + "title": "Items" }, "total": { - "title": "Total", - "type": "integer" + "type": "integer", + "title": "Total" }, "page": { - "title": "Page", - "type": "integer" + "type": "integer", + "title": "Page" }, "page_size": { - "title": "Page Size", - "type": "integer" + "type": "integer", + "title": "Page Size" } - } - }, - "EmailNotifications": { - "title": "EmailNotifications", + }, + "type": "object", "required": [ - "species", - "last_sent" + "items", + "total", + "page", + "page_size" ], - "type": "object", + "title": "DetectionListResponses" + }, + "EmailNotifications": { "properties": { "species": { - "title": "Species", - "type": "string" + "type": "string", + "title": "Species" }, "last_sent": { - "title": "Last Sent", "type": "string", - "format": "date-time" + "format": "date-time", + "title": "Last Sent" } }, + "type": "object", + "required": [ + "species", + "last_sent" + ], + "title": "EmailNotifications", "example": { "species": "Sus scrofa", "last_sent": "2024-09-15T10:30:00Z" } }, "EventSchema": { - "title": "EventSchema", - "required": [ - "timestamp", - "sensorId", - "species", - "microphoneLLA", - "animalEstLLA", - "animalTrueLLA", - "animalLLAUncertainty", - "audioClip", - "confidence", - "sampleRate" - ], - "type": "object", "properties": { "timestamp": { - "title": "Timestamp", "type": "string", - "format": "date-time" + "format": "date-time", + "title": "Timestamp" }, "sensorId": { - "title": "Sensorid", + "type": "string", "minLength": 1, - "type": "string" + "title": "Sensorid" }, "species": { - "title": "Species", + "type": "string", "minLength": 1, - "type": "string" + "title": "Species" }, "microphoneLLA": { - "title": "Microphonella", - "maxItems": 3, - "minItems": 3, - "type": "array", "items": { "type": "number" - } - }, - "animalEstLLA": { - "title": "Animalestlla", + }, + "type": "array", "maxItems": 3, "minItems": 3, - "type": "array", + "title": "Microphonella" + }, + "animalEstLLA": { "items": { "type": "number" - } - }, - "animalTrueLLA": { - "title": "Animaltruella", + }, + "type": "array", "maxItems": 3, "minItems": 3, - "type": "array", + "title": "Animalestlla" + }, + "animalTrueLLA": { "items": { "type": "number" - } + }, + "type": "array", + "maxItems": 3, + "minItems": 3, + "title": "Animaltruella" }, "animalLLAUncertainty": { - "title": "Animalllauncertainty", - "type": "integer" + "type": "integer", + "title": "Animalllauncertainty" }, "audioClip": { - "title": "Audioclip", - "type": "string" + "type": "string", + "title": "Audioclip" }, "confidence": { - "title": "Confidence", + "type": "number", "exclusiveMaximum": 100.0, "exclusiveMinimum": 0.0, - "type": "number" + "title": "Confidence" }, "sampleRate": { - "title": "Samplerate", - "type": "integer" + "type": "integer", + "title": "Samplerate" } }, + "type": "object", + "required": [ + "timestamp", + "sensorId", + "species", + "microphoneLLA", + "animalEstLLA", + "animalTrueLLA", + "animalLLAUncertainty", + "audioClip", + "confidence", + "sampleRate" + ], + "title": "EventSchema", "example": { "timestamp": "2023-03-22T13:45:12.000Z", "sensorId": "2", @@ -3089,83 +3092,83 @@ } }, "ForgotPasswordSchema": { - "title": "ForgotPasswordSchema", - "required": [ - "user" - ], - "type": "object", "properties": { "user": { - "title": "User", - "type": "string" + "type": "string", + "title": "User" } - } - }, - "GuestSignupSchema": { - "title": "GuestSignupSchema", + }, + "type": "object", "required": [ - "username", - "email", - "password", - "timestamp" + "user" ], - "type": "object", + "title": "ForgotPasswordSchema" + }, + "GuestSignupSchema": { "properties": { "username": { - "title": "Username", - "type": "string" + "type": "string", + "title": "Username" }, "email": { - "title": "Email", - "type": "string" + "type": "string", + "title": "Email" }, "password": { - "title": "Password", - "type": "string" + "type": "string", + "title": "Password" }, "timestamp": { - "title": "Timestamp", "type": "string", - "format": "date-time" + "format": "date-time", + "title": "Timestamp" } - } + }, + "type": "object", + "required": [ + "username", + "email", + "password", + "timestamp" + ], + "title": "GuestSignupSchema" }, "HTTPValidationError": { - "title": "HTTPValidationError", - "type": "object", "properties": { "detail": { - "title": "Detail", - "type": "array", "items": { "$ref": "#/components/schemas/ValidationError" - } + }, + "type": "array", + "title": "Detail" } - } + }, + "type": "object", + "title": "HTTPValidationError" }, "MicrophoneSchema": { - "title": "MicrophoneSchema", - "required": [ - "sensorId", - "microphoneLLA" - ], - "type": "object", "properties": { "sensorId": { - "title": "Sensorid", + "type": "string", "minLength": 1, - "type": "string" + "title": "Sensorid" }, "microphoneLLA": { - "title": "Microphonella", - "maxItems": 3, - "minItems": 3, - "type": "array", "items": { "type": "number" - } + }, + "type": "array", + "maxItems": 3, + "minItems": 3, + "title": "Microphonella" } }, + "type": "object", + "required": [ + "sensorId", + "microphoneLLA" + ], + "title": "MicrophoneSchema", "example": { "sensorId": "2", "microphoneLLA": [ @@ -3176,40 +3179,40 @@ } }, "MovementSchema": { - "title": "MovementSchema", - "required": [ - "timestamp", - "species", - "animalId", - "animalTrueLLA" - ], - "type": "object", "properties": { "timestamp": { - "title": "Timestamp", "type": "string", - "format": "date-time" + "format": "date-time", + "title": "Timestamp" }, "species": { - "title": "Species", + "type": "string", "minLength": 1, - "type": "string" + "title": "Species" }, "animalId": { - "title": "Animalid", + "type": "string", "minLength": 1, - "type": "string" + "title": "Animalid" }, "animalTrueLLA": { - "title": "Animaltruella", - "maxItems": 3, - "minItems": 3, - "type": "array", "items": { "type": "number" - } + }, + "type": "array", + "maxItems": 3, + "minItems": 3, + "title": "Animaltruella" } }, + "type": "object", + "required": [ + "timestamp", + "species", + "animalId", + "animalTrueLLA" + ], + "title": "MovementSchema", "example": { "timestamp": "2023-03-22T13:45:12.000Z", "species": "Sus Scrofa", @@ -3222,321 +3225,328 @@ } }, "OTPVerifyRequest": { - "title": "OTPVerifyRequest", - "required": [ - "email", - "otp" - ], - "type": "object", "properties": { "email": { - "title": "Email", - "type": "string" + "type": "string", + "title": "Email" }, "otp": { - "title": "Otp", - "type": "string" + "type": "string", + "title": "Otp" } - } - }, - "RecordingData": { - "title": "RecordingData", + }, + "type": "object", "required": [ - "timestamp", - "sensorId", - "microphoneLLA", - "animalEstLLA", - "animalTrueLLA", - "animalLLAUncertainty", - "audioClip", - "mode", - "audioFile" + "email", + "otp" ], - "type": "object", + "title": "OTPVerifyRequest" + }, + "RecordingData": { "properties": { "timestamp": { - "title": "Timestamp", "type": "string", - "format": "date-time" + "format": "date-time", + "title": "Timestamp" }, "sensorId": { - "title": "Sensorid", - "type": "string" + "type": "string", + "title": "Sensorid" }, "microphoneLLA": { - "title": "Microphonella", - "maxItems": 3, - "minItems": 3, - "type": "array", "items": { "type": "number" - } - }, - "animalEstLLA": { - "title": "Animalestlla", + }, + "type": "array", "maxItems": 3, "minItems": 3, - "type": "array", + "title": "Microphonella" + }, + "animalEstLLA": { "items": { "type": "number" - } - }, - "animalTrueLLA": { - "title": "Animaltruella", + }, + "type": "array", "maxItems": 3, "minItems": 3, - "type": "array", + "title": "Animalestlla" + }, + "animalTrueLLA": { "items": { "type": "number" - } + }, + "type": "array", + "maxItems": 3, + "minItems": 3, + "title": "Animaltruella" }, "animalLLAUncertainty": { - "title": "Animalllauncertainty", + "type": "number", "exclusiveMinimum": 0.0, - "type": "number" + "title": "Animalllauncertainty" }, "audioClip": { - "title": "Audioclip", - "type": "string" + "type": "string", + "title": "Audioclip" }, "mode": { - "title": "Mode", - "type": "string" + "type": "string", + "title": "Mode" }, "audioFile": { - "title": "Audiofile", - "type": "string" + "type": "string", + "title": "Audiofile" } - } - }, - "RequestSchema": { - "title": "RequestSchema", + }, + "type": "object", "required": [ - "username", - "animal", - "requestingToChange", - "initial", - "modified", - "source", - "date", - "status" + "timestamp", + "sensorId", + "microphoneLLA", + "animalEstLLA", + "animalTrueLLA", + "animalLLAUncertainty", + "audioClip", + "mode", + "audioFile" ], - "type": "object", + "title": "RecordingData" + }, + "RequestSchema": { "properties": { "username": { - "title": "Username", - "type": "string" + "type": "string", + "title": "Username" }, "animal": { - "title": "Animal", - "type": "string" + "type": "string", + "title": "Animal" }, "requestingToChange": { - "title": "Requestingtochange", - "type": "string" + "type": "string", + "title": "Requestingtochange" }, "initial": { - "title": "Initial", - "type": "string" + "type": "string", + "title": "Initial" }, "modified": { - "title": "Modified", - "type": "string" + "type": "string", + "title": "Modified" }, "source": { - "title": "Source", - "type": "string" + "type": "string", + "title": "Source" }, "date": { - "title": "Date", "type": "string", - "format": "date-time" + "format": "date-time", + "title": "Date" }, "status": { - "title": "Status", - "type": "string" + "type": "string", + "title": "Status" } - } - }, - "ResetPasswordSchema": { - "title": "ResetPasswordSchema", + }, + "type": "object", "required": [ - "user", - "password", - "otp" + "username", + "animal", + "requestingToChange", + "initial", + "modified", + "source", + "date", + "status" ], - "type": "object", + "title": "RequestSchema" + }, + "ResetPasswordSchema": { "properties": { "user": { - "title": "User", - "type": "string" + "type": "string", + "title": "User" }, "password": { - "title": "Password", - "type": "string" + "type": "string", + "title": "Password" }, "otp": { - "title": "Otp", - "type": "integer" + "type": "integer", + "title": "Otp" } - } - }, - "SignInRequest": { - "title": "SignInRequest", + }, + "type": "object", "required": [ - "email", - "password" + "user", + "password", + "otp" ], - "type": "object", + "title": "ResetPasswordSchema" + }, + "SignInRequest": { "properties": { "email": { - "title": "Email", - "type": "string" + "type": "string", + "title": "Email" }, "password": { - "title": "Password", - "type": "string" + "type": "string", + "title": "Password" } - } - }, - "TwoFactorVerifySchema": { - "title": "TwoFactorVerifySchema", + }, + "type": "object", "required": [ - "user_id", - "otp" + "email", + "password" ], - "type": "object", + "title": "SignInRequest" + }, + "TwoFactorVerifySchema": { "properties": { "user_id": { - "title": "User Id", - "type": "string" + "type": "string", + "title": "User Id" }, "otp": { - "title": "Otp", - "type": "string" + "type": "string", + "title": "Otp" } - } - }, - "UserLoginSchema": { - "title": "UserLoginSchema", + }, + "type": "object", "required": [ - "username", - "email", - "password" + "user_id", + "otp" ], - "type": "object", + "title": "TwoFactorVerifySchema" + }, + "UserLoginSchema": { "properties": { "username": { - "title": "Username", - "type": "string" + "type": "string", + "title": "Username" }, "email": { - "title": "Email", - "type": "string" + "type": "string", + "title": "Email" }, "password": { - "title": "Password", - "type": "string" + "type": "string", + "title": "Password" } - } - }, - "UserSignupSchema": { - "title": "UserSignupSchema", + }, + "type": "object", "required": [ "username", - "password", "email", - "roles", - "gender", - "DoB", - "address", - "organization" + "password" ], - "type": "object", + "title": "UserLoginSchema" + }, + "UserSignupSchema": { "properties": { "username": { - "title": "Username", - "type": "string" + "type": "string", + "title": "Username" }, "password": { - "title": "Password", + "type": "string", "minLength": 8, - "type": "string" + "title": "Password" }, "email": { - "title": "Email", - "type": "string" + "type": "string", + "title": "Email" }, "roles": { - "title": "Roles", - "type": "array", "items": { "type": "string" - } + }, + "type": "array", + "title": "Roles" }, "gender": { - "title": "Gender", - "type": "string" + "type": "string", + "title": "Gender" }, "DoB": { - "title": "Dob", "type": "string", - "format": "date-time" + "format": "date-time", + "title": "Dob" }, "address": { "$ref": "#/components/schemas/AddressSchema" }, "organization": { - "title": "Organization", - "type": "string" + "type": "string", + "title": "Organization" }, "phonenumber": { - "title": "Phonenumber", - "type": "string" + "type": "string", + "title": "Phonenumber" }, "notificationAnimals": { - "title": "Notificationanimals", - "type": "array", "items": { "$ref": "#/components/schemas/AnimalNotificationSchema" }, + "type": "array", + "title": "Notificationanimals", "default": [] }, "emailNotifications": { - "title": "Emailnotifications", - "type": "array", "items": { "$ref": "#/components/schemas/EmailNotifications" }, + "type": "array", + "title": "Emailnotifications", "default": [] } - } - }, - "ValidationError": { - "title": "ValidationError", + }, + "type": "object", "required": [ - "loc", - "msg", - "type" + "username", + "password", + "email", + "roles", + "gender", + "DoB", + "address", + "organization" ], - "type": "object", + "title": "UserSignupSchema" + }, + "ValidationError": { "properties": { "loc": { - "title": "Location", - "type": "array", "items": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": "array", + "title": "Location" }, "msg": { - "title": "Message", - "type": "string" + "type": "string", + "title": "Message" }, "type": { - "title": "Error Type", - "type": "string" + "type": "string", + "title": "Error Type" } - } + }, + "type": "object", + "required": [ + "loc", + "msg", + "type" + ], + "title": "ValidationError" } }, "securitySchemes": { diff --git a/src/Components/HMI/ui/public/admin/add-project.html b/src/Components/HMI/ui/public/admin/add-project.html index ceab232fb..3bfdf3148 100644 --- a/src/Components/HMI/ui/public/admin/add-project.html +++ b/src/Components/HMI/ui/public/admin/add-project.html @@ -39,12 +39,12 @@ Alerts - + Reboot - + Settings diff --git a/src/Components/HMI/ui/public/admin/alerts.html b/src/Components/HMI/ui/public/admin/alerts.html index f41eb5ba0..a02871243 100644 --- a/src/Components/HMI/ui/public/admin/alerts.html +++ b/src/Components/HMI/ui/public/admin/alerts.html @@ -40,12 +40,12 @@ Alerts - + Reboot - + Settings diff --git a/src/Components/HMI/ui/public/admin/component/sidebar-component.html b/src/Components/HMI/ui/public/admin/component/sidebar-component.html index 2080aa25a..e5cecaa35 100644 --- a/src/Components/HMI/ui/public/admin/component/sidebar-component.html +++ b/src/Components/HMI/ui/public/admin/component/sidebar-component.html @@ -6,6 +6,10 @@ #sidebarnav a:hover{background:#F0F7F2;color:var(--ink)} /* visible focus ring for accessibility */ #sidebarnav a:focus{outline:2px solid rgba(47,110,79,0.12);outline-offset:2px} + /* Submenu visuals: smaller font, muted color, inset by 20px */ + #sidebarnav .first-level > li > a.sub-link{ display:block; padding-left:36px; font-size:13px; color:var(--muted); height:36px; line-height:36px; text-decoration:none; font-weight:500; } + #sidebarnav .first-level > li > a.sub-link:hover{ background:#F7FBF7; color:var(--ink); } + #sidebarnav .first-level > li > a.sub-link.active{ color:var(--primary); background:transparent; font-weight:600; }