HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
admin.php
Go to the documentation of this file.
1 <?php
2 /* @var $this JobsController */
3 /* @var $model Jobs */
4 
5 $this->breadcrumbs = array(
6  'Jobs' => array('index'),
7  'Manage',
8 );
9 
10 $this->menu = array(
11  array('label' => 'List Jobs', 'url' => array('index')),
12 );
13 
14 Yii::app()->clientScript->registerScript('search', "
15 $('.search-button').click(function(){
16  $('.search-form').toggle();
17  return false;
18 });
19 $('.search-form form').submit(function(){
20  $('#jobs-grid').yiiGridView('update', {
21  data: $(this).serialize()
22  });
23  return false;
24 });
25 ");
26 ?>
27 
28 <h1>Manage Jobs</h1>
29 
30 <p>
31 You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
32 or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
33 </p>
34 
35 <?php echo CHtml::link('Advanced Search', '#', array('class' => 'search-button')); ?>
36 <div class="search-form" style="display:none">
37 <?php $this->renderPartial('_search', array(
38  'model' => $model,
39 )); ?>
40 </div><!-- search-form -->
41 
42 <?php $this->widget('zii.widgets.grid.CGridView', array(
43  'id' => 'jobs-grid',
44  'dataProvider' => $model->search(),
45  'filter' => $model,
46  'columns' => array(
47  'id',
48  'job_class',
49  'job_data',
50  'crontab',
51  array(
52  'name' => 'job_status_id',
53  'value' => 'JobStatus::getStatusName($data["job_status_id"])',
54  ),
55  'create_time',
56  'planned_time',
57  'start_time',
58  'finish_time',
59  array(
60  'class' => 'CButtonColumn',
61  'template' => '{View}',
62  'htmlOptions' => array('class' => 'bttn-clmn'),
63  'buttons' => array(
64  'View' => array(
65  'label' => 'log',
66  'url' => 'Yii::app()->createUrl("job/jobsLogs/admin?JobsLogs[job_id]=$data[id]")',
67  'options' => array('class' => 'act-btn'),
68  ),
69  ),
70  ),
71  array(
72  'class' => 'CButtonColumn',
73  ),
74  ),
75 )); ?>