-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70c067a
commit 4132e38
Showing
3 changed files
with
33 additions
and
44 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,20 @@ | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
|
||
<script src="lib/bindings/utils.js"></script> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/dist/vis-network.min.css" integrity="sha512-WgxfT5LWjfszlPHXRmBWHkV2eceiWTOBvrKCNbdgDYTHrT2AeLCGbF4sZlZw3UMN3WtL0tGUoIAKsu8mllg/XA==" crossorigin="anonymous" referrerpolicy="no-referrer" /> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/vis-network.min.js" integrity="sha512-LnvoEWDFrqGHlHmDD2101OrLcbsfkrzoSpvtSQtxK3RMnRV0eOkhhBN2dXHKRrUU8p2DGRTk35n4O8nWSVe1mQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> | ||
|
||
|
||
<head> | ||
<meta charset="utf-8"/> | ||
<script src="lib/bindings/utils.js"></script> | ||
<link crossorigin="anonymous" href="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/dist/vis-network.min.css" integrity="sha512-WgxfT5LWjfszlPHXRmBWHkV2eceiWTOBvrKCNbdgDYTHrT2AeLCGbF4sZlZw3UMN3WtL0tGUoIAKsu8mllg/XA==" referrerpolicy="no-referrer" rel="stylesheet"/> | ||
<script crossorigin="anonymous" integrity="sha512-LnvoEWDFrqGHlHmDD2101OrLcbsfkrzoSpvtSQtxK3RMnRV0eOkhhBN2dXHKRrUU8p2DGRTk35n4O8nWSVe1mQ==" referrerpolicy="no-referrer" src="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/vis-network.min.js"></script> | ||
<center> | ||
<h1></h1> | ||
</center> | ||
|
||
<!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" /> | ||
<script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>--> | ||
<link | ||
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" | ||
rel="stylesheet" | ||
integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" | ||
crossorigin="anonymous" | ||
/> | ||
<script | ||
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" | ||
integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf" | ||
crossorigin="anonymous" | ||
></script> | ||
|
||
|
||
<center> | ||
<h1></h1> | ||
</center> | ||
<style type="text/css"> | ||
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" rel="stylesheet"/> | ||
<script crossorigin="anonymous" integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script> | ||
<center> | ||
<h1></h1> | ||
</center> | ||
<style type="text/css"> | ||
|
||
#mynetwork { | ||
width: 100%; | ||
|
@@ -52,22 +37,13 @@ <h1></h1> | |
|
||
|
||
</style> | ||
</head> | ||
|
||
|
||
<body> | ||
<div class="card" style="width: 100%"> | ||
|
||
|
||
<div id="mynetwork" class="card-body"></div> | ||
</div> | ||
|
||
|
||
|
||
<div id="config"></div> | ||
|
||
|
||
<script type="text/javascript"> | ||
</head> | ||
<body> | ||
<div class="card" style="width: 100%"> | ||
<div class="card-body" id="mynetwork"></div><div id="code_section" style="position: absolute;width: 30%;font-family: monospace;top: 0; left: 0;z-index: 1;font-size: 13;background-color: #fff6a8;font-color: #000000;display: none;border: 1px solid black;resize: both;overflow: auto;"><pre style="width: 100%; height: 100%;white-space: pre;background-color: #fff6a8;"></pre></div> | ||
</div> | ||
<div id="config"></div> | ||
<script type="text/javascript"> | ||
|
||
// initialize global variables. | ||
var edges; | ||
|
@@ -176,5 +152,17 @@ <h1></h1> | |
} | ||
drawGraph(); | ||
</script> | ||
</body> | ||
<script>network.on('select', function(){ | ||
document.querySelector("#code_section").style.display="none"; | ||
document.querySelector("#code_section pre").textContent = "" | ||
if (network.getSelectedNodes()) { | ||
const selectedNode = network.getSelectedNodes()[0]; | ||
if (allNodes[selectedNode]) { | ||
document.querySelector("#code_section").style.display="block"; | ||
document.querySelector("#code_section pre").textContent = | ||
JSON.stringify(JSON.parse(allNodes[selectedNode].stix), null, 2); | ||
} | ||
} | ||
}) | ||
</script></body> | ||
</html> |