This is a multi-part message in MIME format.
--------------060903040608080205050207
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Ahoy.
I was working on modifying some of the style info in the GUI, but ran
into some serious need of aspirin due to the fact that every piece of
style info is duplicated in every file. So I found myself patching the
nagios gui code instead, and make it include one stylesheet file (named
common.css), as well as the scripts own one. This way, I can at least
put a few common nominators in for each and every page, and it should
ease the task of beautifying the gui somewhat. Diff against cvs
attached. Apply with patch -p1.
Also, different indentation styles and parameter ordering in the
CSS-files makes cat * | sort | uniq close to useless.
The attached bash/sed-thingie will take care of making indentation
nicely uniform, and thus allow for simple scripting to find duplicate
entries. sed 4.0.9 or later required. The patch turned out to be ~120kB,
so I thought I'd rather submit the script to compute the differences
instead. Each line of sed is explained in the script, so it should be
fairly simple to remove unwanted modifications.
Cheers
--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Lead Developer
--------------060903040608080205050207
Content-Type: text/plain;
name="nagios-common-css.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="nagios-common-css.diff"
diff -urN ../nagios.patched/cgi/avail.c ./cgi/avail.c
--- ../nagios.patched/cgi/avail.c Wed Jan 21 05:56:09 2004
+++ ./cgi/avail.c Sat Aug 7 15:46:49 2004
@@ -1044,9 +1044,11 @@
printf("Nagios Availability\n");
printf("\n");
- if(use_stylesheet==TRUE)
+ if(use_stylesheet==TRUE){
+ printf("\n",url_stylesheets_path);
printf("\n",url_stylesheets_path,AVAIL_CSS);
-
+ }
+
printf("\n");
printf("\n");
diff -urN ../nagios.patched/cgi/cmd.c ./cgi/cmd.c
--- ../nagios.patched/cgi/cmd.c Fri Mar 26 07:04:04 2004
+++ ./cgi/cmd.c Sat Aug 7 15:46:49 2004
@@ -240,8 +240,10 @@
printf("External Command Interface\n");
printf("\n");
- if(use_stylesheet==TRUE)
+ if(use_stylesheet==TRUE){
+ printf("\n",url_stylesheets_path);
printf("\n",url_stylesheets_path,COMMAND_CSS);
+ }
printf("\n");
diff -urN ../nagios.patched/cgi/config.c ./cgi/config.c
--- ../nagios.patched/cgi/config.c Fri Aug 15 03:34:09 2003
+++ ./cgi/config.c Sat Aug 7 15:46:49 2004
@@ -321,8 +321,10 @@
printf("Configuration\n");
printf("\n");
- if(use_stylesheet==TRUE)
+ if(use_stylesheet==TRUE){
+ printf("\n",url_stylesheets_path);
printf("\n",url_stylesheets_path,CONFIG_CSS);
+ }
printf("\n");
diff -urN ../nagios.patched/cgi/extinfo.c ./cgi/extinfo.c
--- ../nagios.patched/cgi/extinfo.c Thu May 20 07:47:21 2004
+++ ./cgi/extinfo.c Sat Aug 7 15:46:49 2004
@@ -500,9 +500,10 @@
printf("Extended Information\n");
printf("\n");
- if(use_stylesheet==TRUE)
+ if(use_stylesheet==TRUE){
+ printf("",url_stylesheets_path);
printf("",url_stylesheets_path,EXTINFO_CSS);
-
+ }
printf("\n");
printf("\n");
diff -urN ../nagios.patched/cgi/histogram.c ./cgi/histogram.c
--- ../nagios.patched/cgi/histogram.c Wed Jan 21 05:56:09 2004
+++ ./cgi/histogram.c Sat Aug 7 15:46:49 2004
@@ -1001,8 +1001,10 @@
printf("Nagios Histogram\n");
printf("\n");
- if(use_stylesheet==TRUE)
+ if(use_stylesheet==TRUE){
+ printf("\n",url_stylesheets_path);
printf("<LINK REL='stylesh
...[email truncated]...
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]