fix: filter killed contract processes in backend unless NodePortal calls listContractProcess

This commit is contained in:
Frank.R.Wu 2021-06-21 17:23:41 +08:00
parent 0fddac2519
commit ecb922b3ae
2 changed files with 510 additions and 507 deletions

File diff suppressed because it is too large Load Diff

View File

@ -300,7 +300,7 @@ function onGetNodeSessionID(data) {
global.session = data.session; global.session = data.session;
global.wssocket.send(JSON.stringify({ global.wssocket.send(JSON.stringify({
pubKey: global.sm2Key.publicKey, pubKey: global.sm2Key.publicKey,
signature: sm2.doSignature(global.session, global.sm2Key.privateKey,{hash:true,der:true}), signature: sm2.doSignature(global.session, global.sm2Key.privateKey, {hash: true, der: true}),
action: "login" action: "login"
})); }));
} }
@ -498,25 +498,25 @@ function addNodeUnit(obj) {
if (!global.units) { if (!global.units) {
global.units = {}; global.units = {};
} }
var x=document.getElementById("selectUnits"); var x = document.getElementById("selectUnits");
for (i = 0; i < x.length; ++i){ for (i = 0; i < x.length; ++i) {
if (x.options[i].value == obj.key){ if (x.options[i].value == obj.key) {
return; return;
} }
} }
var option=document.createElement("option"); var option = document.createElement("option");
var type = obj.type; var type = obj.type;
if (type == "TCP") { if (type == "TCP") {
var at_ = obj.key.indexOf("_"); var at_ = obj.key.indexOf("_");
var key = obj.key.substr(at_+1); var key = obj.key.substr(at_ + 1);
global.units[key] = obj.value; global.units[key] = obj.value;
option.text = obj.type + ":" + key; option.text = obj.type + ":" + key;
} else { } else {
global.units[obj.key] = obj.value; global.units[obj.key] = obj.value;
option.text = obj.type + ":" + obj.key + ":" +obj.value.length + "nodes"; option.text = obj.type + ":" + obj.key + ":" + obj.value.length + "nodes";
} }
option.value = obj.key; option.value = obj.key;
x.add(option,null); x.add(option, null);
} }