-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
40 lines (37 loc) · 3.32 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>prettier-elastic-query demo page</title>
<script type="text/javascript" src="../prettier-elastic-query.min.js"></script></head>
<body>
<h3>Valid input:</h3>
<code id="example1-raw">
(((tags:"Superman Activity") AND (tags:("Source - Drainage Pipes" OR "Source - Time Travel" OR "Source - Alien Transmissions" OR "Source - Ghosts" OR "Source - Gossip" OR "Source - MenInHats")) AND tags:"Customer - World Government") OR ((tags:"Spiderman Activity") AND (tags:("Source - Drainage Pipes" OR "Source Type - Fashion Magazines" OR "Source Type - Social Media" OR "Source - MenInHats" OR "Source - Flashpoint" OR "Source - Ghosts")) AND ((meta.tlp_color:(RED OR AMBER) AND tags:"Customer - World Government") OR meta.tlp_color:(WHITE OR GREEN))) OR ((tags:"Batman Activity") AND (tags:("Source - Drainage Pipes" OR "Source Type - Fashion Magazines" OR "Source Type - Social Media" OR "Source - Gossip" OR "Source - Ghosts")) AND ((meta.tlp_color:(RED OR AMBER) AND tags:"Customer - World Government") OR meta.tlp_color:(WHITE OR GREEN))) OR ((tags:"Theme - Financial Crime") AND (tags:("Source - Drainage Pipes" OR "Source - MenInHats" OR "Source - Gossip" OR "Source Type - Fashion Magazines" OR "Source Type - Social Media" OR "Source - Ghosts")) AND ((meta.tlp_color:(RED OR AMBER) AND tags:"Customer - World Government") OR meta.tlp_color:(WHITE OR GREEN))) OR ((tags:"Jocker Activity") AND (tags:("Source - Drainage Pipes" OR "Source Type - Fashion Magazines" OR "Source Type - Social Media" OR "Source - MenInHats" OR "Source - Gossip" OR "Source - Ghosts")) AND ((meta.tlp_color:(RED OR AMBER) AND tags:"Customer - World Government") OR meta.tlp_color:(WHITE OR GREEN))) OR ((tags:"Random Activity") AND (tags:("Source - Drainage Pipes" OR "Source Type - Fashion Magazines" OR "Source Type - Social Media" OR "Source - Time Travel" OR "Source - Alien Transmissions" OR "Source - Ghosts" OR "Source - Gossip" OR "Source - MenInHats")) AND ((meta.tlp_color:(RED OR AMBER) AND tags:"Customer - World Government") OR meta.tlp_color:(WHITE OR GREEN)))) AND (data.type:report AND tags:"BigBoss - Reviewed" AND created_at:[2018-06-06 TO *]) AND (-some_number:68 OR some_value:/joh?n(ath[oa]n)/) AND (some:(+>123 AND +<=123) AND age:<=123 AND some:{123 TO *} AND count:[1 TO 5}) AND (simple:foo~ OR some:"fox quick"~5 OR other:something\ word~11) AND meta.estimated_start_time:[now-1w/d+9h TO now/d+9h]
</code>
<h3>Output:</h3>
<pre>
<code id="example1-formatted">
</code>
</pre>
<h3>Invalid input:</h3>
<code id="example2-raw">
meta.estimated_start_time:[now-1w/d+9h TO now/d+9h] AND Blah.(?? tags:“Funky Tag” AND data.type:cookies-receipt
</code>
<h3>Output:</h3>
<pre>
<code id="example2-formatted">
</code>
</pre>
<script>
PrettierEs.extendHighlighter({'keywords': ['WHITE', 'GREEN', 'AMBER', 'RED']});
var example1Raw = document.getElementById("example1-raw");
var example1Formatted = document.getElementById("example1-formatted");
example1Formatted.innerHTML = PrettierEs.prettify(example1Raw.innerText, 90);
var example2Raw = document.getElementById("example2-raw");
var example2Formatted = document.getElementById("example2-formatted");
example2Formatted.innerText = example2Raw.innerText;
PrettierEs.prettifyElement('example2-formatted', true, 90);
</script>
</body>
</html>