bdcontract-web-ide/BlockIndexer.html
2021-06-17 00:33:32 +08:00

471 lines
26 KiB
HTML

<html>
<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/popper.min.js"></script>
<link href="./jqueryui1.12/jquery-ui.css" rel="stylesheet">
<script src="./jqueryui1.12/jquery-ui.js"></script>
<script src="./jqueryui1.12/jquery.contextMenu.js"></script>
<link href="./jqueryui1.12/jquery.contextMenu.min.css" rel="stylesheet">
<script src="./jqueryui1.12/jquery.ui.position.js"></script>
<link href="./jqueryui1.12/jquery-editable-select.css" rel="stylesheet">
<script src="./jqueryui1.12/jquery-editable-select.js"></script>
<script src="./js/createWS.js"></script>
<script src="./js/cryptico.js"></script>
<script src="./js/commonutil.js"></script>
<script src="./js/bootstrap.min.js"></script>
<script src="./js/echarts.min.js"></script>
<script src="./js/echarts-gl.min.js"></script>
<script src="./js/echartsTheme.js"></script>
<script src="js/codemirror/addon/edit/matchbrackets.js"></script>
<script src="./js/sm2.js"></script>
<link rel="stylesheet" type="text/css"
href="./js/DataTables/datatables.min.css"/>
<link rel="stylesheet" type="text/css"
href="./js/DataTables/datatables.extra.css"/>
<script type="text/javascript"
src="./js/DataTables/jquery.dataTables.min.js"></script>
<script type="text/javascript"
src="./js/DataTables/dataTables.bootstrap4.min.js"></script>
<script src="./js/blockindexer/BlockIndexer.js"></script>
<script src="./js/vue.js"></script>
<link rel="stylesheet" href="./css/loading.css">
<link rel="stylesheet" href="./css/common.css">
<link rel="stylesheet" href="./css/bootstrap.min.css">
<script src="./js/bootstrap.min.js"></script>
<link href="./css/bootstrap4-toggle.min.css" rel="stylesheet">
<script src="./js/bootstrap4-toggle.min.js"></script>
</head>
<body>
<header
class="headerFooter navbar navbar-default navbar-fixed-top navColor ">
<div class="col-4">
<a class="navbar-brand" href="#"> <img alt="Brand"
src="./images/logo-1.png" style="height: 30px">
</a> <span>数瑞通用区块链索引工具</span>
</div>
<div class="nav navbar-right userName" data-toggle="modal"
data-target="#pubkeyDialog">欢迎, {{shortName}}
</div>
</header>
<div class="container-fluid " id="main">
<div class="row h-100">
<div class="col-2 " id="horiNav">
<div class="nav flex-column nav-pills " id="v-pills-tab"
role="tablist" aria-orientation="vertical">
<a class="nav-link active" id="v-pills-userManager-tab"
data-toggle="pill" href="#v-pills-userManager" role="tab"
aria-controls="v-pills-userManager" aria-selected="true"
onclick="loadUserMan()"> <img
src="./images/index/analysis.png" class="iconimg">创建索引
</a> <a class="nav-link" id="v-pills-contractCodeManager-tab"
data-toggle="pill" href="#v-pills-contractCodeManager" role="tab"
aria-controls="v-pills-contractCodeManager"
onclick="initcodeManage()" aria-selected="false"><img
src="./images/index/operation.png" class="iconimg">适配器管理 </a> <a
class="nav-link" id="v-pills-contractInstance-tab"
data-toggle="pill" href="#v-pills-contractInstance" role="tab"
aria-controls="v-pills-contractInstance" aria-selected="false"
onclick="loadContractInstances()"><img
src="./images/index/writer.png" class="iconimg">索引算法管理 </a> <a
class="nav-link" id="v-pills-logManager-tab" data-toggle="pill"
href="#v-pills-logManager" role="tab" onclick="initLocalLog()"
aria-controls="v-pills-logManager" aria-selected="false"><img
src="./images/index/customer-support.png" class="iconimg">存储层管理
</a> <a class="nav-link" id="v-pills-nodeManager-tab"
data-toggle="pill" href="#v-pills-nodeManager" role="tab"
aria-controls="v-pills-nodeManager" aria-selected="false"
onclick="showNodeConfig()"><img
src="./images/index/network.png" class="iconimg">模板管理 </a>
</div>
</div>
<div class="col-10 h-100" style="padding: 0; overflow-y: scroll;">
<div class="tab-content" id="v-pills-tabContent">
<!-- 创建索引对应的DIV -->
<div class="tab-pane fade show active" id="v-pills-userManager"
role="tabpanel" aria-labelledby="v-pills-userManager-tab">
<div class="container">
<div class="row" style="margin-top: 30px">
<div class="col-sm-12">
<div class="card ">
<div class="card-body">
<h5 class="card-title">向导栏</h5>
<div class="d-flex justify-content-center" id="RolePie">
<div class="spinner-border text-primary"
style="width: 4rem; height: 4rem;" role="status">
<span class="sr-only">内容页</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 适配器管理 对应的DIV -->
<div class="tab-pane fade" id="v-pills-contractCodeManager"
role="tabpanel" aria-labelledby="v-pills-contractCodeManager-tab">
<div class="container">
<div class="row" style="margin-top: 30px">
<div class="col-sm-12">
<div class="card ">
<div class="card-body">
<h5 class="card-title">这里是个表格</h5>
<div class="d-flex justify-content-center" id="RolePie">
<div class="spinner-border text-primary"
style="width: 4rem; height: 4rem;" role="status">
<span class="sr-only">内容页</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 合约实例管理 对应的DIV -->
<div class="tab-pane fade" id="v-pills-contractInstance"
role="tabpanel" aria-labelledby="v-pills-contractInstance-tab">
<div class="container">
<div class="row" style="margin-top: 30px">
<div class="col-sm-12">
<div class="card ">
<div class="card-body">
<h5 class="card-title">这里是个表格</h5>
<div class="d-flex justify-content-center" id="RolePie">
<div class="spinner-border text-primary"
style="width: 4rem; height: 4rem;" role="status">
<span class="sr-only">内容页</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 存储层管理 对应的DIV -->
<div class="tab-pane fade" id="v-pills-logManager" role="tabpanel"
aria-labelledby="v-pills-logManager-tab">
<div class="container">
<div class="row" style="margin-top: 30px">
<div class="col-sm-12">
<div class="card ">
<div class="card-body">
<h5 class="card-title">这里是个表格</h5>
<div class="d-flex justify-content-center" id="RolePie">
<div class="spinner-border text-primary"
style="width: 4rem; height: 4rem;" role="status">
<span class="sr-only">内容页</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 节点管理 对应的DIV -->
<div class="tab-pane fade" id="v-pills-nodeManager" role="tabpanel"
aria-labelledby="v-pills-nodeManager-tab">
<div class="container">
<div class="row" style="margin-top: 30px">
<div class="col-sm-12">
<div class="card">
<div class="card-body">
<h5 class="card-title">节点配置</h5>
<div class="card-body" id="centerportal">
<div class="d-flex justify-content-center">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text"
id="inputGroup-sizing-default">节点名称</span>
</div>
<input type="text" class="form-control" id="nodeNameInput">
<div class="input-group-append">
<button class="btn btn-outline-secondary" type="button"
id="changeNodeName" onclick="changeNodeName()">修改
</button>
</div>
</div>
</div>
<div class="d-flex justify-content-center">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text"
id="inputGroup-sizing-default">PeerID</span>
</div>
<input type="text" class="form-control" id="peerIDInput">
</div>
</div>
<div class="d-flex justify-content-center">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text"
id="inputGroup-sizing-default">YJS路径</span>
</div>
<input type="text" class="form-control" id="yjsInput">
<div class="input-group-append">
<button class="btn btn-outline-secondary" type="button"
id="changeYJSPath" onclick="changeYJSPath()">修改
</button>
</div>
</div>
</div>
<div class="d-flex justify-content-center">
<div class='input-group mb-3'>
<div class="input-group-prepend">
<span class="input-group-text"
id="inputGroup-sizing-default">加入网络</span>
</div>
<input type='text' class='form-control'
id='nodeCenterInput'>
<div class='input-group-append'>
<button class='btn btn-outline-secondary' type='button'
id='changeNodeCenter' onclick='changeNodeCenter()'>修改
</button>
</div>
</div>
</div>
<div class="d-flex justify-content-center">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text"
id="inputGroup-sizing-default">数链节点</span>
</div>
<input type="text" class="form-control" id="bdledgerPeersInput">
<div class='input-group-append'>
<button class='btn btn-outline-secondary' type='button'
id='changeBDledger' onclick='changeBDledger()'>修改
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="margin-top: 30px">
<div class="col-sm-12">
<div class="card">
<div class="card-body">
<h5 class="card-title">可信执行集群列表</h5>
<div class="card-body" id="trustNodesUnitTabDiv">
<div class="d-flex justify-content-center">
<div class="spinner-border text-primary"
style="width: 4rem; height: 4rem;" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="margin-top: 30px">
<div class="col-sm-12">
<div class="card">
<div class="card-body">
<h5 class="card-title">Licence配置</h5>
<div class="card-body" id="paths">
<div class="d-flex justify-content-center">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">Licence</span>
</div>
<textarea class="form-control" id="licence"
aria-label="Licence"></textarea>
</div>
</div>
<div class="d-flex justify-content-center">
<div class="input-group mb-3">
<span class="input-group-text">Licence过期时间 </span> <span
class="input-group-text" id="expireTime"></span>
</div>
</div>
<div class="d-flex justify-content-center">
<div class="input-group mb-3">
<button type="button" onclick="uploadLicence()"
class="btn btn-outline-secondary">设置Licence
</button>
<button onclick="submitReq()" type="button"
class="btn btn-outline-secondary">申请Licence
</button>
<button onclick="flushLicence()" type="button"
class="btn btn-outline-secondary">刷新申请状态
</button>
<button onclick="downloadUUID()" type="button"
class="btn btn-outline-secondary">下载节点ID文件
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 用于配置sm2密钥的对话框 -->
<div class="modal fade" id="pubkeyDialog" tabindex="-1" role="dialog"
aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle">用户信息</h5>
<button type="button" class="close" data-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</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>
</div>
<div class="input-group-append">
<button class="btn btn-outline-danger" for="localKeyList"
v-on:click="deletePubkey">删除公钥
</button>
</div>
</div>
</div>
<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>
<input type="text" class="form-control" placeholder="(请复制并妥善保存)"
disabled="disabled" aria-label=""
aria-describedby="basic-addon1">
<div class="input-group-append">
<button type="button" class="btn btn-outline-primary"
id="generatePubkeyBtn" v-on:click="generatePubkey">生成新公钥
</button>
<button type="button" class="btn btn-outline-primary"
data-dismiss="modal" id="importPubkeyBtn"
v-on:click="importPubkey">导入公钥
</button>
</div>
</div>
</div>
<textarea class="form-control mb-3" title="复制密钥,并妥善保存"
id="sm2KeyTextarea" v-model="sm2KeyStr"
style="width: 100%; min-height: 150px" rows="" cols="">
</textarea>
<div class="row" style="padding-left: 16px; padding-right: 16px;">
</div>
<div class="row" style="padding-left: 16px; padding-right: 16px">
<span>我的权限:{{myRole}}</span>
</div>
<div class="input-group">
<select id="inputGroupSelect04" v-model="test"
class="custom-select" style="appearance: none"
@change="changeProduct($event)">
<option v-for="(item,index) in productList" :key="index"
:value='item.id'>{{item.title}}
</option>
</select>
<div class="input-group-append">
<button class="btn btn-outline-primary" type="button"
v-on:click="applyRole">角色认证
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Flexbox container for aligning the toasts -->
<div aria-live="polite" aria-atomic="true" aria-hidden="true"
class="d-flex justify-content-center align-items-center"
style="dispaly: none; min-height: 200px; position: absolute; top: 30%; left: 40%;"
aria-hidden="true">
<!-- Then put toasts within -->
<div id="alertDiv" class="toast fade hide" role="alert"
aria-live="assertive" autohide="false" aria-atomic="true"
style="min-width: 200px">
<div class="toast-header">
<strong class="mr-auto">{{toastTitle}}</strong>
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast"
aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="toast-body">{{toastMessage}}</div>
</div>
</div>
<footer class="headerFooter" footermt-autopy-3>
<div class="row">
<div style="padding-left: -10px;" class="col-8">©2018-2020</div>
<div style="" class="col-4">
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>
</footer>
<script>
const isBaaS = false
var h = document.body.clientHeight
- $("header").css("height").replace("px", "")
- $("footer").css("height").replace("px", "");
$("#main").css("height", h + "px");
init();
//initWSocket();
</script>
</body>
</html>