def report(uid): colors = { 'PENDING': 'cyan', 'ERROR': 'red', 'SUCCESS': 'green', 'INPROGRESS': 'yellow', 'SKIPPED': 'blue'} report = graph.report_topo(uid) for item in report: msg = '{} -> {}'.format(item[0], item[1]) if item[2]: msg += ' :: {}'.format(item[2]) click.echo(click.style(msg, fg=colors[item[1]]))
def report(uid): colors = { 'PENDING': 'cyan', 'ERROR': 'red', 'SUCCESS': 'green', 'INPROGRESS': 'yellow', 'SKIPPED': 'blue'} total = 0.0 report = graph.report_topo(uid) for item in report: msg = '{} -> {}'.format(item[0], item[1]) if item[2]: msg += ' :: {}'.format(item[2]) if item[4] and item[3]: delta = float(item[4])-float(item[3]) total += delta msg += ' D: {}'.format(delta) click.echo(click.style(msg, fg=colors[item[1]])) click.echo('Delta SUM: {}'.format(total))
def click_report(uid): colors = { 'PENDING': 'cyan', 'ERROR': 'red', 'SUCCESS': 'green', 'INPROGRESS': 'yellow', 'SKIPPED': 'blue' } total = 0.0 report = graph.report_topo(uid) for item in report: msg = '{} -> {}'.format(item[0], item[1]) if item[2]: msg += ' :: {}'.format(item[2]) if item[4] and item[3]: delta = float(item[4]) - float(item[3]) total += delta msg += ' D: {}'.format(delta) click.echo(click.style(msg, fg=colors[item[1]])) click.echo('Delta SUM: {}'.format(total))
def click_report(uid): colors = { "PENDING": "cyan", "ERROR": "red", "SUCCESS": "green", "INPROGRESS": "yellow", "SKIPPED": "blue", "NOOP": "black", } total = 0.0 report = graph.report_topo(uid) for item in report: msg = "{} -> {}".format(item[0], item[1]) if item[2]: msg += " :: {}".format(item[2]) if item[4] and item[3]: delta = float(item[4]) - float(item[3]) total += delta msg += " D: {}".format(delta) click.echo(click.style(msg, fg=colors[item[1]])) click.echo("Delta SUM: {}".format(total))