Module: check_mk
Branch: master
Commit: ad4ee8977e0e9a8c373e2587b7e535097c649492
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ad4ee8977e0e9a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Aug 22 10:33:10 2016 +0200
Removed more bad looking gif images (from custom link snapin)
---
multisite.mk | 6 +++---
web/htdocs/images/icon_link.png | Bin 0 -> 4557 bytes
web/htdocs/images/link_configuration.gif | Bin 969 -> 0 bytes
web/htdocs/images/link_downtime.gif | Bin 985 -> 0 bytes
web/htdocs/images/link_error.gif | Bin 961 -> 0 bytes
web/htdocs/images/link_events.gif | Bin 986 -> 0 bytes
web/htdocs/images/link_folder.gif | Bin 978 -> 0 bytes
web/htdocs/images/link_folder_open.gif | Bin 978 -> 0 bytes
web/htdocs/images/link_home.gif | Bin 1045 -> 0 bytes
web/htdocs/images/link_hosts.gif | Bin 1058 -> 0 bytes
web/htdocs/images/link_info.gif | Bin 1021 -> 0 bytes
web/htdocs/images/link_link.gif | Bin 1038 -> 0 bytes
web/htdocs/images/link_map.gif | Bin 1026 -> 0 bytes
web/htdocs/images/link_monitoring.gif | Bin 1024 -> 0 bytes
web/htdocs/images/link_notes.gif | Bin 1043 -> 0 bytes
web/htdocs/images/link_notifications.gif | Bin 1014 -> 0 bytes
web/htdocs/images/link_performance.gif | Bin 1025 -> 0 bytes
web/htdocs/images/link_processes.gif | Bin 1000 -> 0 bytes
web/htdocs/images/link_queue.gif | Bin 958 -> 0 bytes
web/htdocs/images/link_reporting.gif | Bin 1064 -> 0 bytes
web/htdocs/images/link_search.gif | Bin 1001 -> 0 bytes
web/plugins/sidebar/shipped.py | 18 ++++++++++++++++--
22 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/multisite.mk b/multisite.mk
index 4219522..0501d43 100644
--- a/multisite.mk
+++ b/multisite.mk
@@ -38,10 +38,10 @@ nagvis_base_url = '/nagvis'
# Links for everyone
custom_links['guest'] = [
- ( "Classical Nagios GUI", "../nagios/", "link_home.gif"
),
+ ( "Classical Nagios GUI", "../nagios/", "icon_home.png"
),
( "Addons", True, [
- ( "PNP4Nagios", "../pnp4nagios/",
"link_reporting.gif" ),
- ( "NagVis", "../nagvis/",
"link_map.gif" ),
+ ( "PNP4Nagios", "../pnp4nagios/",
"icon_pnp.png" ),
+ ( "NagVis", "../nagvis/",
"icon_nagvis.png" ),
]),
]
diff --git a/web/htdocs/images/icon_link.png b/web/htdocs/images/icon_link.png
new file mode 100644
index 0000000..869ddc3
Binary files /dev/null and b/web/htdocs/images/icon_link.png differ
diff --git a/web/htdocs/images/link_configuration.gif
b/web/htdocs/images/link_configuration.gif
deleted file mode 100644
index cfac640..0000000
Binary files a/web/htdocs/images/link_configuration.gif and /dev/null differ
diff --git a/web/htdocs/images/link_downtime.gif b/web/htdocs/images/link_downtime.gif
deleted file mode 100644
index e1fa927..0000000
Binary files a/web/htdocs/images/link_downtime.gif and /dev/null differ
diff --git a/web/htdocs/images/link_error.gif b/web/htdocs/images/link_error.gif
deleted file mode 100644
index a11f335..0000000
Binary files a/web/htdocs/images/link_error.gif and /dev/null differ
diff --git a/web/htdocs/images/link_events.gif b/web/htdocs/images/link_events.gif
deleted file mode 100644
index 0a99ceb..0000000
Binary files a/web/htdocs/images/link_events.gif and /dev/null differ
diff --git a/web/htdocs/images/link_folder.gif b/web/htdocs/images/link_folder.gif
deleted file mode 100644
index a9e901a..0000000
Binary files a/web/htdocs/images/link_folder.gif and /dev/null differ
diff --git a/web/htdocs/images/link_folder_open.gif
b/web/htdocs/images/link_folder_open.gif
deleted file mode 100644
index 8b8886e..0000000
Binary files a/web/htdocs/images/link_folder_open.gif and /dev/null differ
diff --git a/web/htdocs/images/link_home.gif b/web/htdocs/images/link_home.gif
deleted file mode 100644
index 4629492..0000000
Binary files a/web/htdocs/images/link_home.gif and /dev/null differ
diff --git a/web/htdocs/images/link_hosts.gif b/web/htdocs/images/link_hosts.gif
deleted file mode 100644
index c1c688e..0000000
Binary files a/web/htdocs/images/link_hosts.gif and /dev/null differ
diff --git a/web/htdocs/images/link_info.gif b/web/htdocs/images/link_info.gif
deleted file mode 100644
index 0422620..0000000
Binary files a/web/htdocs/images/link_info.gif and /dev/null differ
diff --git a/web/htdocs/images/link_link.gif b/web/htdocs/images/link_link.gif
deleted file mode 100644
index d317683..0000000
Binary files a/web/htdocs/images/link_link.gif and /dev/null differ
diff --git a/web/htdocs/images/link_map.gif b/web/htdocs/images/link_map.gif
deleted file mode 100644
index ba23239..0000000
Binary files a/web/htdocs/images/link_map.gif and /dev/null differ
diff --git a/web/htdocs/images/link_monitoring.gif
b/web/htdocs/images/link_monitoring.gif
deleted file mode 100644
index 006a54b..0000000
Binary files a/web/htdocs/images/link_monitoring.gif and /dev/null differ
diff --git a/web/htdocs/images/link_notes.gif b/web/htdocs/images/link_notes.gif
deleted file mode 100644
index b3ff249..0000000
Binary files a/web/htdocs/images/link_notes.gif and /dev/null differ
diff --git a/web/htdocs/images/link_notifications.gif
b/web/htdocs/images/link_notifications.gif
deleted file mode 100644
index 9c4e728..0000000
Binary files a/web/htdocs/images/link_notifications.gif and /dev/null differ
diff --git a/web/htdocs/images/link_performance.gif
b/web/htdocs/images/link_performance.gif
deleted file mode 100644
index d6cdfaf..0000000
Binary files a/web/htdocs/images/link_performance.gif and /dev/null differ
diff --git a/web/htdocs/images/link_processes.gif b/web/htdocs/images/link_processes.gif
deleted file mode 100644
index b89b5f6..0000000
Binary files a/web/htdocs/images/link_processes.gif and /dev/null differ
diff --git a/web/htdocs/images/link_queue.gif b/web/htdocs/images/link_queue.gif
deleted file mode 100644
index eab5224..0000000
Binary files a/web/htdocs/images/link_queue.gif and /dev/null differ
diff --git a/web/htdocs/images/link_reporting.gif b/web/htdocs/images/link_reporting.gif
deleted file mode 100644
index 129bab5..0000000
Binary files a/web/htdocs/images/link_reporting.gif and /dev/null differ
diff --git a/web/htdocs/images/link_search.gif b/web/htdocs/images/link_search.gif
deleted file mode 100644
index 2e6dfde..0000000
Binary files a/web/htdocs/images/link_search.gif and /dev/null differ
diff --git a/web/plugins/sidebar/shipped.py b/web/plugins/sidebar/shipped.py
index 57811cf..97b59cd 100644
--- a/web/plugins/sidebar/shipped.py
+++ b/web/plugins/sidebar/shipped.py
@@ -1427,10 +1427,20 @@ def render_custom_links():
html.end_foldable_container()
elif type(entry[1]) == str:
frame = len(entry) > 3 and entry[3] or "main"
+
if len(entry) > 2 and entry[2]:
- html.write('<img src="images/%s">' %
entry[2])
+ icon_file = entry[2]
+
+ # Old configs used files named "link_<name>.gif".
Those .gif files have
+ # been removed from Check_MK. Replacing such images with the
default icon
+ if icon_file.endswith(".gif"):
+ icon_file = "icon_link.png"
else:
- html.write('<img
src="images/link_link.gif">')
+ icon_file = "icon_link.png"
+
+ # TODO: Recode to use html.icon / html.render_icon
+ html.write('<img class="icon"
align="absmiddle" src="images/%s">' % icon_file)
+
simplelink(entry[0], entry[1], frame)
else:
html.write(_("Second part of tuple must be list or string, not
%s\n") % str(entry[1]))
@@ -1453,6 +1463,10 @@ sidebar_snapins["custom_links"] = {
#snapin_custom_links img {
margin-right: 5px;
}
+#snapin_custom_links img.icon {
+ width: 16px;
+ height: 16px;
+}
"""
}