/[cvs]/nfo/php/libs/org.netfrag.app/YAA/JobList.php
ViewVC logotype

Contents of /nfo/php/libs/org.netfrag.app/YAA/JobList.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations)
Tue May 13 15:12:34 2003 UTC (21 years, 2 months ago) by joko
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +12 -7 lines
modified parameters required for job filtering

1 <?
2 /*
3 ## -------------------------------------------------------------------------
4 ## $Id: JobList.php,v 1.2 2003/04/18 14:06:22 joko Exp $
5 ## -------------------------------------------------------------------------
6 ## $Log: JobList.php,v $
7 ## Revision 1.2 2003/04/18 14:06:22 joko
8 ## minor fix: url api has been update
9 ##
10 ## Revision 1.1 2003/02/22 16:19:08 joko
11 ## YAA - Yet Another Admin
12 ## + initial commit
13 ##
14 ## -------------------------------------------------------------------------
15 */
16
17
18 // ----------------------------------------------------------
19 // View/List/Simple: job overview / selection area
20
21 class YAA_JobList extends InfoTable {
22
23 var $jobs;
24 var $backend;
25 var $lift;
26
27 function YAA_JobList($args) {
28 //print Dumper($args);
29 $this->options = $args;
30 $this->backend = new TsBackend();
31 //$this->lift = new Data_Lift( array( metatype => 'job' ) );
32 $this->lift = mkObject('Data::Lift', undef, array( metatype => 'job' ) );
33 return $this->_perform();
34 }
35
36 function _perform() {
37
38 // frontend
39 $this->set_title('Job List');
40 $this->set_cellpadding(10);
41
42 // fetch list of jobs (including some metadata) from backend
43 $this->jobs = $this->backend->getTaskList($this->options);
44
45
46 if (is_array($this->jobs[target])) {
47
48 // trace
49 //print Dumper($this->jobs);
50 //exit;
51
52 foreach($this->jobs[target] as $key => $job) {
53
54 //$task_data = task2metadata($value);
55 $this->lift->set($job);
56 $this->lift->to('html');
57 $this->lift->add(array( name => $key ) );
58
59 $out = $this->lift->get();
60
61 $controlbox = new VerticalCSSNavTable('Actions:');
62 $controlbox->add( url::query( array( ap => "pcontrol", action => 'status', job => $out[name] )), 'status' );
63 $controlbox->add( url::query( array( ap => "pcontrol", action => 'run', job => $out[name] )), 'run' );
64
65 $this->add_row(
66 //rLink( array( action => 'run', job => $out[name] )),
67 //rAnchor("info", array( ap => 'pcontrol', job => $out[name], action => 'info' )),
68 $controlbox,
69 //substr($description, 0, 100) . "...",
70 //html_pre($description),
71 //substr(str_replace("\n", "<br/>", $description), 0, strlen($description) * 4/5) . " ...",
72 container(html_b($out[name]), html_br(), html_br(), html_b('description:'), html_br(), $out[description], html_br(), $out[steps])
73 //html_img("img/quest.gif", '', '', '', $out[description])
74 );
75 }
76
77 } else {
78 $this->add("Diese Anfrage f&uuml;hrte zu keinem Ergebnis.<br/> Bitte w&auml;hlen Sie in der Liste links eine andere Job-Kategorie aus.<br/>");
79
80 }
81
82 }
83
84 }
85
86
87 ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed