Ejemplo n.º 1
0
def status_styling(params, content):
    if params.get('status') == 'running':
        col = 'running'
    elif params.get('status') == 'Fail':
        col = 'failure'
    elif params.get('status') == 'cancelled':
        col = 'failure'
    elif params.get('finish_time') and not (params.get('status') == 'Fail'):
        col = 'pass'
    else:
        col = 'plain'
    attrs = {'class':col}
    return tr(**attrs)[content]
Ejemplo n.º 2
0
def status_styling(params, content):
    """colour row appropriately"""
    if params.get('failure') or (params.get('unknown_failures', 0) > 0
                                 or params.get('product_problems', 0) > 0):
        col = 'failure'
    elif params.get('passes', 0) > 0:
        col = 'pass'
    elif params.get('passes', 0) > 0:
        col = 'known'
    else:
        col = 'progress'
    attrs = {'class': col}
    return tr(**attrs)[content]
Ejemplo n.º 3
0
def status_styling(params, content):
    if params.get('status') == 'running':
        col = 'running'
    elif params.get('status') == 'Fail':
        col = 'failure'
    elif params.get('status') == 'cancelled':
        col = 'failure'
    elif params.get('finish_time') and not (params.get('status') == 'Fail'):
        col = 'pass'
    else:
        col = 'plain'
    attrs = {'class': col}
    return tr(**attrs)[content]
Ejemplo n.º 4
0
def status_styling(params, content):
    """make a tr containng content colourised according to params"""
    if not params.get('end_time'): 
        col = 'progress'
    elif params.get('end_time') and not params.get('failure'): 
        col = 'pass'
    elif params.get('failure') and params.get('whiteboard'): 
        col = 'known'
    elif params.get('failure'): 
        col = 'failure'
    else:
        col = 'plain'
    attrs = {'class':col}
    return tr(**attrs)[content]
Ejemplo n.º 5
0
def status_styling(params, content):
    """colour row appropriately"""
    if params.get('failure') or (
        params.get('unknown_failures',0)>0 or 
        params.get('product_problems', 0)>0):
        col = 'failure'
    elif params.get('passes',0)>0:
        col = 'pass'
    elif params.get('passes',0)>0:
        col = 'known'
    else:
        col = 'progress'
    attrs = {'class': col}
    return tr(**attrs)[content]
Ejemplo n.º 6
0
def status_styling(params, content):
    """make a tr containng content colourised according to params"""
    if not params.get('end_time'):
        col = 'progress'
    elif params.get('end_time') and not params.get('failure'):
        col = 'pass'
    elif params.get('failure') and params.get('whiteboard'):
        col = 'known'
    elif params.get('failure'):
        col = 'failure'
    else:
        col = 'plain'
    attrs = {'class': col}
    return tr(**attrs)[content]
Ejemplo n.º 7
0
def status_styling(params, content, i=''):
    """Need something here for colourised content"""
    if not params.get('finish_time'):
        col = 'progress'
    elif params.get('result') == 'PASS':
        col = 'pass'
    elif params.get('result') == 'FAIL':
        col = 'failure'
    else:
        col = 'plain'
    if params.get('step%s'%i) == 'PASS':
        col = 'pass'
    if params.get('step%s'%i) == 'FAIL':
        col = 'failure'
    attrs = {'class':col}
    return tr(**attrs)[content]
Ejemplo n.º 8
0
Archivo: logs.py Proyecto: OpenXT/bvt
def row_styling(params, content):
    """Style rows according to CSS"""
    attrs = {'class': params['kind']}
    return tr(**attrs)[content]
Ejemplo n.º 9
0
Archivo: duts.py Proyecto: OpenXT/bvt
 def row_fn(doc, columns):
     style = {'class':'pass'} if (doc.get('owner', '') == '' and \
                                      doc.get('run_bvt')) else {}
     return tr(**style)[form(method='post', action='/duts')[columns]]
Ejemplo n.º 10
0
def row_styling(params, content):
    """Style rows according to CSS"""
    attrs = {'class': params['kind']}
    return tr(**attrs)[content]