/[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.2 - (show annotations)
Fri Apr 18 14:06:22 2003 UTC (21 years, 4 months ago) by joko
Branch: MAIN
Changes since 1.1: +8 -4 lines
minor fix: url api has been update

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

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