-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
修改debug api,完善部分系统信息 #396
修改debug api,完善部分系统信息 #396
Conversation
Codecov Report
@@ Coverage Diff @@
## master #396 +/- ##
=========================================
Coverage ? 84.91%
=========================================
Files ? 70
Lines ? 9075
Branches ? 0
=========================================
Hits ? 7706
Misses ? 1369
Partials ? 0
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #396 +/- ##
==========================================
- Coverage 85.01% 84.89% -0.12%
==========================================
Files 70 70
Lines 9020 9102 +82
==========================================
+ Hits 7668 7727 +59
- Misses 1352 1375 +23
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那你这个info,可能要管理员权限了,不然登录用户就能看到这个也是不太好。
或者info可以普通用户看到,就是一些静态信息,渲染也很快。
debug只有管理员可以看到,可能要取一些资源。
django Q有些api可以拿状态,但是感觉不好调试,我在Windows上就老出问题,蛋疼
感觉这个接口就是给管理员排查问题用,普通用户也没必要看这些,是不是限制管理员访问更合理,虽然里面把密码连接信息都隐藏了,还有现在问题是sysconfig和packages信息比较多,不确定全都是有效信息 |
嗯管理员权限好 或者看一下我上面的评论,debug多一点,info少一点 |
管他有效没效都先写到debug里😂 也可以考虑输出yaml?yaml人和机器都能读 |
咋输出yaml,没用过,你有时间的话可以按你的想法调整下,或者等下版也行,准备这个合了发一版 |
那你把管理员权限加上,普通用户有权限看到这个不合适 |
fa53f95
to
2916634
Compare
增加了django_q的信息,分为debug和info,
|
相关PR:#385
补全inception、django_q、运行环境、系统配置、依赖包信息,最终结构如下
访问地址:http://139.199.0.191/api/info
http://139.199.0.191/api/debug?full=true