xuxueli / xxl-job

A distributed task scheduling framework.(分布式任务调度平台XXL-JOB)
http://www.xuxueli.com/xxl-job/
GNU General Public License v3.0
27.06k stars 10.75k forks source link

DataTables warning: table id=job_list - Ajax error. #2358

Open waynezhangw opened 3 years ago

waynezhangw commented 3 years ago

Please answer some questions before submitting your issue. Thanks!

Which version of XXL-JOB do you using?

服务器部署2.3.0,Windows上访问

Expected behavior

浏览器输入admin绑定的域名登录之后,点击任务管理、调度日志、执行器管理后,应该流畅丝滑的显示对应的内容

Actual behavior

浏览器输入admin绑定的域名登录之后,点击任务管理、调度日志、执行器管理会时不时出现: DataTables warning: table id=job_list - Ajax error. For more information about this error, please see http://datatables.net/tn/7 或 DataTables warning: table id=jobgroup_list - Ajax error. For more information about this error, please see http://datatables.net/tn/7 时不时出现指的是点击10次可能会出现6次Ajax error的弹窗提醒,其他4次正常显示对应内容。

Steps to reproduce the behavior

我在Windows本机部署时没遇到这个问题,在linux上部署后出现这个问题了

Other information

尝试了“应该是低版本存在JS缓存。强制刷新一下浏览器缓存,退出并重新登陆确认下”之后,问题依然存在

VINO42 commented 3 years ago

这个问题是因为 返回的用户列表中的permission字段没有 也就是后端项目jackson序列化的问题导致返回的permission字段没有, 是因为permission数据库默认值设置的是null或者空串 然后后端的jackson序列化配置空串或null不返回该字段,导致数据渲染问题

https://datatables.net/manual/tech-notes/4 详细见 Parameter is a string 这一块 As a result, this error usually occurs if:

The data property specified doesn't exist (a typo or a gap in data) The value of the property specified is null

我是在用户列表界面碰到了这个问题 我的后台返回的接口响应如下 image

VINO42 commented 3 years ago

解决办法如下: 找到user_list这个table_id 找到permission这个字段的数据配置项目: image

VINO42 commented 3 years ago

加个render设置下默认值或者defaultContent就可以了