-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
166 lines (137 loc) · 3.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
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
line-height: 0;
}
body > * > * {
line-height: 1.2em;
}
.chart-container {
overflow-y: auto;
overflow-x: hidden;
line-height: 0;
}
.chart_container > * {
line-height: 1.2em;
}
.legend .x-axis text {
fill: black;
font: 10px sans-serif;
text-anchor: start;
transform: rotate(-8deg);
}
.axis .domain {
display: none;
}
.chart text {
font: 10px sans-serif;
fill: black;
}
.chart .y-axis .tick > line {
opacity: 0.1;
}
.chart .x-axis text {
display: none;
}
* {
transition: transform 100ms linear;
}
.chart .data-area .log-entry .main-rect-fill {
fill: white;
}
.chart .data-area .log-entry .main-rect-stroke {
stroke: black;
stroke-width: 1px;
stroke-linecap: square;
stroke-linejoin: miter;
fill: none;
}
.chart .data-area .log-entry .duration line {
stroke: black;
stroke-width: 2px;
}
.chart .data-area .highlight .time-line {
stroke: black;
stroke-width: 1px;
stroke-dasharray: 4px 2px;
}
.chart .data-area .highlight text.timestamp {
text-anchor: start;
font: 9px monospace;
}
.chart .data-area .highlight text.timestamp.right-half {
text-anchor: end;
}
.chart.multiple-highlights .data-area .highlight .time-line-container {
display: none;
}
.chart.highlights .data-area .log-entry-container {
opacity: 0.25;
}
.detail {
display: block;
white-space: pre-wrap;
word-break: break-all;
margin: 0 4px;
padding: 8px;
border: 1px solid black;
box-sizing: border-box;
border-radius: 3px;
width: 650px;
}
.detail .parameter-row {
margin-left: 1em;
text-indent: -1em;
}
.detail .parameter-row .parameter-key {
font-weight: bold;
}
.detail .parameter-row a.with-mouseover {
text-decoration: underline dashed rgba(0,0,0,0.35);
cursor: default;
}
.detail .parameter-row a.with-mouseover:hover {
text-decoration-color: initial;
}
.detail svg.right-symbol {
padding-left: 0.25em;
vertical-align: -1px;
}
.detail svg .symbol-shape-outline {
stroke: #777;
fill: none;
/* ideally...
stroke-width: 1px;
vector-effect: non-scaling-stroke;
but I can't get non-scaling-stroke to work reliably, so... */
stroke-width: 0.25px
}
textarea {
width: 650px;
}
</style>
<title>logdia</title>
<link rel="icon" href="icons/digitalmarketplace-logdia-16.png">
<body>
<div id="visualization">
<svg class="legend"></svg>
<div class="chart-container">
<svg class="chart">
<defs>
<filter y="-50%" height="200%" id="halo">
<feColorMatrix result="matrixOut" in="SourceAlpha" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.8 0"/>
<feMorphology in="matrixOut" result="morphOut" operator="dilate" radius="2" />
<feBlend in="SourceGraphic" in2="morphOut" mode="normal"/>
</filter>
</defs>
</svg>
</div>
</div>
<form id="src-data-form">
<textarea name="src-data-json" rows="20" placeholder="Paste JSON log content here ('Elasticsearch response body' in Kibana)"></textarea>
<button type="submit">Update</button>
</form>
<script src="d3.v4.js" charset="utf-8"></script>
<script src="logdia.js" charset="utf-8"></script>
</body>