|
@@ -49,7 +49,7 @@
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
|
|
+
|
|
<!-- footer -->
|
|
<!-- footer -->
|
|
{{template "mask"}}
|
|
{{template "mask"}}
|
|
{{template "dialog"}}
|
|
{{template "dialog"}}
|
|
@@ -109,8 +109,12 @@ $(function () {
|
|
}
|
|
}
|
|
}},
|
|
}},
|
|
{"data":"InstanceId",render:function(val,a,row,pos){
|
|
{"data":"InstanceId",render:function(val,a,row,pos){
|
|
- return '<a class="btn btn-sm btn-warning" onclick="del(\''+row.InstanceId+'\')">释放</a>';
|
|
|
|
- }}
|
|
|
|
|
|
+ return '<div class="btn-group">'+
|
|
|
|
+ '<a class="btn btn-sm btn-warning" onclick="del(\''+row.InstanceId+'\')">释放</a>'+
|
|
|
|
+ '<a class="btn btn-sm btn-danger" href="#" onclick="delInstanceId(\''+row.InstanceId+'\')">删 除</a>'
|
|
|
|
+ '</div>';
|
|
|
|
+ },
|
|
|
|
+ }
|
|
]
|
|
]
|
|
});
|
|
});
|
|
ttable.on('init.dt', function () {
|
|
ttable.on('init.dt', function () {
|
|
@@ -136,14 +140,14 @@ $(function () {
|
|
{label:"表名",s_label:"s_table",placeholder:"信息表名",must:true},
|
|
{label:"表名",s_label:"s_table",placeholder:"信息表名",must:true},
|
|
{label:"开始日期",s_label:"s_date",placeholder:"2018-01-01",must:true},
|
|
{label:"开始日期",s_label:"s_date",placeholder:"2018-01-01",must:true},
|
|
{label:"截止日期",s_label:"e_date",placeholder:"2019-01-01",must:true},
|
|
{label:"截止日期",s_label:"e_date",placeholder:"2019-01-01",must:true},
|
|
- ]
|
|
|
|
|
|
+ ]
|
|
}else if (n=="releasetime"){
|
|
}else if (n=="releasetime"){
|
|
_tit="释放设置"
|
|
_tit="释放设置"
|
|
tag=[
|
|
tag=[
|
|
{label:"实例ID",s_label:"instanceid",placeholder:"实例ID",must:true},
|
|
{label:"实例ID",s_label:"instanceid",placeholder:"实例ID",must:true},
|
|
{label:"顺延时间",s_label:"hours",placeholder:"当前时间起(单位/h)",must:true},
|
|
{label:"顺延时间",s_label:"hours",placeholder:"当前时间起(单位/h)",must:true},
|
|
- ]
|
|
|
|
- }
|
|
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
htmlObj={
|
|
htmlObj={
|
|
title:_tit,
|
|
title:_tit,
|
|
tag:tag,
|
|
tag:tag,
|
|
@@ -159,12 +163,12 @@ $(function () {
|
|
bcon=false
|
|
bcon=false
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
- })
|
|
|
|
- if (bcon){
|
|
|
|
- showConfirm("确认执行?", function() {
|
|
|
|
|
|
+ })
|
|
|
|
+ if (bcon){
|
|
|
|
+ showConfirm("确认执行?", function() {
|
|
$.post("/admin/distribution/runInstances",obj,function(data){
|
|
$.post("/admin/distribution/runInstances",obj,function(data){
|
|
if(data&&data.rep){
|
|
if(data&&data.rep){
|
|
- window.location.href="/admin/distribution"
|
|
|
|
|
|
+ window.location.href="/admin/distribution"
|
|
}else{
|
|
}else{
|
|
showTip(data.msg,1000)
|
|
showTip(data.msg,1000)
|
|
}
|
|
}
|
|
@@ -190,7 +194,7 @@ function del(_id){
|
|
type:"post",
|
|
type:"post",
|
|
data:{"InstanceId":_id},
|
|
data:{"InstanceId":_id},
|
|
success:function(r){
|
|
success:function(r){
|
|
- if(r.rep){
|
|
|
|
|
|
+ if(r.rep){
|
|
ttable.ajax.reload();
|
|
ttable.ajax.reload();
|
|
}else{
|
|
}else{
|
|
showTip("释放失败", 1000, function() {});
|
|
showTip("释放失败", 1000, function() {});
|
|
@@ -199,6 +203,22 @@ function del(_id){
|
|
})
|
|
})
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+function delInstanceId(_id){
|
|
|
|
+ showConfirm("确定删除实例(数据库的)?", function() {
|
|
|
|
+ $.ajax({
|
|
|
|
+ url:"/admin/distribution/deleteInstancedb",
|
|
|
|
+ type:"post",
|
|
|
|
+ data:{"InstanceId":_id},
|
|
|
|
+ success:function(r){
|
|
|
|
+ if(r.rep){
|
|
|
|
+ ttable.ajax.reload();
|
|
|
|
+ }else{
|
|
|
|
+ showTip("确定删除实例", 1000, function() {});
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ });
|
|
|
|
+}
|
|
function upInstanceIds(){
|
|
function upInstanceIds(){
|
|
showConfirm("更新实例?", function() {
|
|
showConfirm("更新实例?", function() {
|
|
com.maskShow("正在更新实例...");
|
|
com.maskShow("正在更新实例...");
|
|
@@ -206,7 +226,7 @@ function upInstanceIds(){
|
|
url:"/admin/distribution/upstatus",
|
|
url:"/admin/distribution/upstatus",
|
|
type:"post",
|
|
type:"post",
|
|
success:function(r){
|
|
success:function(r){
|
|
- if(r.rep){
|
|
|
|
|
|
+ if(r.rep){
|
|
ttable.ajax.reload();
|
|
ttable.ajax.reload();
|
|
com.maskHide();
|
|
com.maskHide();
|
|
}
|
|
}
|
|
@@ -222,14 +242,14 @@ function deploy(){
|
|
url:"/admin/distribution/deploy",
|
|
url:"/admin/distribution/deploy",
|
|
type:"post",
|
|
type:"post",
|
|
success:function(r){
|
|
success:function(r){
|
|
- if(r.rep){
|
|
|
|
|
|
+ if(r.rep){
|
|
ttable.ajax.reload();
|
|
ttable.ajax.reload();
|
|
com.maskHide();
|
|
com.maskHide();
|
|
}else{
|
|
}else{
|
|
showTip("部署失败", 1000, function() {});
|
|
showTip("部署失败", 1000, function() {});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ })
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -240,7 +260,7 @@ function rangetask(){
|
|
url:"/admin/distribution/rangetask",
|
|
url:"/admin/distribution/rangetask",
|
|
type:"post",
|
|
type:"post",
|
|
success:function(r){
|
|
success:function(r){
|
|
- if(r.rep){
|
|
|
|
|
|
+ if(r.rep){
|
|
ttable.ajax.reload();
|
|
ttable.ajax.reload();
|
|
com.maskHide();
|
|
com.maskHide();
|
|
}else{
|
|
}else{
|
|
@@ -248,6 +268,6 @@ function rangetask(){
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- })
|
|
|
|
|
|
+ })
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|