[Nagios-checkins] nagios/cgi config.c,1.38,1.39
Nagios network monitoring software is enterprise server monitoring
Brought to you by:
egalstad,
sawolf-nagios
From: Ethan G. <ega...@us...> - 2007-07-31 12:59:19
|
Update of /cvsroot/nagios/nagios/cgi In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13165/cgi Modified Files: config.c Log Message: Timeperiod exclusions, doc updates, prep for new release Index: config.c =================================================================== RCS file: /cvsroot/nagios/nagios/cgi/config.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** config.c 30 May 2007 21:41:09 -0000 1.38 --- config.c 31 Jul 2007 12:58:48 -0000 1.39 *************** *** 4,8 **** * * Copyright (c) 1999-2007 Ethan Galstad (na...@na...) ! * Last Modified: 05-30-2007 * * This CGI program will display various configuration information. --- 4,8 ---- * * Copyright (c) 1999-2007 Ethan Galstad (na...@na...) ! * Last Modified: 07-30-2007 * * This CGI program will display various configuration information. *************** *** 1411,1419 **** void display_timeperiods(void){ ! timerange *temp_timerange; ! daterange *temp_daterange; ! timeperiod *temp_timeperiod; char *months[12]={"january","february","march","april","may","june","july","august","september","october","november","december"}; char *days[7]={"sunday","monday","tuesday","wednesday","thursday","friday","saturday"}; int odd=0; int day=0; --- 1411,1421 ---- void display_timeperiods(void){ ! timerange *temp_timerange=NULL; ! daterange *temp_daterange=NULL; ! timeperiod *temp_timeperiod=NULL; ! timeperiodexclusion *temp_timeperiodexclusion=NULL; char *months[12]={"january","february","march","april","may","june","july","august","september","october","november","december"}; char *days[7]={"sunday","monday","tuesday","wednesday","thursday","friday","saturday"}; + char *temp_ptr=NULL; int odd=0; int day=0; *************** *** 1425,1428 **** --- 1427,1431 ---- int seconds=0; int line=0; + int item=0; /* see if user is authorized to view time period information... */ *************** *** 1444,1447 **** --- 1447,1451 ---- printf("<TH CLASS='data'>Name</TH>\n"); printf("<TH CLASS='data'>Alias/Description</TH>\n"); + printf("<TH CLASS='data'>Exclusions</TH>\n"); printf("<TH CLASS='data'>Days/Dates</TH>\n"); printf("<TH CLASS='data'>Times</TH>\n"); *************** *** 1464,1467 **** --- 1468,1480 ---- printf("<TD CLASS='%s'><A NAME='%s'>%s</A></TD>\n",bg_class,url_encode(temp_timeperiod->name),temp_timeperiod->name); printf("<TD CLASS='%s'>%s</TD>\n",bg_class,temp_timeperiod->alias); + + printf("<TD CLASS='%s'>",bg_class); + item=0; + for(temp_timeperiodexclusion=temp_timeperiod->exclusions;temp_timeperiodexclusion!=NULL;temp_timeperiodexclusion=temp_timeperiodexclusion->next){ + item++; + printf("%s<A HREF='#%s'>%s</A>",(item==1)?"":", ",url_encode(temp_timeperiodexclusion->timeperiod_name),temp_timeperiodexclusion->timeperiod_name); + } + printf("</TD>"); + printf("<TD CLASS='%s'>",bg_class); *************** *** 1473,1477 **** if(line>1) ! printf("<TR><TD COLSPAN='2'></TD><TD CLASS='%s'>\n",bg_class); switch(temp_daterange->type){ --- 1486,1490 ---- if(line>1) ! printf("<TR><TD COLSPAN='3'></TD><TD CLASS='%s'>\n",bg_class); switch(temp_daterange->type){ *************** *** 1553,1557 **** if(line>1) ! printf("<TR><TD COLSPAN='2'></TD><TD CLASS='%s'>\n",bg_class); printf("%s",days[day]); --- 1566,1570 ---- if(line>1) ! printf("<TR><TD COLSPAN='3'></TD><TD CLASS='%s'>\n",bg_class); printf("%s",days[day]); |