diff --git a/doc/XXL-JOB官方文档.md b/doc/XXL-JOB官方文档.md index 0dfab647..4ae8cd7d 100644 --- a/doc/XXL-JOB官方文档.md +++ b/doc/XXL-JOB官方文档.md @@ -2543,7 +2543,7 @@ public void execute() { - 4、【升级】多个项目依赖升级至较新稳定版本,涉及 netty、spring/springboot、groovy 等; -### 7.40 版本 v3.2.0 Release Notes[规划中] +### 7.40 版本 v3.2.0 Release Notes[2025-06-24] - 1、【强化】AI任务(ollamaJobHandler)优化:针对 “model” 模型配置信息,从执行器侧文件类配置调整至调度中心“任务参数”动态配置,支持集成多模型、并结合任务动态配置切换。 - 2、【安全】登录认证重构:密码加密算法从Md5改为Sha256;登录态改为登录后动态随机生成;提升系统安全性;(需要针对用户表进行字段调整,同时需要重新初始化密码信息;相关SQL脚本如下) ``` diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/web/interceptor/CommonDataInterceptor.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/web/interceptor/CommonDataInterceptor.java index 1ecc92de..46151a77 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/web/interceptor/CommonDataInterceptor.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/web/interceptor/CommonDataInterceptor.java @@ -2,18 +2,14 @@ package com.xxl.job.admin.web.interceptor; import com.xxl.job.admin.util.I18nUtil; import com.xxl.tool.freemarker.FtlTool; -import jakarta.servlet.http.Cookie; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.springframework.context.annotation.Configuration; -import org.springframework.stereotype.Component; import org.springframework.web.servlet.AsyncHandlerInterceptor; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; -import java.util.HashMap; - /** * push cookies to model as cookieMap * @@ -31,15 +27,6 @@ public class CommonDataInterceptor implements WebMvcConfigurer { Object handler, ModelAndView modelAndView) throws Exception { - // cookie - if (modelAndView!=null && request.getCookies()!=null && request.getCookies().length>0) { - HashMap cookieMap = new HashMap(); - for (Cookie ck : request.getCookies()) { - cookieMap.put(ck.getName(), ck); - } - modelAndView.addObject("cookieMap", cookieMap); - } - // static method if (modelAndView != null) { modelAndView.addObject("I18nUtil", FtlTool.generateStaticModel(I18nUtil.class.getName())); diff --git a/xxl-job-admin/src/main/resources/static/js/common.1.js b/xxl-job-admin/src/main/resources/static/js/common.1.js index 55778c39..675ff874 100644 --- a/xxl-job-admin/src/main/resources/static/js/common.1.js +++ b/xxl-job-admin/src/main/resources/static/js/common.1.js @@ -28,68 +28,6 @@ $(function(){ }); - // slideToTop - var slideToTop = $("
"); - slideToTop.html(''); - slideToTop.css({ - position: 'fixed', - bottom: '20px', - right: '25px', - width: '40px', - height: '40px', - color: '#eee', - 'font-size': '', - 'line-height': '40px', - 'text-align': 'center', - 'background-color': '#222d32', - cursor: 'pointer', - 'border-radius': '5px', - 'z-index': '99999', - opacity: '.7', - 'display': 'none' - }); - slideToTop.on('mouseenter', function () { - $(this).css('opacity', '1'); - }); - slideToTop.on('mouseout', function () { - $(this).css('opacity', '.7'); - }); - $('.wrapper').append(slideToTop); - $(window).scroll(function () { - if ($(window).scrollTop() >= 150) { - if (!$(slideToTop).is(':visible')) { - $(slideToTop).fadeIn(500); - } - } else { - $(slideToTop).fadeOut(500); - } - }); - $(slideToTop).click(function () { - $("html,body").animate({ // firefox ie not support body, chrome support body. but found that new version chrome not support body too. - scrollTop: 0 - }, 100); - }); - - // left menu status v: js + server + cookie - $('.sidebar-toggle').click(function(){ - var xxljob_adminlte_settings = $.cookie('xxljob_adminlte_settings'); // on=open,off=close - if ('off' == xxljob_adminlte_settings) { - xxljob_adminlte_settings = 'on'; - } else { - xxljob_adminlte_settings = 'off'; - } - $.cookie('xxljob_adminlte_settings', xxljob_adminlte_settings, { expires: 7 }); //$.cookie('the_cookie', '', { expires: -1 }); - }); - - // left menu status v1: js + cookie - /* - var xxljob_adminlte_settings = $.cookie('xxljob_adminlte_settings'); - if (xxljob_adminlte_settings == 'off') { - $('body').addClass('sidebar-collapse'); - } - */ - - // update pwd $('#updatePwd').on('click', function(){ $('#updatePwdModal').modal({backdrop: false, keyboard: false}).modal('show'); @@ -160,5 +98,57 @@ $(function(){ updatePwdModalValidate.resetForm(); $("#updatePwdModal .form .form-group").removeClass("has-error"); }); - + + // slideToTop + var slideToTop = $("
"); + slideToTop.html(''); + slideToTop.css({ + position: 'fixed', + bottom: '20px', + right: '25px', + width: '40px', + height: '40px', + color: '#eee', + 'font-size': '', + 'line-height': '40px', + 'text-align': 'center', + 'background-color': '#222d32', + cursor: 'pointer', + 'border-radius': '5px', + 'z-index': '99999', + opacity: '.7', + 'display': 'none' + }); + slideToTop.on('mouseenter', function () { + $(this).css('opacity', '1'); + }); + slideToTop.on('mouseout', function () { + $(this).css('opacity', '.7'); + }); + $('.wrapper').append(slideToTop); + $(window).scroll(function () { + if ($(window).scrollTop() >= 150) { + if (!$(slideToTop).is(':visible')) { + $(slideToTop).fadeIn(500); + } + } else { + $(slideToTop).fadeOut(500); + } + }); + $(slideToTop).click(function () { + $("html,body").animate({ // firefox ie not support body, chrome support body. but found that new version chrome not support body too. + scrollTop: 0 + }, 100); + }); + + + // change menu status + $('.sidebar-toggle').click(function(){ + if ( 'close' == $.cookie('sidebar_status') ) { + $.cookie('sidebar_status', 'open', { expires: 7 }); + } else { + $.cookie('sidebar_status', 'close', { expires: 7 }); //$.cookie('the_cookie', '', { expires: -1 }); + } + }); + }); diff --git a/xxl-job-admin/src/main/resources/templates/common/common.macro.ftl b/xxl-job-admin/src/main/resources/templates/common/common.macro.ftl index 3f3a49b2..3f6163aa 100644 --- a/xxl-job-admin/src/main/resources/templates/common/common.macro.ftl +++ b/xxl-job-admin/src/main/resources/templates/common/common.macro.ftl @@ -1,12 +1,20 @@ +<#-- page import (style + script) --> <#macro commonStyle> - <#-- favicon --> + <#-- i18n --> + <#global I18n = I18nUtil.getMultString()?eval /> + + <#-- favicon、logo --> + ${I18n.admin_name} + <#-- meta --> + + <#-- link style --> @@ -28,9 +36,6 @@ - <#-- i18n --> - <#global I18n = I18nUtil.getMultString()?eval /> - <#macro commonScript> @@ -38,30 +43,43 @@ - - - - + + + + - - <#-- jquery cookie --> <#-- jquery.validate --> - <#-- layer --> - <#-- common --> - + + + + + <#-- common js --> + + <#macro commonHeader> diff --git a/xxl-job-admin/src/main/resources/templates/help.ftl b/xxl-job-admin/src/main/resources/templates/help.ftl index 1409fc50..2dc79dec 100644 --- a/xxl-job-admin/src/main/resources/templates/help.ftl +++ b/xxl-job-admin/src/main/resources/templates/help.ftl @@ -5,7 +5,7 @@ <@netCommon.commonStyle /> ${I18n.admin_name} -sidebar-collapse "> +
<@netCommon.commonHeader /> diff --git a/xxl-job-admin/src/main/resources/templates/index.ftl b/xxl-job-admin/src/main/resources/templates/index.ftl index d642f4e6..618e6360 100644 --- a/xxl-job-admin/src/main/resources/templates/index.ftl +++ b/xxl-job-admin/src/main/resources/templates/index.ftl @@ -7,7 +7,7 @@ ${I18n.admin_name} -sidebar-collapse "> +
<@netCommon.commonHeader /> diff --git a/xxl-job-admin/src/main/resources/templates/jobgroup/jobgroup.index.ftl b/xxl-job-admin/src/main/resources/templates/jobgroup/jobgroup.index.ftl index 09346887..4bbd01ac 100644 --- a/xxl-job-admin/src/main/resources/templates/jobgroup/jobgroup.index.ftl +++ b/xxl-job-admin/src/main/resources/templates/jobgroup/jobgroup.index.ftl @@ -7,7 +7,7 @@ ${I18n.admin_name} -sidebar-collapse "> +
<@netCommon.commonHeader /> diff --git a/xxl-job-admin/src/main/resources/templates/jobinfo/jobinfo.index.ftl b/xxl-job-admin/src/main/resources/templates/jobinfo/jobinfo.index.ftl index 340d5d7d..a83ae016 100644 --- a/xxl-job-admin/src/main/resources/templates/jobinfo/jobinfo.index.ftl +++ b/xxl-job-admin/src/main/resources/templates/jobinfo/jobinfo.index.ftl @@ -7,7 +7,7 @@ ${I18n.admin_name} -sidebar-collapse"> +
<@netCommon.commonHeader /> diff --git a/xxl-job-admin/src/main/resources/templates/joblog/joblog.detail.ftl b/xxl-job-admin/src/main/resources/templates/joblog/joblog.detail.ftl index bb8072f9..352fcfbe 100644 --- a/xxl-job-admin/src/main/resources/templates/joblog/joblog.detail.ftl +++ b/xxl-job-admin/src/main/resources/templates/joblog/joblog.detail.ftl @@ -5,8 +5,7 @@ <@netCommon.commonStyle /> ${I18n.admin_name} - - +
diff --git a/xxl-job-admin/src/main/resources/templates/joblog/joblog.index.ftl b/xxl-job-admin/src/main/resources/templates/joblog/joblog.index.ftl index bd3567c8..5b38866a 100644 --- a/xxl-job-admin/src/main/resources/templates/joblog/joblog.index.ftl +++ b/xxl-job-admin/src/main/resources/templates/joblog/joblog.index.ftl @@ -9,7 +9,7 @@ ${I18n.admin_name} -sidebar-collapse "> +
<@netCommon.commonHeader /> diff --git a/xxl-job-admin/src/main/resources/templates/login.ftl b/xxl-job-admin/src/main/resources/templates/login.ftl index e6a29e01..289771ff 100644 --- a/xxl-job-admin/src/main/resources/templates/login.ftl +++ b/xxl-job-admin/src/main/resources/templates/login.ftl @@ -1,10 +1,13 @@ + <#-- import macro --> <#import "./common/common.macro.ftl" as netCommon> + + <#-- commonStyle --> <@netCommon.commonStyle /> + - ${I18n.admin_name}