This is a multi-part message in MIME format.
--------------020007030307040702010404
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On 08/26/2010 02:58 PM, Jochen Bern wrote:
> On 08/25/2010 01:58 PM, Jochen Bern wrote:
>> On 08/24/2010 11:30 PM, Jochen Bern wrote:
>>> I wrote a patch for config.c which makes the links display the
>>> appropriate "expansion" right away.
>> Update:
> 2nd update (sorry for the spamming :-C ) ...
There's always one more bug ... but does it *have* to make an appearance
right the same *hour*!? %-C
Sorry,
J. Bern
--=20
Jochen Bern, Systemingenieur --- LINworks GmbH
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP =3D D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C2=
7
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Gesch=E4ftsf=FChrer Metin Dogan, Oliver Mic=
hel
--------------020007030307040702010404
Content-Type: text/plain;
name="nagios-3.2.1-CommandExpand-patch.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="nagios-3.2.1-CommandExpand-patch.txt"
--- config.c.orig 2009-05-15 16:02:47.000000000 +0200
+++ config.c 2010-08-26 15:07:23.000000000 +0200
@@ -65,6 +65,7 @@
#define DISPLAY_HOSTDEPENDENCIES 11
#define DISPLAY_HOSTESCALATIONS 12
#define DISPLAY_SERVICEGROUPS 15
+#define DISPLAY_COMMAND_EXPANSION 16211
void document_header(int);
void document_footer(void);
@@ -84,6 +85,7 @@
void display_serviceescalations(void);
void display_hostdependencies(void);
void display_hostescalations(void);
+void display_command_expansion(void);
void unauthorized_message(void);
@@ -91,9 +93,25 @@
authdata current_authdata;
int display_type=DISPLAY_NONE;
+char to_expand[MAX_COMMAND_BUFFER];
+char *command_args[MAX_COMMAND_ARGUMENTS];
+char hashed_color[8];
int embedded=FALSE;
+void print_expand_input(int type){
+ char *seldesc="";
+
+ if (type==DISPLAY_COMMAND_EXPANSION) return; /* Has its own form, w/ larger */
+ else if (type==DISPLAY_SERVICES){ seldesc=" Services Named or on Host"; }
+ else if (type==DISPLAY_SERVICEDEPENDENCIES){ seldesc=" Dependencies with Host"; }
+ else if (type==DISPLAY_SERVICEESCALATIONS){ seldesc=" Escalations on Host"; }
+ else if (type==DISPLAY_HOSTDEPENDENCIES){ seldesc=" Dependencies on/of Host"; }
+ else if (type==DISPLAY_HOSTESCALATIONS){ seldesc=" Escalations for Host"; }
+ printf("Show Only%s:\n",seldesc);
+ printf("",html_encode(to_expand,FALSE));
+ }
int main(void){
int result=OK;
@@ -153,8 +171,8 @@
if(display_type!=DISPLAY_NONE){
- printf("\n",CONFIG_CGI);
printf("\n");
+ printf("\n",CONFIG_CGI);
printf("Object Type:\n");
printf("");
@@ -171,12 +189,16 @@
printf("Contact Groups\n",(display_type==DISPLAY_CONTACTGROUPS)?"SELECTED":"");
printf("Timeperiods\n",(display_type==DISPLAY_TIMEPERIODS)?"SELECTED":"");
printf("Commands\n",(display_type==DISPLAY_COMMANDS)?"SELECTED":"");
+ printf("Command Expansion\n",(display_type==DISPLAY_COMMAND_EXPANSION)?"SELECTED":"");
printf("\n");
printf("\n");
+ print_expand_input(display_type);
+
printf("\n");
- printf("\n");
printf("\n");
+
+ printf("\n");
}
/* display context-sensitive help */
@@ -217,6 +239,10 @@
case DISPLAY_HOSTESCALATIONS:
display_context_help(CONTEXTHELP_CONFIG_HOSTESCALATIONS);
break;
+ case DISPLAY_COMMAND_EXPANSION:
+ /* Reusing DISPLAY_COMMANDS help until further notice */
+
...[email truncated]...
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]