This repository has been archived by the owner on Mar 19, 2021. It is now read-only.
/
index.phtml
454 lines (340 loc) · 16.2 KB
/
index.phtml
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
<?php
$title = 'Dashboard';
$this->headTitle($title);
?>
<h2><?php echo $this->translate($title); ?></h2>
<hr />
<script type="text/javascript">
function chart1() {
var data = [
['Running', <?php echo $this->jobsRunning; ?>],
['Completed successful', <?php echo $this->jobsTerminated; ?>],
['Terminated with Errors', <?php echo $this->jobsTerminatedWithErrors; ?>],
['Non-fatal Errors', <?php echo $this->jobsWithNonFatalErrors; ?>],
['Fatal Errors', <?php echo $this->jobsWithFatalErrors; ?>],
['Canceled by user', <?php echo $this->jobsCanceled; ?>],
['Verify found difference', <?php echo $this->jobsVerifyFoundDiff; ?>],
['Waiting for Client', <?php echo $this->jobsWaitingForClient; ?>],
['Waiting for Storage daemon', <?php echo $this->jobsWaitingForStorageDaemon; ?>],
['Waiting for new media', <?php echo $this->jobsWaitingForNewMedia; ?>],
['Waiting for media mount', <?php echo $this->jobsWaitingForMediaMount; ?>],
['Waiting for storage resource', <?php echo $this->jobsWaitingForStorageResource; ?>],
['Waiting for job resource', <?php echo $this->jobsWaitingForJobResource; ?>],
['Waiting for client resource', <?php echo $this->jobsWaitingForClientResource; ?>],
['Waiting on maximum jobs', <?php echo $this->jobsWaitingOnMaximumJobs; ?>],
['Waiting on start time', <?php echo $this->jobsWaitingOnStartTime; ?>],
['Waiting on higher priority jobs', <?php echo $this->jobsWaitingOnHigherPriorityJobs; ?>],
['SD despooling attributes', <?php echo $this->jobsSDdespoolingAttributes; ?>],
['Doing batch insert file records', <?php echo $this->jobsBatchInsertFileRecords; ?>],
['Created not yet running', <?php echo $this->jobsCreatedNotRunning; ?>],
['Blocked', <?php echo $this->jobsBlocked; ?>]
];
var plot1 = jQuery.jqplot('chart1',[data],
{
seriesDefaults: {
renderer: jQuery.jqplot.PieRenderer,
rendererOptions: {
showDataLabels: true
}
},
legend:{
show: true,
location: 'w'
},
grid: {
drawGridLines: true
}
});
}
$(document).ready(
function(){
chart1();
}
);
</script>
<?php
$flash = $this->flashMessenger();
$flash->setMessageOpenFormat('
<div%s>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">
×
</button>
<ul><li>')
->setMessageSeparatorString('</li><li>')
->setMessageCloseString('</li></ul></div>');
echo $flash->render('error', array('alert', 'alert-dismissable', 'alert-danger'));
echo $flash->render('info', array('alert', 'alert-dismissable', 'alert-info'));
echo $flash->render('default', array('alert', 'alert-dismissable', 'alert-warning'));
echo $flash->render('success', array('alert', 'alert-dismissable', 'alert-success'));
?>
<!-- RUNNING JOBS -->
<?php if(count($this->runningJobs) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">
<span class="glyphicon glyphicon-list"></span>
<a data-toggle="collapse" href="#collapseRunning"><?php echo $this->translate('Running jobs') ?></a>
<span class="caret"></span>
</h3>
</div>
<div class="panel-body panel-collapse collapse out" id="collapseRunning">
<table class="table table-striped table-hover" style="font-size: 9pt;">
<tr>
<th>Job</th>
<th>Name</th>
<th>Client</th>
<th>Type</th>
<th>Level</th>
<th>Start</th>
<!-- <th>Duration</th> -->
<th>Status</th>
<th>Log</th>
</tr>
<?php foreach ($this->runningJobs as $item) : ?>
<tr>
<td><a href="<?php echo $this->url('job', array('action' => 'details', 'id' => $item->jobid)); ?>"><?php echo $this->escapeHtml($item->jobid); ?></a></td>
<td><?php echo $this->escapeHtml($item->jobname); ?></td>
<td><a href="<?php echo $this->url('client', array('action' => 'details', 'id' => $item->clientid)); ?>"><?php echo $this->escapeHtml($item->clientname); ?></a></td>
<td><?php echo $this->printJobType($item->type); ?></td>
<td><?php echo $this->printJobLevel($item->level); ?></td>
<td><?php echo $this->escapeHtml($item->starttime); ?></td>
<!-- <td><?php echo $this->printJobDuration($item->starttime, $item->endtime); ?></td> -->
<td><?php echo $this->printJobStatus($item->jobstatus); ?></td>
<td><a href="<?php echo $this->url('log', array('action' => 'job', 'id' => $item->jobid)); ?>"><span class="glyphicon glyphicon-file"></a></td>
</tr>
<?php endforeach; ?>
</table>
</div>
</div>
</div>
</div>
<?php elseif(count($this->runningJobs) == 0) : ?>
<div class="alert alert-dismissable alert-info">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<ul>
<li><?php echo $this->translate("Currently, there are no jobs running."); ?></li>
</ul>
</div>
<?php endif; ?>
<!-- WAITING JOBS -->
<?php if(count($this->waitingJobs) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<span class="glyphicon glyphicon-list"></span>
<a data-toggle="collapse" href="#collapseWaiting"><?php echo $this->translate('Waiting jobs') ?></a>
<span class="caret"></span>
</h3>
</div>
<div class="panel-body panel-collapse collapse out" id="collapseWaiting">
<table class="table table-striped table-hover" style="font-size: 9pt;">
<tr>
<th>Job</th>
<th>Name</th>
<th>Client</th>
<th>Type</th>
<th>Level</th>
<th>Start</th>
<!-- <th>Duration</th> -->
<th>Status</th>
<th>Log</th>
</tr>
<?php foreach ($this->waitingJobs as $item) : ?>
<tr>
<td><a href="<?php echo $this->url('job', array('action' => 'details', 'id' => $item->jobid)); ?>"><?php echo $this->escapeHtml($item->jobid); ?></a></td>
<td><?php echo $this->escapeHtml($item->jobname); ?></td>
<td><a href="<?php echo $this->url('client', array('action' => 'details', 'id' => $item->clientid)); ?>"><?php echo $this->escapeHtml($item->clientname); ?></a></td>
<td><?php echo $this->printJobType($item->type); ?></td>
<td><?php echo $this->printJobLevel($item->level); ?></td>
<td><?php echo $this->escapeHtml($item->starttime); ?></td>
<!-- <td><?php echo $this->printJobDuration($item->starttime, $item->endtime); ?></td> -->
<td><?php echo $this->printJobStatus($item->jobstatus); ?></td>
<td><a href="<?php echo $this->url('log', array('action' => 'job', 'id' => $item->jobid)); ?>"><span class="glyphicon glyphicon-file"></a></td>
</tr>
<?php endforeach; ?>
</table>
</div>
</div>
</div>
</div>
<?php elseif(count($this->waitingJobs) == 0) : ?>
<div class="alert alert-dismissable alert-info">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<ul>
<li><?php echo $this->translate("Currently, there are no jobs waiting."); ?></li>
</ul>
</div>
<?php endif; ?>
<!-- UNSUCCESSFUL JOBS -->
<?php if(count($this->lastUnsuccessfulJobs) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="panel panel-danger">
<div class="panel-heading">
<h3 class="panel-title">
<span class="glyphicon glyphicon-list"></span>
<a data-toggle="collapse" href="#collapseUnsuccessful"><?php echo $this->translate('Unsuccessful jobs (last 24 hours)') ?></a>
<span class="caret"></span>
</h3>
</div>
<div class="panel-body panel-collapse collapse out" id="collapseUnsuccessful">
<table class="table table-striped table-hover" style="font-size: 9pt;">
<tr>
<th>Job</th>
<th>Name</th>
<th>Client</th>
<th>Type</th>
<th>Level</th>
<th>Start</th>
<th>Duration</th>
<th>Status</th>
<th>Log</th>
</tr>
<?php foreach ($this->lastUnsuccessfulJobs as $jobUnsuccess) : ?>
<tr>
<td><a href="<?php echo $this->url('job', array('action' => 'details', 'id' => $jobUnsuccess->jobid)); ?>"><?php echo $this->escapeHtml($jobUnsuccess->jobid); ?></a></td>
<td><?php echo $this->escapeHtml($jobUnsuccess->jobname); ?></td>
<td><a href="<?php echo $this->url('client', array('action' => 'details', 'id' => $jobUnsuccess->clientid)); ?>"><?php echo $this->escapeHtml($jobUnsuccess->clientname); ?></a></td>
<td><?php echo $this->printJobType($jobUnsuccess->type); ?></td>
<td><?php echo $this->printJobLevel($jobUnsuccess->level); ?></td>
<td><?php echo $this->escapeHtml($jobUnsuccess->starttime); ?></td>
<td><?php echo $this->printJobDuration($jobUnsuccess->starttime, $jobUnsuccess->endtime); ?></td>
<td><?php echo $this->printJobStatus($jobUnsuccess->jobstatus); ?></td>
<td><a href="<?php echo $this->url('log', array('action' => 'job', 'id' => $jobUnsuccess->jobid)); ?>"><span class="glyphicon glyphicon-file"></a></td>
</tr>
<?php endforeach; ?>
</table>
</div>
</div>
</div>
</div>
<?php elseif(count($this->lastUnsuccessfulJobs) == 0) : ?>
<div class="alert alert-dismissable alert-info">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<ul>
<li><?php echo $this->translate("Congratulation, no unsuccessful jobs during the last 24 hours!"); ?></li>
</ul>
</div>
<?php endif; ?>
<!-- SUCCESSFUL JOBS -->
<?php if(count($this->lastSuccessfulJobs) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title">
<span class="glyphicon glyphicon-list"></span>
<a data-toggle="collapse" href="#collapseSuccessful"><?php echo $this->translate('Successful jobs (last 24 hours)') ?></a>
<span class="caret"></span>
</h3>
</div>
<div class="panel-body panel-collapse collapse out" id="collapseSuccessful">
<table class="table table-striped table-hover" style="font-size: 9pt;">
<tr>
<th>Job</th>
<th>Name</th>
<th>Client</th>
<th>Type</th>
<th>Level</th>
<th>Start</th>
<th>Duration</th>
<th>Status</th>
<th>Log</th>
</tr>
<?php foreach ($this->lastSuccessfulJobs as $jobSuccess) : ?>
<tr>
<td><a href="<?php echo $this->url('job', array('action' => 'details', 'id' => $jobSuccess->jobid)); ?>"><?php echo $this->escapeHtml($jobSuccess->jobid); ?></a></td>
<td><?php echo $this->escapeHtml($jobSuccess->jobname); ?></td>
<td><a href="<?php echo $this->url('client', array('action' => 'details', 'id' => $jobSuccess->clientid)); ?>"><?php echo $this->escapeHtml($jobSuccess->clientname); ?></a></td>
<td><?php echo $this->printJobLevel($jobSuccess->level); ?></td>
<td><?php echo $this->printJobType($jobSuccess->type); ?></td>
<td><?php echo $this->escapeHtml($jobSuccess->starttime); ?></td>
<td><?php echo $this->printJobDuration($jobSuccess->starttime, $jobSuccess->endtime); ?></td>
<td><?php echo $this->printJobStatus($jobSuccess->jobstatus); ?></td>
<td>
<a href="<?php echo $this->url('log', array('action' => 'job', 'id' => $jobSuccess->jobid)); ?>" title="<?php echo $this->translate("View logs"); ?>"><span class="glyphicon glyphicon-file"></span></a>
</td>
</tr>
<?php endforeach; ?>
</table>
</div>
</div>
</div>
</div>
<?php elseif(count($this->lastSuccessfulJobs) == 0) : ?>
<div class="alert alert-dismissable alert-info">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<ul>
<li><?php echo $this->translate("No successful jobs during the last 24 hours!"); ?></li>
</ul>
</div>
<?php endif; ?>
<!-- JOB STATISTICS -->
<div class="row">
<div class="col-md-9">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<span class="glyphicon glyphicon-stats"></span>
<a data-toggle="collapse" href="#collapseJobStats"><?php echo $this->translate('Job statistic (last 24 hours)') ?></a>
<span class="caret"></span>
</h3>
</div>
<div class="panel-body panel-collapse collapse in" id="collapseJobStats">
<div class="col-md-4">
<table class="table table-striped table-hover" style="font-size: 9pt;">
<tr><td>Running</td><td><?php echo $this->jobsRunning; ?></td></tr>
<tr><td>Completed successful</td><td><?php echo $this->jobsTerminated; ?></td></tr>
<tr><td>Terminated with errors</td><td><?php echo $this->jobsTerminatedWithErrors; ?></td></tr>
<tr><td>Non-fatal errors</td><td><?php echo $this->jobsWithNonFatalErrors; ?></td></tr>
<tr><td>Fatal errors</td><td><?php echo $this->jobsWithFatalErrors; ?></td></tr>
<tr><td>Canceled by user</td><td><?php echo $this->jobsCanceled; ?></td></tr>
<tr><td>Verify found difference</td><td><?php echo $this->jobsVerifyFoundDiff; ?></td></tr>
<tr><td>Waiting for client</td><td><?php echo $this->jobsWaitingForClient; ?></td></tr>
<tr><td>Waiting for storage daemon</td><td><?php echo $this->jobsWaitingForStorageDaemon; ?></td></tr>
<tr><td>Waiting for new media</td><td><?php echo $this->jobsWaitingForNewMedia; ?></td></tr>
<tr><td>Waiting for media mount</td><td><?php echo $this->jobsWaitingForMediaMount; ?></td></tr>
<tr><td>Waiting for storage resource</td><td><?php echo $this->jobsWaitingForStorageResource; ?></td></tr>
<tr><td>Waiting for job resource</td><td><?php echo $this->jobsWaitingForJobResource; ?></td></tr>
<tr><td>Waiting for client resource</td><td><?php echo $this->jobsWaitingForClientResource; ?></td></tr>
<tr><td>Waiting on maximum jobs</td><td><?php echo $this->jobsWaitingOnMaximumJobs; ?></td></tr>
<tr><td>Waiting on start time</td><td><?php echo $this->jobsWaitingOnStartTime; ?></td></tr>
<tr><td>Waiting on higher priority jobs</td><td><?php echo $this->jobsWaitingOnHigherPriorityJobs; ?></td></tr>
<tr><td>SD despooling attributes</td><td><?php echo $this->jobsSDdespoolingAttributes; ?></td></tr>
<tr><td>Doing batch insert file records</td><td><?php echo $this->jobsBatchInsertFileRecords; ?></td></tr>
<tr><td>Created not yet running</td><td><?php echo $this->jobsCreatedNotRunning; ?></td></tr>
<tr><td>Blocked</td><td><?php echo $this->jobsBlocked; ?></td></tr>
</table>
</div>
<div class="col-md-5">
<div id="chart1" style="width:500px; height:500px;"></div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<span class="glyphicon glyphicon-stats"></span>
<?php echo $this->translate('Catalog statistic') ?>
</h3>
</div>
<div class="panel-body">
<table class="table table-striped table-hover" style="font-size: 9pt;">
<tr><td>Total clients</td><td><span class="badge"><?php echo $this->clientNum; ?></span></td></tr>
<tr><td>Total filesets</td><td><span class="badge"><?php echo $this->filesetNum; ?></span></td></tr>
<tr><td>Total pools</td><td><span class="badge"><?php echo $this->poolNum; ?></span></td></tr>
<tr><td>Total volumes</td><td><span class="badge"><?php echo $this->volumeNum; ?></span></td></tr>
<tr><td>Total jobs</td><td><span class="badge"><?php echo $this->jobNum; ?></span></td></tr>
<tr><td>Total files</td><td><span class="badge"><?php echo $this->fileNum; ?></span></td></tr>
<tr><td>Total logs</td><td><span class="badge"><?php echo $this->logNum; ?></span></td></tr>
</table>
</div>
</div>
</div>
</div>