-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsumo_query.html
104 lines (96 loc) · 3.95 KB
/
sumo_query.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
<html>
<head>
<script>
////////////////////////////////////////////////////////////
// See https://github.com/oriadam/sumologic_google_charts //
////////////////////////////////////////////////////////////
// Set your online tracker URL here:
var TRACKER_URL = 'https://endpoint1.collection.eu.sumologic.com/receiver/v1/http/GIBBERISH-GIBBERISH-GIBBERISH-GIBBERISH-GIBBERISH-GIBBERISH-GIBBERISH-GIBBERISH-GIBBERISH-GIBBERISH?';
// Set your predefined queries here:
var PREDEFINED_QUERIES = [
'_collector=......',
'_collector=.......',
];
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" >
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" ></script>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/blueimp-md5/1.1.1/js/md5.min.js"></script>
<link href="style.css" rel="stylesheet">
<style>
iframe[name="result"] {
width:90%;
height:300px;
border:1px solid #ddd;
}
input[name="q"] {
width:1000px;
}
#queryBuilder .sub-group{
padding-left:20px;
}
[onclick] {
cursor: pointer;
}
body {padding:0px 20px;}
.firstgeo {
font-weight: bold;
text-transform: uppercase;
}
#cp_container table,#cp_container td,#cp_container th {
font-size:12px;
line-height:12px;
}
#cp_container td:nth-child(3) {
font-family:monospace;
}
</style>
</head>
<body>
<a href="https://service.eu.sumologic.com/ui/index.html" target="_blank">Login to Sumologic</a>
<a href="https://service.sumologic.com/help/Getting_Started_Using_Search.htm" target="_blank">Query Starter Guide</a>
<a href="https://nite-www.sumologic.net/help/Search_Examples_Cheat_Sheet.htm" target="_blank">Query Cheat Sheet</a>
<datalist id="queries_datalist">
</datalist>
<div id="q_container">
<form action='./chart.php' method="get" target="result">
<label class="form-group"><span>Start Date: </span><input class="form-control" name="from" type="date"></label>
<label class="form-group"><span>Query: </span><input class="form-control" name="q" maxlength="2000" list="queries_datalist"></label>
<label class="form-group"><span>Chart: </span><input class="form-control" type="checkbox" checked onchange="this.form.action=this.checked?'./chart.php':'./api.php'"></label>
<span class="btn btn-xs" onclick="$('#more').toggle()">more</span>
<div id="more" style="display:none">
<label class="form-group"><span>End Date: </span><input class="form-control" name="to" type="date" value=""></label>
<label class="form-group"><span>Show Query: </span><input class="form-control" name="show_query" type="checkbox" value="1"></label>
<label class="form-group"><span>Show Request: </span><input class="form-control" name="show_ch" type="checkbox" value="1"></label>
<label class="form-group"><span>Show Response: </span><input class="form-control" name="show_raw" type="checkbox" value="1"></label>
</div>
<!--label class="form-group"><span>Secret: </span><input class="form-control" name="secret" value=""></label-->
<input type="hidden" name="secret">
<br>
<label class="form-group submit"><input class="form-control" type="submit"></label>
</form>
<h4>Query Result</h4>
<iframe name="result"></iframe>
</div>
<script src="populate_form_from_search_query.js"></script>
<script>
var $queries_datalist=$('#queries_datalist');
PREDEFINED_QUERIES.forEach(function(q){
var opt=$('<option>');
opt.prop('value',q);
$queries_datalist.append(opt);
});
function allOffExcept(elem){
$('#queryBuilder .query-selector input[type="checkbox"]:checked').not(elem).prop('checked',false);
}
function resize(){
var $iframe=$('iframe[name="result"]');
$iframe.height(innerHeight - $iframe.position().top - 20)
}
resize();
$(window).on('resize',resize);
$('[onclick]').click(resize);
</script>
</body>
</html>