| 
									
										
										
										
											2012-01-18 09:25:16 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | $link_array = array('page'    => 'device', | 
					
						
							|  |  |  |                     'device'  => $device['device_id'], | 
					
						
							|  |  |  |                     'tab'     => 'loadbalancer'); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-25 12:24:34 +00:00
										 |  |  | // Cisco ACE
 | 
					
						
							| 
									
										
										
										
											2012-01-18 09:25:16 +00:00
										 |  |  | $type_text['loadbalancer_rservers'] = "Rservers"; | 
					
						
							|  |  |  | $type_text['loadbalancer_vservers'] = "Serverfarms"; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-25 12:24:34 +00:00
										 |  |  | // Citrix Netscaler
 | 
					
						
							| 
									
										
										
										
											2012-01-18 09:25:16 +00:00
										 |  |  | $type_text['netscaler_vsvr'] = "VServers"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | print_optionbar_start(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | $pagetitle[] = "Load Balancer"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | echo("<span style='font-weight: bold;'>Load Balancer</span> » "); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | unset($sep); | 
					
						
							|  |  |  | foreach ($loadbalancer_tabs as $type) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-21 05:51:58 +00:00
										 |  |  |   if (!$vars['type']) { $vars['type'] = $type; } | 
					
						
							| 
									
										
										
										
											2012-01-18 09:25:16 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   echo($sep); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-21 05:51:58 +00:00
										 |  |  |   if ($vars['type'] == $type) | 
					
						
							| 
									
										
										
										
											2012-01-18 09:25:16 +00:00
										 |  |  |   { | 
					
						
							|  |  |  |     echo('<span class="pagemenu-selected">'); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-21 05:51:58 +00:00
										 |  |  |   echo(generate_link($type_text[$type] ." (".$device_loadbalancer_count[$type].")",$link_array,array('type'=>$type))); | 
					
						
							|  |  |  |   if ($vars['type'] == $type) { echo("</span>"); } | 
					
						
							| 
									
										
										
										
											2012-01-18 09:25:16 +00:00
										 |  |  |   $sep = " | "; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | print_optionbar_end(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-21 05:51:58 +00:00
										 |  |  | if (is_file("pages/device/loadbalancer/".mres($vars['type']).".inc.php")) | 
					
						
							| 
									
										
										
										
											2012-01-18 09:25:16 +00:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2012-01-21 05:51:58 +00:00
										 |  |  |    include("pages/device/loadbalancer/".mres($vars['type']).".inc.php"); | 
					
						
							| 
									
										
										
										
											2012-01-18 09:25:16 +00:00
										 |  |  | } else { | 
					
						
							|  |  |  |   foreach ($loadbalancer_tabs as $type) | 
					
						
							|  |  |  |   { | 
					
						
							|  |  |  |     if ($type != "overview") | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       if (is_file("pages/device/loadbalancer/overview/".mres($type).".inc.php")) { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $g_i++; | 
					
						
							|  |  |  |         if (!is_integer($g_i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         echo('<div style="background-color: '.$row_colour.';">'); | 
					
						
							|  |  |  |         echo('<div style="padding:4px 0px 0px 8px;"><span class=graphhead>'.$type_text[$type].'</span>'); | 
					
						
							| 
									
										
										
										
											2012-04-06 13:56:23 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-18 09:25:16 +00:00
										 |  |  |         include("pages/device/loadbalancer/overview/".mres($type).".inc.php"); | 
					
						
							| 
									
										
										
										
											2012-04-06 13:56:23 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-18 09:25:16 +00:00
										 |  |  |         echo('</div>'); | 
					
						
							|  |  |  |         echo('</div>'); | 
					
						
							|  |  |  |       } else { | 
					
						
							|  |  |  |         $graph_title = $type_text[$type]; | 
					
						
							|  |  |  |         $graph_type = "device_".$type; | 
					
						
							| 
									
										
										
										
											2012-04-06 13:56:23 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-18 09:25:16 +00:00
										 |  |  |         include("includes/print-device-graph.php"); | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ?>
 |