-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
248 lines (205 loc) · 12.1 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<!DOCTYPE html>
<html style="height: 100%;">
<head>
<title>Knowledge Graph Editor</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/cytoscape/3.19.1/cytoscape.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/cytoscape-edgehandles.js"></script>
<!-- CodeMirror CSS and JS from jsDelivr -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/lib/codemirror.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/codemirror.js"></script>
<!-- CodeMirror JavaScript mode and add-ons -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/mode/javascript/javascript.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/addon/hint/show-hint.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/addon/hint/show-hint.css">
<script src="https://cdn.jsdelivr.net/npm/interactjs/dist/interact.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/choices.js/public/assets/scripts/choices.min.js"></script>
<!-- Include CryptoJS for encryption -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/crypto-js.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css">
<script src="https://cdn.jsdelivr.net/npm/@tarekraafat/[email protected]/dist/autoComplete.min.js"></script>
</head>
</head>
<body>
<div id="detailsSidebar" class="details-sidebar">
<h2>Node Details</h2>
<div id="nodeDetailsContent"></div>
</div>
<div id="controls" class="controls">
<div class="control-group">
<button class="button toggle" id="toggleNodeInputsBtn" aria-label="Toggle Node Controls">🔄 Node</button>
<div id="nodeControls" class="input-group" style="display: none;">
<button class="button node-btn" id="addNodeBtn" aria-label="Add Node">➕ Node</button>
<input type="text" id="node-id" placeholder="Node ID">
<button class="button node-btn" id="removeNodeBtn" aria-label="Remove Node">➖ Node</button>
<input type="text" id="remove-node-id" placeholder="Node ID to remove">
</div>
</div>
<div class="control-group">
<button class="button toggle" id="toggleEdgeInputsBtn" aria-label="Toggle Edge Controls">🔄 Edge</button>
<div id="edgeControls" class="input-group" style="display: none;">
<button class="button edge-btn" id="addEdgeBtn" aria-label="Add Edge">➕ Edge</button>
<input type="text" id="source-id" placeholder="Source ID">
<input type="text" id="target-id" placeholder="Target ID">
<input type="text" id="edge-description" placeholder="Verb/Description">
<button class="button edge-btn" id="removeEdgeBtn" aria-label="Remove Edge">➖ Edge</button>
<input type="text" id="remove-edge-description" placeholder="Edge Description to remove">
</div>
</div>
<!-- Article Controls -->
<div class="control-group">
<button class="button toggle" id="toggleArticleInputsBtn" aria-label="Toggle Article Inputs">📝 Article</button>
<div id="articleControls" class="input-group" style="display: none;">
<input type="text" id="article-title" placeholder="Article Title">
<textarea id="article-description" placeholder="Description"></textarea>
<input type="text" id="article-hashtags" placeholder="Hashtags (e.g., #abc #efg)">
<button class="button" id="addArticleBtn" aria-label="Add Article">➕ Article</button>
</div>
</div>
<!-- API Features Control Group -->
<div class="control-group">
<button class="button" id="toggleAPIFeaturesBtn" aria-label="Toggle API Features">🌐 API</button>
<div id="apiFeatures" class="input-group" style="display: none;">
<select id="apiSelect" aria-label="Select API Endpoint">
<!-- API Endpoints will be populated here -->
</select>
<input type="text" id="apiInput" placeholder="Enter prompt" style="margin-left: 10px;">
<button class="button" id="submitToAPIBtn" aria-label="Submit to API">➡️ Submit</button>
<button class="button" id="addToGraphBtn" aria-label="Add to Graph">Add to Graph</button>
<!-- Loading Animation Container -->
<div id="loadingAnimation" class="loading-animation" style="display: none;">
<div class="loader"></div>
</div>
<!-- Results Preview Box -->
<textarea id="resultsBox" class="results-preview-box" placeholder="Results will appear here..."></textarea>
</div>
</div>
<!-- UserId Features Control Group -->
<div class="control-group">
<button class="button" id="toggleUserIdFeaturesBtn" aria-label="Toggle UserId Features">🆔 Features</button>
<div id="userIdFeatures" class="input-group" style="display: none;">
<label>Enable UserId: <input type="checkbox" id="toggleUserId" /></label>
<input type="text" id="userIdInput" placeholder="UserId" style="margin-left: 10px;" />
</div>
</div>
<!-- Toggle for showing Type Features -->
<div class="control-group">
<button class="button" id="toggleTypeFeaturesBtn" aria-label="Toggle Type Features">🔠 Type</button>
<div id="typeFeatures" class="input-group" style="display: none;">
<label>Enable Type: <input type="checkbox" id="toggleType" /></label>
<input type="text" id="typeInput" placeholder="Type1,Type2" style="margin-left: 10px;" />
</div>
</div>
<!-- Toggle Privacy Level Features -->
<div class="control-group">
<button class="button" id="togglePrivacyLevelFeaturesBtn" aria-label="Toggle Privacy Level Features">🔒 Privacy</button>
<div id="privacyLevelFeatures" class="input-group" style="display: none;">
<label>Enable Privacy Level: <input type="checkbox" id="togglePrivacyLevel" /></label>
<input type="text" id="privacyLevelInput" placeholder="Privacy Level" style="margin-left: 10px;" />
</div>
</div>
<!-- Toggle Url Level Features -->
<div class="control-group">
<button class="button" id="toggleUrlFeaturesBtn" aria-label="Toggle URL Features">🔗 URL</button>
<div id="urlFeatures" class="input-group" style="display: none;">
<label>Enable URL: <input type="checkbox" id="toggleUrl" /></label>
<input type="text" id="urlInput" placeholder="URL" style="margin-left: 10px;" />
</div>
</div>
<!-- Preprocessing Logic Control Group -->
<div class="control-group">
<button class="button" id="togglePreprocessingFeaturesBtn" aria-label="Toggle Preprocessing Features">🔄 Preprocessing</button>
<div id="preprocessingFeatures" class="input-group" style="display: none;">
<label>Enable Preprocessing: <input type="checkbox" id="togglePreprocessing" /></label>
<input type="text" id="preprocessingInput" placeholder="Preprocessing Logic" style="margin-left: 10px;">
</div>
</div>
<!-- Post-processing Logic Control Group -->
<div class="control-group">
<button class="button" id="togglePostprocessingFeaturesBtn" aria-label="Toggle Postprocessing Features">🔄 Postprocessing</button>
<div id="postprocessingFeatures" class="input-group" style="display: none;">
<label>Enable Postprocessing: <input type="checkbox" id="togglePostprocessing" /></label>
<input type="text" id="postprocessingInput" placeholder="Post-processing Logic" style="margin-left: 10px;">
</div>
</div>
<!-- Post-processing Logic Control Group -->
<div class="control-group">
<button class="button" id="toggleManipulationFeaturesBtn" aria-label="Toggle Manipulation Features">🔄 Manupulation</button>
<div id="ManipulationFeatures" class="input-group" style="display: none;">
<label>Enable Manipulation: <input type="checkbox" id="toggleManipulation" /></label>
<input type="text" id="ManipulationInput" placeholder="Manipulation Logic" style="margin-left: 10px;">
</div>
</div>
<div class="control-group">
<button class="button" id="startProcessingBtn" aria-label="Start Processing">▶️ Start Processing</button>
</div>
<!-- API Endpoint Control Group -->
<div class="control-group">
<button class="button" id="toggleApiEndpointFeaturesBtn" aria-label="Toggle API Endpoint Features">🌐 API Endpoint</button>
<div id="apiEndpointFeatures" class="input-group" style="display: none;">
<label>Enable API Endpoint: <input type="checkbox" id="toggleApiEndpoint" /></label>
<input type="text" id="apiEndpointInput" placeholder="API Endpoint" style="margin-left: 10px;">
</div>
</div>
<!-- Search Controls Toggle Button -->
<div class="control-group">
<button class="button" id="toggleSearchControlsBtn">🔍 Search</button>
</div>
<!-- Search Controls (Initially Hidden) -->
<div id="searchControls" class="input-group" style="display: none;">
<input type="text" id="searchInput" placeholder="Search term" />
<label><input type="checkbox" id="searchNodesCheckbox" checked /> Search Nodes</label>
<label><input type="checkbox" id="searchEdgesCheckbox" /> Search Edges</label>
<button class="button" id="executeSearchBtn">Execute Search</button>
</div>
<div class="control-group">
<!-- Toggle for showing encryption/decryption features -->
<button class="button" id="toggleEncryptionFeaturesBtn" aria-label="Toggle Encryption Features">🔐</button>
<div id="encryptionFeatures" class="input-group" style="display: none;">
<!-- Encryption Toggle and Key Input -->
<label>Encryption: <input type="checkbox" id="toggleEncryption" /></label>
<input type="text" id="encryptionKey" placeholder="Encryption Key" style="margin-left: 10px;" />
<!-- Import Key File Button -->
<button class="button" id="importKeyFileBtn" aria-label="Import Key File">📁</button>
<input type="file" id="importKeyInput" style="display: none;" accept=".json">
<!-- Decrypt Graph Button -->
<button class="button" id="decryptGraphBtn" aria-label="Decrypt Graph">🔓</button>
<!-- Encrypt Graph Button -->
<button class="button" id="encryptGraphBtn" aria-label="Encrypt Graph">🔒</button>
</div>
</div>
<!-- Toggle Image Mode Control -->
<div class="control-group">
<button class="button" id="toggleImageModeBtn" aria-label="Toggle Image Mode">🖼️ Mode</button>
</div>
<button class="button reset-btn" id="resetZoomBtn" aria-label="Reset Zoom">🔄</button>
<!-- Import Graph Button -->
<button class="button import-btn" id="importGraphBtn" aria-label="Import Graph">📥</button>
<!-- Export Graph Button -->
<button class="button export-btn" id="exportGraphBtn" aria-label="Export Graph">📤</button>
<input type="file" id="importFileInput" style="display: none;" accept=".json">
<!-- Import Mapping Button -->
</div>
<div id="graphContainer" style="position: relative; height: 100%;">
<div id="cy" style="height: 100%;"></div>
<div id="toolbar">
<button id="selectMode" class="toolbar-btn" title="Select Mode">
<img src="ui/images/select-icon.png" alt="Select" />
</button>
<button id="addNodeMode" class="toolbar-btn" title="Add Node Mode">
<img src="ui/images/add-node-icon.png" alt="Add Node" />
</button>
<button id="addEdgeMode" class="toolbar-btn" title="Add Edge Mode">
<img src="ui/images/add-edge-icon.png" alt="Add Edge" />
</button>
<button id="filterByArticleMode" class="toolbar-btn" title="Filter By article Mode">
<img src="ui/images/filter-article-icon.png" alt="Filter article" />
</button>
</div>
</div>
<script type="module" defer src="index.js"></script>
</body>
</html>