aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-02-06 10:13:43 +0100
committerJulien Lancelot <julien.lancelot@gmail.com>2013-02-06 10:13:43 +0100
commit3c86fc9b760e0f663e85673a1ddff51f2b0494b9 (patch)
treed4405442108c5a39c9cb8e18729deb91485f1821 /sonar-server/src/main
parenta83774108ce39d7e3823fa4bbfec380b1628d0d3 (diff)
downloadsonarqube-3c86fc9b760e0f663e85673a1ddff51f2b0494b9.tar.gz
sonarqube-3c86fc9b760e0f663e85673a1ddff51f2b0494b9.zip
Integrate Test API update in tests viewer
Diffstat (limited to 'sonar-server/src/main')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable_working_view.erb17
-rw-r--r--sonar-server/src/main/webapp/images/tests/FAILURE.pngbin0 -> 613 bytes
-rw-r--r--sonar-server/src/main/webapp/images/tests/SKIPPED.pngbin0 -> 1297 bytes
-rw-r--r--sonar-server/src/main/webapp/images/tests/error.pngbin0 -> 1297 bytes
-rw-r--r--sonar-server/src/main/webapp/images/tests/ok.pngbin0 -> 1297 bytes
-rw-r--r--sonar-server/src/main/webapp/javascripts/resource.js18
6 files changed, 11 insertions, 24 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 e202cdd2093..7254910a470 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
@@ -19,23 +19,8 @@
<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 -%>"/>
+ <img src="<%= ApplicationController.root_context + "/images/tests/" + test_case.status.name + ".png" -%>"/>
</td>
<td class="thin right" nowrap><%= test_case.durationInMs -%> ms</td>
<td>
diff --git a/sonar-server/src/main/webapp/images/tests/FAILURE.png b/sonar-server/src/main/webapp/images/tests/FAILURE.png
new file mode 100644
index 00000000000..f00e4264181
--- /dev/null
+++ b/sonar-server/src/main/webapp/images/tests/FAILURE.png
Binary files differ
diff --git a/sonar-server/src/main/webapp/images/tests/SKIPPED.png b/sonar-server/src/main/webapp/images/tests/SKIPPED.png
new file mode 100644
index 00000000000..6e871b22585
--- /dev/null
+++ b/sonar-server/src/main/webapp/images/tests/SKIPPED.png
Binary files differ
diff --git a/sonar-server/src/main/webapp/images/tests/error.png b/sonar-server/src/main/webapp/images/tests/error.png
new file mode 100644
index 00000000000..0da4d846a66
--- /dev/null
+++ b/sonar-server/src/main/webapp/images/tests/error.png
Binary files differ
diff --git a/sonar-server/src/main/webapp/images/tests/ok.png b/sonar-server/src/main/webapp/images/tests/ok.png
new file mode 100644
index 00000000000..fb454cefd5c
--- /dev/null
+++ b/sonar-server/src/main/webapp/images/tests/ok.png
Binary files differ
diff --git a/sonar-server/src/main/webapp/javascripts/resource.js b/sonar-server/src/main/webapp/javascripts/resource.js
index 1972e35db58..5f5347d2d4a 100644
--- a/sonar-server/src/main/webapp/javascripts/resource.js
+++ b/sonar-server/src/main/webapp/javascripts/resource.js
@@ -186,14 +186,16 @@ function hVF(elt, line) {
/*
Functions used in tests viewer
*/
-function expandTests(index){
- $j(".tests_viewer #test_collapseLink_"+ index).show();
- $j(".tests_viewer #test_expandLink_"+ index).hide();
- $j(".tests_viewer #test_message_"+ index).show();
+function expandTests(index, elt){
+ var parent = $j(elt).closest('.test_name_'+index);
+ parent.find(".test_expandLink_"+ index).hide();
+ parent.find(".test_collapseLink_"+ index).show();
+ parent.next(".tests_viewer .test_message_"+ index).show();
}
-function collapseTests(index){
- $j(".tests_viewer #test_collapseLink_"+ index).hide();
- $j(".tests_viewer #test_expandLink_"+ index).show();
- $j(".tests_viewer #test_message_"+ index).hide();
+function collapseTests(index, elt){
+ var parent = $j(elt).closest('.test_name_'+index);
+ parent.find(".test_collapseLink_"+ index).hide();
+ parent.find(".test_expandLink_"+ index).show();
+ parent.next(".tests_viewer .test_message_"+ index).hide();
} \ No newline at end of file