1 ##############################################################################
2 # Copyright (c) 2016 Max Breitenfeldt and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
11 from django.template.defaultfilters import register
15 def jenkins_job_color(job_result):
16 if job_result == 'SUCCESS':
18 if job_result == 'FAILURE':
20 if job_result == 'UNSTABLE':
22 return '#646F73' # job is still building
26 def jenkins_status_color(slave_status):
27 if slave_status == 'offline':
29 if slave_status == 'online':
31 if slave_status == 'online / idle':
36 def jenkins_job_blink(job_result):
37 if job_result == '': # job is still building
38 return 'class=blink_me'