def _check_level_to_classname(check):
    """
    Return the appropriated css classname for the check level
    """
    if check.has_failed:
        if check.level == check.LEVEL_ERROR:
            return 'danger'
        elif check.level == check.LEVEL_WARNING:
            return 'warning'
        else:
            return 'info'

    return 'default'