w5teams / w5

Security Orchestration, Automation and Response (SOAR) Platform. 安全编排与自动化响应平台,无需编写代码的安全自动化,使用 SOAR 可以让团队工作更加高效
https://w5.io
GNU General Public License v3.0
1.48k stars 244 forks source link

保存的剧本,icon图标丢失 #62

Open BigYoungs opened 11 months ago

BigYoungs commented 11 months ago

当Soar的服务器地址改变后,比如原来是192.168.1.1,后来服务地址改为192.168.1.2,再打开以前保存的剧本,图标就会丢失。 原因是:剧本当时保存时,剧本里的icon保存的是"data":{"icon":"http://192.168.1.1/app/basic/start.png","name":"开始"" 这就导致更换ip后,icon丢失。

BigYoungs commented 11 months ago

临时修复方案:

# 进到5w的mysql容器里
docker exec -u root -it w5_mysql /bin/bash
# 操作数据库
mysql -uroot -h127.0.0.1 -pw5_12345678
# 切换db
use w5_db;
# 更新替换IP(域名)
update w5_workflow set flow_json=replace(flow_json,'原ip','新ip') where uuid="剧本的uuid";

# 返回Query OK, 1 row affected (0.01 sec),就更新好了。
sanjinhub commented 11 months ago

迁移服务器只能这样改,如果是平台前端导入的剧本会自动修改