forked from eXist-db/monex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
457 lines (455 loc) · 25 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
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
<?xml version="1.0" encoding="UTF-8"?>
<div xmlns="http://www.w3.org/1999/xhtml" data-template="templates:surround" data-template-with="templates/page.html" data-template-at="content">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Monitoring
<small data-template="app:get-instance">Control panel</small>
</h1>
<ol class="breadcrumb">
<li>
<a href="#">
<i class="fa fa-dashboard"/> Home</a>
</li>
<li class="active">Monitoring</li>
</ol>
</section>
<!-- Main content -->
<section id="dashboard" class="content">
<div id="connection-alert" class="alert alert-danger" style="display: none;">
<i class="fa fa-ban"/>
<b>Alert! </b>
<span class="message"/>
</div>
<div id="browser-alert" class="alert alert-danger" style="display: none;">
<i class="fa fa-ban"/>
<b>Alert! </b> Your browser does not support websockets. Remote monitoring and console
will not work!
</div>
<!-- Small boxes (Stat box) -->
<div class="row">
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-aqua">
<div class="inner">
<h3 id="jmx-brokers">
<span data-bind="text: jmx.Database.ActiveBrokers">?</span> of
<span data-bind="text: jmx.Database.TotalBrokers">?</span>
</h3>
<p>
Active DB Processes
</p>
</div>
<div class="icon">
<i class="ion ion-android-storage"/>
</div>
<span class="small-box-footer"> </span>
</div>
</div><!-- ./col -->
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-green">
<div class="inner">
<h3 id="jmx-uptime" data-bind="text: uptime($data.jmx.Database.Uptime())">?</h3>
<p>
Uptime
</p>
</div>
<div class="icon">
<i class="ion ion-ios7-time-outline"/>
</div>
<span class="small-box-footer"> </span>
</div>
</div><!-- ./col -->
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-yellow">
<div class="inner">
<h3 id="jmx-queries" data-bind="text: $data.jmx.ProcessReport.RunningQueries.length || 0">?</h3>
<p>
Running Queries
</p>
</div>
<div class="icon">
<i class="ion ion-ios7-search"/>
</div>
<span class="small-box-footer"> </span>
</div>
</div><!-- ./col -->
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-red">
<div class="inner">
<h3 data-bind="text: $data.jmx.LockManager.WaitingThreads.length || 0">?</h3>
<p>
Waiting Threads
</p>
</div>
<div class="icon">
<i class="ion ion-pie-graph"/>
</div>
<span class="small-box-footer"> </span>
</div>
</div><!-- ./col -->
</div><!-- /.row -->
<div class="row">
<!-- Left col -->
<section class="col-lg-12">
<!-- Box (Memory Usage) -->
<div class="box box-warning">
<div class="box-header">
<i class="fa fa-bar-chart-o"/>
<h3 class="box-title">Java Memory</h3>
</div><!-- /.box-header -->
<div class="box-body no-padding">
<div class="row" data-bind="with: jmx.MemoryImpl.HeapMemoryUsage">
<div class="col-sm-7">
<div class="chart" id="memory-graph" style="height: 250px;" data-labels="Used memory,Committed memory" data-properties="jmx.MemoryImpl.HeapMemoryUsage.used,jmx.MemoryImpl.HeapMemoryUsage.committed" data-max-y="jmx.MemoryImpl.HeapMemoryUsage.max"/>
</div>
<div class="col-sm-5">
<div class="pad">
<!-- Progress bars -->
<div class="clearfix">
<span class="pull-left">Memory Used</span>
<small class="pull-right">
<span data-bind="text: Math.floor(parseInt($data.used()) / 1024 / 1024)">10</span> /
<span data-bind="text: Math.floor(parseInt($data.max()) / 1024 / 1024)">10</span> M
</small>
</div>
<div class="progress xs">
<div class="progress-bar progress-bar-green" data-bind="style: {width: Math.round($data.used() / ($data.max() / 100)) + '%'}"/>
</div>
</div><!-- /.pad -->
<div class="pad">
<!-- Progress bars -->
<div class="clearfix">
<span class="pull-left">Memory Committed</span>
<small class="pull-right">
<span data-bind="text: Math.floor(parseInt($data.committed()) / 1024 / 1024)">10</span> /
<span data-bind="text: Math.floor(parseInt($data.max()) / 1024 / 1024)">10</span> M
</small>
</div>
<div class="progress xs">
<div class="progress-bar progress-bar-green" data-bind="style: {width: Math.round($data.committed() / ($data.max() / 100)) + '%'}"/>
</div>
</div><!-- /.pad -->
</div><!-- /.col -->
</div><!-- /.row - inside box -->
</div><!-- /.box-body -->
<div class="box-footer">
<button class="btn btn-warning" data-bind="visible: parseInt($data.jmx.version()) > 0, click: gc">Garbage Collect</button>
</div>
</div><!-- /.box -->
</section>
</div><!-- /.row -->
<div class="row">
<!-- Left col -->
<section class="col-lg-6">
<!-- Box (Running XQueries) -->
<div class="box box-success">
<div class="box-header">
<i class="ion ion-ios7-search"/>
<h3 class="box-title">Running Queries</h3>
</div><!-- /.box-header -->
<div class="box-body no-padding">
<table class="table table-striped">
<thead>
<tr>
<th>Id</th>
<th>Source</th>
<th>Source Type</th>
<th>Status</th>
<th/>
</tr>
</thead>
<tbody data-bind="visible: $data.jmx.ProcessReport.RunningQueries().length == 0">
<tr>
<td colspan="5">No running queries</td>
</tr>
</tbody>
<tbody data-bind="foreach: { data: jmx.ProcessReport.RunningQueries, afterRender: addKillBtn }">
<tr>
<td data-bind="text: id"/>
<td>
<span class="source-key" data-bind="text: $data.sourceKey().replace(/^.*\/([^\/]+)$/, '$1'), attr: { title: sourceKey }" data-toggle="tooltip"/>
</td>
<td data-bind="text: sourceType"/>
<td>
<span class="label" data-bind="text: $data.terminating() == 'false' ? 'running' : 'terminating', css: { 'label-success': $data.terminating() == 'false', 'label-warning': $data.terminating() == 'true' }"/>
</td>
<td>
<a href="#" class="kill-query" title="Kill Query" data-bind="if: JMX_INSTANCE.name == 'localhost' || JMX_INSTANCE.version != 0">
<span class="glyphicon glyphicon-remove"/>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="box box-danger">
<div class="box-header">
<i class="fa fa-cogs"/>
<h3 class="box-title">Running Jobs</h3>
</div>
<div class="box-body no-padding">
<table class="table table-striped">
<thead>
<tr>
<th>Action</th>
<th>Id</th>
<th>Info</th>
</tr>
</thead>
<tbody data-bind="visible: $data.jmx.ProcessReport.RunningJobs().length == 0">
<tr>
<td colspan="5">No running jobs</td>
</tr>
</tbody>
<tbody data-bind="foreach: jmx.ProcessReport.RunningJobs">
<td data-bind="text: action"/>
<td data-bind="text: id"/>
<td data-bind="text: info"/>
</tbody>
</table>
</div>
</div>
<div class="box box-danger">
<div class="box-header">
<i class="fa fa-lock"/>
<h3 class="box-title">Waiting Threads</h3>
</div><!-- /.box-header -->
<div class="box-body no-padding">
<table class="table table-striped">
<thead>
<tr>
<th>Thread</th>
<th>Waiting for</th>
<th>Resource</th>
<th>Lock mode</th>
<th>Lock type</th>
</tr>
</thead>
<tbody data-bind="visible: $data.jmx.LockManager.WaitingThreads().length == 0">
<tr>
<td colspan="5">No waiting threads</td>
</tr>
</tbody>
<tbody data-bind="foreach: jmx.LockManager.WaitingThreads">
<tr>
<td data-bind="text: waitingThread"/>
<td data-bind="text: owner"/>
<td data-bind="text: id"/>
<td data-bind="text: lockMode"/>
<td data-bind="text: lockType"/>
</tr>
</tbody>
</table>
</div>
</div>
<div class="box box-info">
<div class="box-header">
<i class="fa fa-info"/>
<h3 class="box-title">System Information</h3>
</div><!-- /.box-header -->
<div class="box-body no-padding">
<table class="table table-striped">
<thead>
<tr>
<th>Key</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>eXist Version:</td>
<td data-bind="text: jmx.SystemInfo.ExistVersion"/>
</tr>
<tr>
<td>eXist Build:</td>
<td data-bind="text: jmx.SystemInfo.ExistBuild"/>
</tr>
<tr>
<td>Operating System:</td>
<td data-bind="text: jmx.SystemInfo.OperatingSystem"/>
</tr>
<tr>
<td>Default Encoding:</td>
<td data-bind="text: jmx.SystemInfo.DefaultEncoding"/>
</tr>
<tr>
<td>Instance ID:</td>
<td data-bind="text: jmx.Database.InstanceId"/>
</tr>
</tbody>
</table>
</div>
</div>
</section>
<section class="col-lg-6">
<!-- Box (Cache Usage) -->
<div class="box box-info">
<div class="box-header">
<i class="fa fa-bar-chart-o"/>
<h3 class="box-title">Database Brokers</h3>
</div><!-- /.box-header -->
<div class="box-body">
<div class="chart" id="brokers-graph" style="height: 200px;" data-labels="Active Brokers,Total Brokers" data-properties="jmx.Database.ActiveBrokers,jmx.Database.TotalBrokers" data-max-y="jmx.Database.MaxBrokers"/>
</div>
</div>
<!-- Box (Cache Usage) -->
<div class="box box-info">
<div class="box-header">
<i class="fa fa-download"/>
<h3 class="box-title">Cache Usage</h3>
</div><!-- /.box-header -->
<div class="box-body jmx-cache-manager" data-bind="with: findByName($data.jmx.CacheManager(), 'org.exist.management.exist:type=CacheManager')">
<div class="clearfix">
<span class="pull-left">Cache Manager</span>
<small class="pull-right">
<span data-bind="text: MaxTotal">0</span>/<span data-bind="text: CurrentSize">0</span> pages</small>
</div>
<div class="progress xs">
<div class="progress-bar progress-bar-success progress-cache" data-bind="style: {width: Math.round($data.CurrentSize() / ($data.MaxTotal() / 100)) + '%'}"/>
</div>
</div>
<div class="box-body jmx-cache-manager" data-bind="with: findByName($data.jmx.CacheManager(), 'org.exist.management.exist:type=CollectionCacheManager')">
<div class="clearfix">
<span class="pull-left">Collection Cache Manager</span>
<small class="pull-right">
<span data-bind="text: MaxTotal">0</span>/<span data-bind="text: CurrentSize">0</span> bytes</small>
</div>
<div class="progress xs">
<div class="progress-bar progress-bar-success progress-cache" data-bind="style: {width: Math.round($data.CurrentSize() / ($data.MaxTotal() / 100)) + '%'}"/>
</div>
</div>
<div class="box-body jmx-cache" data-bind="with: findByName($data.jmx.Cache(), 'org.exist.management.exist:type=CacheManager.Cache,name=dom.dbx,cache-type=BTREE')">
<div class="clearfix">
<span class="pull-left">dom.dbx (BTree)</span>
<small class="pull-right">
<span class="cache-stats">
Size: <span data-bind="text: Size">0</span> /
Used: <span data-bind="text: Used">0</span> /
Fails: <span data-bind="text: Fails">0</span> /
Hits: <span data-bind="text: Hits">0</span>
</span>
</small>
</div>
<div class="progress xs">
<div class="progress-bar progress-bar-info progress-cache" data-bind="style: {width: Math.round($data.Used() / ($data.Size() / 100)) + '%'}"/>
</div>
</div>
<div class="box-body jmx-cache" data-bind="with: findByName($data.jmx.Cache(), 'org.exist.management.exist:type=CacheManager.Cache,name=structure.dbx,cache-type=BTREE')">
<div class="clearfix">
<span class="pull-left">structure.dbx (BTree)</span>
<small class="pull-right">
<span class="cache-stats">
Size: <span data-bind="text: Size">0</span> /
Used: <span data-bind="text: Used">0</span> /
Fails: <span data-bind="text: Fails">0</span> /
Hits: <span data-bind="text: Hits">0</span>
</span>
</small>
</div>
<div class="progress xs">
<div class="progress-bar progress-bar-info progress-cache" data-bind="style: {width: Math.round($data.Used() / ($data.Size() / 100)) + '%'}"/>
</div>
</div>
<div class="box-body jmx-cache" data-bind="with: findByName($data.jmx.Cache(), 'org.exist.management.exist:type=CacheManager.Cache,name=collections.dbx,cache-type=BTREE')">
<div class="clearfix">
<span class="pull-left">collections.dbx (BTree)</span>
<small class="pull-right">
<span class="cache-stats">
Size: <span data-bind="text: Size">0</span> /
Used: <span data-bind="text: Used">0</span> /
Fails: <span data-bind="text: Fails">0</span> /
Hits: <span data-bind="text: Hits">0</span>
</span>
</small>
</div>
<div class="progress xs">
<div class="progress-bar progress-bar-info progress-cache" data-bind="style: {width: Math.round($data.Used() / ($data.Size() / 100)) + '%'}"/>
</div>
</div>
<div class="box-body jmx-cache" data-bind="with: findByName($data.jmx.Cache(), 'org.exist.management.exist:type=CacheManager.Cache,name=values.dbx,cache-type=BTREE')">
<div class="clearfix">
<span class="pull-left">values.dbx (BTree)</span>
<small class="pull-right">
<span class="cache-stats">
Size: <span data-bind="text: Size">0</span> /
Used: <span data-bind="text: Used">0</span> /
Fails: <span data-bind="text: Fails">0</span> /
Hits: <span data-bind="text: Hits">0</span>
</span>
</small>
</div>
<div class="progress xs">
<div class="progress-bar progress-bar-info progress-cache" data-bind="style: {width: Math.round($data.Used() / ($data.Size() / 100)) + '%'}"/>
</div>
</div>
</div>
</section>
<section class="col-lg-6">
<div class="box box-info">
<div class="box-header">
<i class="fa fa-bar-chart-o"/>
<h3 class="box-title">Recent Queries</h3>
</div>
<div class="box-body no-padding">
<table class="table table-striped">
<thead>
<tr>
<th>Time</th>
<th>Source</th>
<th>Elapsed Time</th>
</tr>
</thead>
<tbody id="jmx-recent-queries" data-bind="foreach: {data: jmx.ProcessReport.RecentQueryHistory, afterRender: function(node) { $('.source-key', node).tooltip(); }}">
<tr>
<td data-bind="text: new Date(parseInt($data.mostRecentExecutionTime()))"/>
<td>
<span class="source-key" data-bind="text: $data.sourceKey().replace(/^.*\/([^\/]+)$/, '$1'), attr: { title: sourceKey }" data-toggle="tooltip"/>
</td>
<td data-bind="text: mostRecentExecutionDuration"/>
</tr>
</tbody>
</table>
</div>
</div>
</section>
</div>
<!--div class="row">
<section class="col-lg-12">
<div class="box box-primary" id="loading-example">
<div class="box-header">
<i class="fa fa-cloud"></i>
<h3 class="box-title">Active Threads</h3>
</div>
<div class="box-body no-padding">
<table class="table table-striped">
<thead>
<tr>
<th>Property</th>
<th>Value</th>
</tr>
</thead>
<tbody data-bind="foreach: jmx.Database.ActiveBrokersMap">
<tr>
<td data-bind="text: owner"></td>
<td data-bind="text: referenceCount"></td>
<td data-bind="text: stack"></td>
</tr>
</tbody>
</table>
</div>
</div>
</section>
</div-->
</section>
<script type="text/javascript" src="resources/scripts/modernizr.custom.js"/>
<script type="text/javascript" src="resources/scripts/knockout-3.1.0.js"/>
<script type="text/javascript" src="resources/scripts/knockout.mapping-2.4.1.js"/>
<script type="text/javascript" src="resources/scripts/jquery.flot.min.js"/>
<script type="text/javascript" src="resources/scripts/jquery.flot.time.min.js"/>
<script type="text/javascript" src="resources/scripts/exadmin.js"/>
</div>