Compare commits
2 Commits
proj/zhizh
...
proj/nanni
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0c19fae21 | ||
|
|
a22b1064eb |
@@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Cache-Control" content="no-cache"/>
|
||||
<title>智能合约在线编辑器</title>
|
||||
<title>数瑞智能合约在线编辑器</title>
|
||||
<script src="./jqueryui1.12/jquery-2.1.4.js"></script>
|
||||
<link href="./jqueryui1.12/jquery-ui.css" rel="stylesheet">
|
||||
<script src="./jqueryui1.12/jquery-ui.js"></script>
|
||||
@@ -127,7 +127,7 @@
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body style="overflow-x: hidden;">
|
||||
<body>
|
||||
|
||||
<header
|
||||
class="headerFooter navbar navbar-default navbar-fixed-top navColor ">
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
<script src="./js/bootstrap4-toggle.min.js"></script>
|
||||
|
||||
</head>
|
||||
<body style="overflow-x: hidden;">
|
||||
<body>
|
||||
|
||||
<header
|
||||
class="headerFooter navbar navbar-default navbar-fixed-top navColor ">
|
||||
@@ -544,73 +544,6 @@
|
||||
<textarea class="form-control" id="responseArea"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row d-flex justify-content-flex-start">
|
||||
<h6 class="card-title" style="margin-top: 2%">Mask配置</h6>
|
||||
<div class="input-group mb-3">
|
||||
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">参数</span>
|
||||
</div>
|
||||
|
||||
<input type="text" class="form-control" placeholder="输入参数" id="maskArg">
|
||||
|
||||
<div class="input-group-append">
|
||||
<button onclick="getMask()" type="button"
|
||||
class="btn btn-outline-primary">get
|
||||
</button>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<button onclick="setMask()"
|
||||
type="button" class="btn btn-outline-primary">set
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row d-flex justify-content-flex-start">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="maskStatus">当前配置:</span>
|
||||
</div>
|
||||
|
||||
<textarea class="form-control" id="maskResponseArea"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row d-flex justify-content-flex-start">
|
||||
<h6 class="card-title" style="margin-top: 2%">Mock配置</h6>
|
||||
<div class="input-group mb-3">
|
||||
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">参数</span>
|
||||
</div>
|
||||
|
||||
<input type="text" class="form-control" placeholder="输入参数" id="mockArg">
|
||||
|
||||
<div class="input-group-append">
|
||||
<button onclick="getMock()" type="button"
|
||||
class="btn btn-outline-primary">get
|
||||
</button>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<button onclick="setMock()"
|
||||
type="button" class="btn btn-outline-primary">set
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row d-flex justify-content-flex-start">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="mockStatus">当前配置:</span>
|
||||
</div>
|
||||
|
||||
<textarea class="form-control" id="mockResponseArea"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row d-flex justify-content-flex-start">
|
||||
<h6 class="card-title" style="margin-top: 2%">权限管理</h6>
|
||||
</div>
|
||||
|
||||
@@ -35,7 +35,11 @@
|
||||
<!--script src="./js/echartsTheme.js"></script -->
|
||||
<!-- script src="./js/echarts-gl.min.js"></script -->
|
||||
<script src="./js/sm2.js"></script>
|
||||
<script src="./js/sm3.js"></script>
|
||||
<script src="./js/sm4.js"></script>
|
||||
|
||||
|
||||
<script src="./js/sm/index.js"></script>
|
||||
<script src="./js/d3.v5.min.js"></script>
|
||||
<!-- script src="./js/dagre-d3.min.js"></script -->
|
||||
<script src="./js/tipsy/jquery.tipsy.min.js"></script>
|
||||
@@ -64,7 +68,7 @@
|
||||
}
|
||||
|
||||
.projectButton.ui-state-active {
|
||||
background: #304156;
|
||||
background: #2E324C;
|
||||
color: white;
|
||||
}
|
||||
|
||||
@@ -78,8 +82,8 @@
|
||||
|
||||
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link {
|
||||
color: white;
|
||||
background-color: #304156;
|
||||
border-color: #304156;
|
||||
background-color: #2E324C;
|
||||
border-color: #2E324C;
|
||||
}
|
||||
|
||||
.ui-tabs {
|
||||
@@ -95,14 +99,14 @@
|
||||
}
|
||||
|
||||
.ui-menu-item.ui-state-active:hover {
|
||||
background: #304156;
|
||||
background: #2E324C;
|
||||
color: white;
|
||||
border: 1px solid #999;
|
||||
}
|
||||
|
||||
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active,
|
||||
a.ui-button:active, .ui-button:active, .ui-button.ui-state-active:hover {
|
||||
background: #304156;
|
||||
background: #2E324C;
|
||||
color: white;
|
||||
border: 1px solid #999;
|
||||
}
|
||||
@@ -116,7 +120,7 @@
|
||||
}
|
||||
|
||||
.fileLine:hover {
|
||||
background: #304156;
|
||||
background: #2E324C;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -128,7 +132,7 @@
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body style="overflow-x: hidden;">
|
||||
<body>
|
||||
|
||||
<header
|
||||
class="headerFooter navbar navbar-default navbar-fixed-top navColor ">
|
||||
@@ -274,7 +278,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="box" style="overflow:hidden; height:100%">
|
||||
<div id="box" style="overflow:hide; height:100%">
|
||||
<div id="contractCode" class="flex-grow-1" style="height:100%">
|
||||
<div id="textareaDiv" class="col-sm-12" style="width: 100%; height: 100%; padding:0">
|
||||
<textarea id="scriptEditor" style="width: 100%; height: 100%"
|
||||
@@ -555,14 +559,14 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12" id="responseAreaDiv">
|
||||
<textarea id="responseArea" class="form-control"
|
||||
style="width: 100%; height: 200px;"></textarea>
|
||||
style="width: 100%; height: 150px;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 mt-3" id="outputStreamAreaDiv">
|
||||
控制台输出:
|
||||
<textarea id="outputStreamArea" class="form-control"
|
||||
style="width: 100%; height: 200px;"></textarea>
|
||||
style="width: 100%; height: 150px;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
}
|
||||
|
||||
.projectButton.ui-state-active {
|
||||
background: #304156;
|
||||
background: #2E324C;
|
||||
color: white;
|
||||
}
|
||||
|
||||
@@ -72,8 +72,8 @@
|
||||
|
||||
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link {
|
||||
color: white;
|
||||
background-color: #304156;
|
||||
border-color: #304156;
|
||||
background-color: #2E324C;
|
||||
border-color: #2E324C;
|
||||
}
|
||||
|
||||
.ui-tabs {
|
||||
@@ -89,14 +89,14 @@
|
||||
}
|
||||
|
||||
.ui-menu-item.ui-state-active:hover {
|
||||
background: #304156;
|
||||
background: #2E324C;
|
||||
color: white;
|
||||
border: 1px solid #999;
|
||||
}
|
||||
|
||||
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active,
|
||||
a.ui-button:active, .ui-button:active, .ui-button.ui-state-active:hover {
|
||||
background: #304156;
|
||||
background: #2E324C;
|
||||
color: white;
|
||||
border: 1px solid #999;
|
||||
}
|
||||
@@ -110,7 +110,7 @@
|
||||
}
|
||||
|
||||
.fileLine:hover {
|
||||
background: #304156;
|
||||
background: #2E324C;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
2
css/bootstrap.min.css
vendored
2
css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -9,7 +9,7 @@
|
||||
border: 1px solid rgba(0, 0, 0, .125);
|
||||
border-radius: 5px;
|
||||
background: white;
|
||||
color: #304156;
|
||||
color: #2E324C;
|
||||
}
|
||||
|
||||
.userName:hover {
|
||||
@@ -22,17 +22,17 @@
|
||||
#horiNav {
|
||||
padding-top: 10px;
|
||||
border: 1px solid rgba(0, 0, 0, .05);
|
||||
background: #e9f6ff;
|
||||
background: #f8f9fa;
|
||||
}
|
||||
|
||||
#outputNav {
|
||||
padding-top: 10px;
|
||||
border: 1px solid rgba(0, 0, 0, .05);
|
||||
background: #e9f6ff;
|
||||
background: #f8f9fa;
|
||||
}
|
||||
|
||||
div .card {
|
||||
background: #e9f6ff;
|
||||
background: #f8f9fa;
|
||||
}
|
||||
|
||||
#main {
|
||||
@@ -85,16 +85,16 @@ div .card {
|
||||
|
||||
.projectLine.collapsed {
|
||||
background: #D5D6DB;
|
||||
color: #304156;
|
||||
color: #2E324C;
|
||||
}
|
||||
|
||||
.projectLine {
|
||||
background: #304156;
|
||||
background: #2E324C;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.projectLine.collapsed:hover {
|
||||
background: #304156;
|
||||
background: #2E324C;
|
||||
color: white;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ div .card {
|
||||
}
|
||||
|
||||
.headerFooter {
|
||||
background: #304156;
|
||||
background: #2E324C;
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 7.8 KiB |
11
images/logo-1.svg
Normal file
11
images/logo-1.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 106 KiB |
BIN
images/logo-12.png
Executable file
BIN
images/logo-12.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
BIN
images/logo.png
Normal file → Executable file
BIN
images/logo.png
Normal file → Executable file
Binary file not shown.
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 37 KiB |
@@ -2,7 +2,7 @@
|
||||
<header>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Cache-Control" content="no-cache"/>
|
||||
<title>数瑞智能合约</title>
|
||||
<title>智能合约</title>
|
||||
<script src="./jqueryui1.12/jquery-2.1.4.js"></script>
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
padding-bottom: 30px;
|
||||
width: 28%;
|
||||
cursor: hand;
|
||||
background: #304156;
|
||||
background: #2E324C;
|
||||
color: white;
|
||||
}
|
||||
|
||||
@@ -100,11 +100,11 @@
|
||||
</style>
|
||||
|
||||
</header>
|
||||
<body style="background: #304156; color: white;">
|
||||
<body style="background: #2E324C; color: white;">
|
||||
<div
|
||||
style="width: 90%; max-width: 1000px; min-width: 850px; margin: 0 auto; margin-top: 3%;">
|
||||
<div style="width: 20%; float: right; margin-right: 0%">
|
||||
<img src="./images/logo.png" class="logoimg"></img>
|
||||
<img src="./images/logo-1.png" class="logoimg"></img>
|
||||
</div>
|
||||
<div
|
||||
style="width: fit-content; margin: 0; font-size: 200%; background-color: white; color: black; border-radius: 10px; float: left; padding: 10px;">
|
||||
|
||||
@@ -443,155 +443,6 @@ function onExecuteResult(obj) {
|
||||
}
|
||||
}
|
||||
|
||||
function getMask() {
|
||||
const argDiv = $('#maskArg')[0];
|
||||
const request = {};
|
||||
request.action = "getMask";
|
||||
request.requestID = new Date().getTime() + "";
|
||||
request.contractID = global.contractInstance;
|
||||
const operation = $("#selectContractFunction")[0].value;
|
||||
if (operation === " " && !operation) {
|
||||
myToast("执行合约", "请选择合约方法!");
|
||||
return;
|
||||
}
|
||||
//request.operation = operation;
|
||||
request.arg = argDiv.value;
|
||||
request.pubkey = global.sm2Key.publicKey;
|
||||
//request.isDebug = executeContractAsDebug.checked;
|
||||
console.log(request.arg);
|
||||
//const gasLimit = $('#gasLimit').val()/1;
|
||||
var toSign = request.contractID + "|"
|
||||
+ request.operation + "|" + arg ;
|
||||
/*if (gasLimit>0){
|
||||
request.gasLimit = gasLimit;
|
||||
toSign+= "|" + gasLimit;
|
||||
}*/
|
||||
toSign+= "|" + global.sm2Key.publicKey;
|
||||
request.signature = sm2.doSignature(
|
||||
toSign,
|
||||
global.sm2Key.privateKey,
|
||||
{hash: true, der: true});
|
||||
localStorage.setItem("persisArg", JSON.stringify(request));
|
||||
global.wssocket.send(JSON.stringify(request));
|
||||
}
|
||||
function setMask() {
|
||||
const argDiv = $('#maskArg')[0];
|
||||
const request = {};
|
||||
request.action = "setMask";
|
||||
request.requestID = new Date().getTime() + "";
|
||||
request.contractID = global.contractInstance;
|
||||
const operation = $("#selectContractFunction")[0].value;
|
||||
if (operation === " " && !operation) {
|
||||
myToast("执行合约", "请选择合约方法!");
|
||||
return;
|
||||
}
|
||||
//request.operation = operation;
|
||||
request.arg = argDiv.value;
|
||||
request.pubkey = global.sm2Key.publicKey;
|
||||
//request.isDebug = executeContractAsDebug.checked;
|
||||
console.log(request.arg);
|
||||
//const gasLimit = $('#gasLimit').val()/1;
|
||||
var toSign = request.contractID + "|"
|
||||
+ request.operation + "|" + arg ;
|
||||
/*if (gasLimit>0){
|
||||
request.gasLimit = gasLimit;
|
||||
toSign+= "|" + gasLimit;
|
||||
}*/
|
||||
toSign+= "|" + global.sm2Key.publicKey;
|
||||
request.signature = sm2.doSignature(
|
||||
toSign,
|
||||
global.sm2Key.privateKey,
|
||||
{hash: true, der: true});
|
||||
localStorage.setItem("persisArg", JSON.stringify(request));
|
||||
global.wssocket.send(JSON.stringify(request));
|
||||
}
|
||||
|
||||
function onGetMask(obj) {
|
||||
console.log("onGetMask obj.data", obj.data);
|
||||
try {
|
||||
const result = obj;
|
||||
$("#maskResponseArea")[0].value = JSON.stringify(obj.data);
|
||||
|
||||
} catch (e) {
|
||||
$("#maskResponseArea")[0].value = JSON.stringify(obj.data);
|
||||
}
|
||||
}
|
||||
|
||||
function getMock() {
|
||||
const argDiv = $('#mockArg')[0];
|
||||
const request = {};
|
||||
request.action = "getMock";
|
||||
request.requestID = new Date().getTime() + "";
|
||||
request.contractID = global.contractInstance;
|
||||
const operation = $("#selectContractFunction")[0].value;
|
||||
if (operation === " " && !operation) {
|
||||
myToast("执行合约", "请选择合约方法!");
|
||||
return;
|
||||
}
|
||||
//request.operation = operation;
|
||||
request.arg = argDiv.value;
|
||||
request.pubkey = global.sm2Key.publicKey;
|
||||
//request.isDebug = executeContractAsDebug.checked;
|
||||
console.log(request.arg);
|
||||
//const gasLimit = $('#gasLimit').val()/1;
|
||||
var toSign = request.contractID + "|"
|
||||
+ request.operation + "|" + arg ;
|
||||
/*if (gasLimit>0){
|
||||
request.gasLimit = gasLimit;
|
||||
toSign+= "|" + gasLimit;
|
||||
}*/
|
||||
toSign+= "|" + global.sm2Key.publicKey;
|
||||
request.signature = sm2.doSignature(
|
||||
toSign,
|
||||
global.sm2Key.privateKey,
|
||||
{hash: true, der: true});
|
||||
localStorage.setItem("persisArg", JSON.stringify(request));
|
||||
global.wssocket.send(JSON.stringify(request));
|
||||
}
|
||||
|
||||
function setMock() {
|
||||
const argDiv = $('#mockArg')[0];
|
||||
const request = {};
|
||||
request.action = "setMock";
|
||||
request.requestID = new Date().getTime() + "";
|
||||
request.contractID = global.contractInstance;
|
||||
const operation = $("#selectContractFunction")[0].value;
|
||||
if (operation === " " && !operation) {
|
||||
myToast("执行合约", "请选择合约方法!");
|
||||
return;
|
||||
}
|
||||
//request.operation = operation;
|
||||
request.arg = argDiv.value;
|
||||
request.pubkey = global.sm2Key.publicKey;
|
||||
//request.isDebug = executeContractAsDebug.checked;
|
||||
console.log(request.arg);
|
||||
//const gasLimit = $('#gasLimit').val()/1;
|
||||
var toSign = request.contractID + "|"
|
||||
+ request.operation + "|" + arg ;
|
||||
/*if (gasLimit>0){
|
||||
request.gasLimit = gasLimit;
|
||||
toSign+= "|" + gasLimit;
|
||||
}*/
|
||||
toSign+= "|" + global.sm2Key.publicKey;
|
||||
request.signature = sm2.doSignature(
|
||||
toSign,
|
||||
global.sm2Key.privateKey,
|
||||
{hash: true, der: true});
|
||||
localStorage.setItem("persisArg", JSON.stringify(request));
|
||||
global.wssocket.send(JSON.stringify(request));
|
||||
}
|
||||
|
||||
function onGetMock(obj) {
|
||||
console.log("onGetMask obj.data", obj.data);
|
||||
try {
|
||||
const result = obj;
|
||||
$("#mockResponseArea")[0].value = JSON.stringify(obj.data);
|
||||
|
||||
} catch (e) {
|
||||
$("#mockResponseArea")[0].value = JSON.stringify(obj.data);
|
||||
}
|
||||
}
|
||||
|
||||
function onHashResult(obj) {
|
||||
$("#hashResult").html("数链指纹:" + obj.data);
|
||||
}
|
||||
@@ -651,7 +502,7 @@ function drawCPTable(table) {
|
||||
<td>${i + 1}</td>
|
||||
<td>${table[i].pid}</td>
|
||||
<td>${table[i]['isLeak']}</td>
|
||||
<td>${new Date(table[i]['cpuStart']).toLocaleString()}</td>
|
||||
<td>${new Date(table[i]['cpuStart']).toLocaleString()}/td>
|
||||
<td>${table[i]['cpuTotal']}</td>
|
||||
<td>${table[i]['cpuSys']}</td>
|
||||
<td>${(table[i]['resident'] / (1024 * 1024)).toFixed(2)}MB</td>
|
||||
|
||||
@@ -200,12 +200,6 @@ function WSHandler(event) {
|
||||
case 'onListLeakContractProcess':
|
||||
onListLeakContractProcess(obj);
|
||||
break;
|
||||
case 'onGetMask':
|
||||
onGetMask(obj);
|
||||
break;
|
||||
case 'onGetMock':
|
||||
onGetMock(obj);
|
||||
break;
|
||||
default:
|
||||
displayOutput(obj);
|
||||
break;
|
||||
@@ -282,7 +276,6 @@ function getControlWsUrl(host) {
|
||||
function initWSocket() {
|
||||
const host = document.location.host;
|
||||
const url = getControlWsUrl(host);
|
||||
document.title = `数瑞智能合约节点管理中心(${host})`;
|
||||
// console.log("connect ws:" + url);
|
||||
global.wssocket = createWssocket(url, function () {
|
||||
getSession();
|
||||
@@ -525,3 +518,6 @@ function addNodeUnit(obj) {
|
||||
option.value = obj.key;
|
||||
x.add(option, null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -142,7 +142,6 @@ function getControlWsUrl(host) {
|
||||
function initWSocket() {
|
||||
console.log("[OnlineIDE.js] initWSocket : ");
|
||||
let host = document.location.host;
|
||||
document.title = `数瑞智能合约在线编辑器(${host})`
|
||||
let url = getControlWsUrl(
|
||||
global.urlparam && global.urlparam['nodeAddr'] ? global.urlparam['nodeAddr'] : host);
|
||||
// console.log("connect ws:" + url);
|
||||
|
||||
@@ -3,7 +3,7 @@ function getDateDaysBefore(daysAgo) {
|
||||
return new Date(dateStr).getTime() - daysAgo * 24 * 3600 * 1000;
|
||||
}
|
||||
|
||||
let primaryColor = "#304156";
|
||||
let primaryColor = "#2E324C";
|
||||
|
||||
// ======Vue start
|
||||
let headerVue = "";
|
||||
|
||||
Reference in New Issue
Block a user