forked from oasis-open/cti-stix-visualization
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
55 lines (52 loc) · 2.98 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<html lang="en">
<head>
<title>STIX Viewer</title>
<meta charset="utf-8"/>
<link rel="stylesheet" type="text/css" href="application.css" />
<script src="require.js" data-main="application"></script>
<style>
.selected {
/* Drop-shadow SVG styling has to go here for compatibility reasons */
filter: url("#drop-shadow");
}
</style>
</head>
<body>
<h1><span id="header">STIX Visualizer</span> <span id="chosen-files"></span>
<a href="https://github.com/oasis-open/cti-stix-visualization/"><img src="GitHub-Mark-64px.png" alt="View source on GitHub"></a></h1>
<div id="uploader">
<p>Drop some STIX 2.0 here!</p>
<input type="file" id="files" name="files" /><br>
<p>-- OR --</p>
<p>Fetch some STIX 2.0 from this URL!</p>
<input type="text" id="url" name="url" placeholder="Paste URL here" /><br>
<button id="fetch-url">Fetch</button>
<p>-- OR --</p>
<p>Pass it as a url parameter, like so:</p><a href="https://oasis-open.github.io/cti-stix-visualization/?url=https://raw.githubusercontent.com/oasis-open/cti-stix-visualization/master/test.json">https://oasis-open.github.io/cti-stix-visualization/?url=https://raw.githubusercontent.com/oasis-open/cti-stix-visualization/master/test.json</a>
<p>-- OR --</p>
<p>Paste some STIX 2.0 here!</p>
<textarea id="paste-area-stix-json" name="pasted" placeholder="Copy/Paste JSON data here..."></textarea><br>
<button id="paste-parser">Parse</button>
<br />
<p>-- Configuration --</p>
<textarea id="paste-area-custom-config" name="pasted" placeholder="Copy/Paste, in JSON format, (if you want to specify this) your custom config for the graph as such: { "<object_type>": 	{ 		"display_property": <nameOfProperty>, 		"display_icon": <nameOfIconFile> 	}, "userLabels": 	{ 		"<STIX ID>": "a label", 		... 	} } "<object_type>" lets you customize labels per-type; "userLabels" lets you customize labels per-ID. For type-specific customization, please note that the above properties are the only currently-supported properties, and at least 1 of them has to be specified. ID-specific label customization will take priority over type-specific labels."></textarea>
</div>
<div id="canvas-container" class="hidden">
<div id="canvas-wrapper">
<svg id="canvas"></svg>
<p>Nodes are draggable! (Node will 'pin' on mouseup)</p>
<p>Double-click a pinned node to unpin it!</p>
<p>Click the 'Selected Node' area to expand/shrink it.</p>
</div>
<div id="legend" class="sidebar">
<h2>Legend</h2>
<ul id="legend-content"></ul>
</div>
<div id="selected" class="sidebar">
<h2>Selected Node</h2>
<div id="selection">
</div>
</div>
</div>
</body>
</html>