Permalink
Browse files

live notifications eye-candy

  • Loading branch information...
1 parent a62c5e9 commit a62ed7a353817ef8e0bddce096239a3fce4e7112 @comboy comboy committed Apr 7, 2012
@@ -1,6 +1,5 @@
$(document).ready ->
- window.WEB_SOCKET_SWF_LOCATION = '/WebSocketMain.swf'
jug = new Juggernaut
jug.subscribe "moci", (data) ->
console.log("Got data: " + JSON.stringify(data))
@@ -35,10 +34,19 @@ $(document).ready ->
tr_details = $('.last_runs .details.test_suite_run_'+tsr_id)
if tr_details.length != 0
tr_details.find('.current_test_unit').html(d['test_unit']['class_name'] + ' :: ' + d['test_unit']['name'])
+ tr_details.removeClass('tu_state_waiting')
+ tr_details.removeClass('tu_state_ok')
+ tr_details.removeClass('tu_state_fail')
+ switch d['result']
+ when 'W'
+ tr_details.addClass('tu_state_waiting')
+ when 'E', 'F'
+ tr_details.addClass('tu_state_fail')
+ when '.'
+ tr_details.addClass('tu_state_ok')
else
-
- if $('.last_runs tr').length > 12
- $('.last_runs tr.state_finished').slice(-6).hide()
+ if $('.last_runs tr.state_finished').length > 12
+ $('.last_runs tr.state_finished').slice(-6).remove()
@@ -29,13 +29,45 @@ table.last_runs {
table.last_runs tr.state_running.details {
display: table-row;
- text-align: center;
+ text-align: left;
}
table.last_runs tr.state_finished.details {
display: none;
}
+table.last_runs tr.state_finished td.info .time {
+ display: inline;
+}
+
+table.last_runs tr.state_finished td.info .spinner {
+ display: none;
+}
+
+table.last_runs tr.state_running td.info .time {
+ display: none;
+}
+
+table.last_runs tr.state_running td.info .spinner {
+ display: inline;
+}
+
+table.last_runs tr.details .current_test_unit {
+ font-size: 9px;
+}
+
+table.last_runs tr.details.tu_state_ok {
+ background-color:#FFF5CC;
+}
+
+table.last_runs tr.details.tu_state_waiting {
+ background-color:#FFF5CC;
+}
+
+table.last_runs tr.details.tu_state_fail {
+ background-color:#FEEBEB;
+}
+
table.no_border {
border-width: 0px;
}
@@ -1,8 +1,11 @@
%tr{:class => "test_suite_run_#{tsr.id} state_#{tsr.state}"}
- %td= tsr.updated_at
+ %td.info
+ .time
+ = tsr.updated_at
+ .spinner
+ = image_tag 'ajax_inline2.gif'
%td= tsr.test_suite.name
%td.state= tsr.state
%tr{:class => "test_suite_run_#{tsr.id} details state_#{tsr.state}"}
%td{:colspan => 3}
- = image_tag 'ajax_inline2.gif'
%span.current_test_unit

0 comments on commit a62ed7a

Please sign in to comment.