[icinga-checkins] icinga.org: icinga-core/dev/ido: classic-ui: optimized cgi jpg filesizes

git at icinga.org git at icinga.org
Wed Oct 3 01:15:26 CEST 2012


Module: icinga-core
Branch: dev/ido
Commit: f6582801b75c89a5d51960b05f72176e371705da
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=f6582801b75c89a5d51960b05f72176e371705da

Author: Ricardo Bartels <ricardo at bitchbrothers.com>
Date:   Sun Sep 30 00:24:58 2012 +0200

classic-ui: optimized cgi jpg filesizes

* removed unused files
* optimized file size
* fixed css to work properly again when displaying only icinga logo in tac header

114132 bytes -> 7326 bytes [6.41%]

Kudos to calestyo for the idea!

---

 cgi/cgiutils.c                                   |    5 +----
 cgi/tac.c                                        |    2 +-
 html/images/Icinga_Header_Webinterface.jpg       |  Bin 40593 -> 3310 bytes
 html/images/Icinga_Header_Webinterface_Pixel.jpg |  Bin 18524 -> 538 bytes
 html/images/Icinga_TAC_Header_Webinterface.jpg   |  Bin 3229 -> 3478 bytes
 html/images/tacdisabled.jpg                      |  Bin 11261 -> 0 bytes
 html/images/tacenabled.jpg                       |  Bin 11269 -> 0 bytes
 html/stylesheets/common.css                      |    9 +++++++++
 8 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/cgi/cgiutils.c b/cgi/cgiutils.c
index baaf107..5ac6509 100644
--- a/cgi/cgiutils.c
+++ b/cgi/cgiutils.c
@@ -1139,10 +1139,7 @@ void document_header(int cgi_id, int use_stylesheet, char *cgi_title) {
 	printf("<title>%s</title>\n", cgi_title);
 
 	if (cgi_id == TAC_CGI_ID && tac_header == TRUE) {
-		if (show_tac_header == TRUE)
-			printf("<LINK REL='stylesheet' TYPE='text/css' HREF='%s%s'>\n", url_stylesheets_path, TAC_HEADER_CSS);
-		else //no? show the classic header as the default
-			printf("<LINK REL='stylesheet' TYPE='text/css' HREF='%sinterface/common.css'>\n", url_stylesheets_path);
+		printf("<LINK REL='stylesheet' TYPE='text/css' HREF='%s%s'>\n", url_stylesheets_path, (show_tac_header == TRUE) ? TAC_HEADER_CSS : COMMON_CSS);
 	} else if (use_stylesheet) {
 		printf("<LINK REL='stylesheet' TYPE='text/css' HREF='%s%s'>\n", url_stylesheets_path, COMMON_CSS);
 		printf("<LINK REL='stylesheet' TYPE='text/css' HREF='%s%s'>\n", url_stylesheets_path, cgi_css);
diff --git a/cgi/tac.c b/cgi/tac.c
index bd9ef84..54815dd 100644
--- a/cgi/tac.c
+++ b/cgi/tac.c
@@ -1205,7 +1205,7 @@ void display_tac_overview(void) {
 
 	if (tac_header == TRUE && show_tac_header == FALSE) { // we want the top header, but not the tac version
 
-		printf("	<div id='banner' align='center'><img src='%s%s' alt='%s' /></div>", url_images_path, TAC_HEADER_DEFAULT_LOGO, TAC_HEADER_DEFAULT_LOGO_ALT);
+		printf("	<div class='tac_banner' align='center'><img src='%s%s' alt='%s' /></div>", url_images_path, TAC_HEADER_DEFAULT_LOGO, TAC_HEADER_DEFAULT_LOGO_ALT);
 		return; //we're done here
 
 	} else if (tac_header == TRUE && show_tac_header == TRUE) { // we want the tac header
diff --git a/html/images/Icinga_Header_Webinterface.jpg b/html/images/Icinga_Header_Webinterface.jpg
index 9026379..158154d 100644
Binary files a/html/images/Icinga_Header_Webinterface.jpg and b/html/images/Icinga_Header_Webinterface.jpg differ
diff --git a/html/images/Icinga_Header_Webinterface_Pixel.jpg b/html/images/Icinga_Header_Webinterface_Pixel.jpg
index 31fddb8..06ec5b8 100644
Binary files a/html/images/Icinga_Header_Webinterface_Pixel.jpg and b/html/images/Icinga_Header_Webinterface_Pixel.jpg differ
diff --git a/html/images/Icinga_TAC_Header_Webinterface.jpg b/html/images/Icinga_TAC_Header_Webinterface.jpg
index aa30e2a..dfd8ab4 100644
Binary files a/html/images/Icinga_TAC_Header_Webinterface.jpg and b/html/images/Icinga_TAC_Header_Webinterface.jpg differ
diff --git a/html/images/tacdisabled.jpg b/html/images/tacdisabled.jpg
deleted file mode 100644
index 1545cbd..0000000
Binary files a/html/images/tacdisabled.jpg and /dev/null differ
diff --git a/html/images/tacenabled.jpg b/html/images/tacenabled.jpg
deleted file mode 100644
index 5858972..0000000
Binary files a/html/images/tacenabled.jpg and /dev/null differ
diff --git a/html/stylesheets/common.css b/html/stylesheets/common.css
index 72ef208..160c163 100644
--- a/html/stylesheets/common.css
+++ b/html/stylesheets/common.css
@@ -199,3 +199,12 @@ a img {
 table.linkBox { margin-top: 20px; }
 td.linkBox a { color: #000; margin-left: 5px;  padding-left: 10px;  background: url(../images/interface/menu_li1.gif) 0 0.35em no-repeat;  }
 td.linkBox a:hover { color: #6e7475; background: url(../images/interface/menu_li2.gif) 0 0.35em no-repeat;  }
+
+.tac { margin: 0px; }
+
+.tac_banner {
+	width: 100%;
+	height: 70px;
+	line-height: 70px;
+	background: #ededed url(../images/Icinga_Header_Webinterface_Pixel.jpg) top left repeat-x;
+}





More information about the icinga-checkins mailing list