From 9848b90bd9eddf0324ffdc0d8f089c6c24683fe8 Mon Sep 17 00:00:00 2001 From: artem Date: Fri, 22 Feb 2008 15:28:41 +0000 Subject: - [DEV-118] added dashboard screen to monitoring (Artem) - [ZBX-206] merged rev.5367:5370 of 1.4/ (Artem) [fixed case sensitive hosts sorting] - [DEV-119] changes how users online are counted (Artem) - implemented patch [added y axis calculation type: "Calculated [Min=0]"] (Artem) - changes in schema.sql (Artem) - fixed JS lib, url class (Artem) - some other small fixes (Artem) git-svn-id: svn://svn.zabbix.com/trunk@5387 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/html.inc.php | 42 +++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'frontends/php/include/html.inc.php') diff --git a/frontends/php/include/html.inc.php b/frontends/php/include/html.inc.php index 719ce7de..6946ecd4 100644 --- a/frontends/php/include/html.inc.php +++ b/frontends/php/include/html.inc.php @@ -106,4 +106,44 @@ function BR(){ return new CTag('br','no'); } -?> + + function create_hat($caption,$items,$addicons=null,$id=null,$state=1){ + + if(is_null($id)){ + list($usec, $sec) = explode(' ',microtime()); + $id = 'hat_'.((int)($sec % 10)).((int)($usec * 1000)); + } + + $td_l = new CCol(SPACE); + $td_l->AddOption('width','100%'); + + $icons_row = array($td_l); + if(!is_null($addicons)){ + if(!is_array($addicons)) $addicons = array($addicons); + foreach($addicons as $value) $icons_row[] = $value; + } + + $icon = new CDiv(SPACE,($state)?'arrowup':'arrowdown'); + $icon->AddAction('onclick',new CScript("javascript: change_hat_state(this,'".$id."');")); + + $icons_row[] = $icon; + + $icon_tab = new CTable(); + $icon_tab->AddOption('width','100%'); + + $icon_tab->AddRow($icons_row); + + $table = new CTable(); + $table->AddOption('width','100%'); + $table->SetCellPadding(0); + $table->SetCellSpacing(0); + $table->AddRow(get_table_header($caption,$icon_tab)); + + $div = new CDiv($items); + $div->AddOption('id',$id); + if(!$state) $div->AddOption('style','display: none;'); + + $table->AddRow($div); + return $table; + } +?> \ No newline at end of file -- cgit