'Update stats views.'

def update_views(self):

    super(Plugin, self).update_views()
    for key in ['user', 'system', 'iowait']:
        if (key in self.stats):
            self.views[key]['decoration'] = self.get_alert_log(self.stats[key], header=key)
    for key in ['steal', 'total']:
        if (key in self.stats):
            self.views[key]['decoration'] = self.get_alert(self.stats[key], header=key)
    for key in ['ctx_switches']:
        if (key in self.stats):
            self.views[key]['decoration'] = self.get_alert(self.stats[key], maximum=(100 * self.stats['cpucore']), header=key)
    for key in ['nice', 'irq', 'iowait', 'steal', 'ctx_switches', 'interrupts', 'soft_interrupts', 'syscalls']:
        if (key in self.stats):
            self.views[key]['optional'] = True
