Browse Source

处理公用渲染函数

master
453530270@qq.com 2 years ago
parent
commit
700d62245b
  1. 45
      fss/www/index.html

45
fss/www/index.html

@ -108,7 +108,7 @@
</div>
<!-- List group -->
<ul class="list-group">
<ul class="list-group" id="scsc">
<li class="list-group-item optzone">
<div class="col-md-10">
<input type="checkbox" name="sfiles" />
@ -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 = "<li class=\"list-group-item\">输入目标服务器" + scip + "</li>";
$("#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 = "<li class=\"list-group-item\">输入目标服务器" + scip + "</li>";
// 目标站
$("#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 += "</li>";
})
// 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的解码

Loading…
Cancel
Save