using Admin.NET.Plugin.AiDOP.Dto.S8; using Admin.NET.Plugin.AiDOP.Infrastructure; using Admin.NET.Plugin.AiDOP.Service.S8; namespace Admin.NET.Plugin.AiDOP.Controllers.S8; [ApiController] [Route("api/aidop/s8/config/monitor-options")] [NonUnify] public class AdoS8ConfigMonitorDictionaryController : ControllerBase { private readonly S8MonitorDictionaryService _svc; private readonly S8TrustedScopeResolver _scope; public AdoS8ConfigMonitorDictionaryController(S8MonitorDictionaryService svc, S8TrustedScopeResolver scope) { _svc = svc; _scope = scope; } /// /// 监控对象/指标只读字典。返回结构与前端 BUSINESS_MONITOR_OPTIONS 同形。 /// CONFIG-MONITOR-DICT-READONLY-SEED-1。 /// [HttpGet] public async Task GetOptionsAsync( [FromQuery] long tenantId = 1, [FromQuery] long factoryId = 1) { // Compatibility-only. Security scope is resolved server-side. _ = tenantId; _ = factoryId; var scope = await _scope.ResolveAsync(); return Ok(await _svc.GetOptionsAsync(scope.TenantId, scope.FactoryId)); } }