arthas icon indicating copy to clipboard operation
arthas copied to clipboard

开发全新的Web UI

Open hengyunabc opened this issue 2 years ago • 4 comments

  • 目前有webconsole,本质上还是一个terminal
  • 有一个简单的UI: http://127.0.0.1:8563/ui ,但这个只是展示了json结果

需要以现代web方式,构建一个全新的UI,所有的数据结构尽量以更友好的,图形化展示。

简而言之,学生需要先熟悉下arthas的命令,比如

  • https://arthas.aliyun.com/doc/sysprop.html
  • https://arthas.aliyun.com/doc/watch

可以按命令里的 在线教程 跑一下。

然后看一下这个HTTP API:

  • https://arthas.aliyun.com/doc/http-api.html

利用上面的HTTP API,构建出类似下面的UI:

  • https://help.aliyun.com/document_detail/300078.html

  • 这个UI的的代码在: http://127.0.0.1:8563/ui

https://github.com/alibaba/arthas/tree/master/core/src/main/resources/com/taobao/arthas/core/http/ui

  • web console的代码在:

https://github.com/alibaba/arthas/blob/master/core/src/main/resources/com/taobao/arthas/core/http/index.html

web console是基于 xterm实现的,本质上是后端实现了一个web socket的服务器,可以不用关注。


参考:

  • https://arthas.aliyun.com/doc/web-console.html

hengyunabc avatar Apr 07 '22 03:04 hengyunabc

This is your Intranet address, which no one else can access. You can post pictures for others to read.

dezhonger avatar Apr 07 '22 09:04 dezhonger

This is your Intranet address, which no one else can access. You can post pictures for others to read.

Launch arthas, attach to any java process , and visit http://127.0.0.1:8563/ui

kylixs avatar Apr 10 '22 13:04 kylixs

https://github.com/alibaba/arthas/pull/1699 我之前整过类似的,看能否基于这个继续优化下

1994 avatar Apr 11 '22 02:04 1994

新版本的 Web UI已经合并到主干,欢迎大家试用和提出建议。

下 载: arthas-bin.zip

webconsole

原来的web console, 升级xterm,使用webgl,滚动非常顺滑。

  • http://localhost:8563/
image

web ui

基于HTTP API的新UI

  • http://localhost:8563/ui/
image

hengyunabc avatar Oct 11 '22 08:10 hengyunabc