With 1.6 there where huge changes inside the web page generation and also coming with this many extension programmed before are not working anymore.
Now I have one problem what I cannot solve completely by myself.
Own HW/SW inventory plugin also uses own painters to color some fields inside the HW/SW inventory table.
With 1.5 these painters where defined inside the same file as the display hints for the inventory table.
Now with 1.6 there is no chance to define these painters outside from ~/lib/python/cmk/gui/plugins/views/inventory.py
If someone wonders what such painters do.
Automatic coloring if the date is in the future or past.
@decorate_inv_paint
def inv_paint_date_status(date_string):
warn_days = -90
crit_days = -30
# check if date_sting not None, if so return no CSS Class and None
if date_string is None:
return '', ''
try:
days = int((time.time() - time.mktime(time.strptime(date_string, '%Y-%m-%d'))) / 86400)
except ValueError:
return '', date_string
if days > crit_days:
css_class = 'date_crit'
elif days > warn_days:
css_class = 'date_warn'
else:
css_class = 'date_default'
return css_class, '%s' % date_string
If someone knows how to use painters now with 1.6 in combination with HW/SW inventory tables it would be nice to know