HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
view.php
Go to the documentation of this file.
1 <?php
11 $this->pageTitle = $activePanel->getName() . ' - Yii Debugger';
12 ?>
13 <div class="default-view">
14  <?php $this->renderPartial('_toolbar', array('panels' => $panels)); ?>
15  <div class="container-fluid">
16  <div class="row-fluid">
17  <div class="span2">
18  <ul class="nav nav-pills nav-stacked">
19  <?php
20  foreach ($panels as $id => $panel) {
21  $link = CHtml::link(CHtml::encode($panel->getName()), array('view', 'tag' => $tag, 'panel' => $id));
22  echo CHtml::tag('li', array('class' => $panel === $activePanel ? 'active' : null), $link);
23  }
24  ?>
25  </ul>
26  </div><!--/span-->
27  <div class="span10">
28  <div class="callout alert alert-info">
29  <div class="btn-group">
30  <?php echo CHtml::link('All', array('index'), array('class' => 'btn')); ?>
31  <?php echo CHtml::link('Latest', array('view', 'panel' => $activePanel->id), array('class' => 'btn')); ?>
32  <button class="btn dropdown-toggle" data-toggle="dropdown">
33  Last 10
34  <span class="caret"></span>
35  </button>
36  <ul class="dropdown-menu">
37  <?php
38  $count = 0;
39  foreach ($manifest as $meta) {
40  $label = $meta['method'] . ' ' . urldecode($meta['url']) . ($meta['ajax'] ? ' (AJAX)' : '')
41  . ', ' . date('Y-m-d h:i:s', $meta['time'])
42  . ', ' . $meta['ip'];
43  $url = array('view', 'tag' => $meta['tag'], 'panel' => $activePanel->id);
44  if ($meta['tag'] == $tag && $count > 0) {
45  echo '<li class="divider"></li>';
46  }
47  echo '<li>';
48  echo CHtml::link(CHtml::encode($label), $url);
49  echo '</li>';
50  if (++$count >= 10) {
51  break;
52  }
53  if ($meta['tag'] == $tag) {
54  echo '<li class="divider"></li>';
55  }
56  }
57  ?>
58  </ul>
59  </div>
60  <?php echo CHtml::link(
61  '<i class="icon-star' . (!$this->owner->getLock($tag) ? '-empty' : '') . '"></i>',
62  array('lock', 'tag' => $tag),
63  array(
64  'class' => 'lock btn' . ($this->owner->getLock($tag) ? ' active' : ''),
65  'data-toggle' => 'button',
66  'title' => 'Lock or unlock of deleting',
67  )
68  ); ?>
69  <?php echo $summary['method']; ?>
70  <?php echo CHtml::link(CHtml::encode(urldecode($summary['url'])), $summary['url']); ?>
71  <?php echo $summary['ajax'] ? ' (AJAX)' : ''; ?>
72  at <?php echo date('Y-m-d h:i:s', $summary['time']); ?>
73  by <?php echo $summary['ip']; ?>
74  </div>
75  <?php echo $activePanel->getDetail(); ?>
76  </div>
77  </div>
78  </div>
79 </div>
80 <?php
81 Yii::app()->clientScript->registerScript(__CLASS__ . '#view', <<<JS
82  $('a.lock').tooltip().click(function(e){
83  e.preventDefault();
84  var el = $(this);
85  $.get(el.attr('href'), function(data){
86  if (data) {
87  $(el).addClass('active').children('i').addClass('icon-star').removeClass('icon-star-empty');
88  } else {
89  $(el).removeClass('active').children('i').addClass('icon-star-empty').removeClass('icon-star');
90  }
91  });
92  });
93 JS
94 );
95 ?>