From 783f4d5b98599a40fe3c0fc7cad911e49dbe4ec9 Mon Sep 17 00:00:00 2001 From: "xueli.xue" Date: Tue, 25 Apr 2017 11:27:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E5=BA=A6=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xxl/job/admin/service/impl/XxlJobServiceImpl.java | 7 ++++++- xxl-job-admin/src/main/webapp/WEB-INF/template/index.ftl | 6 ++++-- xxl-job-admin/src/main/webapp/static/js/index.js | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java index 539bb90b..621ce973 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java @@ -12,6 +12,7 @@ import com.xxl.job.core.registry.RegistHelper; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.time.DateUtils; +import org.apache.commons.lang.time.FastDateFormat; import org.quartz.CronExpression; import org.quartz.SchedulerException; import org.slf4j.Logger; @@ -329,7 +330,11 @@ public class XxlJobServiceImpl implements IXxlJobService { triggerCountFailTotal += dayFailCount; } } else { - return new ReturnT>(ReturnT.FAIL_CODE, null); + for (int i = 4; i > -1; i--) { + triggerDayList.add(FastDateFormat.getInstance("yyyy-MM-dd").format(DateUtils.addDays(new Date(), -i))); + triggerDayCountSucList.add(0); + triggerDayCountFailList.add(0); + } } Map result = new HashMap(); diff --git a/xxl-job-admin/src/main/webapp/WEB-INF/template/index.ftl b/xxl-job-admin/src/main/webapp/WEB-INF/template/index.ftl index bf665f73..217afe02 100644 --- a/xxl-job-admin/src/main/webapp/WEB-INF/template/index.ftl +++ b/xxl-job-admin/src/main/webapp/WEB-INF/template/index.ftl @@ -58,10 +58,12 @@ ${jobLogCount}
-
+
style="width: ${(jobLogSuccessCount*100/jobLogCount)?string("0.00")}%" >
- 调度成功率:${(jobLogSuccessCount*100/jobLogCount)?string("0.00")}% + <#if jobLogCount gt 0> + 调度成功率:${(jobLogSuccessCount*100/jobLogCount)?string("0.00")}% + diff --git a/xxl-job-admin/src/main/webapp/static/js/index.js b/xxl-job-admin/src/main/webapp/static/js/index.js index df001415..99b85289 100644 --- a/xxl-job-admin/src/main/webapp/static/js/index.js +++ b/xxl-job-admin/src/main/webapp/static/js/index.js @@ -47,7 +47,7 @@ $(function () { }, toolbox: { feature: { - saveAsImage: {} + /*saveAsImage: {}*/ } }, grid: {