You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
开放接口报警明细:新增报警历史分页 GET /openApi/alarm/pageAlarm、当前活跃离线报警 GET /openApi/alarm/listActive(不分页)与越限记录分页 GET /openApi/alarm/pageThresholdRecord,与既有的可靠性 / 异常聚合报表互补,回答「具体是哪几条」(开放接口文档 v1.7,4.9–4.11)。
开放接口订阅设备与点位同步:新增 GET /openApi/subscription/devicePoint/sync,按 deviceId 游标分批返回订阅报文维护的设备 / 点位元信息(mqtt_subscription_device_point),形态与 4.5 设备同步一致,供外部系统全量遍历(开放接口文档 v1.8,4.12)。
设备/点位被触发规则引用时拒绝删除:删除设备(单条与批量)前检查事件触发规则的动作设备、动作点位与条件点位引用;删除点位(单条与批量)前检查动作点位与条件点位引用。有引用时分别返回新错误码 40063 / 40064 并整批不删,避免删除后规则持续报 condition address ... not found、且再也无法触发。先修改或删除相关规则即可恢复删除。
Added
Kafka push channel: adds the kafka type backed by the pure-Go franz-go client, supporting multiple seed brokers, SASL/PLAIN, TLS, acks (all/leader/none, with idempotent writes disabled for non-all), an auto-create-topic switch and the shared offline spool/replay. It reuses every message format (native-json / group-json / mapping-json / script), group subscriptions, payload preview and test send; the record key is the device code (falling back to the device ID) so one device stays on one partition, and workers defaults to 1 for ordered sends. Adds migration 035_add_kafka_push_channel_form.sql.
OpenAPI alarm details: adds alarm-history paging GET /openApi/alarm/pageAlarm, currently-active offline alarms GET /openApi/alarm/listActive (unpaginated) and threshold-record paging GET /openApi/alarm/pageThresholdRecord, complementing the existing reliability / abnormality aggregates with "which alarms exactly" detail queries (OpenAPI docs v1.7, 4.9–4.11).
OpenAPI subscription device/point sync: adds GET /openApi/subscription/devicePoint/sync, returning device/point metadata maintained from subscription messages (mqtt_subscription_device_point) in device-level cursor batches, mirroring 4.5 for full external traversal (OpenAPI docs v1.8, 4.12).
OpenAPI thing-model batch upsert: adds POST /openApi/thingModel/batchUpsert, letting external systems create or update thing models and their properties in batches by the code / identifier natural keys (create if absent, update if present). Each model is one transaction with partial success across models; every entry reports created/updated/failed plus an error code. Properties absent from the request are never deleted, and changing kind/accessMode on a property bound to a point is still rejected (41018) (OpenAPI docs v1.9, 4.13).
OpenAPI thing-model batch delete: adds POST /openApi/thingModel/batchDelete (delete models by code, including their properties) and POST /openApi/thingModelProperty/batchDelete (delete properties by modelCode + identifier). Each entry reports deleted/failed plus an error code, with partial success across entries. The single-delete binding guards are reused (a model bound to a device or whose properties are bound to points returns 41005; a bound property returns 41006), and missing entries return 41002 / 41004 (OpenAPI docs v1.10, 4.14–4.15).
Protocol-aware complete device import template: GET /device/importTemplate accepts protocolId. For a selected protocol the template adds every connection-parameter column from that protocol's form_json to the base columns (name / protocol / description / code / thing model / status), localizes titles, marks required fields and adds Excel data validation for options; imported values are written into protocol_json with their proper types (input → string, inputNumber → number, select → the option's original type). Templates with parameter columns require a single protocol for the whole file; mixed protocols or a stale template are rejected wholesale. The sample row moves to a second worksheet so importing an untouched template creates no sample device. Protocol-template imports also derive the scan identity (scan_identity) from host/port/unitId/dstNode, so imported devices participate in scan duplicate detection; universal templates and serial protocols stay empty. Manual creation and connection-config edits now generate/recompute the scan identity from the config (edits previously cleared it), writing an empty value only when no host can be derived.
Device import code column is now required: the template must contain a code column; empty, invalid or duplicate codes fail only that row, and codes are no longer generated from names. The legacy three-column template (without a code column) is no longer supported; legacy four-or-more-column templates that include a code column still import.
Thing model and enabled status in device import: two new columns — "thing model" (name or code, must exist and be enabled) and "status" (enabled/disabled, default enabled).
Clearer required/optional header annotations: required columns now end with *, and header cells are color-coded (required: deep blue with a red bottom border; optional: light blue). The example sheet ends with a legend. Import still matches columns by header name and [fieldKey], so the styling does not affect parsing.
Online status in the device list: the device object list's status column now shows a four-state "online status" — disabled / not collected / online / offline — with a hover explanation. DeviceVO gains a collected field so "enabled but not in the collection schedule" is distinguishable from genuinely online/offline, using the same semantics as the dashboard overview.
Export scan results as a device import template: POST /deviceScan/exportTemplate exports the selected scan results using the protocol's device import template (.xlsx). The file matches GET /device/importTemplate?protocolId= exactly, with names, codes, descriptions and connection parameters from protocolJson prefilled below the header; edit the codes/names in Excel and import them from the device object page. The scan add dialog gains an "Export to Excel" button.
Fixed
Collector groups subscribed by push channels can no longer be deleted: deleting a collector group now checks every push channel's config_json.groupIds; if any channel (including disabled ones) still subscribes to it, deletion is rejected with the new error code 40050, so channel configs no longer retain group IDs that can never match a batch. Since deleting a device cascades to its collector groups, single and batch device deletion are rejected wholesale with 40065 when any group of the device is subscribed; batch deletion never partially succeeds. Remove the group from the channel configuration first.
Devices and points referenced by trigger rules can no longer be deleted: single and batch device deletion check event-trigger rules for references through the action device, action points and condition points; single and batch point deletion check action and condition points. A referenced device or point returns the new error code 40063 / 40064 and the whole batch is left untouched, so deleting them no longer leaves rules logging condition address ... not found and unable to fire. Modify or delete the referencing rule first to proceed.