From a38204511af0b0fb73cd416ac665c5f3cb277846 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 24 Mar 2026 13:17:53 +0800 Subject: [PATCH] refactor(control): align point roles and equipment kind --- src/control/validator.rs | 12 ------------ web/html/modals.html | 2 +- web/js/equipment.js | 6 ++++-- web/js/roles.js | 29 +++++++++++++++++------------ 4 files changed, 22 insertions(+), 27 deletions(-) diff --git a/src/control/validator.rs b/src/control/validator.rs index 934baa7..494556d 100644 --- a/src/control/validator.rs +++ b/src/control/validator.rs @@ -115,18 +115,6 @@ pub async fn validate_manual_control( } } - if let Some(estop_point) = role_map.get("estop").copied() { - let estop_monitor = monitor_guard - .get(&estop_point.point_id) - .ok_or_else(|| missing_monitor_err("ESTOP", equipment_id))?; - if monitor_value_as_bool(estop_monitor) { - return Err(ApiErr::Forbidden( - "Emergency stop is active, command denied".to_string(), - Some(json!({ "equipment_id": equipment_id })), - )); - } - } - let command_value_type = monitor_guard .get(&command_point.point_id) .and_then(|item| item.value_type.clone()); diff --git a/web/html/modals.html b/web/html/modals.html index 196c417..ea7a247 100644 --- a/web/html/modals.html +++ b/web/html/modals.html @@ -72,7 +72,7 @@