2012-03-18 08:20:31 +00:00
|
|
|
module BuildListsHelper
|
|
|
|
def build_list_status_color(status)
|
|
|
|
if [BuildList::BUILD_PUBLISHED, BuildServer::SUCCESS].include? status
|
2012-03-19 08:39:46 +00:00
|
|
|
return 'success'
|
2012-03-18 08:20:31 +00:00
|
|
|
end
|
|
|
|
if [BuildServer::BUILD_ERROR, BuildServer::PLATFORM_NOT_FOUND,
|
|
|
|
BuildServer::PROJECT_NOT_FOUND,BuildServer::PROJECT_VERSION_NOT_FOUND, BuildList::FAILED_PUBLISH].include? status
|
2012-03-19 08:39:46 +00:00
|
|
|
return 'error'
|
2012-03-18 08:20:31 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
'nocolor'
|
|
|
|
end
|
|
|
|
|
|
|
|
def build_list_item_status_color(status)
|
|
|
|
if BuildServer::SUCCESS == status
|
|
|
|
return 'success'
|
|
|
|
end
|
|
|
|
if [BuildServer::DEPENDENCIES_ERROR, BuildServer::BUILD_ERROR, BuildList::Item::GIT_ERROR].include? status
|
|
|
|
return 'error'
|
|
|
|
end
|
|
|
|
|
|
|
|
''
|
|
|
|
end
|
|
|
|
end
|