This repository has been archived by the owner on Feb 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
206 lines (189 loc) · 7.73 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>ylogviewer - an YaST Log Viewer</title>
<link rel="icon" type="image/png" href="https://avatars3.githubusercontent.com/u/909990?s=60&v=4" />
<!-- use Picnic CSS from https://picnicss.com/ -->
<link rel="stylesheet" href="picnic.min.css">
<link rel="stylesheet" href="style.css">
<script src="pako_inflate.min.js"></script>
<script src="xzwasm.min.js"></script>
<script src="untar.js"></script>
<script src="bz2.js"></script>
<script src="script.js"></script>
</head>
<body>
<div id="page">
<h1>YaST Log Viewer</h1>
<article class="card">
<header>
<h3>Select the <code>y2log</code> file to display</h3>
</header>
<section class="content">
<h4>Local File</h4>
<input type="file" id="file" />
<button id="load-file">Load File</button>
</section>
<section class="content">
<h4>Remote File</h4>
<label><input id="url" type="url" placeholder="URL"></label>
<button id="load-url">Load URL</button>
</section>
</article>
<article class="card notes" id="notes-info">
<header>
<h3><span class="notes-icon">ℹ️ </span>Notes</h3>
</header>
<section class="content">
<div class="flex one two-1000">
<div>
<h4>Experimental Project</h4>
<p>
<span class="notes-icon">⚠️ </span>
This is still a proof of concept project for experiments. That just means
there might be bugs...
</p>
<h4>Supported Files</h4>
<p>You can load the log file in several formats:
<ul>
<li>Plain text format (from <code>/var/log/YaST2/y2log</code> )</li>
<li>Gzip compressed file (<code>*.gz</code>, like <code>y2log-1.gz</code> )</li>
<li>XZ compressed file (<code>*.xz</code>, currently not
created by YaST, you have to compress the file manually)</li>
<li>Bzip2 compressed file (<code>*.bz2</code>, currently not
created by YaST, you have to compress the file manually)</li>
<li>Tarball (<code>*.tar.gz</code>, <code>*.tar.bz2</code> or <code>*.tar.xz</code>,
created by the <code><a href=
"https://github.com/yast/yast-yast2/blob/master/scripts/save_y2logs">
save_y2logs</a></code> script, currently only the
<code>YaST2/y2log</code> file is displayed)
</li>
</ul>
</p>
<h4>Remote Files</h4>
<p>
Downloading remote files works only from the servers which allow
<a href="https://en.wikipedia.org/wiki/Cross-origin_resource_sharing">
cross-origin resource sharing (CORS)</a>, this is a limitation
of the <a href="https://en.wikipedia.org/wiki/Same-origin_policy">
same-origin security policy</a>. Not all servers support cross-origin
requests, you might get errors for URLs which normally work
in the browser. In that case download the file and then use the
downloaded file.
</p>
<p>
Only the HTTP and HTTPS protocols are supported for downloading.
</p>
<h4>Local Processing</h4>
<p>
The selected file is NOT uploaded anywhere, the ylogviewer uses
the HTML5 features and several JavaScript libraries for handling the
GZ, XZ and TAR files, it processes the selected file completely locally!
That has several advantages:
<ul>
<li>Speed - nothing is uploaded or downloaded, no bandwidth limitations</li>
<li>Security - the logs might potentially contain sensitive data, all data stay in your machine!</li>
<li>Offline mode - the viewer can be used without internet connection</li>
</ul>
</p>
</div>
</div>
</section>
</article>
<div id="loader" class="loader"></div>
<h2 id="file-header"></h2>
<div id="index"></div>
<h2 id="processes-header"></h2>
<div id="content">
<!-- the y2log is loaded here -->
</div>
<!-- popup with filtering options -->
<div class="modal" id="config-modal">
<input id="configuration_popup" type="checkbox" />
<label for="configuration_popup" class="overlay"></label>
<article>
<header>
<h3>Display and Filter Settings</h3>
<label for="configuration_popup" class="close">×</label>
</header>
<section class="content" id="filter-group-data">
<h4>Display Log Data</h4>
<label>
<input type="checkbox" id="show-date" data-selector=".log-date">
<span class="checkable">Date</span>
</label>
<label>
<input type="checkbox" id="show-time" data-selector=".log-time" checked>
<span class="checkable">Time</span>
</label>
<label>
<input type="checkbox" id="show-log-level" data-selector=".log-level-item">
<span class="checkable">Log Level</span>
</label>
<label>
<input type="checkbox" id="show-host" data-selector=".log-host">
<span class="checkable">Hostname</span>
</label>
<label>
<input type="checkbox" id="show-pid" data-selector=".log-pid">
<span class="checkable">Process ID</span>
</label>
<label>
<input type="checkbox" id="show-component" data-selector=".log-component" checked>
<span class="checkable">Component</span>
</label>
<label>
<input type="checkbox" id="show-location" data-selector=".log-location" checked>
<span class="checkable">Location</span>
</label>
<label>
<input type="checkbox" id="show-message" data-selector=".log-message" checked>
<span class="checkable">Message</span>
</label>
</section>
<section class="content" id="filter-group-level">
<h4>Log Levels</h4>
<label>
<input type="checkbox" id="show-debug" data-level="0" checked>
<span class="checkable log-level-0">(0) Debug</span>
</label>
<label>
<input type="checkbox" id="show-info" data-level="1" checked>
<span class="checkable log-level-1">(1) Info</span>
</label>
<label>
<input type="checkbox" id="show-warning" data-level="2" checked>
<span class="checkable log-level-2">(2) Warning</span>
</label>
<label>
<input type="checkbox" id="show-error" data-level="3" checked>
<span class="checkable log-level-3">(3) Error</span>
</label>
<label>
<input type="checkbox" id="show-security" data-level="4" checked>
<span class="checkable log-level-4">(4) Security</span>
</label>
<label>
<input type="checkbox" id="show-internal" data-level="5" checked>
<span class="checkable log-level-5">(5) Internal</span>
</label>
</section>
<section class="content" id="filter-group-components">
<h4>Components</h4>
<div id="filter-group-components-list"></div>
</section>
<footer>
<label for="configuration_popup" class="button">
Close
</label>
</footer>
</article>
</div>
<span id="configuration">
<button id="filter">Filter</button>
</span>
<span id="navigation"></span>
</div>
</body>
</html>