Module: check_mk
Branch: master
Commit: 50a72721ea7d7e5e9fe9630fcace261b0a3853d1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=50a72721ea7d7e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Feb 15 08:29:13 2012 +0100
Move reschedule icon to first position
That way this icon is better aligned
---
web/plugins/icons/builtin.py | 80 +++++++++++++++++++++---------------------
1 files changed, 40 insertions(+), 40 deletions(-)
diff --git a/web/plugins/icons/builtin.py b/web/plugins/icons/builtin.py
index 9b51479..09cc393 100644
--- a/web/plugins/icons/builtin.py
+++ b/web/plugins/icons/builtin.py
@@ -75,6 +75,46 @@ multisite_icons.append({
'paint': paint_icon_image,
})
+
+# +----------------------------------------------------------------------+
+# | ____ _ _ _ |
+# | | _ \ ___ ___ ___| |__ ___ __| |_ _| | ___ |
+# | | |_) / _ \/ __|/ __| '_ \ / _ \/ _` | | | | |/ _ \ |
+# | | _ < __/\__ \ (__| | | | __/ (_| | |_| | | __/ |
+# | |_| \_\___||___/\___|_| |_|\___|\__,_|\__,_|_|\___| |
+# | |
+# +----------------------------------------------------------------------+
+
+def paint_reschedule(what, row, tags, custom_vars):
+ # Reschedule button
+ if (row[what + "_active_checks_enabled"] == 1
+ or row[what + '_check_command'].startswith('check_mk-')) \
+ and config.may('action.reschedule'):
+
+ servicedesc = ''
+ wait_svc = ''
+ icon = 'icon_reload'
+ txt = _('Reschedule an immediate check of this %s') % _(what)
+
+ if what == 'service':
+ servicedesc = row['service_description']
+ wait_svc = servicedesc
+
+ # Use Check_MK service for cmk based services
+ if row[what + '_check_command'].startswith('check_mk-'):
+ servicedesc = 'Check_MK'
+ icon = 'icon_reload_cmk'
+ txt = _('Reschedule an immediate check of the
\'Check_MK\' service')
+
+ return '<a href=\"javascript:void(0);\" ' \
+ 'onclick="performAction(this, \'reschedule\',
\'%s\', \'%s\', \'%s\', \'%s\');">' \
+ '<img class=icon title="%s" src="images/%s.gif"
/></a>' % \
+ (row["site"], row["host_name"], servicedesc,
wait_svc, txt, icon)
+
+multisite_icons.append({
+ 'columns': [ 'active_checks_enabled' ],
+ 'paint': paint_reschedule,
+})
# +----------------------------------------------------------------------+
# | _ _ _ _ |
# | / \ ___| | ___ __ _____ _| | ___ __| | __ _ ___ |
@@ -409,43 +449,3 @@ def paint_aggregations(what, row, tags, custom_vars):
multisite_icons.append({
'paint': paint_aggregations,
})
-
-# +----------------------------------------------------------------------+
-# | ____ _ _ _ |
-# | | _ \ ___ ___ ___| |__ ___ __| |_ _| | ___ |
-# | | |_) / _ \/ __|/ __| '_ \ / _ \/ _` | | | | |/ _ \ |
-# | | _ < __/\__ \ (__| | | | __/ (_| | |_| | | __/ |
-# | |_| \_\___||___/\___|_| |_|\___|\__,_|\__,_|_|\___| |
-# | |
-# +----------------------------------------------------------------------+
-
-def paint_reschedule(what, row, tags, custom_vars):
- # Reschedule button
- if (row[what + "_active_checks_enabled"] == 1
- or row[what + '_check_command'].startswith('check_mk-')) \
- and config.may('action.reschedule'):
-
- servicedesc = ''
- wait_svc = ''
- icon = 'icon_reload'
- txt = _('Reschedule an immediate check of this %s') % _(what)
-
- if what == 'service':
- servicedesc = row['service_description']
- wait_svc = servicedesc
-
- # Use Check_MK service for cmk based services
- if row[what + '_check_command'].startswith('check_mk-'):
- servicedesc = 'Check_MK'
- icon = 'icon_reload_cmk'
- txt = _('Reschedule an immediate check of the
\'Check_MK\' service')
-
- return '<a href=\"javascript:void(0);\" ' \
- 'onclick="performAction(this, \'reschedule\',
\'%s\', \'%s\', \'%s\', \'%s\');">' \
- '<img class=icon title="%s" src="images/%s.gif"
/></a>' % \
- (row["site"], row["host_name"], servicedesc,
wait_svc, txt, icon)
-
-multisite_icons.append({
- 'columns': [ 'active_checks_enabled' ],
- 'paint': paint_reschedule,
-})