Comments (3)
资产管理好像添加是成功的,获取全部服务器的时候是失效的
资产管理这部分, 目前只有服务器管理是完成的, 目前我本地没有出现您提出的问题. 方便的话可提供一些错误详情, 方便定位
from drf_admin.
[2021-02-02 11:20:35,689][INFO][middleware.py:62]==>[[zy [Request: GET /api/oauth/info/ {}] [Response: 200 OK {'msg': '成功', 'errors': '', 'code': 200, 'data': {'id': 1, 'username': 'zy', 'name': '', 'avatar': 'http://127.0.0.1:8769/media/avatar/default.png', 'email': '[email protected]', 'permissions': [], 'department': '', 'mobile': ''}}]]]
HTTP GET /api/oauth/info/ 200 [0.04, 127.0.0.1:51406]
[2021-02-02 11:20:35,979][INFO][middleware.py:62]==>[[zy [Request: GET /api/cmdb/assets/status/ {}] [Response: 200 OK {'msg': '成功', 'errors': '', 'code': 200, 'data': {'results': [{'value': 0, 'label': '在线'}, {'value': 1, 'label': '下线'}, {'value': 2, 'label': '未知'}, {'value': 3, 'label': '故障'}, {'value': 4, 'label': '备用'}]}}]]]
[2021-02-02 11:20:35,982][INFO][middleware.py:62]==>[[zy [Request: GET /api/cmdb/servers/ {'page': ['1'], 'size': ['10'], 'search': [''], 'ordering': [''], 'asset_status': ['']}] [Response: 200 OK {'msg': '成功', 'errors': '', 'code': 200, 'data': OrderedDict([('count', 0), ('next', None), ('previous', None), ('results', [])])}]]]
HTTP GET /api/cmdb/assets/status/ 200 [0.03, 127.0.0.1:51409]
HTTP GET /api/cmdb/servers/?page=1&size=10&search=&ordering=&asset_status= 200 [0.03, 127.0.0.1:51406]
数据库也成功添加了,但是你的接口取不到servers的数据,显示不出来
下面的网络设备/api/monitor/ip/接口就是正常的
from drf_admin.
[2021-02-02 11:20:35,689][INFO][middleware.py:62]==>[[zy [Request: GET /api/oauth/info/ {}] [Response: 200 OK {'msg': '成功', 'errors': '', 'code': 200, 'data': {'id': 1, 'username': 'zy', 'name': '', 'avatar': 'http://127.0.0.1:8769/media/avatar/default.png', 'email': '[email protected]', 'permissions': [], 'department': '', 'mobile': ''}}]]] HTTP GET /api/oauth/info/ 200 [0.04, 127.0.0.1:51406] [2021-02-02 11:20:35,979][INFO][middleware.py:62]==>[[zy [Request: GET /api/cmdb/assets/status/ {}] [Response: 200 OK {'msg': '成功', 'errors': '', 'code': 200, 'data': {'results': [{'value': 0, 'label': '在线'}, {'value': 1, 'label': '下线'}, {'value': 2, 'label': '未知'}, {'value': 3, 'label': '故障'}, {'value': 4, 'label': '备用'}]}}]]] [2021-02-02 11:20:35,982][INFO][middleware.py:62]==>[[zy [Request: GET /api/cmdb/servers/ {'page': ['1'], 'size': ['10'], 'search': [''], 'ordering': [''], 'asset_status': ['']}] [Response: 200 OK {'msg': '成功', 'errors': '', 'code': 200, 'data': OrderedDict([('count', 0), ('next', None), ('previous', None), ('results', [])])}]]] HTTP GET /api/cmdb/assets/status/ 200 [0.03, 127.0.0.1:51409] HTTP GET /api/cmdb/servers/?page=1&size=10&search=&ordering=&asset_status= 200 [0.03, 127.0.0.1:51406]
数据库也成功添加了,但是你的接口取不到服务器的数据,显示不出来
下面的网络设备/ api / monitor / ip /接口就是正常的
查看了您的问题,但是我这边并没有遇到这样的情况,您可以通过debug加断点的方式,查询下queryset是否有值,并查看下序列化器中的返回值。
from drf_admin.
Related Issues (20)
- 【建议】在文档中指定要求的redis版本 HOT 2
- 【咨询问题】在项目任意文件中调试(debug)变量 HOT 3
- 联系求助 HOT 3
- 关于用户权限的实现 HOT 1
- 权限问题 HOT 2
- 大佬,快更新呀,感觉权限模块没有完全实现 HOT 2
- django_apscheduler 在 uwsgi 多进程环境下无法正常运行 HOT 2
- drf admin项目 QQ交流群
- ModuleNotFoundError: No module named 'easyaudit' HOT 1
- object-level / instance-level / row-level 权限控制 HOT 2
- 错误的代码放上了折腾好久 HOT 1
- 关于主机绑定部门问题 HOT 1
- 依赖包文件版本需更新 HOT 1
- 大佬诚招测开讲师,我的微信:18821768014,有意向我们可以聊下
- JobsListCreateAPIView(ListCreateAPIView)类的问题 HOT 3
- 权限问题 HOT 1
- 运行久了后端会报“took too long to shut down and was killed.”错误,导致连接异常
- 用户权限问题 HOT 1
- 【建议】在文档中指定python具体版本 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drf_admin.