@@ -208,7 +208,33 @@
$("input[name='serverip']").val(oscip);
}
- // click function
+ // click function SOURCE SERVER
+ $("#entsip").on("click", function () {
+ scfs();
+ })
+
+
+ // 目标服务器的文件信息
+ var scfs = function () {
+ //
+ scip = $("input[name='sip']").val();
+ // ip storage
+ sessionStorage.setItem("scip", scip);
+ //监视目录
+ var jsdir = $("input[name='sdir']").val();
+ if (jsdir != '') {
+ urlpath = encodeURIComponent(btoa(jsdir));
+ }
+ //
+ var html = "
输入目标服务器" + scip + "";
+ $("#mbip").text("源站(" + scip + ")");
+ // 获取信息
+ gescinfo("#scsc",scip);
+ //
+ $("#rstatus").append(html);
+ }
+
+ // button click function for TARGET SERVER
$("#tentsip").on("click", function () {
tgfs();
})
@@ -225,19 +251,17 @@
urlpath = encodeURIComponent(btoa(jsdir));
}
//
-
-
var html = "输入目标服务器" + scip + "";
// 目标站
$("#mbip").text("目标站(" + scip + ")");
// 获取信息
- gescinfo(scip);
+ gescinfo("#tgsc",scip);
//
$("#rstatus").append(html);
}
// 获取目标服务器的信息
- var gescinfo = function (scip) {
+ var gescinfo = function (elemnt,scip) {
// 客户端的状态地址
var url = "http://" + scip + ":9099/sc?p=" + urlpath.replace("/\\/g", "\/");
//
@@ -262,7 +286,8 @@
html += "";
})
// append to html
- $("#tgsc").html(html)
+ // $("#tgsc").html(html)
+ $(elemnt).html(html);
writelog(scip + "获取数据:" + res.data.list.length + "条数据")
// 客户端监控目录
$("#sc01").text(res.workdir);
@@ -338,7 +363,11 @@
//解码base64
var dbsresp = function (bsStr) {
console.log("respone base64 string ",bsStr)
- return decodeURIComponent(atob(bsStr))
+ if(bsStr=="."){
+ return "."
+ }else{
+ return decodeURIComponent(atob(bsStr))
+ }
}
// 另外的base64的解码