update index_datanet
This commit is contained in:
parent
141532cd19
commit
2ab42516f9
BIN
images/datanet/identifier.png
Normal file
BIN
images/datanet/identifier.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.5 KiB |
BIN
images/datanet/repo.png
Normal file
BIN
images/datanet/repo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
BIN
images/datanet/search.png
Normal file
BIN
images/datanet/search.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
314
index_datanet.html
Normal file
314
index_datanet.html
Normal file
@ -0,0 +1,314 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Cache-Control" content="no-cache"/>
|
||||
<title>数瑞数联网系统</title>
|
||||
<script src="./jqueryui1.12/jquery-2.1.4.js"></script>
|
||||
<script src="./js/createWS.js"></script>
|
||||
<script src="./js/cryptico.js"></script>
|
||||
<script src="./js/bootstrap.min.js"></script>
|
||||
<script src="./js/commonutil.js"></script>
|
||||
<script src="./js/vue.js"></script>
|
||||
<script src="./client/js/bdwareclient.js"></script>
|
||||
<script src="./js/sm2.js"></script>
|
||||
<link href="./css/common.css" rel="stylesheet">
|
||||
<link href="./css/bootstrap.min.css" rel="stylesheet">
|
||||
</head>
|
||||
<body style="background: #2E324C; color: white;">
|
||||
|
||||
<div class="modal fade" id="pubkeyDialog" data-backdrop="static">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLongTitle" style="color:black;">用户信息</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row" style="padding-left: 16px; padding-right: 16px">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text" for="localKeyList">本地密钥</label>
|
||||
</div>
|
||||
<select class="custom-select"
|
||||
aria-label="Example select with button addon"
|
||||
style="appearance: none" v-model="selectedSM2Key"
|
||||
@change="changeSM2Key($event)">
|
||||
<option v-for="(item,index) in sm2KeyList" :key="index"
|
||||
:value='item.id'>{{item.title}}
|
||||
</option>
|
||||
</select>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-primary" for="localKeyList"
|
||||
v-on:click="exportPubkey">导出密钥
|
||||
</button>
|
||||
|
||||
|
||||
<button type="button" class="btn btn-outline-primary"
|
||||
id="generatePubkeyBtn" v-on:click="generatePubkey">生成新密钥
|
||||
</button>
|
||||
|
||||
|
||||
<button class="btn btn-outline-danger" for="localKeyList"
|
||||
v-on:click="deletePubkey">删除密钥
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<textarea class="form-control mb-3" title="复制密钥,并妥善保存"
|
||||
id="sm2KeyTextarea" v-model="sm2KeyStr"
|
||||
style="width: 100%; min-height: 150px; resize:none" rows="" cols="">
|
||||
</textarea>
|
||||
<div class="row" style="padding-left: 16px; padding-right: 16px">
|
||||
<div class="input-group mb-1">
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text" for="localKeyList">以上为当前SM2密钥,请复制或导出密钥,并妥善保存</label>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<button type="button" class="btn btn-primary"
|
||||
data-dismiss="modal" id="importPubkeyBtn"
|
||||
v-on:click="importPubkey">确认
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="width: 90%; height:10px; max-width: 1000px; min-width: 850px; margin: 3% auto 0px;">
|
||||
<header class="" style="float:right">
|
||||
<div class=" nav navbar-right userName" data-toggle="modal" id="user"
|
||||
data-target="#pubkeyDialog">当前用户: {{shortName}}
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.halfDiv {
|
||||
float: left;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.projectTreeDiv {
|
||||
height: auto;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.halfDivRight {
|
||||
float: left;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.ui-tabs {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.ui-accordion .ui-accordion-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#tabs-1 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ui-tabs .ui-tabs-panel {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.context-menu-root {
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
#projectDiv {
|
||||
height: 83%;
|
||||
width: 20%;
|
||||
border: 0px solid grey;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.CodeMirror {
|
||||
height: auto
|
||||
}
|
||||
|
||||
.logoimg {
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
input {
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.sendTransInput {
|
||||
background-color: #f0e4e4;
|
||||
border-radius: 5px;
|
||||
margin: 5px;
|
||||
width: 15%;
|
||||
margin-left: 4%;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.normalDiv {
|
||||
float: left;
|
||||
text-align: center;
|
||||
border-radius: 5px;
|
||||
margin: 2%;
|
||||
padding: 5px;
|
||||
padding-top: 30px;
|
||||
padding-bottom: 30px;
|
||||
width: 29%;
|
||||
cursor: hand;
|
||||
background: #2E324C;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.iconimg {
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 48px;
|
||||
max-height: 48px;
|
||||
vertical-align: middle;
|
||||
filter: invert(100%);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
<div id="main" style="background: #2E324C; color: white;">
|
||||
<input id="urlInput" style="display:none"/>
|
||||
<input id="selectContract" style="display:none"/>
|
||||
<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>
|
||||
</div>
|
||||
<div
|
||||
style="width: fit-content; margin: 0; font-size: 200%; background-color: white; color: black; border-radius: 10px; float: left; padding: 10px;">
|
||||
导航
|
||||
</div>
|
||||
<div
|
||||
style="width: 100%; margin-top: 2%; float: left; background-color: white; border-radius: 10px;">
|
||||
<div class="normalDiv" onclick="jumpTo('./DOIP/GlobalRouter/assets/#')">
|
||||
<img src="./images/datanet/identifier.png" class="iconimg"></img><br/>
|
||||
<span style="vertical-align: middle">标识解析系统</span>
|
||||
</div>
|
||||
<div class="normalDiv" onclick="jumpTo('./DOIP/Registry/assets/#')">
|
||||
<img src="./images/datanet/search.png" class="iconimg"></img><br/>
|
||||
<span style="vertical-align: middle">数字对象注册表</span>
|
||||
</div>
|
||||
<div class="normalDiv"
|
||||
onclick="jumpTo('./client/bdwareclient.html?self=true&contract=RepositoryExample')">
|
||||
<img src="./images/datanet/repo.png" class="iconimg"></img><br/>
|
||||
<span style="vertical-align: middle">数字对象仓库</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br/>
|
||||
<div style="width: fit-content; margin-top: 2%; float: right; border-radius: 10px; font-size: 50%">
|
||||
Icons made by
|
||||
<a href="https://www.flaticon.com/authors/monkik"
|
||||
title="monkik" style="color: white;">monkik</a>
|
||||
from
|
||||
<a href="https://www.flaticon.com/" title="Flaticon"
|
||||
style="color: white;">www.flaticon.com</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
jumpTo = function (addr) {
|
||||
document.location.href = addr;
|
||||
};
|
||||
const isBaaS = false
|
||||
const h = document.body.clientHeight
|
||||
- $("header").css("height").replace("px", "")
|
||||
$("#main").css("height", h + "px");
|
||||
function init() {
|
||||
const urlParams = getRequestParameters();
|
||||
initVue();
|
||||
initGlobal(urlParams);
|
||||
|
||||
if (global.urlparam["noRender"] === "true") {
|
||||
switchRenderBtn.innerHTML = "加载界面";
|
||||
}
|
||||
global.cbs = {};
|
||||
|
||||
const urlInput = $("#urlInput");
|
||||
if (global.urlparam["self"] === "true") {
|
||||
if (document.location.href.startsWith("http")) {
|
||||
let path = document.location.origin + document.location.pathname;
|
||||
path = path.replace("/client/bdwareclient.html", "");
|
||||
urlInput[0].value = path.replace("http",
|
||||
"ws");
|
||||
if (global.urlparam["withNodeCenterWS"] === "true") {
|
||||
urlInput[0].value += "/NodeCenterWS";
|
||||
}
|
||||
connectNode();
|
||||
}
|
||||
} else if (global.urlparam["nodeAddr"]) {
|
||||
urlInput[0].value = global.urlparam["nodeAddr"];
|
||||
connectNode();
|
||||
} else {
|
||||
const lastNode = localStorage.getItem("lastNode");
|
||||
if (lastNode) {
|
||||
urlInput[0].value = lastNode;
|
||||
connectNode();
|
||||
}
|
||||
}
|
||||
}
|
||||
init();
|
||||
$(document).ready(function(){
|
||||
if(localStorage.getItem("PrivKeyList") == null || localStorage.getItem("agent") == null){
|
||||
$('#pubkeyDialog').modal();
|
||||
}else{
|
||||
var div = document.getElementById("user");
|
||||
// div.setAttribute("style","display:none");
|
||||
}
|
||||
})
|
||||
$('#pubkeyDialog').on('hide.bs.modal', function () {
|
||||
var div = document.getElementById("user");
|
||||
var lst = JSON.parse(localStorage.getItem("PrivKeyList"));
|
||||
lst.pop();
|
||||
localStorage.setItem("PrivKeyList",JSON.stringify(lst));
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<!--
|
||||
============ NodeCenter的一些链接:其中39.106.6.6监听的是1817端口。 查看节点是否启动
|
||||
http://39.106.6.6:18001/SCIDE/NodeCenter?action=ping 查看NodeCenter当前连接的节点
|
||||
http://39.106.6.6:18001/SCIDE/NodeCenter?action=listCMInfo
|
||||
|
||||
刷新NodeCenter已连接节点的合约数据
|
||||
http://39.106.6.6:18001/SCIDE/NodeCenter?action=updateContract
|
||||
|
||||
检查节点是否已连接,删除断开连接的节点
|
||||
http://39.106.6.6:18001/SCIDE/NodeCenter?action=checkAlive
|
||||
|
||||
获取某个合约的日志数量
|
||||
http://39.106.6.6:18001/SCIDE/NodeCenter?action=getLogSize&contractID=BDCoin
|
||||
|
||||
获取某个合约的日志,从第offset条,取count条
|
||||
http://39.106.6.6:18001/SCIDE/NodeCenter?action=requestLog&contractID=BDCoin&offset=16&count=10
|
||||
|
||||
获取某个合约的日志,取最新的count条
|
||||
http://39.106.6.6:18001/SCIDE/NodeCenter?action=requestLastLog&contractID=BDCoin&count=10
|
||||
-->
|
@ -62,7 +62,15 @@ function initVue() {
|
||||
newKey.id = this.sm2KeyList.length;
|
||||
newKey.title = headerVue.shortName;
|
||||
newKey.sm2Key = this.sm2KeyStr;
|
||||
this.sm2KeyList.push(newKey);
|
||||
var exist = false;
|
||||
for (var i=0;i<this.sm2KeyList.length;i++){
|
||||
var iterKey = this.sm2KeyList[i];
|
||||
if (iterKey.sm2Key==newKey.sm2Key)
|
||||
exist = true;
|
||||
}
|
||||
if (!exist)
|
||||
this.sm2KeyList.push(newKey);
|
||||
|
||||
localStorage.setItem("PrivKeyList", JSON.stringify(this.sm2KeyList));
|
||||
getSession();
|
||||
listProjects("priv");
|
||||
|
Loading…
Reference in New Issue
Block a user