feat: support createParam
This commit is contained in:
@@ -102,8 +102,6 @@ function drawConInfoTable(table) {
|
||||
<th>状态</th>
|
||||
<th>端口</th>
|
||||
<th>类型</th>
|
||||
<th>通讯</th>
|
||||
<th>共识</th>
|
||||
<!--<th>返回方式</th>-->
|
||||
<th>次数</th>
|
||||
<th>流量</th>
|
||||
@@ -125,19 +123,20 @@ ${table[i].name}
|
||||
<td>${table[i]['contractStatus']}</td>
|
||||
<td>${table[i].port || '-'}</td>
|
||||
<td>${table[i].type}</td>
|
||||
<td>${table[i]['networkType'] ? "P2P" : "TCP"}</td>
|
||||
<td>${table[i]['consensusType'] ? CONSENSUS_TABLE[table[i]['consensusType']] : '无'}</td>
|
||||
<!--<td>${table[i]['networkType'] ? "P2P" : "TCP"}</td>-->
|
||||
<!--<td>${table[i]['consensusType'] ? CONSENSUS_TABLE[table[i]['consensusType']] : '无'}</td>-->
|
||||
<!--<td>${table[i].responseType ? RESPONSE_TYPE_TABLE[table[i].responseType] : '-'}</td>-->
|
||||
<td>${table[i].times}</td>
|
||||
<td>${table[i]['traffic'] || '-'}</td>
|
||||
<td>${table[i].storage || '-'}</td>
|
||||
<td style='padding:2px 12px 2px 12px'>
|
||||
<button onclick="stopContractByID('${table[i].id}')" class="btn btn-secondary">停止</button>
|
||||
<button onclick="restartContractByID('${table[i].id}')" class="btn btn-secondary">重启</button>
|
||||
</td>
|
||||
</tr>`
|
||||
}
|
||||
html += tableTail;
|
||||
html = "<h5 class='card-title'>DO实例列表</h5>" + html;
|
||||
html = "<h5 class='card-title'>DO实例列表</h5>" + "<button onclick='pruneKilledContract()' class='btn btn-secondary' style='float:right'>清除已停合约</button>"+html;
|
||||
ciTabDiv.html(html);
|
||||
|
||||
$("#ciTabDivTab").DataTable(
|
||||
@@ -184,6 +183,29 @@ function stopContractByID(contractID) {
|
||||
});
|
||||
}
|
||||
|
||||
function pruneKilledContract() {
|
||||
$("#dialogBodyDiv").html("是否清除已停合约" );
|
||||
showDialog("请确认", function () {
|
||||
global.wssocket.send(JSON.stringify({
|
||||
action: 'pruneKilledContract',
|
||||
requestID: new Date().getTime().toString()
|
||||
}));
|
||||
setTimeout(listContractProcess,1000);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function restartContractByID(contractID) {
|
||||
$("#dialogBodyDiv").html("是否重启合约,ContractID:" + contractID);
|
||||
showDialog("请确认", function () {
|
||||
global.wssocket.send(JSON.stringify({
|
||||
action: 'restartContractProcess',
|
||||
requestID: new Date().getTime().toString(),
|
||||
id: contractID
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
function drawContractInstanceStatusPie(table) {
|
||||
const ciStatusPieDiv = $("#ciStatusPieDiv")
|
||||
if (ciStatusPieDiv.css("height") === "0px") {
|
||||
|
||||
Reference in New Issue
Block a user