diff -Nur /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/1.php bartlby-ui/1.php --- /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/1.php 2008-04-03 11:21:13.000000000 +0200 +++ bartlby-ui/1.php 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ - \ No newline at end of file diff -Nur /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/bartlby_action.php bartlby-ui/bartlby_action.php --- /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/bartlby_action.php 2008-04-03 11:21:13.000000000 +0200 +++ bartlby-ui/bartlby_action.php 2008-05-24 12:44:33.000000000 +0200 @@ -7,9 +7,10 @@ if($_POST[action]) { $act=$_POST[action]; } +$btl=new BartlbyUi($Bartlby_CONF); $layout= new Layout(); $layout->setTitle("Bartlby Action ($act)"); -$btl=new BartlbyUi($Bartlby_CONF); + $layout->Table("100%"); @@ -551,10 +552,18 @@ if($df == false) { $exec_plan=""; } - $ads=bartlby_add_service($btl->CFG, $_GET[service_server], $_GET[service_plugin],$_GET[service_name],$_GET[service_args],$_GET[notify_enabled], $exec_plan,$_GET[service_interval],$_GET[service_type],$_GET[service_var], $_GET[service_passive_timeout], $_GET[service_check_timeout], $_GET[service_ack], $_GET[service_retain], $_GET[service_snmp_community], $_GET[service_snmp_objid], $_GET[service_snmp_version], $_GET[service_snmp_warning], $_GET[service_snmp_critical], $_GET[service_snmp_type],$_GET[service_active], $_GET[flap_seconds],$_GET[renotify_interval], $_GET[escalate_divisor]); - $global_msg=bartlby_get_server_by_id($btl->CFG, $_GET[service_server]); - $global_msg[exec_plan]=$btl->resolveServicePlan($exec_plan); + for($x = 0; $xCFG, $server_id, $_GET[service_plugin],$_GET[service_name],$_GET[service_args],$_GET[notify_enabled], $exec_plan,$_GET[service_interval],$_GET[service_type],$_GET[service_var], $_GET[service_passive_timeout], $_GET[service_check_timeout], $_GET[service_ack], $_GET[service_retain], $_GET[service_snmp_community], $_GET[service_snmp_objid], $_GET[service_snmp_version], $_GET[service_snmp_warning], $_GET[service_snmp_critical], $_GET[service_snmp_type],$_GET[service_active], $_GET[flap_seconds],$_GET[renotify_interval], $_GET[escalate_divisor]); + $tmp=bartlby_get_server_by_id($btl->CFG, $server_id); + + $global_msg[server_name] .= $tmp[server_name] . ","; + + + } + + $global_msg[exec_plan]=$btl->resolveServicePlan($exec_plan); $act="service_" . $_GET[service_type]; if($_GET[service_type] == 3) { $global_msg[group_out] = $btl->resolveGroupString($_GET[service_var]); @@ -677,11 +686,11 @@ ); $content = "" . $ov . "
"; -$layout->push_outside($layout->create_box($layout->BoxTitle, $content)); +$layout->create_box($layout->BoxTitle, $content, "Message"); $btl->getExtensionsReturn("_POST_" . $act, $layout); $layout->BoxTitle=""; $layout->TableEnd(); -$layout->display(); +$layout->display("bartlby_action"); diff -Nur /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/bartlby-ui.class.php bartlby-ui/bartlby-ui.class.php --- /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/bartlby-ui.class.php 2008-04-06 22:57:23.000000000 +0200 +++ bartlby-ui/bartlby-ui.class.php 2008-09-07 14:49:37.000000000 +0200 @@ -1,11 +1,34 @@ , + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139, + * USA; either version 2 of the License, or (at your option) any later + * version; incorporated herein by reference. + * + * visit: www.bartlby.org for support + * ----------------------------------------------------------------------- */ +/* +$Revision: 16 $ +$HeadURL: http://bartlby.svn.sourceforge.net/svnroot/bartlby/trunk/bartlby-core/src/ack.c $ +$Date: 2008-04-07 21:20:34 +0200 (Mo, 07 Apr 2008) $ +$Author: hjanuschka $ +*/ + include_once("bartlbystorage.class.php"); session_start(); set_time_limit(0); set_magic_quotes_runtime(0); -define("BARTLBY_UI_VERSION", "1.42"); +define("BARTLBY_UI_VERSION", "2.1"); +define("BARTLBY_RELNOT", ""); $wdays[0]="Sunday"; $wdays[1]="Monday"; $wdays[2]="Tuesday"; @@ -629,6 +652,12 @@ } + + if(bartlby_config("ui-extra.conf", "theme") != "") { + $this->theme=bartlby_config("ui-extra.conf", "theme"); + } else { + $this->theme="classic"; + } $this->BASE_URL=substr($_SERVER[SCRIPT_URI], 0, strrpos($_SERVER[SCRIPT_URI], "/")+1); @@ -1104,9 +1133,9 @@ function is_gone($state) { switch($state) { case 1: - return "Object changed you should reload"; + return "Object changed you should reload"; case 2: - return "Object deleted you should reload"; + return "Object deleted you should reload"; default: return ""; } @@ -1184,6 +1213,11 @@ ); return $i; } + function setTheme($name="classic") { + if($name=="") $name="classic"; + $this->theme=$name; + } + function getExtensionsReturn($method, $layout, $ign=false) { $r=array(); $dhl = opendir("extensions"); @@ -1206,9 +1240,9 @@ array_push($r, $ex); if(!file_exists("extensions/" . $file . ".disabled")) { - $endis=""; + $endis=""; } else { - $endis=""; + $endis=""; } @@ -1225,7 +1259,7 @@ "; - @$layout->push_outside($layout->create_box($info_box_title, $core_content)); + $layout->create_box($info_box_title, $core_content, "extension_" . $ex[ex_name]); } @@ -1818,19 +1852,19 @@ return $re; } function getserveroptions($defaults, $layout) { - $modify = ""; - $copy = ""; - $logview= ""; + $modify = ""; + $copy = ""; + $logview= ""; if($defaults[server_enabled] == 1) { - $check = ""; + $check = ""; } else { - $check = ""; + $check = ""; } if($defaults[server_notify] == 1) { - $notifys = ""; + $notifys = ""; } else { - $notifys = ""; + $notifys = ""; } $is_gone=$this->is_gone($defaults[server_gone]); @@ -1839,33 +1873,33 @@ function getserviceOptions($defaults, $layout) { if($defaults[service_active] == 1) { - $check = ""; + $check = ""; } else { - $check = ""; + $check = ""; } if($defaults[notify_enabled] == 1) { - $notifys = ""; + $notifys = ""; } else { - $notifys = ""; + $notifys = ""; } if($defaults[is_downtime] == 1) { - $downtime=""; + $downtime=""; } else { $downtime=" "; } - $modify = ""; - $force = ""; - $comments=""; - $logview= ""; - $reports = ""; + $modify = ""; + $force = ""; + $comments=""; + $logview= ""; + $reports = ""; if(file_exists($this->PERFDIR . "/" . $defaults[plugin])) { - $stat = ""; + $stat = ""; } else { $stat = ""; } - $copy = ""; + $copy = ""; $is_gone=$this->is_gone($defaults[is_gone]); diff -Nur /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/bulk_actions.php bartlby-ui/bulk_actions.php --- /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/bulk_actions.php 1970-01-01 01:00:00.000000000 +0100 +++ bartlby-ui/bulk_actions.php 2008-09-07 14:09:01.000000000 +0200 @@ -0,0 +1,32 @@ +set_menu("main"); +$layout->setTitle(""); + + +$servers=$btl->GetSVCMap(); + +$servcs = array(); +while(list($k, $v) = @each($servers)) { + for($y=0; $ycreate_box($title, $content, "core_info", array( + 'services' => $servcs, +), "bulk_services"); + + + +$layout->display("bulk_actions"); diff -Nur /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/cli.php bartlby-ui/cli.php --- /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/cli.php 2008-04-06 18:23:17.000000000 +0200 +++ bartlby-ui/cli.php 2008-05-30 13:54:16.000000000 +0200 @@ -44,6 +44,8 @@ $reopen_server=false; $running_only=0; $ticker="|"; +$hide_warns=0; +$hide_infos=0; $ncurses_session = ncurses_init(); $main = ncurses_newwin(0, 0, 0, 0); // main window @@ -99,7 +101,28 @@ if($k == 115 || $reopen_server == true) { btl_disp_server(); } - + if($k == 119) { + if($hide_warns == 0) { + $hide_warns = 1; + } else { + $hide_warns = 0; + } + } + if($k == 82) { + //reset view :-) + $hide_warns=0; + $hide_infos=0; + $alerts_only=1; + + } + if($k == 105) { + if($hide_infos == 0) { + $hide_infos = 1; + } else { + $hide_infos = 0; + } + } + if($k == 258) { if($selected_pos > $lines/2) { $start_from=$start_from+1; @@ -195,6 +218,16 @@ ncurses_color_set(4); break; } + if($hide_warns == 1) { + if($servs[$x][current_state] == 1) { + continue; + } + } + if($hide_infos == 1) { + if($servs[$x][current_state] == 4) { + continue; + } + } if($alerts_only == 1) { if($servs[$x][current_state] == 0) { @@ -796,6 +829,9 @@ array(1, "a" , "Only disable service wich arent OK"), array(1, "d", "also show downtimed services"), array(1, "r", "only show checks wich are currently running"), + array(1, "w", "hide services wich are in state:warning"), + array(1, "i", "hide services wich are in state:info"), + array(1, "R", "Reset filter's"), array(0, "Service Detail:"), array(1, "f", "Force Check"), array(1, "c", "Check enable/disable"), diff -Nur /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/config.php bartlby-ui/config.php --- /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/config.php 2008-04-03 11:21:13.000000000 +0200 +++ bartlby-ui/config.php 2008-09-07 14:09:01.000000000 +0200 @@ -1,4 +1,26 @@ , + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139, + * USA; either version 2 of the License, or (at your option) any later + * version; incorporated herein by reference. + * + * visit: www.bartlby.org for support + * ----------------------------------------------------------------------- */ +/* +$Revision: 16 $ +$HeadURL: http://bartlby.svn.sourceforge.net/svnroot/bartlby/trunk/bartlby-core/src/ack.c $ +$Date: 2008-04-07 21:20:34 +0200 (Mo, 07 Apr 2008) $ +$Author: hjanuschka $ +*/ + $Bartlby_CONF="/opt/bartlby-dev/etc/bartlby.cfg"; if(file_exists("setup.php")) { include("setup.php"); diff -Nur /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/create_map.php bartlby-ui/create_map.php --- /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/create_map.php 2008-04-03 11:21:13.000000000 +0200 +++ bartlby-ui/create_map.php 2008-09-07 14:09:01.000000000 +0200 @@ -1,3 +1,13 @@ +getInfo(); + $layout= new Layout(); + $layout->setTemplate("nonav.html"); +?> + + + - - - - \ No newline at end of file diff -Nur /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/overview.php bartlby-ui/overview.php --- /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/overview.php 2008-04-08 16:42:58.000000000 +0200 +++ bartlby-ui/overview.php 2008-09-07 14:49:37.000000000 +0200 @@ -1,12 +1,37 @@ , + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139, + * USA; either version 2 of the License, or (at your option) any later + * version; incorporated herein by reference. + * + * visit: www.bartlby.org for support + * ----------------------------------------------------------------------- */ +/* +$Revision: 16 $ +$HeadURL: http://bartlby.svn.sourceforge.net/svnroot/bartlby/trunk/bartlby-core/src/ack.c $ +$Date: 2008-04-07 21:20:34 +0200 (Mo, 07 Apr 2008) $ +$Author: hjanuschka $ +*/ + include "config.php"; include "layout.class.php"; include "bartlby-ui.class.php"; $btl=new BartlbyUi($Bartlby_CONF); - $btl->hasRight("main.overview"); $layout= new Layout(); + + + $btl->hasRight("main.overview"); + $layout->set_menu("main"); $layout->MetaRefresh(30); $layout->Table("100%"); @@ -16,26 +41,19 @@ $reload_status="data is up-to-date"; if ($info[sirene_mode] == 0) { - $sir=""; + $sir=""; } else { $sirene_intv=bartlby_config($btl->CFG, "sirene_interval"); if(!$sirene_intv) { $sirene_intv=600; } - $sir="Notify Every: $sirene_intv Seconds "; + $sir="Notify Every: $sirene_intv Seconds "; } $quickview_disabled=bartlby_config("ui-extra.conf", "quickview_enabled"); - /* - $mode=bartlby_config($btl->CFG, "i_am_a_slave"); - if(!$mode) { - $vmode="MASTER"; - } else { - $vmode="SLAVE
dont change anything"; - } - */ + if($info[round_time_count] > 0 && $info[round_time_sum] > 0 ) { $rndMS=round($info[round_time_sum] / $info[round_time_count], 2); } else { @@ -44,40 +62,9 @@ - /* - $is_repl_on=bartlby_config($btl->CFG, "replication"); - if(!$is_repl_on) { - $is_repl_on="false"; - } - $repl = "Replication enabled: $is_repl_on
"; - if($is_repl_on == "true") { - $repl_cnt=bartlby_config($btl->CFG, "replicate_cnt"); - $repl .="Replicating to $repl_cnt Servers every " . bartlby_config($btl->CFG, "replication_intervall") . "
"; - for($x=1; $x<=$repl_cnt; $x++) { - $repl .= str_repeat(" ", 20) . " Server:" . bartlby_config($btl->CFG, "replicate[" . $x . "]") . "
"; - } - $repl .= "Last Replication was on:" . date("d.m.Y H:i:s", $btl->info[last_replication]) . "
"; - } - */ + $servers=$btl->GetSVCMap(); - $mode=bartlby_config("ui-extra.conf", "xml_remote_count"); - if($mode) { - $remote_xml=array(); - for($xml_X=1; $xml_X<=$mode; $xml_X++) { - $xml_cur=bartlby_config("ui-extra.conf", "xml_remote[" . $xml_X . "]"); - $xml_cur_alias=bartlby_config("ui-extra.conf", "xml_alias[" . $xml_X . "]"); - if($xml_cur) { - $xml_return = $btl->getRemoteStatus($xml_cur, $xml_cur_alias); - if($xml_return) { - array_push($remote_xml, $xml_return); - } - } - } - - - - } $hosts_sum=count($servers); @@ -200,81 +187,7 @@ } $bar=$prozent_float . "% Ok - $prozent_crit_float % Critical"; - - /* - for($x=0; $x<$service_sum; $x++) { - - $svc=bartlby_get_service($btl->CFG, $x); - - $qck[$svc[server_name]][$svc[last_state]]++; - $qck[$svc[server_name]][10]=$svc[server_id]; - } - - */ - - $quick_view = ""; - while(list($k, $v)=@each($qck)) { - if($k != $last_qck) { - $cl=""; - $STATE="UP"; - if ($hosts_a_down[$qck[$k][10]] == 1) { - $cl=""; - $STATE="DOWN"; - } - $quick_view .= ""; - $quick_view .= ""; - $quick_view .= ""; - $quick_view .= ""; - $quick_view .= ""; - $quick_view .= ""; - } - - $last_qck=$k; - $qo=""; - $qw=""; - $qc=""; - $qk=""; - } - - if($gdelay_count>0 && $gdelay_sum > 0) { $avgDEL = round($gdelay_sum/$gdelay_count,2); @@ -282,6 +195,8 @@ $avgDEL = 0; } + + $max_running = bartlby_config($btl->CFG, "max_concurent_checks"); $max_load = bartlby_config($btl->CFG, "max_load"); $curr_load = my_sys_getloadavg(); @@ -302,206 +217,67 @@ } else { $load_bar = "" . $info[current_running] . " Load: " . $curr_load[0] . " / " . $max_load . " "; } - $info_box_title='Core Information
Time: ' . date("d.m.Y H:i:s") . '
'; - // (Logged in as:' . $btl->user . ') Uptime: ' . $btl->intervall(time()-$btl->info[startup_time]) . '' - $core_content = "
" . $qck[$k][server_name] . "$STATE"; - - $sf=false; - if($qck[$k][0]) { - $sf=true; - $qo=""; - } - if($qck[$k][1]) { - $sf=true; - $qw=""; - } - - if($qck[$k][2]) { - $sf=true; - $qc=""; - } - - if($qck[$k][3]) { - $sf=true; - $qk=""; - } - if($qck[$k][4]) { - $sf=true; - $qk=""; - } - if($qck[$k][downtime]) { - //$qk=""; - $qk=""; - } - if($qck[$k][acks]) { - $qk=""; - } - - $quick_view .= "$qo"; - $quick_view .= "$qw"; - $quick_view .= "$qc"; - $quick_view .= "$qk"; - $quick_view .= "
" . $qck[$k][0] . " OK's
" . $qck[$k][1] . " Warnings
" . $qck[$k][2] . " Criticals
" . $qck[$k][3] . " Unkown
" . $qck[$k][4] . " Info
" . $qck[$k][downtime] . " Downtime
" . $qck[$k][downtime] . " Downtime
" . $qck[$k][acks] . " Ack Wait

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Logged in as: " . $btl->user . ")Uptime:" . $btl->intervall(time()-$btl->info[startup_time]) . "
Services: " . $info[services] . "    Workers: " . $info[workers] . "    Downtimes: " . $info[downtimes]. "    Datalib:" . $lib[Name] . "-" . $lib[Version] . "
- Running: $load_bar - Avg Round Time:" . $rndMS . " ms / avg service delay: " . $avgDEL . " sec.
Version: " . $btl->getRelease() . "
Reload: " . $reload_status . "
 $sir
"; - $layout->push_outside($layout->create_box($info_box_title, $core_content)); + $info_box_title='Core Information'; + $core_content = ""; + $layout->create_box($info_box_title, $core_content, "core_info", array( + 'user' => $btl->user, + 'time' => date("d.m.Y H:i:s"), + 'uptime' => $btl->intervall(time()-$btl->info[startup_time]), + 'services' => $info[services], + 'workers' => $info[workers], + 'downtimes' => $info[downtimes], + 'datalib' => $lib[Name], + 'datalib_version' => $lib[Version], + 'running' => $load_bar, + 'round_ms_time' => $rndMS, + 'average_delay' => $avgDEL, + 'release_name' => $btl->getRelease(), + 'reload_state' => $reload_status, + 'sirene' => $sir + + ), "core_info"); - $quick_view .= ""; - $tac_title='Tactical Overview
'; - // (Logged in as:' . $btl->user . ') Uptime: ' . $btl->intervall(time()-$btl->info[startup_time]) . '' - $tac_content = " - - - - - - - - - - - - - - - - - - -
Hosts:" . $hosts_sum . "Services:" . $service_sum . "
Up:" . $hosts_up. "Down:" . $hosts_down. "OK:" . $services_ok. "Warning:" . $services_warning. "Critical:" . $services_critical. "Downtime:" . $services_downtime. "Acks outstanding:" . $acks_outstanding. "all failures
$repl
"; - $layout->push_outside($layout->create_box($tac_title, $tac_content)); - - $health_title='System Health
'; - $silverbar = " - - - - - - - - -
  " . $prozent_float . "% OK
"; - - // (Logged in as:' . $btl->user . ') Uptime: ' . $btl->intervall(time()-$btl->info[startup_time]) . '' - $health_content = "
- - - - - - - - -
   
$silverbar
"; - $layout->push_outside($layout->create_box($health_title, $health_content)); - //Generate external boxes ;-) - - for($bx=0; $bxXMLBoxHealth($remote_xml[$bx][info],$remote_xml[$bx][services]); - $remote_xml[$bx][qck]=$xml_box_content[qck]; - $xml_box_title=$remote_xml[$bx][alias]; - - $silverbar = " - - - - - - - - -
  " . $xml_box_content[prozent_float] . "% OK
"; - - $xml_box_output = "
- - - - - - - - - -
   
$silverbar
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Uptime: " . $btl->intervall(time()-$remote_xml[$bx][info][0][startup_time]) . "
Home: " . $xml_base_url . "
Version:" . $remote_xml[$bx][info][0][version] . "
Hosts:" . $xml_box_content[hosts_sum] . "Services:" . $xml_box_content[service_sum] . "
Up:" . $xml_box_content[hosts_up]. "Down:" . $xml_box_content[hosts_down] . "OK:" . $xml_box_content[services_ok]. "Warning:" . $xml_box_content[services_warning]. "Critical:" . $xml_box_content[services_critical]. "Downtime:" . $xml_box_content[services_downtime]. "Acks outstanding:" . $xml_box_content[acks_outstanding]. "
- - "; - $layout->push_outside($layout->create_box($xml_box_title, $xml_box_output)); - - - - - } - //Generate external quick views ;-) - - for($bx=0; $bxXMLQuickView($remote_xml[$bx][info],$remote_xml[$bx][qck], $bx+1); - $xml_box_title=$remote_xml[$bx][alias] . " --> QuickView"; - - - $layout->push_outside($layout->create_box($xml_box_title, $xml_box_content)); - - - - - } + $tac_title='Tactical Overview'; + $layout->create_box($tac_title, $tac_content, "tactical_overview",array( + 'host_sum' => $hosts_sum, + 'hosts_up' => $hosts_up, + 'hosts_down' => $hosts_down, + 'services_ok' => $services_ok, + 'services_warning' => $services_warning, + 'services_critical' => $services_critical, + 'services_downtime' => $services_downtime, + 'acks_outstanding' => $acks_outstanding, + 'services_sum' => $service_sum + + ), "tactical_overview"); + + $health_title='System Health'; + $layout->create_box($health_title, $health_content,"system_health", array( + 'prozent_float' => $prozent_float, + 'color' => $color + ), "system_health"); $layout->setTitle("QuickView"); - $r=$btl->getExtensionsReturn("_overview", $layout); if($quickview_disabled != "false") { - $layout->Tr( - $layout->Td( - array(0=>$quick_view) - ) - - ); + $qv_title='Quick View'; + $layout->create_box($qv_title, $qv_content,"quick_view", array( + 'quick_view' => $qck + ), "quick_view"); - } else { - $layout->Tr( - $layout->Td( - array(0=>"Disabled") - ) - - ); - } - + } + $layout->boxes_placed[MAIN]=false; $layout->TableEnd(); - $layout->display(); + $layout->display("overview"); function my_sys_getloadavg() { diff -Nur /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/permission_worker.php bartlby-ui/permission_worker.php --- /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/permission_worker.php 2008-04-03 11:21:13.000000000 +0200 +++ bartlby-ui/permission_worker.php 2008-11-26 16:49:02.000000000 +0100 @@ -167,6 +167,8 @@ $title="UI privileges"; + $ov .= $layout->Field("worker_id", "hidden", $_GET[worker_id]) . ""; + $ov .= ""; $content = "" . $ov . "
"; $layout->push_outside($layout->create_box($title, $content)); @@ -174,10 +176,10 @@ $title=""; - $content = $layout->Field("worker_id", "hidden", $_GET[worker_id]) . ""; - $layout->push_outside($layout->create_box($title, $content)); + + //$layout->push_outside($layout->create_box($title, $content)); + -$ov .= ""; -$layout->display(); \ No newline at end of file +$layout->display(); diff -Nur /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/server_detail.php bartlby-ui/server_detail.php --- /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-ui/server_detail.php 2008-04-03 11:21:13.000000000 +0200 +++ bartlby-ui/server_detail.php 2008-10-13 22:04:01.000000000 +0200 @@ -24,12 +24,9 @@ $layout= new Layout(); $layout->set_menu("main"); $layout->setTitle("Services"); -if(preg_match("/^XML:(.*):(.*)$/i", $_GET[server_id], $match)) { - $defaults=$btl->remoteServerByID($match[1], $match[2]); -} else { - $defaults=bartlby_get_server_by_id($btl->CFG, $_GET[server_id]); - $btl->hasServerRight($_GET[server_id]); -} + +$defaults=bartlby_get_server_by_id($btl->CFG, $_GET[server_id]); +$btl->hasServerRight($_GET[server_id]); if(!$defaults) { $btl->redirectError("BARTLBY::OBJECT::MISSING"); @@ -37,25 +34,8 @@ } $map=$btl->getSVCMap($btl->CFG, NULL, NULL); -$mode=bartlby_config("ui-extra.conf", "xml_remote_count"); -if($mode) { - $remote_xml=array(); - for($xml_X=1; $xml_X<=$mode; $xml_X++) { - $xml_cur=bartlby_config("ui-extra.conf", "xml_remote[" . $xml_X . "]"); - $xml_cur_alias=bartlby_config("ui-extra.conf", "xml_alias[" . $xml_X . "]"); - if($xml_cur) { - $xml_return = $btl->getRemoteStatus($xml_cur, $xml_cur_alias); - $btl->appendXML_to_svc_map($xml_return[services], $xml_cur_alias, $map, $xml_X); - } - } - - - -} - - $server_map=$map[$_GET[server_id]]; -$layout->Table("100%"); + if($btl->isServerUp($_GET[server_id], $map)) { $isup="UP"; @@ -66,7 +46,6 @@ $services_assigned=""; for($x=0; $x" . $server_map[$x][service_name] . "
"; $dmp_info[$server_map[$x][current_state]] += 1; } @@ -75,12 +54,6 @@ $services_assigned .= "" . $btl->getState($k) . ":" . $v . ","; } - -//echo $defaults[last_notify_send] . "
"; - - - - if($defaults["server_notify"]==1) { $noti_en="true"; } else { @@ -95,91 +68,23 @@ $info_box_title='Server Info'; -// (Logged in as:' . $btl->user . ') Uptime: ' . $btl->intervall(time()-$btl->info[startup_time]) . '' -$core_content = " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name:" . $defaults[server_name] . " 
Status:" . $isup . " 
Ip:" . $defaults[server_ip] . "/" . gethostbyname($defaults[server_ip]) . " 
Port:" . $defaults[server_port] . " 
Notifications?:" . $noti_en . " 
Enabled ?:" . $server_en . " 
Last notify sent:" . date("d.m.Y H:i:s", $defaults[last_notify_send]) . " 
Flap Seconds:" . $defaults[server_flap_seconds] . " 
Icon: 
Location:" . getGeoip(gethostbyname($defaults[server_ip])) . "