diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-01-02 11:29:33 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-01-02 11:29:33 +0000 |
| commit | 1bd57f97f90f26c13bb37cb6c669f444d80db01b (patch) | |
| tree | 6d574241cd286410794707afc72983f2fcbfedc2 /frontends/php/queue.php | |
| parent | cc9d50233d69f1a4c85e9ea925dc7e732bad44b3 (diff) | |
| download | zabbix-1bd57f97f90f26c13bb37cb6c669f444d80db01b.tar.gz zabbix-1bd57f97f90f26c13bb37cb6c669f444d80db01b.tar.xz zabbix-1bd57f97f90f26c13bb37cb6c669f444d80db01b.zip | |
Using new class cTable for queue.php (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@2474 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/queue.php')
| -rw-r--r-- | frontends/php/queue.php | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/frontends/php/queue.php b/frontends/php/queue.php index 62c654f6..dc9a1df2 100644 --- a/frontends/php/queue.php +++ b/frontends/php/queue.php @@ -59,7 +59,8 @@ $now=time(); $result=DBselect("select i.itemid, i.nextcheck, i.description, h.host,h.hostid from items i,hosts h where i.status=0 and i.type not in (2) and ((h.status=".HOST_STATUS_MONITORED." and h.available!=".HOST_AVAILABLE_FALSE.") or (h.status=".HOST_STATUS_MONITORED." and h.available=".HOST_AVAILABLE_FALSE." and h.disable_until<=$now)) and i.hostid=h.hostid and i.nextcheck<$now and i.key_ not in ('status','icmpping','icmppingsec','zabbix[log]') order by i.nextcheck"); - table_begin(); + $table=new Ctable(S_THE_QUEUE_IS_EMPTY); + if($_REQUEST["show"]==0) { $sec_5=0; @@ -83,23 +84,23 @@ } $col=0; - table_header(array(S_DELAY,S_COUNT)); + $table->setHeader(array(S_DELAY,S_COUNT)); $elements=array(S_5_SECONDS,$sec_5); - table_row($elements,$col++); + $table->addRow($elements); $elements=array(S_10_SECONDS,$sec_10); - table_row($elements,$col++); + $table->addRow($elements); $elements=array(S_30_SECONDS,$sec_30); - table_row($elements,$col++); + $table->addRow($elements); $elements=array(S_1_MINUTE,$sec_60); - table_row($elements,$col++); + $table->addRow($elements); $elements=array(S_5_MINUTES,$sec_300); - table_row($elements,$col++); + $table->addRow($elements); $elements=array(S_MORE_THAN_5_MINUTES,$sec_rest); - table_row($elements,$col++); + $table->addRow($elements); } else { - table_header(array(S_NEXT_CHECK,S_HOST,S_DESCRIPTION)); + $table->setHeader(array(S_NEXT_CHECK,S_HOST,S_DESCRIPTION)); $col=0; while($row=DBfetch($result)) { @@ -108,14 +109,12 @@ continue; } $elements=array(date("m.d.Y H:i:s",$row["nextcheck"]),$row["host"],$row["description"]); - table_row($elements,$col++); + $col++; + $table->addRow($elements); } - iif_echo(DBnum_rows($result)==0, - "<TR BGCOLOR=#EEEEEE><TD COLSPAN=3 ALIGN=CENTER>".S_THE_QUEUE_IS_EMPTY."</TD><TR>", - ""); } - table_end(); + $table->show(); ?> <?php show_table_header(S_TOTAL.":$col"); |
