openpitrix / dashboard

📺🐝OpenPitrix UI
Apache License 2.0
32 stars 21 forks source link

Add websocket #161

Closed sunnywx closed 6 years ago

sunnywx commented 6 years ago

websocket 连接路径 /v1/io?uid=system 其中 system 为目前的默认测试用户 接收消息格式类似如下, 一行表示一次返回:

{"type":"create","resource":{"rtype":"repo_event","rid":"repoe-AX8rO4B8ogym","status":"pending"}} {"type":"update","resource":{"rtype":"repo_event","rid":"repoe-AX8rO4B8ogym","status":"successful"}} {"type":"create","resource":{"rtype":"repo_event","rid":"repoe-R9ZmwzzLvmZq","status":"pending"}} {"type":"update","resource":{"rtype":"repo_event","rid":"repoe-R9ZmwzzLvmZq","status":"successful"}}

type分为三种, create/delete/update resource.rtype 目前有四种 repo/repo_event/cluster/job 细节处理类似qingcloud console

sunnywx commented 6 years ago

done #173