diff options
author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-04-30 09:03:14 +0000 |
---|---|---|
committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-04-30 09:03:14 +0000 |
commit | b9c0d1a9d017ae94759f0058466912fdfcac67b0 (patch) | |
tree | 42032a1dd8f88ecf411afa84bca645a385dd60b2 /frontends/php | |
parent | 2c6082db6dbd05718b8535a182350505ce1dde36 (diff) | |
download | zabbix-b9c0d1a9d017ae94759f0058466912fdfcac67b0.tar.gz zabbix-b9c0d1a9d017ae94759f0058466912fdfcac67b0.tar.xz zabbix-b9c0d1a9d017ae94759f0058466912fdfcac67b0.zip |
- [DEV-157] added fullscreen icon to monitoring screens (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5674 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php')
-rw-r--r-- | frontends/php/charts.php | 29 | ||||
-rw-r--r-- | frontends/php/dashboard.php | 20 | ||||
-rw-r--r-- | frontends/php/discovery.php | 19 | ||||
-rw-r--r-- | frontends/php/events.php | 66 | ||||
-rw-r--r-- | frontends/php/httpdetails.php | 37 | ||||
-rw-r--r-- | frontends/php/images/general/bttn/fullscreen.png | bin | 0 -> 3432 bytes | |||
-rw-r--r-- | frontends/php/images/general/bttn/fullscreen_bb.png | bin | 0 -> 1244 bytes | |||
-rw-r--r-- | frontends/php/images/general/bttn/help.png | bin | 0 -> 3353 bytes | |||
-rw-r--r-- | frontends/php/images/general/bttn/help_bb.png | bin | 0 -> 1258 bytes | |||
-rw-r--r-- | frontends/php/include/classes/chelp.inc.php | 14 | ||||
-rw-r--r-- | frontends/php/include/locales/en_gb.inc.php | 2 | ||||
-rw-r--r-- | frontends/php/include/page_header.php | 2 | ||||
-rw-r--r-- | frontends/php/latest.php | 30 | ||||
-rw-r--r-- | frontends/php/maps.php | 33 | ||||
-rw-r--r-- | frontends/php/overview.php | 32 | ||||
-rw-r--r-- | frontends/php/screens.php | 20 | ||||
-rw-r--r-- | frontends/php/srv_status.php | 21 | ||||
-rw-r--r-- | frontends/php/styles/css_bb.css | 8 | ||||
-rw-r--r-- | frontends/php/styles/div.css | 22 | ||||
-rw-r--r-- | frontends/php/tr_status.php | 75 |
20 files changed, 280 insertions, 150 deletions
diff --git a/frontends/php/charts.php b/frontends/php/charts.php index 10e7b8ec..067cd805 100644 --- a/frontends/php/charts.php +++ b/frontends/php/charts.php @@ -29,11 +29,6 @@ $page['scripts'] = array('gmenu.js','scrollbar.js','sbox.js','sbinit.js'); $page['type'] = detect_page_type(PAGE_TYPE_HTML); -?> -<?php - if(isset($_REQUEST['fullscreen'])){ - define('ZBX_PAGE_NO_MENU', 1); - } if(isset($_REQUEST['graphid']) && ($_REQUEST['graphid'] > 0) && (PAGE_TYPE_HTML == $page['type'])){ define('ZBX_PAGE_DO_REFRESH', 1); @@ -41,8 +36,6 @@ include_once 'include/page_header.php'; -?> -<?php // VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION $fields=array( 'groupid'=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID,NULL), @@ -53,7 +46,7 @@ include_once 'include/page_header.php'; 'stime'=> array(T_ZBX_STR, O_OPT, P_SYS, NULL,NULL), 'action'=> array(T_ZBX_STR, O_OPT, P_SYS, IN("'go','add','remove'"),NULL), 'reset'=> array(T_ZBX_STR, O_OPT, P_SYS, IN("'reset'"),NULL), - 'fullscreen'=> array(T_ZBX_INT, O_OPT, P_SYS, IN("1"),NULL), + 'fullscreen'=> array(T_ZBX_INT, O_OPT, P_SYS, IN('0,1'),NULL), //ajax 'favobj'=> array(T_ZBX_STR, O_OPT, P_ACT, NULL, NULL), @@ -123,15 +116,13 @@ include_once 'include/page_header.php'; if(!DBfetch($result)) $_REQUEST['graphid'] = 0; } -?> -<?php + if(($_REQUEST['graphid']>0) && ($_REQUEST['period'] >= ZBX_MIN_PERIOD)){ update_profile('web.graph['.$_REQUEST['graphid'].'].period',$_REQUEST['period']); } update_profile('web.charts.graphid',$_REQUEST['graphid']); -?> -<?php + $h1 = array(S_GRAPHS_BIG.SPACE."/".SPACE); $available_groups = get_accessible_groups_by_user($USER_DETAILS,PERM_READ_LIST); @@ -144,7 +135,7 @@ include_once 'include/page_header.php'; update_profile('web.charts.graphid',0); access_deny(); } - array_push($h1, new CLink($row['name'], '?graphid='.$_REQUEST['graphid'].(isset($_REQUEST['fullscreen']) ? '' : '&fullscreen=1'))); + array_push($h1, $row['name']); } else{ $_REQUEST['graphid'] = 0; @@ -153,8 +144,8 @@ include_once 'include/page_header.php'; $r_form = new CForm(); $r_form->SetMethod('get'); - if(isset($_REQUEST['fullscreen'])) - $r_form->AddVar('fullscreen', 1); + + $r_form->AddVar('fullscreen', $_REQUEST['fullscreen']); $cmbGroup = new CComboBox('groupid',$_REQUEST['groupid'],'submit()'); $cmbHosts = new CComboBox('hostid',$_REQUEST['hostid'],'submit()'); @@ -306,9 +297,15 @@ include_once 'include/page_header.php'; $icon->AddAction('onclick',new CScript("javascript: add2favorites('graphid','".$_REQUEST['graphid']."');")); } $icon->AddOption('id','addrm_fav'); + + $url = '?graphid='.$_REQUEST['graphid'].($_REQUEST['fullscreen']?'':'&fullscreen=1'); + + $fs_icon = new CDiv(SPACE,'fullscreen'); + $fs_icon->AddOption('title',$_REQUEST['fullscreen']?S_NORMAL.' '.S_VIEW:S_FULLSCREEN); + $fs_icon->AddAction('onclick',new CScript("javascript: document.location = '".$url."';")); $icon_tab = new CTable(); - $icon_tab->AddRow(array($icon,SPACE,$h1)); + $icon_tab->AddRow(array($fs_icon,$icon,SPACE,$h1)); $h1 = $icon_tab; } diff --git a/frontends/php/dashboard.php b/frontends/php/dashboard.php index f99848d5..53258258 100644 --- a/frontends/php/dashboard.php +++ b/frontends/php/dashboard.php @@ -44,6 +44,7 @@ include_once "include/page_header.php"; 'output'=> array(T_ZBX_STR, O_OPT, P_ACT, NULL, NULL), 'jsscriptid'=> array(T_ZBX_STR, O_OPT, P_ACT, NULL, NULL), + 'fullscreen'=> array(T_ZBX_INT, O_OPT, P_SYS, IN('0,1'), NULL), //ajax 'favobj'=> array(T_ZBX_STR, O_OPT, P_ACT, NULL, NULL), @@ -188,7 +189,24 @@ include_once "include/page_header.php"; // validate_group(PERM_READ_ONLY,array("allow_all_hosts","monitored_hosts","with_monitored_items")); // $time = new CSpan(date("[H:i:s]",time())); // $time->AddOption('id','refreshed'); - show_table_header(array(S_DASHBOARD_BIG,SPACE),SPACE); + +// Header + $text = array(S_DASHBOARD_BIG); + + $url = '?fullscreen='.($_REQUEST['fullscreen']?'0':'1'); + + $fs_icon = new CDiv(SPACE,'fullscreen'); + $fs_icon->AddOption('title',$_REQUEST['fullscreen']?S_NORMAL.' '.S_VIEW:S_FULLSCREEN); + $fs_icon->AddAction('onclick',new CScript("javascript: document.location = '".$url."';")); + + $icon_tab = new CTable(); + $icon_tab->AddRow(array($fs_icon,SPACE,$text)); + + $text = $icon_tab; + + show_table_header($text,SPACE); +//------------- + $left_tab = new CTable(); $left_tab->SetCellPadding(3); diff --git a/frontends/php/discovery.php b/frontends/php/discovery.php index 2e3bbd55..595bdbd5 100644 --- a/frontends/php/discovery.php +++ b/frontends/php/discovery.php @@ -31,6 +31,7 @@ include_once "include/page_header.php"; // VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION $fields=array( "druleid"=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, null), + 'fullscreen'=> array(T_ZBX_INT, O_OPT, P_SYS, IN('0,1'), NULL), ); check_fields($fields); @@ -51,7 +52,23 @@ include_once "include/page_header.php"; ); $r_form->AddItem(array(S_DISCOVERY_RULE.SPACE,$cmbDRules)); - show_table_header(S_STATUS_OF_DISCOVERY_BIG, $r_form); +// Header + $text = array(S_STATUS_OF_DISCOVERY_BIG); + + $url = '?fullscreen='.($_REQUEST['fullscreen']?'0':'1'); + + $fs_icon = new CDiv(SPACE,'fullscreen'); + $fs_icon->AddOption('title',$_REQUEST['fullscreen']?S_NORMAL.' '.S_VIEW:S_FULLSCREEN); + $fs_icon->AddAction('onclick',new CScript("javascript: document.location = '".$url."';")); + + $icon_tab = new CTable(); + $icon_tab->AddRow(array($fs_icon,SPACE,$text)); + + $text = $icon_tab; + + show_table_header($text, $r_form); +//------------- + $services = array(); diff --git a/frontends/php/events.php b/frontends/php/events.php index dd26d1be..d9d9a06a 100644 --- a/frontends/php/events.php +++ b/frontends/php/events.php @@ -49,18 +49,19 @@ include_once "include/page_header.php"; // VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION $fields=array( - "source"=> array(T_ZBX_INT, O_OPT, P_SYS, IN($allowed_sources), NULL), - "groupid"=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, NULL), - "hostid"=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, NULL), - "triggerid"=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, NULL), - "start"=> array(T_ZBX_INT, O_OPT, P_SYS, BETWEEN(0,65535)."({}%".PAGE_SIZE."==0)", NULL), - "next"=> array(T_ZBX_STR, O_OPT, P_SYS, NULL, NULL), - "prev"=> array(T_ZBX_STR, O_OPT, P_SYS, NULL, NULL), + 'source'=> array(T_ZBX_INT, O_OPT, P_SYS, IN($allowed_sources), NULL), + 'groupid'=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, NULL), + 'hostid'=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, NULL), + 'triggerid'=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, NULL), + 'start'=> array(T_ZBX_INT, O_OPT, P_SYS, BETWEEN(0,65535).'({}%'.PAGE_SIZE.'==0)', NULL), + 'next'=> array(T_ZBX_STR, O_OPT, P_SYS, NULL, NULL), + 'prev'=> array(T_ZBX_STR, O_OPT, P_SYS, NULL, NULL), + 'fullscreen'=> array(T_ZBX_INT, O_OPT, P_SYS, IN('0,1'), NULL), // filter - "filter_rst"=> array(T_ZBX_INT, O_OPT, P_SYS, IN(array(0,1)), NULL), - "filter_set"=> array(T_ZBX_STR, O_OPT, P_SYS, null, NULL), + 'filter_rst'=> array(T_ZBX_INT, O_OPT, P_SYS, IN(array(0,1)), NULL), + 'filter_set'=> array(T_ZBX_STR, O_OPT, P_SYS, null, NULL), - "show_unknown"=> array(T_ZBX_INT, O_OPT, P_SYS, IN(array(0,1)), NULL), + 'show_unknown'=> array(T_ZBX_INT, O_OPT, P_SYS, IN(array(0,1)), NULL), 'filter_timesince'=> array(T_ZBX_INT, O_OPT, P_UNSET_EMPTY, null, NULL), 'filter_timetill'=> array(T_ZBX_INT, O_OPT, P_UNSET_EMPTY, null, NULL), @@ -124,10 +125,10 @@ include_once "include/page_header.php"; ?> <?php - $_REQUEST["start"] = get_request("start", 0); - $_REQUEST["start"]-=(isset($_REQUEST["prev"]))?PAGE_SIZE:0; - $_REQUEST["start"]+=(isset($_REQUEST["next"]))?PAGE_SIZE:0; - $_REQUEST["start"]=($_REQUEST["start"])?$_REQUEST["start"]:0; + $_REQUEST['start'] = get_request('start', 0); + $_REQUEST['start']-=(isset($_REQUEST['prev']))?PAGE_SIZE:0; + $_REQUEST['start']+=(isset($_REQUEST['next']))?PAGE_SIZE:0; + $_REQUEST['start']=($_REQUEST['start'])?$_REQUEST['start']:0; ?> <?php @@ -168,10 +169,11 @@ include_once "include/page_header.php"; } } - validate_group_with_host(PERM_READ_ONLY, array("allow_all_hosts","monitored_hosts","with_items")); +//SDI($_REQUEST['groupid'].' : '.$_REQUEST['hostid']); + validate_group_with_host(PERM_READ_ONLY, array('allow_all_hosts','monitored_hosts','with_items')); - $cmbGroup = new CComboBox("groupid",$_REQUEST["groupid"],"submit()"); - $cmbHosts = new CComboBox("hostid",$_REQUEST["hostid"],"submit()"); + $cmbGroup = new CComboBox('groupid',$_REQUEST['groupid'],'submit()'); + $cmbHosts = new CComboBox('hostid',$_REQUEST['hostid'],'submit()'); $cmbGroup->AddItem(0,S_ALL_SMALL); @@ -222,22 +224,38 @@ include_once "include/page_header.php"; $r_form->AddItem(array(SPACE.S_SOURCE.SPACE, $cmbSource)); } - show_table_header(S_HISTORY_OF_EVENTS_BIG.SPACE.date("[H:i:s]",time()),$r_form); +// Header + $text = array(S_HISTORY_OF_EVENTS_BIG,SPACE,date('[H:i:s]',time())); + + $url = '?fullscreen='.($_REQUEST['fullscreen']?'0':'1'); + + $fs_icon = new CDiv(SPACE,'fullscreen'); + $fs_icon->AddOption('title',$_REQUEST['fullscreen']?S_NORMAL.' '.S_VIEW:S_FULLSCREEN); + $fs_icon->AddAction('onclick',new CScript("javascript: document.location = '".$url."';")); + + $icon_tab = new CTable(); + $icon_tab->AddRow(array($fs_icon,SPACE,$text)); + + $text = $icon_tab; + + show_table_header($text,$r_form); +//------------- + if($source == EVENT_SOURCE_DISCOVERY){ - $table = get_history_of_discovery_events($_REQUEST["start"], PAGE_SIZE); + $table = get_history_of_discovery_events($_REQUEST['start'], PAGE_SIZE); } else{ $config = select_config(); $sql_from = $sql_cond = ''; - if($_REQUEST["hostid"] > 0){ - $sql_cond = ' and h.hostid='.$_REQUEST["hostid"]; + if($_REQUEST['hostid'] > 0){ + $sql_cond = ' and h.hostid='.$_REQUEST['hostid']; } - else if($_REQUEST["groupid"] > 0){ + else if($_REQUEST['groupid'] > 0){ $sql_from = ', hosts_groups hg '; - $sql_cond = ' and h.hostid=hg.hostid and hg.groupid='.$_REQUEST["groupid"]; + $sql_cond = ' and h.hostid=hg.hostid and hg.groupid='.$_REQUEST['groupid']; } else{ $sql_from = ', hosts_groups hg '; @@ -274,7 +292,7 @@ include_once "include/page_header.php"; // make_sorting_link(S_TIME,'e.eventid'), make_sorting_link(S_TIME,'e.clock'), is_show_subnodes() ? S_NODE : null, - $_REQUEST["hostid"] == 0 ? S_HOST : null, + $_REQUEST['hostid'] == 0 ? S_HOST : null, S_DESCRIPTION, S_STATUS, S_SEVERITY, diff --git a/frontends/php/httpdetails.php b/frontends/php/httpdetails.php index 82d1478d..7607b2da 100644 --- a/frontends/php/httpdetails.php +++ b/frontends/php/httpdetails.php @@ -47,28 +47,45 @@ include_once "include/page_header.php"; "httptestid"=> array(T_ZBX_INT, O_MAND, null, DB_ID, null), "groupid"=> array(T_ZBX_INT, O_OPT, null, DB_ID, null), - "hostid"=> array(T_ZBX_INT, O_OPT, null, DB_ID, null) + "hostid"=> array(T_ZBX_INT, O_OPT, null, DB_ID, null), + + 'fullscreen'=> array(T_ZBX_INT, O_OPT, P_SYS, IN('0,1'), NULL), ); check_fields($fields); $accessible_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY); - if(!($httptest_data = DBfetch(DBselect('select ht.* from httptest ht, applications a '. - ' where a.hostid in ('.$accessible_hosts.') and a.applicationid=ht.applicationid '. - ' and ht.httptestid='.$_REQUEST['httptestid'])))) - { + $sql = 'select ht.* '. + ' from httptest ht, applications a '. + ' where a.hostid in ('.$accessible_hosts.') '. + ' and a.applicationid=ht.applicationid '. + ' and ht.httptestid='.$_REQUEST['httptestid']; + + if(!$httptest_data = DBfetch(DBselect($sql))){ access_deny(); } navigation_bar_calc(); ?> <?php - $lnkCancel = new CLink(S_CANCEL,'httpmon.php'.url_param('groupid').url_param('hostid')); - show_table_header(array(S_DETAILS_OF_SCENARIO_BIG.' "', - bold($httptest_data['name']), - '" - '.date(S_DATE_FORMAT_YMDHMS,$httptest_data['lastcheck'])),$lnkCancel - ); +// Header + $text = array(S_DETAILS_OF_SCENARIO_BIG.' / ',bold($httptest_data['name']),' ['.date(S_DATE_FORMAT_YMDHMS,$httptest_data['lastcheck']).']'); + + $url = '?httptestid='.$_REQUEST['httptestid'].'&fullscreen='.($_REQUEST['fullscreen']?'0':'1'); + + $fs_icon = new CDiv(SPACE,'fullscreen'); + $fs_icon->AddOption('title',$_REQUEST['fullscreen']?S_NORMAL.' '.S_VIEW:S_FULLSCREEN); + $fs_icon->AddAction('onclick',new CScript("javascript: document.location = '".$url."';")); + + $icon_tab = new CTable(); + $icon_tab->AddRow(array($fs_icon,SPACE,$text)); + + $text = $icon_tab; + + show_table_header($text,new CLink(S_CANCEL,'httpmon.php'.url_param('groupid').url_param('hostid'))); + +//------------- // TABLE $table = new CTableInfo(); diff --git a/frontends/php/images/general/bttn/fullscreen.png b/frontends/php/images/general/bttn/fullscreen.png Binary files differnew file mode 100644 index 00000000..93fd6df2 --- /dev/null +++ b/frontends/php/images/general/bttn/fullscreen.png diff --git a/frontends/php/images/general/bttn/fullscreen_bb.png b/frontends/php/images/general/bttn/fullscreen_bb.png Binary files differnew file mode 100644 index 00000000..c5b6eb7c --- /dev/null +++ b/frontends/php/images/general/bttn/fullscreen_bb.png diff --git a/frontends/php/images/general/bttn/help.png b/frontends/php/images/general/bttn/help.png Binary files differnew file mode 100644 index 00000000..588e0535 --- /dev/null +++ b/frontends/php/images/general/bttn/help.png diff --git a/frontends/php/images/general/bttn/help_bb.png b/frontends/php/images/general/bttn/help_bb.png Binary files differnew file mode 100644 index 00000000..91d2cef7 --- /dev/null +++ b/frontends/php/images/general/bttn/help_bb.png diff --git a/frontends/php/include/classes/chelp.inc.php b/frontends/php/include/classes/chelp.inc.php index 0f11ab19..e5d5b633 100644 --- a/frontends/php/include/classes/chelp.inc.php +++ b/frontends/php/include/classes/chelp.inc.php @@ -19,23 +19,19 @@ **/ ?> <?php - class CHelp extends CLink - { + class CHelp extends CLink{ /* public */ - function CHelp($url="index.php",$side=null) - { + function CHelp($url="index.php",$side=null){ if(is_null($side)) $side = 'right'; - if($side == 'right') - { + if($side == 'right'){ $pside = 'left'; } - else - { + else{ $side = 'left'; $pside = 'right'; } - parent::CLink(new CImg('images/general/help.gif','?'), 'http://www.zabbix.com/manual/v1.1/'.$url); + parent::CLink(new CDiv(SPACE,'iconhelp'), 'http://www.zabbix.com/manual/v1.1/'.$url); $this->options['style'] = 'padding-'.$pside.': 5px; float:'.$side; $this->options['target'] = '_blank'; } diff --git a/frontends/php/include/locales/en_gb.inc.php b/frontends/php/include/locales/en_gb.inc.php index b9d50887..3311347d 100644 --- a/frontends/php/include/locales/en_gb.inc.php +++ b/frontends/php/include/locales/en_gb.inc.php @@ -372,6 +372,8 @@ 'S_RIGHT_DIR'=> 'Right', 'S_LEFT_DIR'=> 'Left', 'S_SELECT_GRAPH_DOT_DOT_DOT'=> 'Select graph...', + 'S_FULLSCREEN'=> 'Fullscreen', + 'S_VIEW'=> 'View', // Colors 'S_BLACK'=> 'Black', diff --git a/frontends/php/include/page_header.php b/frontends/php/include/page_header.php index 7e821999..ac919dd6 100644 --- a/frontends/php/include/page_header.php +++ b/frontends/php/include/page_header.php @@ -33,6 +33,8 @@ COpt::profiling_start("page"); if(!isset($page["type"])) $page["type"] = PAGE_TYPE_HTML; if(!isset($page["file"])) $page["file"] = basename($_SERVER['PHP_SELF']); + + if($_REQUEST['fullscreen']=get_request('fullscreen', 0)) define('ZBX_PAGE_NO_MENU', 1); include_once "include/locales/en_gb.inc.php"; process_locales(); diff --git a/frontends/php/latest.php b/frontends/php/latest.php index e834efae..7ae3cf4b 100644 --- a/frontends/php/latest.php +++ b/frontends/php/latest.php @@ -43,7 +43,8 @@ include_once "include/page_header.php"; "hostid"=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, NULL), "select"=> array(T_ZBX_STR, O_OPT, NULL, NULL, NULL), - "show"=> array(T_ZBX_STR, O_OPT, NULL, NULL, NULL) + "show"=> array(T_ZBX_STR, O_OPT, NULL, NULL, NULL), + 'fullscreen'=> array(T_ZBX_INT, O_OPT, P_SYS, IN('0,1'), NULL), ); check_fields($fields); @@ -56,7 +57,7 @@ include_once "include/page_header.php"; ?> <?php - $_REQUEST["select"] = get_request("select",""); + $_REQUEST["select"] = get_request('select',''); $_REQUEST["groupbyapp"] = get_request("groupbyapp",get_profile("web.latest.groupbyapp",1)); update_profile("web.latest.groupbyapp",$_REQUEST["groupbyapp"]); @@ -152,7 +153,24 @@ include_once "include/page_header.php"; } $r_form->AddItem(array(SPACE.S_HOST.SPACE,$cmbHosts)); - show_table_header(S_LATEST_DATA_BIG,$r_form); + +// Header + $text = array(S_LATEST_DATA_BIG); + + $url = '?fullscreen='.($_REQUEST['fullscreen']?'0':'1').url_param('select'); + + $fs_icon = new CDiv(SPACE,'fullscreen'); + $fs_icon->AddOption('title',$_REQUEST['fullscreen']?S_NORMAL.' '.S_VIEW:S_FULLSCREEN); + $fs_icon->AddAction('onclick',new CScript("javascript: document.location = '".$url."';")); + + $icon_tab = new CTable(); + $icon_tab->AddRow(array($fs_icon,SPACE,$text)); + + $text = $icon_tab; + + show_table_header($text,$r_form); +//------------- + $r_form = new CForm(); $r_form->SetMethod('get'); @@ -181,8 +199,8 @@ include_once "include/page_header.php"; $table=new CTableInfo(); $table->SetHeader(array( - is_show_subnodes() ? make_sorting_link(S_NODE,'h.hostid') : null, - $_REQUEST["hostid"] ==0 ? make_sorting_link(S_HOST,'h.host') : NULL, + is_show_subnodes()?make_sorting_link(S_NODE,'h.hostid') : null, + ($_REQUEST["hostid"] ==0)?make_sorting_link(S_HOST,'h.host') : NULL, array($link,SPACE,make_sorting_link(S_DESCRIPTION,'i.description')), make_sorting_link(S_LAST_CHECK,'i.lastclock'), S_LAST_VALUE, @@ -265,6 +283,7 @@ include_once "include/page_header.php"; url_param("groupid"). url_param("hostid"). url_param("applications"). + url_param("fullscreen"). url_param("select")); } else{ @@ -273,6 +292,7 @@ include_once "include/page_header.php"; url_param("groupid"). url_param("hostid"). url_param("applications"). + url_param("fullscreen"). url_param("select")); } diff --git a/frontends/php/maps.php b/frontends/php/maps.php index ad847e3f..215d8584 100644 --- a/frontends/php/maps.php +++ b/frontends/php/maps.php @@ -26,10 +26,6 @@ $page['hist_arg'] = array('sysmapid'); $page['scripts'] = array('prototype.js','url.js'); - if(isset($_REQUEST["fullscreen"])){ - define('ZBX_PAGE_NO_MENU', 1); - } - $page['type'] = detect_page_type(PAGE_TYPE_HTML); if(PAGE_TYPE_HTML == $page['type']){ @@ -105,21 +101,17 @@ include_once "include/page_header.php"; $row['name']; } - if(isset($_REQUEST["sysmapid"]) && (!isset($all_maps[$_REQUEST["sysmapid"]]) || $_REQUEST["sysmapid"] == 0)) - { - if(count($all_maps)) - { + if(isset($_REQUEST["sysmapid"]) && (!isset($all_maps[$_REQUEST["sysmapid"]]) || $_REQUEST["sysmapid"] == 0)){ + if(count($all_maps)){ $_REQUEST["sysmapid"] = $all_maps[0]; } - else - { + else{ unset($_REQUEST["sysmapid"]); } } unset($all_maps[0]); - if(isset($_REQUEST["sysmapid"])) - { + if(isset($_REQUEST["sysmapid"])){ update_profile("web.maps.sysmapid",$_REQUEST["sysmapid"]); } ?> @@ -128,11 +120,7 @@ include_once "include/page_header.php"; if(isset($_REQUEST["sysmapid"])){ $sysmap = get_sysmap_by_sysmapid($_REQUEST["sysmapid"]); - $url = "maps.php?sysmapid=".$_REQUEST["sysmapid"]; - if(!isset($_REQUEST["fullscreen"])) - $url .= "&fullscreen=1"; - - array_push($text, nbsp(" / "), new CLink($all_maps[$_REQUEST["sysmapid"]],$url)); + array_push($text, nbsp(' / '), $all_maps[$_REQUEST["sysmapid"]]); if(infavorites('web.favorite.sysmapids',$_REQUEST['sysmapid'],'sysmapid')){ $icon = new CDiv(SPACE,'iconminus'); @@ -145,9 +133,15 @@ include_once "include/page_header.php"; $icon->AddAction('onclick',new CScript("javascript: add2favorites('sysmapid','".$_REQUEST["sysmapid"]."');")); } $icon->AddOption('id','addrm_fav'); + + $url = '?sysmapid='.$_REQUEST['sysmapid'].($_REQUEST['fullscreen']?'':'&fullscreen=1'); + + $fs_icon = new CDiv(SPACE,'fullscreen'); + $fs_icon->AddOption('title',$_REQUEST['fullscreen']?S_NORMAL.' '.S_VIEW:S_FULLSCREEN); + $fs_icon->AddAction('onclick',new CScript("javascript: document.location = '".$url."';")); $icon_tab = new CTable(); - $icon_tab->AddRow(array($icon,SPACE,$text)); + $icon_tab->AddRow(array($fs_icon,$icon,SPACE,$text)); $text = $icon_tab; @@ -156,8 +150,7 @@ include_once "include/page_header.php"; $form = new CForm(); $form->SetMethod('get'); - if(isset($_REQUEST["fullscreen"])) - $form->AddVar("fullscreen",$_REQUEST["fullscreen"]); + $form->AddVar("fullscreen",$_REQUEST["fullscreen"]); $cmbMaps = new CComboBox("sysmapid",get_request("sysmapid",0),"submit()"); diff --git a/frontends/php/overview.php b/frontends/php/overview.php index 09a46366..4b927bc9 100644 --- a/frontends/php/overview.php +++ b/frontends/php/overview.php @@ -28,20 +28,12 @@ $page["file"] = "overview.php"; $page['hist_arg'] = array('groupid','type'); define('ZBX_PAGE_DO_REFRESH', 1); - -$_REQUEST["fullscreen"] = get_request("fullscreen", 0); - -if($_REQUEST["fullscreen"]){ - define('ZBX_PAGE_NO_MENU', 1); -} - -include_once "include/page_header.php"; - define("SHOW_TRIGGERS",0); define("SHOW_DATA",1); -if(isset($_REQUEST["select"])&&($_REQUEST["select"]!="")) -{ +include_once "include/page_header.php"; + +if(isset($_REQUEST["select"])&&($_REQUEST["select"]!="")){ unset($_REQUEST["groupid"]); unset($_REQUEST["hostid"]); } @@ -132,9 +124,25 @@ if(isset($_REQUEST["select"])&&($_REQUEST["select"]!="")) } $help->SetHint($help_table); +// Header + $text = array(S_OVERVIEW_BIG); + + $url = 'overview.php?fullscreen='.($_REQUEST['fullscreen']?'0':'1'); + + $fs_icon = new CDiv(SPACE,'fullscreen'); + $fs_icon->AddOption('title',$_REQUEST['fullscreen']?S_NORMAL.' '.S_VIEW:S_FULLSCREEN); + $fs_icon->AddAction('onclick',new CScript("javascript: document.location = '".$url."';")); + + $icon_tab = new CTable(); + $icon_tab->AddRow(array($fs_icon,$help,$text)); - show_table_header(array($help, new Clink(S_OVERVIEW_BIG,'overview.php?fullscreen='.($_REQUEST['fullscreen']?'0':'1'))), $form); + $text = $icon_tab; + + show_table_header($text,$form); unset($help, $help_table, $form, $col); + +//------------- + $form = new CForm(); $form->SetMethod('get'); diff --git a/frontends/php/screens.php b/frontends/php/screens.php index 44872fd3..bac980aa 100644 --- a/frontends/php/screens.php +++ b/frontends/php/screens.php @@ -30,12 +30,6 @@ $page['hist_arg'] = array('config','elementid'); $page['scripts'] = array('gmenu.js','scrollbar.js','sbox.js','sbinit.js'); //do not change order!!! - $_REQUEST["fullscreen"] = get_request("fullscreen", 0); - - if($_REQUEST["fullscreen"]){ - define('ZBX_PAGE_NO_MENU', 1); - } - $_REQUEST['config'] = get_request('config',get_profile('web.screens.config',0)); $page['type'] = detect_page_type(PAGE_TYPE_HTML); @@ -110,7 +104,6 @@ include_once "include/page_header.php"; update_profile('web.screens.config', $_REQUEST['config']); $_REQUEST["elementid"] = get_request("elementid",get_profile("web.screens.elementid", null)); - $_REQUEST["fullscreen"] = get_request("fullscreen", 0); if( 2 != $_REQUEST["fullscreen"] ) update_profile("web.screens.elementid",$_REQUEST["elementid"]); @@ -196,9 +189,7 @@ include_once "include/page_header.php"; } if( $element ){ - $url = "?elementid=".$elementid; - if($_REQUEST["fullscreen"]==0) $url .= "&fullscreen=1"; - $text[] = array(nbsp(" / "),new CLink($element["name"], $url)); + $text = array(nbsp(' / '),$element["name"]); if(infavorites('web.favorite.screenids',$elementid,(0 == $config)?'screenid':'slideshowid')){ $icon = new CDiv(SPACE,'iconminus'); @@ -210,11 +201,16 @@ include_once "include/page_header.php"; $icon->AddOption('title',S_ADD_TO.' '.S_FAVORITES); $icon->AddAction('onclick',new CScript("javascript: add2favorites('".((0 == $config)?'screenid':'slideshowid')."','".$elementid."');")); } - $icon->AddOption('id','addrm_fav'); + + $url = '?elementid='.$elementid.($_REQUEST['fullscreen']?'':'&fullscreen=1'); + + $fs_icon = new CDiv(SPACE,'fullscreen'); + $fs_icon->AddOption('title',$_REQUEST['fullscreen']?S_NORMAL.' '.S_VIEW:S_FULLSCREEN); + $fs_icon->AddAction('onclick',new CScript("javascript: document.location = '".$url."';")); $icon_tab = new CTable(); - $icon_tab->AddRow(array($icon,SPACE,$text)); + $icon_tab->AddRow(array($fs_icon,$icon,SPACE,$text)); $text = $icon_tab; } diff --git a/frontends/php/srv_status.php b/frontends/php/srv_status.php index 4309c07b..0979d426 100644 --- a/frontends/php/srv_status.php +++ b/frontends/php/srv_status.php @@ -36,10 +36,11 @@ include_once "include/page_header.php"; <?php // VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION $fields=array( - "serviceid"=> array(T_ZBX_INT, O_OPT, P_SYS|P_NZERO, DB_ID, NULL), - "showgraph"=> array(T_ZBX_INT, O_OPT, P_SYS, IN("1"), 'isset({serviceid})'), + 'serviceid'=> array(T_ZBX_INT, O_OPT, P_SYS|P_NZERO, DB_ID, NULL), + 'showgraph'=> array(T_ZBX_INT, O_OPT, P_SYS, IN('1'), 'isset({serviceid})'), + 'fullscreen'=> array(T_ZBX_INT, O_OPT, P_SYS, IN('0,1'), NULL), // ajax - 'favobj'=> array(T_ZBX_STR, O_OPT, P_ACT, IN("'hat'"), NULL), + 'favobj'=> array(T_ZBX_STR, O_OPT, P_ACT, IN('"hat"'), NULL), 'favid'=> array(T_ZBX_STR, O_OPT, P_ACT, NOT_EMPTY, 'isset({favobj})'), 'state'=> array(T_ZBX_INT, O_OPT, P_ACT, NOT_EMPTY, 'isset({favobj})'), ); @@ -58,11 +59,11 @@ include_once "include/page_header.php"; } //--------?> <?php - if(isset($_REQUEST["serviceid"]) && - ($_REQUEST["serviceid"]>0) && - !DBfetch(DBselect('select serviceid from services where serviceid='.$_REQUEST["serviceid"]))) + if(isset($_REQUEST['serviceid']) && + ($_REQUEST['serviceid']>0) && + !DBfetch(DBselect('select serviceid from services where serviceid='.$_REQUEST['serviceid']))) { - unset($_REQUEST["serviceid"]); + unset($_REQUEST['serviceid']); } $available_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY); @@ -210,6 +211,12 @@ include_once "include/page_header.php"; 'graph' => bold(S_GRAPH))); if($tree){ + $url = '?fullscreen='.($_REQUEST['fullscreen']?'0':'1'); + + $fs_icon = new CDiv(SPACE,'fullscreen'); + $fs_icon->AddOption('title',$_REQUEST['fullscreen']?S_NORMAL.' '.S_VIEW:S_FULLSCREEN); + $fs_icon->AddAction('onclick',new CScript("javascript: document.location = '".$url."';")); + $tab = create_hat( S_IT_SERVICES_BIG, $tree->getHTML(), diff --git a/frontends/php/styles/css_bb.css b/frontends/php/styles/css_bb.css index 3d7b2432..2e0b0090 100644 --- a/frontends/php/styles/css_bb.css +++ b/frontends/php/styles/css_bb.css @@ -276,6 +276,14 @@ div.arrowdown{ background-image: url('../images/general/bttn/arrowdown_bb.png'); } +div.fullscreen{ + background-image: url('../images/general/bttn/fullscreen_bb.png'); +} + +div.iconhelp{ + background-image: url('../images/general/bttn/help_bb.png'); +} + div#scrolltableft{ color: #0CF; } diff --git a/frontends/php/styles/div.css b/frontends/php/styles/div.css index 43d53029..7d368885 100644 --- a/frontends/php/styles/div.css +++ b/frontends/php/styles/div.css @@ -89,6 +89,28 @@ div.arrowdown:hover{ cursor:pointer; } +div.fullscreen{ + height: 18px; + width: 18px; + background-image: url('../images/general/bttn/fullscreen.png'); + background-repeat:no-repeat; +} + +div.fullscreen:hover{ + cursor:pointer; +} + +div.iconhelp{ + height: 18px; + width: 18px; + background-image: url('../images/general/bttn/help.png'); + background-repeat:no-repeat; +} + +div.iconhelp:hover{ + cursor:pointer; +} + div.filterclosed{ height: 9px; width: 9px; diff --git a/frontends/php/tr_status.php b/frontends/php/tr_status.php index 6e0ae0cc..f160a949 100644 --- a/frontends/php/tr_status.php +++ b/frontends/php/tr_status.php @@ -75,12 +75,7 @@ $audio = 'audio/trigger_'.$status.'.wav'; } -?> -<?php define('ZBX_PAGE_DO_REFRESH', 1); - - if(isset($_REQUEST["fullscreen"])) - define('ZBX_PAGE_NO_MENU', 1); include_once "include/page_header.php"; @@ -88,17 +83,17 @@ include_once "include/page_header.php"; <?php // VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION $fields=array( - "groupid"=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, null), - "hostid"=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, null), - "noactions"=> array(T_ZBX_STR, O_OPT, null, IN('"true","false"'), null), - "compact"=> array(T_ZBX_STR, O_OPT, null, IN('"true","false"'), null), + 'groupid'=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, null), + 'hostid'=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, null), + 'noactions'=> array(T_ZBX_STR, O_OPT, null, IN('"true","false"'), null), + 'compact'=> array(T_ZBX_STR, O_OPT, null, IN('"true","false"'), null), - "show_triggers"=> array(T_ZBX_INT, O_OPT, null, null, null), - "show_events"=> array(T_ZBX_INT, O_OPT, P_SYS, null, null), - "select"=> array(T_ZBX_STR, O_OPT, null, IN('"true","false"'), null), - "txt_select"=> array(T_ZBX_STR, O_OPT, null, null, null), - "fullscreen"=> array(T_ZBX_STR, O_OPT, null, null, null), - "btnSelect"=> array(T_ZBX_STR, O_OPT, null, null, null) + 'show_triggers'=> array(T_ZBX_INT, O_OPT, null, null, null), + 'show_events'=> array(T_ZBX_INT, O_OPT, P_SYS, null, null), + 'select'=> array(T_ZBX_STR, O_OPT, null, IN('"true","false"'), null), + 'txt_select'=> array(T_ZBX_STR, O_OPT, null, null, null), + 'fullscreen'=> array(T_ZBX_INT, O_OPT, P_SYS, IN('0,1'), null), + 'btnSelect'=> array(T_ZBX_STR, O_OPT, null, null, null) ); check_fields($fields); @@ -110,10 +105,10 @@ include_once "include/page_header.php"; $_REQUEST['noactions'] = get_request('noactions', get_profile('web.tr_status.noactions', 'true')); $_REQUEST['compact'] = get_request('compact', get_profile('web.tr_status.compact', 'true')); - $options = array("allow_all_hosts","monitored_hosts","with_monitored_items");//,"always_select_first_host"); - if(!$ZBX_WITH_SUBNODES) array_push($options,"only_current_node"); + $options = array('allow_all_hosts','monitored_hosts','with_monitored_items');//,'always_select_first_host'); + if(!$ZBX_WITH_SUBNODES) array_push($options,'only_current_node'); - validate_group_with_host(PERM_READ_ONLY,$options,"web.tr_status.groupid","web.tr_status.hostid"); + validate_group_with_host(PERM_READ_ONLY,$options,'web.tr_status.groupid','web.tr_status.hostid'); update_profile('web.tr_status.show_triggers',$_REQUEST['show_triggers']); update_profile('web.tr_status.show_events',$_REQUEST['show_events']); @@ -123,8 +118,6 @@ include_once "include/page_header.php"; $config=select_config(); -?> -<?php if(isset($audio)){ play_sound($audio); } @@ -200,7 +193,7 @@ include_once "include/page_header.php"; ' AND h.hostid=i.hostid '. ' AND h.status='.HOST_STATUS_MONITORED. ' AND hg.hostid=h.hostid '. - ($_REQUEST["groupid"]?' AND hg.groupid='.$_REQUEST["groupid"]:''). + ($_REQUEST['groupid']?' AND hg.groupid='.$_REQUEST['groupid']:''). ' ORDER BY h.host'; $result=DBselect($sql); @@ -215,21 +208,37 @@ include_once "include/page_header.php"; if(!$flag) $_REQUEST['hostid'] = 0; $r_form->AddItem(array(SPACE.S_HOST.SPACE,$cmbHosts)); - $r_form->AddVar("compact",$compact); - $r_form->AddVar("show_triggers",$show_triggers); + $r_form->AddVar('compact',$compact); + $r_form->AddVar('show_triggers',$show_triggers); $r_form->AddVar('show_events',$show_events); $r_form->AddVar('noactions',$noactions); $r_form->AddVar('select',$select); $r_form->AddVar('txt_select',$txt_select); - if(isset($_REQUEST['fullscreen'])) $r_form->AddVar('fullscreen',1); + $r_form->AddVar('fullscreen',$_REQUEST['fullscreen']); - show_table_header( - new CLink(SPACE.S_STATUS_OF_TRIGGERS_BIG.SPACE.date("[H:i:s]",time()),"tr_status.php?show_triggers=$show_triggers". - "&show_events=$show_events&noactions=$noactions&compact=$compact". - (!isset($_REQUEST["fullscreen"]) ? '&fullscreen=1' : '')), - $r_form); - if(!isset($_REQUEST["fullscreen"])){ + $text = array(S_STATUS_OF_TRIGGERS_BIG,SPACE,date('[H:i:s]',time())); + + $url = 'tr_status.php?show_triggers='.$show_triggers. + url_param('show_events'). + url_param('noactions'). + url_param('compact'). + ($_REQUEST['fullscreen']?'':'&fullscreen=1'); + + $fs_icon = new CDiv(SPACE,'fullscreen'); + $fs_icon->AddOption('title',$_REQUEST['fullscreen']?S_NORMAL.' '.S_VIEW:S_FULLSCREEN); + $fs_icon->AddAction('onclick',new CScript("javascript: document.location = '".$url."';")); + + $icon_tab = new CTable(); + $icon_tab->AddRow(array($fs_icon,SPACE,$text)); + + $text = $icon_tab; + + show_table_header($text,$r_form); + + + + if(!$_REQUEST["fullscreen"]){ $left_col = array(); $tr_form = new CForm('tr_status.php'); @@ -309,13 +318,13 @@ include_once "include/page_header.php"; show_table_header($left_col); } - if(isset($_REQUEST["fullscreen"])){ + if($_REQUEST["fullscreen"]){ $triggerInfo = new CTriggersInfo(); $triggerInfo->HideHeader(); $triggerInfo->Show(); } - if(isset($_REQUEST["fullscreen"])){ + if($_REQUEST["fullscreen"]){ $fullscreen='&fullscreen=1'; } else{ @@ -591,4 +600,4 @@ include_once "include/page_header.php"; ?> <?php include_once "include/page_footer.php"; -?> +?>
\ No newline at end of file |