fix: Sentinel SSE URL — /SenSu/plugin/... → /plugin/... (匹配实际路由)
This commit is contained in:
@@ -64,5 +64,93 @@
|
|||||||
"framework.command.execute"
|
"framework.command.execute"
|
||||||
],
|
],
|
||||||
"timestamp": 25949.800077287
|
"timestamp": 25949.800077287
|
||||||
|
},
|
||||||
|
"bc954d7a": {
|
||||||
|
"plugin_name": "example_plugin",
|
||||||
|
"permissions": [
|
||||||
|
"plugin.example.read",
|
||||||
|
"plugin.example.write",
|
||||||
|
"plugin.example.execute",
|
||||||
|
"framework.event.subscribe",
|
||||||
|
"framework.command.execute"
|
||||||
|
],
|
||||||
|
"timestamp": 26229.065811503
|
||||||
|
},
|
||||||
|
"ce4ac758": {
|
||||||
|
"plugin_name": "sentinel",
|
||||||
|
"permissions": [
|
||||||
|
"plugin.sentinel.read",
|
||||||
|
"plugin.sentinel.write",
|
||||||
|
"plugin.network.access",
|
||||||
|
"framework.event.subscribe",
|
||||||
|
"framework.command.execute"
|
||||||
|
],
|
||||||
|
"timestamp": 26229.070282128
|
||||||
|
},
|
||||||
|
"c8b48b80": {
|
||||||
|
"plugin_name": "example_plugin",
|
||||||
|
"permissions": [
|
||||||
|
"plugin.example.read",
|
||||||
|
"plugin.example.write",
|
||||||
|
"plugin.example.execute",
|
||||||
|
"framework.event.subscribe",
|
||||||
|
"framework.command.execute"
|
||||||
|
],
|
||||||
|
"timestamp": 26309.926670171
|
||||||
|
},
|
||||||
|
"79a90016": {
|
||||||
|
"plugin_name": "sentinel",
|
||||||
|
"permissions": [
|
||||||
|
"plugin.sentinel.read",
|
||||||
|
"plugin.sentinel.write",
|
||||||
|
"plugin.network.access",
|
||||||
|
"framework.event.subscribe",
|
||||||
|
"framework.command.execute"
|
||||||
|
],
|
||||||
|
"timestamp": 26309.928777723
|
||||||
|
},
|
||||||
|
"42572063": {
|
||||||
|
"plugin_name": "example_plugin",
|
||||||
|
"permissions": [
|
||||||
|
"plugin.example.read",
|
||||||
|
"plugin.example.write",
|
||||||
|
"plugin.example.execute",
|
||||||
|
"framework.event.subscribe",
|
||||||
|
"framework.command.execute"
|
||||||
|
],
|
||||||
|
"timestamp": 26336.230448858
|
||||||
|
},
|
||||||
|
"a7eb228c": {
|
||||||
|
"plugin_name": "sentinel",
|
||||||
|
"permissions": [
|
||||||
|
"plugin.sentinel.read",
|
||||||
|
"plugin.sentinel.write",
|
||||||
|
"plugin.network.access",
|
||||||
|
"framework.event.subscribe",
|
||||||
|
"framework.command.execute"
|
||||||
|
],
|
||||||
|
"timestamp": 26336.245063286
|
||||||
|
},
|
||||||
|
"87bfab61": {
|
||||||
|
"plugin_name": "example_plugin",
|
||||||
|
"permissions": [
|
||||||
|
"plugin.example.read",
|
||||||
|
"plugin.example.write",
|
||||||
|
"plugin.example.execute",
|
||||||
|
"framework.event.subscribe",
|
||||||
|
"framework.command.execute"
|
||||||
|
],
|
||||||
|
"timestamp": 26497.116175516
|
||||||
|
},
|
||||||
|
"d25e385d": {
|
||||||
|
"plugin_name": "sentinel",
|
||||||
|
"permissions": [
|
||||||
|
"plugin.sentinel.read",
|
||||||
|
"plugin.sentinel.write",
|
||||||
|
"plugin.network.access",
|
||||||
|
"framework.event.subscribe",
|
||||||
|
"framework.command.execute"
|
||||||
|
],
|
||||||
|
"timestamp": 26497.118727235
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
{
|
{
|
||||||
"sentinel": "pending"
|
"sentinel": "pending",
|
||||||
|
"example_plugin": "pending"
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,10 @@ commands:
|
|||||||
permissions:
|
permissions:
|
||||||
- framework.scaffold.plugin
|
- framework.scaffold.plugin
|
||||||
source: internal
|
source: internal
|
||||||
|
echo: &id001
|
||||||
|
description: echo input
|
||||||
|
permissions: []
|
||||||
|
source: plugin.example_plugin
|
||||||
help:
|
help:
|
||||||
description: 显示帮助信息
|
description: 显示帮助信息
|
||||||
permissions:
|
permissions:
|
||||||
@@ -34,6 +38,10 @@ commands:
|
|||||||
permissions:
|
permissions:
|
||||||
- framework.permission.read
|
- framework.permission.read
|
||||||
source: internal
|
source: internal
|
||||||
|
plugin_status: &id002
|
||||||
|
description: show status
|
||||||
|
permissions: []
|
||||||
|
source: plugin.example_plugin
|
||||||
pm_plugin_status:
|
pm_plugin_status:
|
||||||
description: '权限管理: 查看插件权限状态'
|
description: '权限管理: 查看插件权限状态'
|
||||||
permissions:
|
permissions:
|
||||||
@@ -79,7 +87,7 @@ commands:
|
|||||||
permissions:
|
permissions:
|
||||||
- framework.tui.control
|
- framework.tui.control
|
||||||
source: internal
|
source: internal
|
||||||
sentinel: &id001
|
sentinel: &id003
|
||||||
description: Sentinel 集群状态
|
description: Sentinel 集群状态
|
||||||
permissions: []
|
permissions: []
|
||||||
source: plugin.sentinel
|
source: plugin.sentinel
|
||||||
@@ -93,8 +101,11 @@ commands:
|
|||||||
permissions:
|
permissions:
|
||||||
- framework.command.test
|
- framework.command.test
|
||||||
source: internal
|
source: internal
|
||||||
last_updated: 25949.782764527
|
last_updated: 26497.09846161
|
||||||
plugin_commands:
|
plugin_commands:
|
||||||
|
example_plugin:
|
||||||
|
echo: *id001
|
||||||
|
plugin_status: *id002
|
||||||
sentinel:
|
sentinel:
|
||||||
sentinel: *id001
|
sentinel: *id003
|
||||||
total_commands: 19
|
total_commands: 21
|
||||||
|
|||||||
@@ -1,6 +1,19 @@
|
|||||||
http_port: 4200
|
http_port: 4200
|
||||||
last_updated: 25949.800680829
|
last_updated: 26497.116694526
|
||||||
plugin_routes:
|
plugin_routes:
|
||||||
|
example_plugin:
|
||||||
|
- methods:
|
||||||
|
- GET
|
||||||
|
path: /example_plugin/api/example/info
|
||||||
|
require_auth: false
|
||||||
|
- methods:
|
||||||
|
- POST
|
||||||
|
path: /example_plugin/api/plugin/echo
|
||||||
|
require_auth: true
|
||||||
|
- methods:
|
||||||
|
- POST
|
||||||
|
path: /example_plugin/api/plugin/plugin_status
|
||||||
|
require_auth: true
|
||||||
sentinel:
|
sentinel:
|
||||||
- methods:
|
- methods:
|
||||||
- GET
|
- GET
|
||||||
|
|||||||
@@ -118,7 +118,7 @@
|
|||||||
|
|
||||||
function connectSSE() {
|
function connectSSE() {
|
||||||
if (sseConn) { sseConn.close(); sseConn = null; }
|
if (sseConn) { sseConn.close(); sseConn = null; }
|
||||||
sseConn = new EventSource("/SenSu/plugin/sentinel/sse");
|
sseConn = new EventSource("/plugin/sentinel/sse");
|
||||||
sseConn.addEventListener("nodes_update", function(e){
|
sseConn.addEventListener("nodes_update", function(e){
|
||||||
var d = JSON.parse(e.data);
|
var d = JSON.parse(e.data);
|
||||||
if (d.nodes) renderNodes(d.nodes);
|
if (d.nodes) renderNodes(d.nodes);
|
||||||
|
|||||||
Reference in New Issue
Block a user