4 |
## $Id$ |
## $Id$ |
5 |
## ------------------------------------------------------------------------- |
## ------------------------------------------------------------------------- |
6 |
## $Log$ |
## $Log$ |
7 |
|
## Revision 1.3 2003/05/13 15:12:34 joko |
8 |
|
## modified parameters required for job filtering |
9 |
|
## |
10 |
|
## Revision 1.2 2003/04/18 14:06:22 joko |
11 |
|
## minor fix: url api has been update |
12 |
|
## |
13 |
## Revision 1.1 2003/02/22 16:19:08 joko |
## Revision 1.1 2003/02/22 16:19:08 joko |
14 |
## YAA - Yet Another Admin |
## YAA - Yet Another Admin |
15 |
## + initial commit |
## + initial commit |
27 |
var $backend; |
var $backend; |
28 |
var $lift; |
var $lift; |
29 |
|
|
30 |
function YAA_JobList($filter) { |
function YAA_JobList($args) { |
31 |
|
//print Dumper($args); |
32 |
|
$this->options = $args; |
33 |
$this->backend = new TsBackend(); |
$this->backend = new TsBackend(); |
34 |
//$this->lift = new Data_Lift( array( metatype => 'job' ) ); |
//$this->lift = new Data_Lift( array( metatype => 'job' ) ); |
35 |
$this->lift = mkObject('Data::Lift', undef, array( metatype => 'job' ) ); |
$this->lift = mkObject('Data::Lift', undef, array( metatype => 'job' ) ); |
36 |
return $this->_do($filter); |
return $this->_perform(); |
37 |
} |
} |
38 |
|
|
39 |
function _do($filter) { |
function _perform() { |
40 |
|
|
41 |
// frontend |
// frontend |
42 |
$this->set_title('Job List'); |
$this->set_title('Job List'); |
43 |
$this->set_cellpadding(10); |
$this->set_cellpadding(10); |
44 |
|
|
45 |
// fetch list of jobs (including some metadata) from backend |
// fetch list of jobs (including some metadata) from backend |
46 |
$this->jobs = $this->backend->getTaskList($filter); |
$this->jobs = $this->backend->getTaskList($this->options); |
47 |
|
|
48 |
|
|
49 |
if (is_array($this->jobs[target])) { |
if (is_array($this->jobs[target])) { |
62 |
$out = $this->lift->get(); |
$out = $this->lift->get(); |
63 |
|
|
64 |
$controlbox = new VerticalCSSNavTable('Actions:'); |
$controlbox = new VerticalCSSNavTable('Actions:'); |
65 |
$controlbox->add( httpQuery( array( action => 'status', job => $out[name] )), 'status' ); |
$controlbox->add( url::query( array( ap => "pcontrol", action => 'status', job => $out[name] )), 'status' ); |
66 |
$controlbox->add( httpQuery( array( action => 'run', job => $out[name] )), 'run' ); |
$controlbox->add( url::query( array( ap => "pcontrol", action => 'run', job => $out[name] )), 'run' ); |
67 |
|
|
68 |
$this->add_row( |
$this->add_row( |
69 |
//rLink( array( action => 'run', job => $out[name] )), |
//rLink( array( action => 'run', job => $out[name] )), |