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]
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]
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]
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]
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]
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]
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]
def row_styling(params, content): """Style rows according to CSS""" attrs = {'class': params['kind']} return tr(**attrs)[content]
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]]