[refs #223] Fix build status color helpers
This commit is contained in:
parent
b3d7091db0
commit
348fd40daf
|
@ -463,6 +463,19 @@ table.tablesorter tr td.buttons a span.delete {
|
||||||
|
|
||||||
#fork-and-edit {display:block;}
|
#fork-and-edit {display:block;}
|
||||||
|
|
||||||
|
.notify.blue div.success {
|
||||||
|
border: 1px solid #bad099;
|
||||||
|
background: #d7e599;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.notify.blue div.error {
|
||||||
|
float: left;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
background-color: #FBE3E4;
|
||||||
|
border-color: #FBC2C4;
|
||||||
|
}
|
||||||
|
|
||||||
div.notify.blue div.nocolor {
|
div.notify.blue div.nocolor {
|
||||||
float: left;
|
float: left;
|
||||||
border: 1px solid #a9c6dd;
|
border: 1px solid #a9c6dd;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
module BuildListsHelper
|
module BuildListsHelper
|
||||||
def build_list_status_color(status)
|
def build_list_status_color(status)
|
||||||
if [BuildList::BUILD_PUBLISHED, BuildServer::SUCCESS].include? status
|
if [BuildList::BUILD_PUBLISHED, BuildServer::SUCCESS].include? status
|
||||||
return 'green'
|
return 'success'
|
||||||
end
|
end
|
||||||
if [BuildServer::BUILD_ERROR, BuildServer::PLATFORM_NOT_FOUND,
|
if [BuildServer::BUILD_ERROR, BuildServer::PLATFORM_NOT_FOUND,
|
||||||
BuildServer::PROJECT_NOT_FOUND,BuildServer::PROJECT_VERSION_NOT_FOUND, BuildList::FAILED_PUBLISH].include? status
|
BuildServer::PROJECT_NOT_FOUND,BuildServer::PROJECT_VERSION_NOT_FOUND, BuildList::FAILED_PUBLISH].include? status
|
||||||
return 'red'
|
return 'error'
|
||||||
end
|
end
|
||||||
|
|
||||||
'nocolor'
|
'nocolor'
|
||||||
|
@ -21,14 +21,4 @@ module BuildListsHelper
|
||||||
|
|
||||||
''
|
''
|
||||||
end
|
end
|
||||||
|
|
||||||
def build_list_status(build_list)
|
|
||||||
if [BuildList::BUILD_PUBLISHED, BuildServer::SUCCESS].include? build_list.status
|
|
||||||
"success"
|
|
||||||
elsif [BuildServer::BUILD_ERROR, BuildServer::PLATFORM_NOT_FOUND, BuildServer::PROJECT_NOT_FOUND,
|
|
||||||
BuildServer::PROJECT_VERSION_NOT_FOUND, BuildList::FAILED_PUBLISH].include? build_list.status
|
|
||||||
"error"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
%tr{:id => "row#{build_list_counter}", :class => "#{build_list_status(build_list)}"}
|
%tr{:id => "row#{build_list_counter}", :class => "#{build_list_status_color(build_list.status)}"}
|
||||||
%td= link_to (build_list.bs_id.present? ? build_list.bs_id : t("layout.build_lists.bs_id_not_set")), build_list
|
%td= link_to (build_list.bs_id.present? ? build_list.bs_id : t("layout.build_lists.bs_id_not_set")), build_list
|
||||||
%td= build_list.human_status
|
%td= build_list.human_status
|
||||||
%td= link_to build_list.project.name, build_list.project
|
%td= link_to build_list.project.name, build_list.project
|
||||||
|
|
Loading…
Reference in New Issue