-1:pe.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s]","i"),tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,nt=/
-{{.LayoutContent}}
+{{include .MainContent .}}
{{/*
\ No newline at end of file
+
diff --git a/views/task/copy.html b/resource/template/task/copy.html
similarity index 98%
rename from views/task/copy.html
rename to resource/template/task/copy.html
index 6fe7d234..77e05ef9 100644
--- a/views/task/copy.html
+++ b/resource/template/task/copy.html
@@ -120,7 +120,7 @@
@@ -160,13 +160,13 @@
var formSelects = layui.formSelects;
- var server_id = {{$.service_ids}};
+ var server_id = [{{$.task.ServerIds}}];
formSelects.render({
init : server_id,
name : 'select_server',
});
- var select_notify = {{$.notify_user_ids}};
+ var select_notify = [{{$.task.NotifyUserIds}}];
console.log(select_notify);
formSelects.render({
diff --git a/views/task/detail.html b/resource/template/task/detail.html
similarity index 85%
rename from views/task/detail.html
rename to resource/template/task/detail.html
index 358f751f..3201b11f 100644
--- a/views/task/detail.html
+++ b/resource/template/task/detail.html
@@ -14,18 +14,18 @@
{{end}}
- {{if eq $.task.Status 1}}
-
- {{end}}
- {{if eq $.task.Status 0}}
-
- {{end}}
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
@@ -183,7 +183,7 @@
}
window.parent.openTab("/task/edit?id="+id,task_name+' 编辑',"admin_task_edit-"+id,'fa-edit');
}else if(event==='log'){
- window.parent.openTab("/tasklog/list?task_id="+id,task_name+'日志',"admin_log-"+id,'');
+ window.parent.openTab("/task_log/list?task_id="+id,task_name+'日志',"admin_log-"+id,'');
}else if(event==='copy'){
window.parent.openTab("/task/copy?id="+id,task_name+' 复制',"admin_task_copy-"+id,'fa-copy');
}else if(event==="del"){
@@ -195,7 +195,7 @@
layer.confirm("确认要删除这条任务吗?", {icon: 3, title:'提示'}, function(index){
layer.load();
- $.post('/task/ajaxdel', {id:id}, function (out) {
+ $.post('/task/ajax_del', {id:id}, function (out) {
if (out.status == 0) {
layer.msg("操作成功",{icon: 1,shade:0.3,time:1000},function () {
@@ -217,10 +217,10 @@
}else if (event==='run'){
layer.confirm("测试执行任务,注意不要超时,请确认执行", {icon: 3, title:'提示'}, function(index){
layer.load();
- $.post('/task/ajaxrun', {id:id}, function (out) {
+ $.post('/task/ajax_run', {id:id}, function (out) {
if (out.status == 0) {
layer.msg("操作成功",{icon: 1,shade:0.3,time:1000},function () {
- window.parent.openTab("/tasklog/list?task_id="+id,task_name+' 日志',"admin_task_log-"+id,'');
+ window.parent.openTab("/task_log/list?task_id="+id,task_name+' 日志',"admin_task_log-"+id,'');
})
} else {
@@ -234,7 +234,7 @@
layer.close(index);
});
}else if (event==='audit' || event==='start' || event==='pause' || event==="nopass"){
- $.post('/task/ajax'+event, {id:id}, function (out) {
+ $.post('/task/ajax_'+event, {id:id}, function (out) {
if (out.status == 0) {
layer.msg("操作成功",{icon: 1,shade:0.3,time:1000},function () {
window.location.reload()
diff --git a/views/task/edit.html b/resource/template/task/edit.html
similarity index 98%
rename from views/task/edit.html
rename to resource/template/task/edit.html
index c9a89084..e342235f 100644
--- a/views/task/edit.html
+++ b/resource/template/task/edit.html
@@ -120,7 +120,7 @@
@@ -162,13 +162,13 @@
var formSelects = layui.formSelects;
- var server_id = {{$.service_ids}};
+ var server_id = [{{$.task.ServerIds}}];
formSelects.render({
init : server_id,
name : 'select_server',
});
- var select_notify = {{$.notify_user_ids}};
+ var select_notify = [{{$.task.NotifyUserIds}}];
console.log(select_notify);
formSelects.render({
diff --git a/views/task/list.html b/resource/template/task/list.html
similarity index 66%
rename from views/task/list.html
rename to resource/template/task/list.html
index c2626730..3981b622 100644
--- a/views/task/list.html
+++ b/resource/template/task/list.html
@@ -4,8 +4,8 @@
-
- cron
+
+
@@ -33,11 +33,14 @@