付延余
2022-12-16 f0f8ee8c4a945adbc742d9bab69382b28ad311fb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
function searchByOrder(orderBy,orderType){
    window.location.href = "/tssw/appInfo/list?orderBy="+orderBy+"&orderType="+orderType+"&hostname="+$("#hostname").val();
}
 
function searchByOnline(state){
    window.location.href = "/tssw/appInfo/list?state="+state;
}
 
function searchByAccount() {
    window.location.href = "/tssw/appInfo/list?account="+$("#account").val();
}
 
function add() {
    window.location.href = "/tssw/appInfo/edit";
}
 
function addBatch() {
    window.location.href = "/tssw/appInfo/editBatch";
}
 
 
 
function view(id) {
    window.location.href = "/tssw/appInfo/view?id="+id;
}
 
function edit(id){
    window.location.href = "/tssw/appInfo/edit?id="+id;
}
 
function del(id) {
    if(confirm('你确定要删除吗?')) {
        window.location.href = "/tssw/appInfo/del?id=" + id;
    }
}
function viewDate(id,searchTime){
    window.location.href = "/tssw/appInfo/view?id="+id+"&am="+searchTime;
}
 
function excelExport(id,searchTime){
    var startTime = $("#startTime").val();
    var endTime = $("#endTime").val();
    window.open("/tssw/appInfo/chartExcel?id="+id+"&startTime="+startTime+"&endTime="+endTime+"&am="+searchTime);
}
 
function showSetGroupId() {
    var chk_value =[];
    $("input[name='todo2']:checkbox").each(function() {
        if($(this).is(':checked')) {
            chk_value.push($(this).val());
        }
    });
    if(chk_value.length == 0){
        alert("请先选择需要设置分组的进程");
        return;
    }
    $("#id3").val(chk_value.join(","));
    $("#modal-default3").modal("toggle");
}
 
function ajaxSaveGroupId() {
    $("#form4").ajaxSubmit(function(message) {
        window.location.href = window.location.href;
    });
}
 
function searchByGroupId() {
    window.location.href = "/tssw/appInfo/list?groupId="+$("#groupId").val();
}
 
 
function cancel(){
    history.back();
}
 
//数据表单动态添加一行下标,每次添加+1
var dataFromIndex = 0 ;
var appType = "1";
 
function addDataForm() {
    var dataHideContentHtml = $("#dataHideContent").html();
    dataHideContentHtml = dataHideContentHtml.replace(/{num}/g, dataFromIndex);
    if(appType=='2'){
        dataHideContentHtml = dataHideContentHtml.replace(/进程ID号/g, "PID文件路径");
        dataHideContentHtml = dataHideContentHtml.replace(/输入进程ID号如9639/g, "如:/usr/local/nginx.pid");
    }
    if(appType=='3'){
        dataHideContentHtml = dataHideContentHtml.replace(/进程ID号/g, "进程启动指令的关键字");
        dataHideContentHtml = dataHideContentHtml.replace(/输入进程ID号如9639/g, "linux或windows的进程启动指令COMMAND里的关键字符,请保证关键字符能唯一对应进程,如:tssw-server-release.jar");
    }
    $("#dataFormList").append(dataHideContentHtml);
    $("#dataFromIndex").val(dataFromIndex);
    dataFromIndex += 1;
}