HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
index.php
Go to the documentation of this file.
1 <?php
7 $this->pageTitle = 'Available Debug Data - Yii Debugger';
8 ?>
9 <div class="default-index">
10  <div class="navbar">
11  <div class="navbar-inner">
12  <div class="container">
13  <div class="yii2-debug-toolbar-block title">
14  Yii Debugger
15  </div>
16  </div>
17  </div>
18  </div>
19 
20  <div class="container-fluid">
21  <div class="row-fluid">
22  <h1>Available Debug Data</h1>
23  <table class="table table-condensed table-bordered table-striped table-hover table-filtered" style="table-layout: fixed;">
24  <thead>
25  <tr>
26  <th style="width:20px;text-align:center;"><i class="icon-star"></i></th>
27  <th style="width: 160px;">Time</th>
28  <th style="width: 120px;">IP</th>
29  <th style="width: 60px;">Method</th>
30  <th style="width: 40px;">Code</th>
31  <th>URL</th>
32  </tr>
33  </thead>
34  <tbody>
35  <?php foreach ($manifest as $tag => $data): ?>
36  <tr>
37  <td style="text-align:center;">
38  <?php echo CHtml::link(
39  '<i class="icon-star' . (!$this->owner->getLock($tag) ? '-empty' : '') . '"></i>',
40  array('lock', 'tag' => $tag),
41  array(
42  'class' => 'lock' . ($this->owner->getLock($tag) ? ' active' : ''),
43  'title' => 'Lock or unlock of deleting',
44  )
45  ); ?>
46  </td>
47  <td><?php echo CHtml::link(date('Y-m-d h:i:s', $data['time']), array('view', 'tag' => $tag, 'panel' => 'request')); ?></td>
48  <td><?php echo $data['ip']; ?></td>
49  <td><?php echo $data['method']; ?></td>
50  <td style="text-align:center;"><?php echo isset($data['code']) ? Yii2RequestPanel::getStatusCodeHtml($data['code']) : ''; ?></td>
51  <td style="word-break:break-all;">
52  <?php echo CHtml::encode(urldecode($data['url'])); ?>
53  <?php echo CHtml::link('<i class="icon-share"></i>', $data['url'], array('class' => 'share', 'target' => 'blank')); ?>
54  </td>
55  </tr>
56  <?php endforeach; ?>
57  </tbody>
58  </table>
59  </div>
60  </div>
61 </div>
62 <?php
63 Yii::app()->clientScript->registerScript(__CLASS__ . '#index', <<<JS
64  $('a.lock').tooltip().click(function(e){
65  e.preventDefault();
66  var el = $(this);
67  $.get(el.attr('href'), function(data){
68  if (data) {
69  $(el).addClass('active').children('i').addClass('icon-star').removeClass('icon-star-empty');
70  } else {
71  $(el).removeClass('active').children('i').addClass('icon-star-empty').removeClass('icon-star');
72  }
73  });
74  });
75 JS
76 );
77 Yii::app()->clientScript->registerCss(__CLASS__ . '#view', <<<CSS
78  a.lock {opacity: 0.5;}
79  a.lock.active, a.lock:hover {opacity: 1;}
80  a.share {display:none}
81  td:hover a.share {display:inline;opacity:0.7;}
82  td:hover a.share:hover {opacity:1;}
83 CSS
84 );
85 ?>