告警在对应位置可以点击并且显示告警SVG #43

Closed
opened 2024-12-23 17:07:45 +08:00 by liangyuanpeng · 3 comments

有些告警触发时,需要对应的方块可以点击 并且显示告警SVG, 告警svg文件在socketio DEVICE_ALERT 事件数据中,字段为: files.alertSvg

数据结构为新的通用的 file 格式. 即:

"files": {
            "alertSvg": {
                "type": "url",
                "url": "xxx",
                "base64": null,
                "compress": null
            }
        },

image

有些告警触发时,需要对应的方块可以点击 并且显示告警SVG, 告警svg文件在socketio DEVICE_ALERT 事件数据中,字段为: files.alertSvg 数据结构为新的通用的 file 格式. 即: ```json "files": { "alertSvg": { "type": "url", "url": "xxx", "base64": null, "compress": null } }, ``` ![image](/attachments/b5ede3f1-0f41-4c98-a87a-786c3fca555e)
jeff was assigned by liangyuanpeng 2024-12-23 17:07:51 +08:00
liangyuanpeng added the
kind/feature
label 2024-12-23 17:07:54 +08:00
Author
Owner

更新: 点击告警位置弹出SVG提示,而不是对应位置,

image

更新: 点击告警位置弹出SVG提示,而不是对应位置, ![image](/attachments/1f833ad2-6d8f-4eab-affa-db0752454873)
liangyuanpeng changed title from fall 告警在对应位置可以点击并且显示告警SVG to 告警在对应位置可以点击并且显示告警SVG 2024-12-26 14:52:28 +08:00
jeff added the
done-waiting-confirmed
label 2024-12-30 00:24:14 +08:00
Owner

已经添加了, 但是 svg 从我从本地取文件回来好像有问题。一直无法正常展示, s3是不是设置了 cors?

已经添加了, 但是 svg 从我从本地取文件回来好像有问题。一直无法正常展示, s3是不是设置了 cors?
Owner

image

https://s3.yunhorn.com/test2/fallalert/matrix08_dot2.svg

经过测试,改成上面这个 svg url 就可以了

![image](/attachments/6e88dd1c-8889-4f8d-8671-a9cca5fe2dee) https://s3.yunhorn.com/test2/fallalert/matrix08_dot2.svg 经过测试,改成上面这个 svg url 就可以了
141 KiB
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: smartoilets-front/projects#43
No description provided.