# 新版本 V1.3.x,新特性

1、遗弃“本地任务”开发模式,推荐使用“远程任务”,易于系统解耦;
	2、遗弃“servlet”方式底层系统通讯,推荐使用JETTY方式,重构通讯逻辑;
	3、【重要】“远程任务”细分为:BEAN、GLUE两种开发模式,其中GLUE方式“远程任务”的逻辑代码托管至云端,动态编译生效,详情请前往博客查看;
	4、UI交互优化:左侧菜单展开状态优化,菜单项选中状态优化,任务列表打开表格有压缩优化;
This commit is contained in:
xueli.xue 2016-05-19 16:17:01 +08:00
parent 83c7e23d77
commit e6c239eca0
14 changed files with 68 additions and 23 deletions

View File

@ -43,7 +43,8 @@ git.osc地址http://git.oschina.net/xuxueli0323/xxl-job
# 新版本 V1.3.x新特性
1、遗弃“本地任务”开发模式推荐使用“远程任务”易于系统解耦
2、遗弃“servlet”方式底层系统通讯推荐使用JETTY方式重构通讯逻辑
3、【重要】“远程任务”细分为BEAN、GLUE两种开发模式其中GLUE方式“远程任务”的逻辑代码托管至云端详情请前往博客查看
3、【重要】“远程任务”细分为BEAN、GLUE两种开发模式其中GLUE方式“远程任务”的逻辑代码托管至云端动态编译生效详情请前往博客查看
4、UI交互优化左侧菜单展开状态优化菜单项选中状态优化任务列表打开表格有压缩优化
# 其他说明

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.xxl</groupId>
<artifactId>xxl-job</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.3.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>xxl-job-admin</module>

View File

@ -4,10 +4,10 @@
<parent>
<groupId>com.xxl</groupId>
<artifactId>xxl-job</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.3.0-SNAPSHOT</version>
</parent>
<artifactId>xxl-job-admin</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
@ -148,7 +148,7 @@
<dependency>
<groupId>com.xxl</groupId>
<artifactId>xxl-job-client</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.3.1</version>
</dependency>
</dependencies>

View File

@ -69,7 +69,7 @@ public class IndexController {
}
@RequestMapping("/help")
public String help(Model model) {
public String help() {
return "help";
}

View File

@ -0,0 +1,34 @@
package com.xxl.job.controller.interceptor;
import java.util.HashMap;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.ArrayUtils;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
/**
* push cookies to model as cookieMap
* @author xuxueli 2015-12-12 18:09:04
*/
public class CookieInterceptor extends HandlerInterceptorAdapter {
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
ModelAndView modelAndView) throws Exception {
if (modelAndView!=null && ArrayUtils.isNotEmpty(request.getCookies())) {
HashMap<String, Cookie> cookieMap = new HashMap<String, Cookie>();
for (Cookie ck : request.getCookies()) {
cookieMap.put(ck.getName(), ck);
}
modelAndView.addObject("cookieMap", cookieMap);
}
super.postHandle(request, response, handler, modelAndView);
}
}

View File

@ -43,6 +43,10 @@
<mvc:mapping path="/**"/>
<bean class="com.xxl.job.controller.interceptor.PermissionInterceptor"/>
</mvc:interceptor>
<mvc:interceptor>
<mvc:mapping path="/**"/>
<bean class="com.xxl.job.controller.interceptor.CookieInterceptor"/>
</mvc:interceptor>
</mvc:interceptors>
<bean id="exceptionResolver" class="com.xxl.job.controller.resolver.WebExceptionResolver" />

View File

@ -5,7 +5,7 @@
<#import "/common/common.macro.ftl" as netCommon>
<@netCommon.commonStyle />
</head>
<body class="hold-transition skin-blue sidebar-mini">
<body class="hold-transition skin-blue sidebar-mini <#if cookieMap?exists && "off" == cookieMap["adminlte_settings"].value >sidebar-collapse</#if> ">
<div class="wrapper">
<!-- header -->
<@netCommon.commonHeader />

View File

@ -10,8 +10,7 @@
.CodeMirror {
border: 0px solid black;
font-size:16px;
height: 95%;
row:200;
height: 100%;
}
</style>
</head>
@ -71,7 +70,7 @@
<@netCommon.commonFooter />
</div>
<textarea id="demoCode" >
<textarea id="demoCode" style="display:none;" >
package com.xxl.job.service.handler;
import org.slf4j.Logger;

View File

@ -8,7 +8,7 @@
<link rel="stylesheet" href="${request.contextPath}/static/adminlte/plugins/datatables/dataTables.bootstrap.css">
</head>
<body class="hold-transition skin-blue sidebar-mini">
<body class="hold-transition skin-blue sidebar-mini <#if cookieMap?exists && "off" == cookieMap["adminlte_settings"].value >sidebar-collapse</#if>">
<div class="wrapper">
<!-- header -->
<@netCommon.commonHeader />

View File

@ -9,7 +9,7 @@
<!-- daterangepicker -->
<link rel="stylesheet" href="${request.contextPath}/static/adminlte/plugins/daterangepicker/daterangepicker-bs3.css">
</head>
<body class="hold-transition skin-blue sidebar-mini">
<body class="hold-transition skin-blue sidebar-mini <#if cookieMap?exists && "off" == cookieMap["adminlte_settings"].value >sidebar-collapse</#if> ">
<div class="wrapper">
<!-- header -->
<@netCommon.commonHeader />

View File

@ -1,6 +1,6 @@
$(function(){
// 导航栏,选中样式处理
// 导航栏,选中样式处理js遍历匹配url遗弃
$(".nav-click").removeClass("active");
$(".nav-click").each(function(){
if( window.location.href.indexOf( $(this).find("a").attr("href") ) > -1){
@ -30,9 +30,9 @@ $(function(){
});
});
// adminlte_settings
// 左侧菜单状态js + 后端 + cookie方式
$('.sidebar-toggle').click(function(){
var adminlte_settings = $.cookie('adminlte_settings');
var adminlte_settings = $.cookie('adminlte_settings'); // 左侧菜单展开状态[adminlte_settings]on=展开off=折叠
if ('off' == adminlte_settings) {
adminlte_settings = 'on';
} else {
@ -40,8 +40,12 @@ $(function(){
}
$.cookie('adminlte_settings', adminlte_settings, { expires: 7 }); //$.cookie('the_cookie', '', { expires: -1 });
});
// 左侧菜单状态js + cookie方式遗弃
/*
var adminlte_settings = $.cookie('adminlte_settings');
if (adminlte_settings == 'off') {
$('body').addClass('sidebar-collapse');
}
*/
});

View File

@ -8,17 +8,20 @@ $(function() {
});
codeEditor.setValue( $("#demoCode").val() );
var height = Math.max(document.documentElement.clientHeight, document.body.offsetHeight);
$(".CodeMirror").attr('style', 'height:'+ height +'px');
$("#save").click(function() {
var codeSource = codeEditor.getValue();
var codeRemark = $("#codeRemark").val();
if (!codeRemark) {
ComAlert.show(1, "请输入备注");
ComAlert.show(2, "请输入备注");
return;
}
if (codeRemark.length < 6|| codeRemark.length > 100) {
ComAlert.show(1, "备注长度应该在6至100之间");
ComAlert.show(2, "备注长度应该在6至100之间");
return;
}
@ -34,7 +37,7 @@ $(function() {
dataType : "json",
success : function(data){
if (data.code == 200) {
ComAlert.show(1, '提交成功', function(){
ComAlert.show(1, '保存成功', function(){
//$(window).unbind('beforeunload');
window.location.reload();
});

View File

@ -4,10 +4,10 @@
<parent>
<groupId>com.xxl</groupId>
<artifactId>xxl-job</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.3.0-SNAPSHOT</version>
</parent>
<artifactId>xxl-job-client-demo</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.3.1-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
@ -55,7 +55,7 @@
<dependency>
<groupId>com.xxl</groupId>
<artifactId>xxl-job-client</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.3.1</version>
</dependency>
</dependencies>

View File

@ -4,10 +4,10 @@
<parent>
<groupId>com.xxl</groupId>
<artifactId>xxl-job</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.3.0-SNAPSHOT</version>
</parent>
<artifactId>xxl-job-client</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.3.1</version>
<dependencies>