forked from splunk-soar-connectors/googlevault
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gsvault_create_export.html
495 lines (473 loc) · 26.8 KB
/
gsvault_create_export.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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
{% extends 'widgets/widget_template.html' %}
{% load custom_template %}
{% block custom_title_prop %}{% if title_logo %}style="background-size: auto 60%; background-position: 50%; background-repeat: no-repeat; background-image: url('/app_resource/{{ title_logo }}');"{% endif %}{% endblock %}
{% block title1 %}{{ title1 }}{% endblock %}
{% block title2 %}{{ title2 }}{% endblock %}
{% block custom_tools %}
{% endblock %}
{% block widget_content %} <!-- Main Start Block -->
<!-- File: gsvault_create_export.html
Copyright (c) 2019-2022 Splunk Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions
and limitations under the License.
-->
<style>
.gsvault a:hover {
text-decoration:underline;
}
.gsvault .wf-h4-style {
font-size : 20px;
}
.gsvault .wf-table-vertical {
width: initial;
font-size: 12px;
}
.gsvault .wf-table-vertical td{
padding: 5px;
border: 1px solid !important;
overflow-x: auto;
}
.gsvault .wf-table-vertical tr td:first-child {
font-weight: bold;
}
.gsvault .wf-table-events {
width: 100%;
overflow-x: auto;
}
.gsvault .dataTable th.widget-th {
border-top: 1px solid !important;
border-bottom: 1px solid !important;
}
.gsvault .dataTable td {
vertical-align: top;
}
.gsvault .dataTable td.widget-td a{
font-size: 12px;
}
.gsvault .dataTable {
font-size: 12px;
}
.gsvault .dataTable .glyphicon.glyphicon-dot:before {
content: "\25cf"; font-size: 10px;
}
</style>
<div class="gsvault" style="overflow: auto; width: 100% height: 100%; padding-left:10px; padding-right:10px">
<!-- Main Div -->
{% for result in results %} <!-- loop for each result -->
{% if not result.data %}
<h4 class="wf-h4-style">No data found</h4>
{% else %}
<div class="info">
<h4 class="wf-h4-style">Info</h4>
<table class="wf-table-vertical">
<tr>
<td>Export name</td>
<td>{{ result.param.name }}</td>
</tr>
<tr>
<td>Matter ID</td>
<td><a href="javascript:;" onclick="context_menu(this, [{'contains': ['gsvault matter id'],
'value': '{{ result.param.matter_id }}' }], 0, {{ container.id }}, null, false);">
{{ result.param.matter_id }}
<span class="fa fa-caret-down" style="font-size: smaller;"></span>
</a></td>
</tr>
<tr>
<td>Corpus Type</td>
<td>{{ result.param.type }}</td>
</tr>
<tr>
<td>Data Scope</td>
<td>{{ result.param.data_scope }}</td>
</tr>
<tr>
<td>Search Method</td>
<td>{{ result.param.search_method }}</td>
</tr>
{% if result.param.org_unit_id %}
<tr>
<td>Organization Unit ID</td>
<td><a href="javascript:;" onclick="context_menu(this, [{'contains': ['gsvault org unit id'],
'value': '{{ result.param.org_unit_id }}' }], 0, {{ container.id }}, null, false);">
{{ result.param.org_unit_id }}
<span class="fa fa-caret-down" style="font-size: smaller;"></span>
</a></td>
</tr>
{% endif %}
{% if result.param.email_ids %}
<tr>
<td>User email IDs</td>
<td><a href="javascript:;" onclick="context_menu(this, [{'contains': ['gsvault email ids'],
'value': '{{ result.param.email_ids }}' }], 0, {{ container.id }}, null, false);">
{{ result.param.email_ids }}
<span class="fa fa-caret-down" style="font-size: smaller;"></span>
</a></td>
</tr>
{% endif %}
{% if result.param.shared_drive_ids %}
<tr>
<td>Shared Drive IDs</td>
<td><a href="javascript:;" onclick="context_menu(this, [{'contains': ['gsvault shared drive ids'],
'value': '{{ result.param.shared_drive_ids }}' }], 0, {{ container.id }}, null, false);">
{{ result.param.shared_drive_ids }}
<span class="fa fa-caret-down" style="font-size: smaller;"></span>
</a></td>
</tr>
{% endif %}
{% if result.param.time_zone %}
<tr>
<td>Time Zone</td>
<td>{{ result.param.time_zone }}</td>
</tr>
{% endif %}
{% if result.param.terms %}
<tr>
<td>Terms</td>
<td>{{ result.param.terms }}</td>
</tr>
{% endif %}
{% if result.param.start_time %}
<tr>
<td>Start time</td>
<td>{{ result.param.start_time }}</td>
</tr>
{% endif %}
{% if result.param.end_time %}
<tr>
<td>End time</td>
<td>{{ result.param.end_time }}</td>
</tr>
{% endif %}
{% if result.param.version_date %}
<tr>
<td>Version Date</td>
<td>{{ result.param.version_date }}</td>
</tr>
{% endif %}
{% if result.param.data_region %}
<tr>
<td>Data Region</td>
<td>{{ result.param.data_region }}</td>
</tr>
{% endif %}
{% if result.param.exclude_drafts %}
<tr>
<td>Exclude Drafts</td>
<td>{{ result.param.exclude_drafts }}</td>
</tr>
{% endif %}
{% if result.param.export_format %}
<tr>
<td>Export Format</td>
<td>{{ result.param.export_format }}</td>
</tr>
{% endif %}
{% if result.param.show_confidential_mode_content %}
<tr>
<td>Show Confidential Mode Content</td>
<td>{{ result.param.show_confidential_mode_content }}</td>
</tr>
{% endif %}
{% if result.param.include_shared_drives %}
<tr>
<td>Include Shared Drive</td>
<td>{{ result.param.include_shared_drives }}</td>
</tr>
{% endif %}
{% if result.param.include_access_info %}
<tr>
<td>Include Access Info</td>
<td>{{ result.param.include_access_info }}</td>
</tr>
{% endif %}
</table>
</div>
<div class="data">
<h4 class="wf-h4-style">Data</h4>
<table class="phantom-table dataTable">
<thead>
<th class="widget-th">Export ID</th>
<th class="widget-th">Export Name</th>
<th class="widget-th">Export Status</th>
<th class="widget-th">Matter ID</th>
<th class="widget-th">Corpus Type</th>
<th class="widget-th">Search Method</th>
<th class="widget-th">Data Scope</th>
<th class="widget-th">Method</th>
<th class="widget-th">Info</th>
<th class="widget-th">Requester</th>
<th class="widget-th">Query</th>
<th class="widget-th">Export Options</th>
<th class="widget-th">Timezone</th>
<th class="widget-th">Create Time</th>
</thead>
{% for finding_data in result.data %}
<tr>
<td><a href="javascript:;" onclick="context_menu(this, [{'contains': ['gsvault export id'],
'value': '{{ finding_data.id }}' }], 0, {{ container.id }}, null, false);">
{{ finding_data.id }}
<span class="fa fa-caret-down" style="font-size: smaller;"></span>
</a></td>
<td>{{ finding_data.name }}</td>
<td>{{ finding_data.status }}</td>
<td><a href="javascript:;" onclick="context_menu(this, [{'contains': ['gsvault matter id'],
'value': '{{ finding_data.matterId }}' }], 0, {{ container.id }}, null, false);">
{{ finding_data.matterId }}
<span class="fa fa-caret-down" style="font-size: smaller;"></span>
</a></td>
<td>{{ finding_data.query.corpus }}</td>
<td>{{ finding_data.query.searchMethod }}</td>
<td>{{ finding_data.query.dataScope }}</td>
<td>{{ finding_data.query.method }}</td>
{% if finding_data.query.orgUnitInfo or finding_data.query.sharedDriveInfo or finding_data.query.accountInfo %}
<td>
{% if finding_data.query.searchMethod == "ORG_UNIT" %}
{% if finding_data.query.orgUnitInfo.orgUnitId %}
<table class="phantom-table dataTable">
<thead>
<th class="widget-th">Organization Unit ID</th>
</thead>
<tr>
<td><a href="javascript:;" onclick="context_menu(this, [{'contains': ['gsvault org unit id'],
'value': '{{ finding_data.query.orgUnitInfo.orgUnitId }}' }], 0, {{ container.id }}, null, false);">
{{ finding_data.query.orgUnitInfo.orgUnitId }}
<span class="fa fa-caret-down" style="font-size: smaller;"></span>
</a></td>
</tr>
</table>
{% endif %}
{% elif finding_data.query.searchMethod == "TEAM_DRIVE" %}
{% if finding_data.query.sharedDriveInfo %}
<table class="phantom-table dataTable">
<thead>
{% if finding_data.query.sharedDriveInfo.sharedDriveIds %}
<th class="widget-th">Shared Drive ID</th>
{% endif %}
</thead>
{% if finding_data.query.sharedDriveInfo.sharedDriveIds %}
{% for id in finding_data.query.sharedDriveInfo.sharedDriveIds %}
<tr>
<td><a href="javascript:;" onclick="context_menu(this, [{'contains': ['gsvault shared drive ids'],
'value': '{{ id }}' }], 0, {{ container.id }}, null, false);">
{{ id }}
<span class="fa fa-caret-down" style="font-size: smaller;"></span>
</a>
</td>
</tr>
{% endfor %}
{% endif %}
</table>
{% endif %}
{% if finding_data.query.teamDriveInfo %}
<table class="phantom-table dataTable">
<thead>
{% if finding_data.query.teamDriveInfo.teamDriveIds %}
<th class="widget-th">Team Drive ID</th>
{% endif %}
</thead>
{% if finding_data.query.teamDriveInfo.teamDriveIds %}
{% for id in finding_data.query.teamDriveInfo.teamDriveIds %}
<tr>
<td><a href="javascript:;" onclick="context_menu(this, [{'contains': ['gsvault shared drive ids'],
'value': '{{ id }}' }], 0, {{ container.id }}, null, false);">
{{ id }}
<span class="fa fa-caret-down" style="font-size: smaller;"></span>
</a></td>
</tr>
{% endfor %}
{% endif %}
</table>
{% endif %}
{% elif finding_data.query.searchMethod == "ACCOUNT" and finding_data.query.corpus == "GROUPS" %}
{% if finding_data.query.accountInfo.emails %}
<table class="phantom-table dataTable">
<thead>
<th class="widget-th">Group Account Emails</th>
</thead>
{% for email in finding_data.query.accountInfo.emails %}
<tr><td><a href="javascript:;" onclick="context_menu(this, [{'contains': ['email'],
'value': '{{ email }}' }], 0, {{ container.id }}, null, false);">
{{ email }}
<span class="fa fa-caret-down" style="font-size: smaller;"></span>
</a></td></tr>
{% endfor %}
</table>
{% endif %}
{% elif finding_data.query.searchMethod == "ACCOUNT" and finding_data.query.corpus != "GROUPS" %}
{% if finding_data.query.accountInfo.emails %}
<table class="phantom-table dataTable">
<thead>
<th class="widget-th">User Account Emails</th>
</thead>
{% for email in finding_data.query.accountInfo.emails %}
<tr><td><a href="javascript:;" onclick="context_menu(this, [{'contains': ['email'],
'value': '{{ email }}' }], 0, {{ container.id }}, null, false);">
{{ email }}
<span class="fa fa-caret-down" style="font-size: smaller;"></span>
</a></td></tr>
{% endfor %}
</table>
{% endif %}
{% else %}
<td>None</td>
{% endif %}
</td>
{% else %}
<td>None</td>
{% endif %}
<td>
<table class="phantom-table dataTable">
<thead>
<th class="widget-th">Display Name</th>
<th class="widget-th">Email</th>
</thead>
<tr>
<td>{{ finding_data.requester.displayName }}</td>
<td><a href="javascript:;" onclick="context_menu(this, [{'contains': ['gsvault email ids', 'email'],
'value': '{{ finding_data.requester.email }}' }], 0, {{ container.id }}, null, false);">
{{ finding_data.requester.email }}
<span class="fa fa-caret-down" style="font-size: smaller;"></span>
</a></td>
</tr>
</table>
</td>
<td>
{% if finding_data.query.startTime or finding_data.query.endTime or finding_data.query.terms %}
<table class="phantom-table dataTable">
<thead>
<th class="widget-th">Start Time</th>
<th class="widget-th">End Time</th>
<th class="widget-th">Terms</th>
</thead>
<tr>
<td>{{ finding_data.query.startTime }}</td>
<td>{{ finding_data.query.endTime }}</td>
<td>{{ finding_data.query.terms }}</td>
</tr>
</table>
{% else %}
None
{% endif %}
</td>
<td>
{% if finding_data.exportOptions %}
<table class="phantom-table dataTable">
<thead>
<th class="widget-th">region</th>
{% if finding_data.exportOptions.groupsOptions %}
<th class="widget-th">Groups Options</th>
{% elif finding_data.exportOptions.mailOptions %}
<th class="widget-th">Mail Options</th>
{% elif finding_data.exportOptions.driveOptions %}
<th class="widget-th">Drive Options</th>
{% else %}
<th class="widget-th">Options</th>
{% endif %}
</thead>
<tr>
<td>{{ finding_data.exportOptions.region }}</td>
{% if finding_data.exportOptions.groupsOptions %}
<td>
<table class="phantom-table dataTable">
<thead>
{% if finding_data.exportOptions.groupsOptions.exportFormat %}
<th>Export Format</th>
{% endif %}
</thead>
<tr>
{% if finding_data.exportOptions.groupsOptions.exportFormat %}
<td>{{ finding_data.exportOptions.groupsOptions.exportFormat }}</td>
{% endif %}
</tr>
</table>
</td>
{% elif finding_data.exportOptions.mailOptions %}
<td>
<table class="phantom-table dataTable">
<thead>
{% if finding_data.exportOptions.mailOptions.exportFormat %}
<th>Export Format</th>
{% endif %}
{% if finding_data.exportOptions.mailOptions.showConfidentialModeContent %}
<th>Show Confidential Mode Content</th>
{% endif %}
</thead>
<tr>
{% if finding_data.exportOptions.mailOptions.exportFormat %}
<td>{{ finding_data.exportOptions.mailOptions.exportFormat }}</td>
{% endif %}
{% if finding_data.exportOptions.mailOptions.showConfidentialModeContent %}
<td>{{ finding_data.exportOptions.mailOptions.showConfidentialModeContent }}</td>
{% endif %}
</tr>
</table>
</td>
{% elif finding_data.exportOptions.driveOptions %}
<td>
<table class="phantom-table dataTable">
<thead>
{% if finding_data.exportOptions.driveOptions.includeAccessInfo %}
<th>Include Access Info</th>
{% endif %}
</thead>
<tr>
{% if finding_data.exportOptions.driveOptions.includeAccessInfo %}
<td>{{ finding_data.exportOptions.driveOptions.includeAccessInfo }}</td>
{% endif %}
</tr>
</table>
</td>
{% else %}
<td>None</td>
{% endif %}
</tr>
</table>
{% endif %}
</td>
<td>{{ finding_data.query.timeZone }}</td>
<td>{{ finding_data.createTime }}</td>
</tr>
{% endfor %}
</table>
</div>
{% endif %}
{% endfor %}
</div>
<script>
$.extend(true, $.fn.dataTable.defaults, {
"searching": true,
"bLengthChange": false,
"language": {
"paginate": {
"previous": "<i class='fa fa-angle-left fa-lg'></i>",
"next": "<i class='fa fa-angle-right fa-lg'></i>"
},
"emptyTable": "No data available"
},
"dom": '<"top">rt<"bottom"p><"clear">',
drawCallback: function(settings) {
var pagination = $(this).closest('.dataTables_wrapper').find('.dataTables_paginate');
pagination.toggle(this.api().page.info().pages > 1);
}
});
$('.dataTable').DataTable();
</script>
{% endblock %}