2017 © Pedro Peláez
 

library xhgui-chinese

From perftools/xhgui,A web based interface for viewing profile data collected by XHProf.

image

laynefyc/xhgui-chinese

From perftools/xhgui,A web based interface for viewing profile data collected by XHProf.

  • Monday, May 21, 2018
  • by laynefyc
  • Repository
  • 7 Watchers
  • 124 Stars
  • 144 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 35 Forks
  • 6 Open issues
  • 10 Versions
  • 40 % Grown

The README.md

最新

新版本已开发完成,做了如下改进:, (*1)

🌈 支持本地Sqlite存储,也支持MySQL和MongoDB存储。, (*2)

🌍 国际化,支持英语/简体中文/繁体中文。, (*3)

🛡 可通过Composer极速安装。, (*4)

🎨 一句命令运行监控服务。, (*5)

🌈 支持帐号密码登录。, (*6)

更多新功能欢迎前往 https://github.com/laynefyc/php-monitor 体验。, (*7)

历史

新版本已经在开发中,后端功能全部开发完成,前端页面开发还在努力中。由于前端技术更新太快,不打算jQuery一把梭了,新版本会用上vue或者react,所以我也是边学习边开发。, (*8)

公众号写了有一段时间,里面的内容也充实了不少,相比博客质量更高一些,分享的内容更成体系,有兴趣的关注看看。, (*9)

http://imgs.it2048.cn/code-log.png, (*10)

提交Issue之前请看看 README.md(当前页面)和历史已经处理的 Closed Issue90%的问题都能找到答案。另外10%的问题请按照Issue模板中需要的信息提交,你提供的信息越多我越能给你准确的建议,不按照规范提交的Issue我会直接关闭。, (*11)

2019年想定个目标 - 重写xhprof扩展和xhgui-branch,有兴趣的朋友请移步到我的博客留言交流一下 我的博客, (*12)

获取底层信息的PHP扩展很多,比如 uprofiler,tideways_xhprof,tideways,xhprof等,他们的原理都一样,只是兼容性与稳定性的差别(选择一个安装,安装多个会冲突)。, (*13)

Class 'MongoClient' not found
Fatal error: Call to undefined function xhprof_enable()

如出现上面的报错信息,请使用php -m 看看是否有tideways或者tideways_xhprof扩展。 再修改 config/config.default.php#L12 配置文件的扩展名。 如果还有问题请检查vendor 目录下是否存在 alcaeus/mongo-php-adapter扩展文件(这是一个兼容mongo.so和mongodb.so的适配器)。如果不存在请更新代码(git pull origin master),然后运行composer install安装。, (*14)

90%的问题都能在 ISSUE 中找到答案 ISSUE, (*15)

tideways的新版扩展已经更名,并且不支持SQL显示,建议使用支持SQL展示的V4版本 v4.1.6, (*16)

如果一定要使用V5版本,请修改配置文件 config/config.default.php#L12 为 tideways_xhprof, (*17)

已添加SQL列表与SQL执行时间展示(暂时只支持tideways扩展),下文有截图。, (*18)

xhgui汉化与更新

xhgui的安装信息可到源项目查看文档:xhgui, (*19)

如果不能安装成功可到我博客看这篇文章:Tideways和xhgui打造PHP非侵入式监控平台, (*20)

当然最好的方式就是联系我,我的博客:https://blog.it2048.cn, (*21)

Latest Stable Version Total Downloads Build Status, (*22)

一. 站在举人的肩膀上

项目的汉化参考了 https://github.com/snfnwgi/xhgui,对部分翻译不够准确的词做了修改,对未翻译的部分做了翻译。, (*23)

xhgui源项目已经很久不更新了。我在基于xhgui搭建PHP监控平台的过程中遇到很多问题,自己对PHP和前端都还算了解,打算边修边优化并将更新的代码开源。, (*24)

二. 为什么不直接在源项目提交Merge Request?

我会将一些基本的语法Bug修复后提交Merge Request。但汉化的修改不会提,主要原因是xhgui源项目对代码的要求基本是可用就可的程度,后期扩展的添加混乱的一塌糊涂。维护代码的人也焦头烂额,很多显而易见的错误都没人修。我无法保证我提的代码被及时的采纳。xhgui的UI主要是针对老外设计的,很多符号和数据单位我看着不习惯,一些交互也不友好,这个项目主要会对这方面做改动所以不适合提交Merge Request。, (*25)

三. 界面截图

首页截图 首页截图, (*26)

瀑布图 瀑布图, (*27)

函数监控图 函数监控图, (*28)

SQL列表 SQL列表, (*29)

四. 更新日志

  1. 将时间选择控件换成了更符合国人使用习惯的laydate;
  2. 将时间的格式转换成了 2017-06-08 12:18:18 格式;
  3. 将微妙转换成了毫秒,byte转换成了MB或者KB;
  4. 添加了IP的展示;
  5. 将中文URL做了url_decode();
  6. 将页面的大标题去掉,换成用颜色选中的Nav标签展示;
  7. 修复了『自定义函数』功能无法使用的问题;
  8. 翻译了大量英文描述;
  9. 很多小Tips等待有心人去发现;
  10. 支持composer更新;

五. TODO

  1. 将前端展示页面抽离出来;
  2. 支持多域名的显示;

六. 通过Composer安装&更新

composer require laynefyc/xhgui-chinese

七. 常见问题

  1. 如果数据显示不全,内存和执行等信息都是空,请排查PHP扩展程序,tideways和xhprof并不支持所有操作系统和所有PHP版本;
  2. 如果mongoDB中的数据是空,请检查mongoDB的配置,header.php文件的引入是否规范;
  3. 提交Issues请带上操作系统,PHP版本,扩展名和扩展版本。只提供一句话很难给你建议;
  4. 历史问题在这里 https://github.com/laynefyc/xhgui-branch/issues?utf8=%E2%9C%93&q=is%3Aissue

八. 既然看到这了不如加个微信吧

https://github.com/laynefyc/xhgui-branch/blob/screenshot/screenshot/code-log1.png, (*30)

http://imgs.it2048.cn/code-log.png, (*31)

The Versions

21/05 2018

dev-master

9999999-dev

From perftools/xhgui,A web based interface for viewing profile data collected by XHProf.

  Sources   Download

MIT

The Requires

 

The Development Requires

21/05 2018

v1.0.3

1.0.3.0

From perftools/xhgui,A web based interface for viewing profile data collected by XHProf.

  Sources   Download

MIT

The Requires

 

The Development Requires

16/05 2018

v1.0.2

1.0.2.0

From perftools/xhgui,A web based interface for viewing profile data collected by XHProf.

  Sources   Download

MIT

The Requires

 

The Development Requires

16/05 2018

dev-screenshot

dev-screenshot

A web based interface for viewing profile data collected by XHProf.

  Sources   Download

MIT

The Requires

 

The Development Requires

16/05 2018

dev-add-sql

dev-add-sql

From perftools/xhgui,A web based interface for viewing profile data collected by XHProf.

  Sources   Download

MIT

The Requires

 

The Development Requires

02/05 2018

dev-add-code-of-conduct-1

dev-add-code-of-conduct-1

From perftools/xhgui,A web based interface for viewing profile data collected by XHProf.

  Sources   Download

MIT

The Requires

 

The Development Requires

02/05 2018

dev-add-license-1

dev-add-license-1

From perftools/xhgui,A web based interface for viewing profile data collected by XHProf.

  Sources   Download

MIT

The Requires

 

The Development Requires

10/07 2017

v1.0.1.x-dev

1.0.1.9999999-dev

From perftools/xhgui,A web based interface for viewing profile data collected by XHProf.

  Sources   Download

MIT

The Requires

 

The Development Requires

10/07 2017

v1.0.1

1.0.1.0

From perftools/xhgui,A web based interface for viewing profile data collected by XHProf.

  Sources   Download

MIT

The Requires

 

The Development Requires

10/07 2017

v1.0.0

1.0.0.0

From perftools/xhgui,A web based interface for viewing profile data collected by XHProf.

  Sources   Download

MIT

The Requires

 

The Development Requires