cgi/statusmap.c File Reference

#include "../include/config.h"
#include "../include/common.h"
#include "../include/objects.h"
#include "../include/macros.h"
#include "../include/statusdata.h"
#include "../include/cgiutils.h"
#include "../include/getcgi.h"
#include "../include/cgiauth.h"
#include <gd.h>
#include <gdfonts.h>

Data Structures

struct  layer_struct

Defines

#define UNKNOWN_GD2_ICON   "unknown.gd2"
#define UNKNOWN_ICON_IMAGE   "unknown.gif"
#define ICINGA_GD2_ICON   "icinga.gd2"
#define DEFAULT_NODE_WIDTH   40
#define DEFAULT_NODE_HEIGHT   65
#define DEFAULT_NODE_VSPACING   15
#define DEFAULT_NODE_HSPACING   45
#define DEFAULT_PROXIMITY_WIDTH   1000
#define DEFAULT_PROXIMITY_HEIGHT   800
#define MINIMUM_PROXIMITY_WIDTH   250
#define MINIMUM_PROXIMITY_HEIGHT   200
#define COORDS_WARNING_WIDTH   650
#define COORDS_WARNING_HEIGHT   60
#define CIRCULAR_DRAWING_RADIUS   100
#define LAYOUT_USER_SUPPLIED   0
#define LAYOUT_SUBLAYERS   1
#define LAYOUT_COLLAPSED_TREE   2
#define LAYOUT_BALANCED_TREE   3
#define LAYOUT_CIRCULAR   4
#define LAYOUT_CIRCULAR_MARKUP   5
#define LAYOUT_CIRCULAR_BALLOON   6

Typedefs

typedef layer_struct layer

Functions

int process_cgivars (void)
void display_page_header (void)
void display_map (void)
void calculate_host_coords (void)
void calculate_total_image_bounds (void)
void calculate_canvas_bounds (void)
void calculate_canvas_bounds_from_host (char *)
void calculate_scaling_factor (void)
void find_eligible_hosts (void)
void load_background_image (void)
void draw_background_image (void)
void draw_background_extras (void)
void draw_host_links (void)
void draw_hosts (void)
void draw_host_text (char *, int, int)
void draw_text (char *, int, int, int)
void write_host_popup_text (host *)
int initialize_graphics (void)
gdImagePtr load_image_from_file (char *)
void write_graphics (void)
void cleanup_graphics (void)
void draw_line (int, int, int, int, int)
void draw_dotted_line (int, int, int, int, int)
void draw_dashed_line (int, int, int, int, int)
int is_host_in_layer_list (host *)
int add_layer (char *)
void free_layer_list (void)
void print_layer_url (int)
int number_of_host_layer_members (host *, int)
int max_child_host_layer_members (host *)
int host_child_depth_separation (host *, host *)
int max_child_host_drawing_width (host *)
int number_of_host_services (host *)
void calculate_balanced_tree_coords (host *, int, int)
void calculate_circular_coords (void)
void calculate_circular_layer_coords (host *, double, double, int, int)
void draw_circular_markup (void)
void draw_circular_layer_markup (host *, double, double, int, int)
int main (int argc, char **argv)

Variables

static icinga_macrosmac
char main_config_file [MAX_FILENAME_LENGTH]
char url_html_path [MAX_FILENAME_LENGTH]
char physical_images_path [MAX_FILENAME_LENGTH]
char url_images_path [MAX_FILENAME_LENGTH]
char url_logo_images_path [MAX_FILENAME_LENGTH]
char url_stylesheets_path [MAX_FILENAME_LENGTH]
char url_js_path [MAX_FILENAME_LENGTH]
hosthost_list
hostgrouphostgroup_list
serviceservice_list
hoststatus * hoststatus_list
servicestatus * servicestatus_list
char * statusmap_background_image
int default_statusmap_layout_method
char physical_logo_images_path [MAX_FILENAME_LENGTH]
authdata current_authdata
int content_type
gdImagePtr unknown_logo_image = NULL
gdImagePtr logo_image = NULL
gdImagePtr map_image = NULL
gdImagePtr background_image = NULL
int color_white = 0
int color_black = 0
int color_red = 0
int color_lightred = 0
int color_green = 0
int color_lightgreen = 0
int color_blue = 0
int color_yellow = 0
int color_orange = 0
int color_grey = 0
int color_lightgrey = 0
int color_transparency_index = 0
int color_transparency_index_r
int color_transparency_index_g
int color_transparency_index_b
int embedded
int refresh
int display_header
int daemon_check
int display_popups = TRUE
int use_links = TRUE
int use_text = TRUE
int use_highlights = TRUE
int user_supplied_canvas = FALSE
int user_supplied_scaling = FALSE
int layout_method = LAYOUT_USER_SUPPLIED
int proximity_width = DEFAULT_PROXIMITY_WIDTH
int proximity_height = DEFAULT_PROXIMITY_HEIGHT
int coordinates_were_specified = FALSE
int scaled_image_width = 0
int scaled_image_height = 0
int canvas_width = 0
int canvas_height = 0
int total_image_width = 0
int total_image_height = 0
int max_image_width = 0
int max_image_height = 0
double scaling_factor = 1.0
double user_scaling_factor = 1.0
int background_image_width = 0
int background_image_height = 0
int canvas_x = 0
int canvas_y = 0
int bottom_margin = 0
int draw_child_links = FALSE
int draw_parent_links = FALSE
int draw_nagios_icon = FALSE
int nagios_icon_x = 0
int nagios_icon_y = 0
hoststatus * hoststatus_list
time_t program_start
layerlayer_list = NULL
int exclude_layers = TRUE
int all_layers = FALSE
int display_type = DISPLAY_HOSTS
int show_all_hosts = TRUE
int show_all_hostgroups = TRUE
int show_all_servicegroups = TRUE
char * host_name = "all"
char * host_filter = NULL
char * hostgroup_name = NULL
char * servicegroup_name = NULL
char * service_desc = NULL
char * service_filter = NULL
int CGI_ID = STATUSMAP_CGI_ID

Define Documentation

#define CIRCULAR_DRAWING_RADIUS   100

#define COORDS_WARNING_HEIGHT   60

#define COORDS_WARNING_WIDTH   650

#define DEFAULT_NODE_HEIGHT   65

#define DEFAULT_NODE_HSPACING   45

#define DEFAULT_NODE_VSPACING   15

#define DEFAULT_NODE_WIDTH   40

#define DEFAULT_PROXIMITY_HEIGHT   800

#define DEFAULT_PROXIMITY_WIDTH   1000

#define ICINGA_GD2_ICON   "icinga.gd2"

#define LAYOUT_BALANCED_TREE   3

#define LAYOUT_CIRCULAR   4

#define LAYOUT_CIRCULAR_BALLOON   6

#define LAYOUT_CIRCULAR_MARKUP   5

#define LAYOUT_COLLAPSED_TREE   2

#define LAYOUT_SUBLAYERS   1

#define LAYOUT_USER_SUPPLIED   0

#define MINIMUM_PROXIMITY_HEIGHT   200

#define MINIMUM_PROXIMITY_WIDTH   250

#define UNKNOWN_GD2_ICON   "unknown.gd2"

#define UNKNOWN_ICON_IMAGE   "unknown.gif"


Typedef Documentation

typedef struct layer_struct layer


Function Documentation

int add_layer ( char *   ) 

void calculate_balanced_tree_coords ( host ,
int  ,
int   
)

void calculate_canvas_bounds ( void   ) 

void calculate_canvas_bounds_from_host ( char *   ) 

void calculate_circular_coords ( void   ) 

void calculate_circular_layer_coords ( host ,
double  ,
double  ,
int  ,
int   
)

void calculate_host_coords ( void   ) 

void calculate_scaling_factor ( void   ) 

void calculate_total_image_bounds ( void   ) 

void cleanup_graphics ( void   ) 

void display_map ( void   ) 

void display_page_header ( void   ) 

void draw_background_extras ( void   ) 

void draw_background_image ( void   ) 

void draw_circular_layer_markup ( host ,
double  ,
double  ,
int  ,
int   
)

void draw_circular_markup ( void   ) 

void draw_dashed_line ( int  ,
int  ,
int  ,
int  ,
int   
)

void draw_dotted_line ( int  ,
int  ,
int  ,
int  ,
int   
)

void draw_host_links ( void   ) 

void draw_host_text ( char *  ,
int  ,
int   
)

void draw_hosts ( void   ) 

void draw_line ( int  ,
int  ,
int  ,
int  ,
int   
)

void draw_text ( char *  ,
int  ,
int  ,
int   
)

void find_eligible_hosts ( void   ) 

void free_layer_list ( void   ) 

int host_child_depth_separation ( host ,
host  
)

int initialize_graphics ( void   ) 

int is_host_in_layer_list ( host  ) 

void load_background_image ( void   ) 

gdImagePtr load_image_from_file ( char *   ) 

int main ( int  argc,
char **  argv 
)

int max_child_host_drawing_width ( host  ) 

int max_child_host_layer_members ( host  ) 

int number_of_host_layer_members ( host ,
int   
)

int number_of_host_services ( host  ) 

void print_layer_url ( int   ) 

int process_cgivars ( void   ) 

void write_graphics ( void   ) 

void write_host_popup_text ( host  ) 


Variable Documentation

int all_layers = FALSE

gdImagePtr background_image = NULL

int background_image_height = 0

int background_image_width = 0

int bottom_margin = 0

int canvas_height = 0

int canvas_width = 0

int canvas_x = 0

int canvas_y = 0

int CGI_ID = STATUSMAP_CGI_ID

int color_black = 0

int color_blue = 0

int color_green = 0

int color_grey = 0

int color_lightgreen = 0

int color_lightgrey = 0

int color_lightred = 0

int color_orange = 0

int color_red = 0

int color_transparency_index = 0

int color_transparency_index_b

int color_transparency_index_g

int color_transparency_index_r

int color_white = 0

int color_yellow = 0

int content_type

int coordinates_were_specified = FALSE

authdata current_authdata

int daemon_check

int default_statusmap_layout_method

int display_header

int display_popups = TRUE

int display_type = DISPLAY_HOSTS

int draw_child_links = FALSE

int draw_nagios_icon = FALSE

int draw_parent_links = FALSE

int embedded

int exclude_layers = TRUE

char* host_filter = NULL

host* host_list

char* host_name = "all"

hostgroup* hostgroup_list

char* hostgroup_name = NULL

hoststatus* hoststatus_list

hoststatus* hoststatus_list

layer* layer_list = NULL

int layout_method = LAYOUT_USER_SUPPLIED

gdImagePtr logo_image = NULL

icinga_macros* mac [static]

char main_config_file[MAX_FILENAME_LENGTH]

gdImagePtr map_image = NULL

int max_image_height = 0

int max_image_width = 0

int nagios_icon_x = 0

int nagios_icon_y = 0

char physical_images_path[MAX_FILENAME_LENGTH]

char physical_logo_images_path[MAX_FILENAME_LENGTH]

time_t program_start

int proximity_height = DEFAULT_PROXIMITY_HEIGHT

int proximity_width = DEFAULT_PROXIMITY_WIDTH

int refresh

int scaled_image_height = 0

int scaled_image_width = 0

double scaling_factor = 1.0

char* service_desc = NULL

char* service_filter = NULL

service* service_list

char* servicegroup_name = NULL

servicestatus* servicestatus_list

int show_all_hostgroups = TRUE

int show_all_hosts = TRUE

int show_all_servicegroups = TRUE

char* statusmap_background_image

int total_image_height = 0

int total_image_width = 0

gdImagePtr unknown_logo_image = NULL

char url_html_path[MAX_FILENAME_LENGTH]

char url_images_path[MAX_FILENAME_LENGTH]

char url_js_path[MAX_FILENAME_LENGTH]

char url_logo_images_path[MAX_FILENAME_LENGTH]

char url_stylesheets_path[MAX_FILENAME_LENGTH]

int use_highlights = TRUE

int use_links = TRUE

int use_text = TRUE

double user_scaling_factor = 1.0

int user_supplied_canvas = FALSE

int user_supplied_scaling = FALSE


Generated on Wed Mar 30 17:22:22 2011 for icinga-core by  doxygen 1.4.7