diff options
author | Julien Lancelot <julien.lancelot@gmail.com> | 2013-02-06 08:39:47 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@gmail.com> | 2013-02-06 08:40:02 +0100 |
commit | a83774108ce39d7e3823fa4bbfec380b1628d0d3 (patch) | |
tree | 12c7242ef56aed1bca6468497551ae0599efebe1 /sonar-server/src/main/webapp | |
parent | ef64bc8cd49434ecec69f3ff966b862a33c664b5 (diff) | |
download | sonarqube-a83774108ce39d7e3823fa4bbfec380b1628d0d3.tar.gz sonarqube-a83774108ce39d7e3823fa4bbfec380b1628d0d3.zip |
SONAR-4093 Add test information
Diffstat (limited to 'sonar-server/src/main/webapp')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable_working_view.erb | 61 |
1 files changed, 40 insertions, 21 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable_working_view.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable_working_view.erb index 6ddf7d2bda4..e202cdd2093 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable_working_view.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable_working_view.erb @@ -5,27 +5,46 @@ <br/> <div class="accordion-body"> <% @test_case_by_test_plan.sort_by{|test_plan, test_cases| test_plan.component.longName}.each do |test_plan, test_cases| %> - <table class="data"> - <thead> - <tr> - <th> - <% resource_key = test_plan.component.key %> - <a href="<%= ApplicationController.root_context -%>/resource/index/<%= resource_key -%>?display_title=true&tab=source" - onclick="openAccordionItem(this.href, this); return false;"><%= test_plan.component.longName %> - </a> - </th> - </tr> - </thead> - <tbody> - <% test_cases.sort_by{|test_case| test_case.name}.each do |test_case| %> - <tr class="<%= cycle("even", "odd") -%>"> - <td> - <%= test_case.name -%> - </td> - </tr> - <% end %> - </tbody> - </table> + <% resource_key = test_plan.component.key %> + <table class="data"> + <thead> + <tr> + <th colspan="3"> + <a href="<%= ApplicationController.root_context -%>/resource/index/<%= resource_key -%>?display_title=true&tab=source" + onclick="openAccordionItem(this.href, this); return false;"><%= test_plan.component.longName %> + </a> + </th> + </tr> + </thead> + <tbody> + <% test_cases.sort_by{|test_case| test_case.name}.each do |test_case| %> + <tr class="<%= cycle("even", "odd") -%>"> + <% + status = test_case.status + case status + when 'ok' + icon_url = ApplicationController.root_context + "/images/levels/ok.png" + when 'failure' + icon_url = ApplicationController.root_context + "/images/warning.png" + when 'error' + icon_url = ApplicationController.root_context + "/images/levels/error.png" + when 'skipped' + icon_url = ApplicationController.root_context + "/images/levels/none.png" + else + icon_url = ApplicationController.root_context + "/images/levels/" + status + ".png" + end + %> + <td class="thin" nowrap> + <img src="<%= icon_url -%>"/> + </td> + <td class="thin right" nowrap><%= test_case.durationInMs -%> ms</td> + <td> + <%= test_case.name -%> + </td> + </tr> + <% end %> + </tbody> + </table> <br/> <% end %> </div> |