xueli.xue 9 years ago
parent
commit
740b2d0268

+ 2 - 7
xxl-job-admin/src/main/webapp/WEB-INF/template/job/index.ftl

@@ -33,7 +33,7 @@
 					<div class="box">
 			            <div class="box-header"><h3 class="box-title">任务列表</h3></div>
 			            <div class="box-body">
-			              	<table id="example1" class="table table-bordered table-striped">
+			              	<table id="job_list" class="table table-bordered table-striped">
 				                <thead>
 					            	<tr>
 					                	<th>任务ID</th>
@@ -82,11 +82,6 @@
 <!-- DataTables -->
 <script src="${request.contextPath}/static/adminlte/plugins/datatables/jquery.dataTables.min.js"></script>
 <script src="${request.contextPath}/static/adminlte/plugins/datatables/dataTables.bootstrap.min.js"></script>
-<!-- page script -->
-<script>
-  $(function () {
-		$("#example1").DataTable();
-  });
-</script>
+<script src="${request.contextPath}/static/js/job.index.1.js"></script>
 </body>
 </html>

+ 5 - 0
xxl-job-admin/src/main/webapp/static/js/job.index.1.js

@@ -0,0 +1,5 @@
+$(function(){
+	$(function () {
+		$("#job_list").DataTable();
+	});
+});

+ 3 - 3
xxl-job-admin/src/test/java/quartz/JunitTest.java

@@ -2,12 +2,12 @@ package quartz;
 
 
 import java.lang.reflect.InvocationTargetException;
-import java.util.Set;
+import java.util.List;
+import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.quartz.JobKey;
 import org.quartz.SchedulerException;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -21,7 +21,7 @@ public class JunitTest {
 	
 	@Test
     public void getJobKeys() throws SchedulerException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, InterruptedException {
-		Set<JobKey> list = DynamicSchedulerUtil.getJobKeys();
+		List<Map<String, Object>> list = DynamicSchedulerUtil.getJobList();
     	System.out.println(list);
     	TimeUnit.SECONDS.sleep(30);
     }