mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-03 20:09:27 +01:00
uses the new html....
This commit is contained in:
parent
532726692c
commit
a24a7639a7
@ -33,6 +33,10 @@
|
|||||||
$this->t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
|
$this->t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
|
||||||
$this->lastid = "";
|
$this->lastid = "";
|
||||||
$this->editmode = false;
|
$this->editmode = false;
|
||||||
|
// nextmatchs
|
||||||
|
$this->start = 0;
|
||||||
|
$this->nextmatchs = CreateObject('phpgwapi.nextmatchs');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Handle the Edit Table Button
|
// Handle the Edit Table Button
|
||||||
@ -124,24 +128,40 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // Values already filled...
|
} // Values already filled...
|
||||||
|
reset($this->fields_inc);
|
||||||
|
while(list($cno,$cname)=each($this->fields_inc))
|
||||||
|
{
|
||||||
|
$this->column[$cname]=$cno;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function list_log()
|
function list_log()
|
||||||
{
|
{
|
||||||
global $phpgw, $phpgw_info;
|
global $phpgw, $phpgw_info;
|
||||||
/*
|
/*
|
||||||
|
$phpgw->log->write('I-TestWrite, write: %1','This message should appear in log');
|
||||||
$phpgw->log->message('I-TestMsg, msg: %1','This message should appear in log');
|
$phpgw->log->message('I-TestMsg, msg: %1','This message should appear in log');
|
||||||
$phpgw->log->error('I-TestInfo, info: %1','This Informational should not be in log');
|
$phpgw->log->error('I-TestInfo, info: %1','This Informational should not be in log');
|
||||||
$phpgw->log->clearstack();
|
$phpgw->log->clearstack();
|
||||||
$phpgw->log->error('I-TestInfo, info: %1','This Informational should be in log');
|
$phpgw->log->error('I-TestInfo, info: %1','This Informational should be in log');
|
||||||
$phpgw->log->error('W-TestWarn, warn: %1','This is a test Warning');
|
$phpgw->log->error('W-TestWarn, warn: %1','This is a test Warning');
|
||||||
$phpgw->log->error('E-TestError, err: %1','This is a test Error');
|
$phpgw->log->error('E-TestError, err: %1','This is a test Error');
|
||||||
$phpgw->log->error('F-Abend, abort: %1','Force abnormal termination');
|
//$phpgw->log->error('F-Abend, abort: %1','Force abnormal termination');
|
||||||
$phpgw->log->commit(); // commit error stack to log...
|
$phpgw->log->commit(); // commit error stack to log...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$this->t->set_file(array('log_list_t' => 'log.tpl'));
|
$this->t->set_file(array('log_list_t' => 'log.tpl'));
|
||||||
|
/*
|
||||||
|
// --------------------------------- nextmatch ---------------------------
|
||||||
|
|
||||||
|
$left = $this->nextmatchs->left('/admin/log.php',$this->start,$this->this->total_records,'&menuaction=admin.uilog.list_log');
|
||||||
|
$right = $this->nextmatchs->right('/admin/log.php',$this->start,$this->this->total_records,'&menuaction=admin.uilog.list_log');
|
||||||
|
$this->t->set_var('left',$left);
|
||||||
|
$this->t->set_var('right',$right);
|
||||||
|
|
||||||
|
$this->t->set_var('search_log',$this->nextmatchs->show_hits($this->bolog->total_records,$this->start));
|
||||||
|
|
||||||
|
// -------------------------- end nextmatch ------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
// Get list of Possible Columns
|
// Get list of Possible Columns
|
||||||
$header = $this->bolog->get_error_cols_e();
|
$header = $this->bolog->get_error_cols_e();
|
||||||
@ -185,9 +205,14 @@ $phpgw->log->commit(); // commit error stack to log...
|
|||||||
$header['log_msg_code']['title'] = 'Code';
|
$header['log_msg_code']['title'] = 'Code';
|
||||||
$header['log_msg_text']['title'] = 'Error Msg';
|
$header['log_msg_text']['title'] = 'Error Msg';
|
||||||
|
|
||||||
|
// Set up Grouping, Suppression...
|
||||||
|
$header['_groupby']=array('log_id'=>1);
|
||||||
|
$header['_supres']=array('log_id'=>1,'log_severity'=>1,'log_date_e'=>1,'log_app'=>1,'log_full_name'=>1);
|
||||||
|
|
||||||
|
|
||||||
// Hack Get All Rows
|
// Hack Get All Rows
|
||||||
$rows = $this->bolog->get_error_e(array('orderby'=>array('log_id','log_msg_log_id')));
|
$rows = $this->bolog->get_error_e(array('orderby'=>array('log_id','log_msg_log_id')));
|
||||||
|
$norows = count($rows);
|
||||||
$header['_edittable']=$this->editmode;
|
$header['_edittable']=$this->editmode;
|
||||||
$table = $this->html->hash_table($rows,$header,$this, 'format_row');
|
$table = $this->html->hash_table($rows,$header,$this, 'format_row');
|
||||||
$this->t->set_var('event_list',$table);
|
$this->t->set_var('event_list',$table);
|
||||||
@ -198,32 +223,17 @@ $phpgw->log->commit(); // commit error stack to log...
|
|||||||
|
|
||||||
function format_row($rno, $row)
|
function format_row($rno, $row)
|
||||||
{
|
{
|
||||||
if ($rno == 0)
|
|
||||||
|
switch($row[$this->column['log_severity']]['value'])
|
||||||
{
|
{
|
||||||
$this->lastid = '';
|
|
||||||
}
|
case 'I': $row[$this->column['log_severity']]['bgcolor'] = 'C0FFC0'; break;
|
||||||
|
case 'W': $row[$this->column['log_severity']]['bgcolor'] = 'FFFFC0'; break;
|
||||||
if ($this->lastid != $row['log_id'])
|
case 'E': $row[$this->column['log_severity']]['bgcolor'] = 'FFC0C0'; break;
|
||||||
{
|
case 'F': $row[$this->column['log_severity']]['bgcolor'] = 'FF0909'; break;
|
||||||
$this->lastid = $row['log_id'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$row['log_id'] = '  ';
|
|
||||||
$row['log_severity'] = '  ';
|
|
||||||
$row['log_date_e'] = '  ';
|
|
||||||
$row['log_app'] = '  ';
|
|
||||||
$row['log_full_name'] = '  ';
|
|
||||||
}
|
|
||||||
switch($row['log_severity'])
|
|
||||||
{
|
|
||||||
case 'I': $lcolor = 'C0FFC0'; break;
|
|
||||||
case 'W': $lcolor = 'FFFFC0'; break;
|
|
||||||
case 'E': $lcolor = 'FFC0C0'; break;
|
|
||||||
case 'F': $lcolor = 'FF0909'; break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch($row['log_msg_severity'])
|
switch($row[$this->column['log_msg_severity']]['value'])
|
||||||
{
|
{
|
||||||
case 'I': $color = 'C0FFC0'; break;
|
case 'I': $color = 'C0FFC0'; break;
|
||||||
case 'W': $color = 'FFFFC0'; break;
|
case 'W': $color = 'FFFFC0'; break;
|
||||||
@ -231,25 +241,16 @@ $phpgw->log->commit(); // commit error stack to log...
|
|||||||
case 'F': $color = 'FF0909'; break;
|
case 'F': $color = 'FF0909'; break;
|
||||||
}
|
}
|
||||||
reset($this->fields_inc);
|
reset($this->fields_inc);
|
||||||
while(list(,$fld) = each($this->fields_inc))
|
while(list($cno,$fld) = each($this->fields_inc))
|
||||||
{
|
{
|
||||||
if (substr($fld,0,7) == 'log_msg')
|
if (substr($fld,0,7) == 'log_msg')
|
||||||
{
|
{
|
||||||
$c = $color;
|
$row[$cno]['bgcolor'] = $color;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($fld == 'log_severity' && $row['log_severity'] != '  ')
|
// $row[$cno]['bgcolor'] = $lcolor;
|
||||||
{
|
}
|
||||||
$c = $lcolor;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$c = "FFFFFF";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
$parms = 'bgcolor="' . $c . '"';
|
|
||||||
$row['_'.$fld] = $parms;
|
|
||||||
}
|
}
|
||||||
return $row;
|
return $row;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user