forked from oasis-open/cti-stix-visualization
-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
85 lines (82 loc) · 4.54 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<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>
<!-- toggle tooltip for "How to use" -->
<script src="tooltip.js"></script>
<style>
.tooltip {
position: fixed;
padding: 10px 20px;
border: 1px solid #b3c9ce;
border-radius: 4px;
text-align: left;
color: #333;
background: #fff;
box-shadow: 3px 3px 3px rgba(0, 0, 0, .3);
}
</style>
</head>
<body>
<div id="top-header-bar">
<h1>
<span id="header">STIX Visualizer</span><span id="chosen-files"></span>
</h1>
<a href="https://github.com/oasis-open/cti-stix-visualization/">
<img src="GitHub-Mark-64px.png" alt="View source on GitHub" width="32" height="32">
</a>
</div>
<div id="uploader">
<p>Drop some STIX 2.x here!</p>
<input type="file" id="files" name="files" multiple/><br>
<p>-- OR --</p>
<p>Fetch some STIX 2.x 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.x 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: { "<objectType>": 	{ 		"displayProperty": <nameOfProperty>, 		"displayIcon": <nameOfIconFile>, 		"embeddedRelationships": [...relationships...] 	}, "userLabels": 	{ 		"<STIX ID>": "a label", 		... 	}, "include": <STIX object filter criteria>, "exclude": <STIX object filter criteria> } "<objectType>" 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. Each relationship in the "embeddedRelationships" list is a ["<property path>", "<edge label>", <edge direction boolean>] triple. The property path should refer to a _ref(s) property somewhere within objects of that type."></textarea>
</div>
<div id="canvas-container" class="hidden">
<div id="canvas-wrapper">
<button data-tooltip="Dragging anywhere will pan the viewing area.<br>
Use the mouse wheel to zoom.<br>
Click the 'Selected Node' area to expand/shrink it.<br>
Click legend items to toggle visibility of nodes of a particular STIX type.">How to use</button>
<div id="date-selector">
<label for="startDate">Start Date:</label>
<input type="date" id="startDate" name="date" placeholder="start" />
<label for="endDate">End Date:</label>
<input type="date" id="endDate" name="date" placeholder="end" />
<button id="filter-date">Filter</button>
</div>
<div id="canvas"></div>
</div>
<div id="selected" class="sidebar">
<h2>Selected Node</h2>
<div id="selection"></div>
</div>
<div id="connections" class="sidebar">
<h2>Linked Nodes</h2>
<h3>Incoming Edges:</h3>
<div id="connections-incoming"></div>
<h3>Outgoing Edges:</h3>
<div id="connections-outgoing"></div>
</div>
<div id="legend" class="sidebar">
<table id="legend-content">
<caption><h2>Legend</h2></caption>
</table>
</div>
</div>
</body>
</html>