banter 0.8.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/.travis.yml +8 -0
  4. data/Gemfile +2 -0
  5. data/Rakefile +29 -0
  6. data/lib/banter/subscriber.rb +18 -0
  7. data/lib/banter/version.rb +1 -1
  8. data/lib/banter/web.rb +6 -0
  9. data/lib/banter/web/application.rb +62 -13
  10. data/lib/banter/web/helpers.rb +6 -2
  11. data/lib/banter/web/models/banter_message.rb +45 -5
  12. data/lib/banter/web/models/banter_worker.rb +5 -0
  13. data/lib/banter/web/serializers/banter_message_serializer.rb +34 -0
  14. data/lib/banter/web/serializers/banter_worker_serializer.rb +30 -0
  15. data/lib/banter/web/serializers/subscriber_serializer.rb +26 -0
  16. data/spec/banter/subscriber_spec.rb +82 -1
  17. data/spec/banter/web/application_spec.rb +173 -2
  18. data/spec/factories/banter_messages.rb +28 -0
  19. data/spec/spec_helper.rb +0 -1
  20. data/web/assets/javascripts/banter.js +449 -0
  21. data/web/assets/javascripts/dashboard_app/app.coffee +4 -0
  22. data/web/assets/javascripts/dashboard_app/controllers/message_controller.coffee +27 -0
  23. data/web/assets/javascripts/dashboard_app/controllers/messages_controller.coffee +57 -0
  24. data/web/assets/javascripts/dashboard_app/controllers/subscribers_controller.coffee +25 -0
  25. data/web/assets/javascripts/dashboard_app/controllers/worker_controller.coffee +30 -0
  26. data/web/assets/javascripts/dashboard_app/controllers/workers_list_controller.coffee +28 -0
  27. data/web/assets/javascripts/dashboard_app/routes.coffee +82 -0
  28. data/web/assets/javascripts/dashboard_app/services/common_methods_service.coffee +6 -0
  29. data/web/assets/javascripts/dashboard_app/services/message_methods_service.coffee +18 -0
  30. data/web/assets/javascripts/dashboard_app/services/messages_service.coffee +17 -0
  31. data/web/assets/javascripts/dashboard_app/services/subscribers_service.coffee +8 -0
  32. data/web/assets/javascripts/dashboard_app/services/worker_methods_service.coffee +11 -0
  33. data/web/assets/javascripts/dashboard_app/services/worker_service.coffee +15 -0
  34. data/web/assets/javascripts/ng-prettyjson.js +15 -0
  35. data/web/assets/stylesheets/banter.css +13 -1
  36. data/web/views/_message.haml +59 -0
  37. data/web/views/_messages.haml +77 -0
  38. data/web/views/_subscribers.haml +22 -0
  39. data/web/views/_worker.haml +52 -0
  40. data/web/views/_workers_list.haml +35 -0
  41. data/web/views/index.haml +16 -29
  42. data/web/views/layout.haml +16 -10
  43. metadata +28 -7
  44. data/web/views/message.haml +0 -52
  45. data/web/views/messages.haml +0 -20
  46. data/web/views/subscribers.haml +0 -17
  47. data/web/views/worker.haml +0 -51
@@ -0,0 +1,77 @@
1
+ .clearfix
2
+
3
+ %div.extra-bold.pull-left.btn.font-size-lg{data: {'ng-show' => "worker", 'ng-class' => "{'bg-danger' : !isWorkerAlive(worker), 'bg-success': isWorkerExecuting(worker) && isWorkerAlive(worker), 'bg-info': !isWorkerExecuting(worker) && isWorkerAlive(worker)}" }}
4
+ %span{data: { 'ng-show' => 'isWorkerExecuting(worker)'}}
5
+ %span.glyphicon.glyphicon-refresh.spin
6
+ WORKING
7
+ %span{data: { 'ng-show' => '!isWorkerExecuting(worker) && isWorkerAlive(worker)'}}
8
+ %span.glyphicon.glyphicon-play-circle
9
+ IDLE
10
+ %span{data: { 'ng-show' => '!isWorkerAlive(worker)'}}
11
+ %span.glyphicon.glyphicon-off
12
+ DEAD
13
+
14
+
15
+ .pull-right
16
+ .btn-group{data: { 'ng-show' => "!isAutoUpdating()"}}
17
+ %a.btn.btn-default{data: { 'ng-click' => 'getFirstPage()', 'ng-disabled' => "!isAutoUpdating() && page == 1"}}
18
+ %span.glyphicon.glyphicon-fast-backward
19
+ %a.btn.btn-default{data: { 'ng-click' => 'getPreviousPage()', 'ng-disabled' => "!isAutoUpdating() && page == 1"}}
20
+ %span.glyphicon.glyphicon-backward
21
+ %a.btn.btn-default{data: { 'ng-click' => 'getNextPage()'}}
22
+ %span.glyphicon.glyphicon-forward
23
+
24
+ %a.btn.btn-primary{data: { 'ng-click' => 'pauseUpdating()', 'ng-show' => "isAutoUpdating()"}}
25
+ %span.glyphicon.glyphicon-pause
26
+ Pause Polling
27
+ %a.btn.btn-primary{data: { 'ng-click' => 'resumeUpdating()', 'ng-show' => "!isAutoUpdating()"}}
28
+ %span.glyphicon.glyphicon-play
29
+ Resume Polling
30
+ %h2{data: { 'ng-if' => '!worker && !subscriber'}}
31
+ Messages
32
+ %h2{data: { 'ng-if' => 'subscriber'}}
33
+ Messages for {{subscriber}}
34
+
35
+ .clearfix
36
+ %div{ data: {'ng-if' => 'worker'}}
37
+ %h2
38
+ Messages processed on {{worker.process_name}} (PID: {{worker.pid}} )
39
+ {{ worker.job_count }}
40
+  
41
+ (
42
+ %span.text-success {{worker.success_count}} Succeeded
43
+ \/
44
+ %span.text-warning {{worker.failed_count}} Failed
45
+ )
46
+
47
+ .table.table-responsive.margin-top-md
48
+ %table.table.table-striped.table-bordered.table-hover
49
+ %thead
50
+ %tr
51
+ %th Worker
52
+ %th Subscriber
53
+ %th Status
54
+ %th Time Taken
55
+ %th Started
56
+ %th Finished
57
+ %th
58
+ %tbody
59
+ %tr{data: { 'ng-repeat' => 'message in messages', 'ng-class' => "{'danger': isMessageFailed(message)}"}}
60
+ %td
61
+ %a{data: { 'ng-href' => dashboard_path("workers/{{message.worker.id}}")}}
62
+ {{ message.worker.process_name}}\#{{message.worker.pid}}
63
+ %td
64
+ %a{data: {'ng-href' => dashboard_path("subscribers/{{message.subscriber_class}}/messages")}}
65
+ {{ message.subscriber_class }}
66
+ %td {{ message.status }}
67
+ %td
68
+ %div{data: {'ng-if' => 'message.done_at' }}
69
+ {{ timeElapsed(message) }}ms
70
+ %td {{ asTime(message.started_at) | amDateFormat:'MM/DD/YYYY, h:mm:ss a' }}
71
+ %td
72
+ %div{data: {'ng-if' => 'message.done_at' }}
73
+ {{ asTime(message.done_at) | amDateFormat:'MM/DD/YYYY, h:mm:ss a' }}
74
+ %th
75
+ %a{data: { 'ng-href' => dashboard_path("messages/{{message.id}}") }}
76
+ View
77
+ %span.glyphicon.glyphicon-chevron-right
@@ -0,0 +1,22 @@
1
+ %h2 Subscribers
2
+ .table.table-responsive
3
+ %table.table.table-striped.table-bordered.table-hover
4
+ %thead
5
+ %tr
6
+ %th Subscriber
7
+ %th Messages Processed
8
+ %th Processing
9
+ %th Succeeded
10
+ %th Errored
11
+ %th Validation Failed
12
+ %tbody
13
+ %tr{data: {'ng-repeat' => 'subscriber in subscribers'}}
14
+ %td
15
+ %a{data: { 'ng-href' => dashboard_path("subscribers/{{subscriber.class_name}}/messages")}}
16
+ {{ subscriber.class_name }}
17
+ %td {{ subscriber.total }}
18
+ %td {{ subscriber.started_count }}
19
+ %td {{ subscriber.success_count }}
20
+ %td {{ subscriber.errored_count }}
21
+ %td {{ subscriber.validation_failed_count }}
22
+
@@ -0,0 +1,52 @@
1
+ .clearfix
2
+ %div.extra-bold.pull-right.padding-large.font-size-lg.rounded-corners-md{data: { 'ng-class' => "{'bg-danger' : !isWorkerAlive(worker), 'bg-success': isWorkerExecuting(worker) && isWorkerAlive(worker), 'bg-info': !isWorkerExecuting(worker) && isWorkerAlive(worker)}" }}
3
+ %span{data: { 'ng-show' => 'isWorkerExecuting(worker)'}}
4
+ %span.glyphicon.glyphicon-refresh.spin
5
+ WORKING
6
+ %span{data: { 'ng-show' => '!isWorkerExecuting(worker)'}}
7
+ %span.glyphicon.glyphicon-play-circle
8
+ IDLE
9
+ %span{data: { 'ng-show' => '!isWorkerAlive(worker)'}}
10
+ %span.glyphicon.glyphicon-off
11
+ DEAD
12
+ %h2
13
+ Worker
14
+
15
+ %ul.list-group
16
+ %li.list-group-item.row
17
+ .col-sm-3.bold Host Name
18
+ .col-sm-9 {{ worker.hostname }}
19
+ %li.list-group-item.row
20
+ .col-sm-3.bold Process Name
21
+ .col-sm-9 {{ worker.process_name}} (PID: {{worker.pid}}
22
+ %li.list-group-item.row
23
+ .col-sm-3.bold Subscriber Classes
24
+ .col-sm-9
25
+ %div{data: { 'ng-repeat' => "worker_class in worker.worker_classes" }}
26
+ %a{data: {'ng-href' => dashboard_path("subscribers/{{worker_class}}/messages")}} {{worker_class}}
27
+ %li.list-group-item.row
28
+ .col-sm-3.bold Started Time
29
+ .col-sm-9 {{ asTime(worker.started_at) | amCalendar }}
30
+ %li.list-group-item.row{data: { 'ng-if' => 'worker.stopped_at'}}
31
+ .col-sm-3.bold Stopped Time
32
+ .col-sm-9 {{ asTime(worker.stopped_at) | amCalendar }}
33
+ %li.list-group-item.row
34
+ .col-sm-3.bold
35
+ %a{data: { 'ng-href' => dashboard_path("workers/{{worker.id}}/messages")}} Messages Processed
36
+ .col-sm-9
37
+ %a{data: { 'ng-href' => dashboard_path("workers/{{worker.id}}/messages")}} {{ worker.job_count }}
38
+  
39
+ (
40
+ %span.text-success {{worker.success_count}} Succeeded
41
+ \/
42
+ %span.text-warning {{worker.failed_count}} Failed
43
+ )
44
+ %li.list-group-item.row{data: { 'ng-if' => "isWorkerExecuting(worker)"}}
45
+ .col-sm-3.bold
46
+ %a{href: "#{root_path}messages/{{worker.current_message['_id']}}"} Current Job
47
+ .col-sm-9
48
+ {{ worker.current_message.subscriber_class }}
49
+ %li.list-group-item.row{data: { 'ng-if' => "isWorkerExecuting(worker)"}}
50
+ .col-sm-3.bold Current Payload
51
+ .col-sm-9
52
+ %pre{data: { 'pretty-json' => 'worker.current_message.payload'}}
@@ -0,0 +1,35 @@
1
+ %h2
2
+ Workers
3
+
4
+ .table.table-responsive{data: { 'ng-if' => "workers.length > 0"} }
5
+ %table.table.table-striped.table-bordered.table-hover
6
+ %thead
7
+ %tr
8
+ %th Hostname
9
+ %th Process Name
10
+ %th PID
11
+ %th Started
12
+ %th Subscribers
13
+ %th Current Job
14
+ %tbody
15
+ %tr{data: {'ng-repeat' => 'worker in workers'}}
16
+ %td
17
+ %a{data: { 'ng-href' => dashboard_path("workers/{{worker.id}}")}} {{ worker.hostname }}
18
+ %td {{ worker.process_name }}
19
+ %td {{ worker.pid }}
20
+ %td
21
+ {{ asTime(worker.started_at) | amCalendar }}
22
+ %td
23
+ %div{data: {'ng-if' => 'worker.worker_classes.length > 2'}}
24
+ {{worker.worker_classes.length}} Subscribers
25
+ %div{data: {'ng-if' => 'worker.worker_classes.length <= 2'}}
26
+ %div{data: { 'ng-repeat' => 'worker_class in worker.worker_classes'}}
27
+ %a{data: { 'ng-href' => dashboard_path("subscribers/{{worker_class}}/messages")}}{{ worker_class }}
28
+
29
+ %td
30
+ %div{data: { 'ng-show' => 'worker.current_message'}}
31
+ %a{data: { 'ng-href' => dashboard_path("messages/{{worker.current_message.id}}")}}
32
+ {{ worker.current_message.subscriber_class }}
33
+ %span.glyphicon.glyphicon-refresh.spin
34
+ %div{data: { 'ng-show' => '!worker.current_message'}}
35
+ Idle
@@ -1,32 +1,19 @@
1
- %h2 Workers
1
+ %base{href: "#{root_path}dashboard/"}
2
+ %div{data: { 'ng-app' => "dashboardApp"}}
3
+ %div{data: { 'ng-view' => ''}}
2
4
 
3
- .table.table-responsive
4
- %table.table.table-striped.table-bordered.table-hover
5
- %thead
6
- %tr
7
- %th Hostname
8
- %th Process Name
9
- %th PID
10
- %th Started
11
- %th Subscribers
12
- %th Current Job
13
- %tbody
14
- - @workers.each do |worker|
15
- %tr{class: (worker.executing? ? 'success' : '')}
16
- %td
17
- %a{href: "#{root_path}workers/#{worker.id}"}= worker.hostname
18
- %td= worker.process_name
19
- %td= worker.pid
20
- %td= worker.started_at.strftime("%m/%d/%Y %I:%M%p")
21
- %td
22
- - subscribers= Array.wrap(worker.worker_classes)
23
- - if subscribers.size > 2
24
- %a{href: "#{root_path}workers/#{worker.id}"}= "#{subscribers.size} subscribers"
25
- - else
26
- = subscribers.join('<br/>').html_safe
27
- %td
28
- - if worker.current_message
29
- = worker.current_message[:subscriber_class]
30
- %span.glyphicon.glyphicon-refresh.spin
5
+ %script{type: 'text/ng-template', id: 'banter/workers-list.html'}
6
+ = haml :_workers_list
31
7
 
8
+ %script{type: 'text/ng-template', id: 'banter/worker.html'}
9
+ = haml :_worker
10
+
11
+ %script{type: 'text/ng-template', id: 'banter/message.html'}
12
+ = haml :_message
13
+
14
+ %script{type: 'text/ng-template', id: 'banter/messages.html'}
15
+ = haml :_messages
16
+
17
+ %script{type: 'text/ng-template', id: 'banter/subscribers.html'}
18
+ = haml :_subscribers
32
19
 
@@ -9,13 +9,6 @@
9
9
  /[if lt IE 9]
10
10
  %script{src: "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js" }
11
11
  %link{:href=>"//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css", :rel=>"stylesheet"}
12
- -#= favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144'
13
- -#= favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114'
14
- -#= favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72'
15
- -#= favicon_link_tag 'apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png'
16
- -#= favicon_link_tag 'favicon.ico', :rel => 'shortcut icon'
17
- %script{:src=>"//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"}
18
- %script{src: '//ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular.min.js' }
19
12
  %link{href: 'http://fonts.googleapis.com/css?family=Open+Sans:700,800,400', rel: 'stylesheet', type:'text/css'}
20
13
  %link{href: "#{root_path}stylesheets/banter.css", rel: 'stylesheet', type:'text/css'}
21
14
 
@@ -32,9 +25,11 @@
32
25
  .collapse.navbar-collapse#banter-navbar-collapse
33
26
  %ul.nav.navbar-nav
34
27
  %li
35
- %a{href: root_path} Workers
28
+ %a{href: dashboard_path} Workers
29
+ %li
30
+ %a{href: dashboard_path("subscribers")} Subscribers
36
31
  %li
37
- %a{href: "#{root_path}subscribers"} Subscribers
32
+ %a{href: dashboard_path("messages")} Messages
38
33
 
39
34
  .container{style: 'margin-top: 55px; padding-top: 10px'}
40
35
  = yield
@@ -42,4 +37,15 @@
42
37
  %p
43
38
  Banter &copy; #{Date.today.year} (Developed & Maintained by
44
39
  %a{href: 'https://www.honest.com'} The Honest Company
45
- )
40
+ )
41
+ :javascript
42
+ window.Banter || (window.Banter = {});
43
+ window.Banter.rootPath = "#{root_path}";
44
+
45
+ %script{:src=>"//code.jquery.com/jquery-2.1.1.min.js"}
46
+ %script{:src=>"//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"}
47
+ %script{src: '//ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular.js' }
48
+ %script{src: '//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.18/angular-route.min.js' }
49
+ %script{src: '//cdnjs.cloudflare.com/ajax/libs/moment.js/2.7.0/moment.min.js' }
50
+ %script{src: '//cdnjs.cloudflare.com/ajax/libs/angular-moment/0.7.1/angular-moment.min.js' }
51
+ %script{src: "#{root_path}javascripts/banter.js" }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: banter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Honest Company
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-07-15 00:00:00.000000000 Z
14
+ date: 2014-07-17 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
@@ -223,6 +223,9 @@ files:
223
223
  - lib/banter/web/helpers.rb
224
224
  - lib/banter/web/models/banter_message.rb
225
225
  - lib/banter/web/models/banter_worker.rb
226
+ - lib/banter/web/serializers/banter_message_serializer.rb
227
+ - lib/banter/web/serializers/banter_worker_serializer.rb
228
+ - lib/banter/web/serializers/subscriber_serializer.rb
226
229
  - lib/generators/banter/install_generator.rb
227
230
  - lib/generators/banter/templates/banter.yml
228
231
  - spec/banter/cli_spec.rb
@@ -236,16 +239,33 @@ files:
236
239
  - spec/banter/subscriber_spec.rb
237
240
  - spec/banter/web/application_spec.rb
238
241
  - spec/config.yml
242
+ - spec/factories/banter_messages.rb
239
243
  - spec/factories/banter_workers.rb
240
244
  - spec/mongoid.yml
241
245
  - spec/spec_helper.rb
246
+ - web/assets/javascripts/banter.js
247
+ - web/assets/javascripts/dashboard_app/app.coffee
248
+ - web/assets/javascripts/dashboard_app/controllers/message_controller.coffee
249
+ - web/assets/javascripts/dashboard_app/controllers/messages_controller.coffee
250
+ - web/assets/javascripts/dashboard_app/controllers/subscribers_controller.coffee
251
+ - web/assets/javascripts/dashboard_app/controllers/worker_controller.coffee
252
+ - web/assets/javascripts/dashboard_app/controllers/workers_list_controller.coffee
253
+ - web/assets/javascripts/dashboard_app/routes.coffee
254
+ - web/assets/javascripts/dashboard_app/services/common_methods_service.coffee
255
+ - web/assets/javascripts/dashboard_app/services/message_methods_service.coffee
256
+ - web/assets/javascripts/dashboard_app/services/messages_service.coffee
257
+ - web/assets/javascripts/dashboard_app/services/subscribers_service.coffee
258
+ - web/assets/javascripts/dashboard_app/services/worker_methods_service.coffee
259
+ - web/assets/javascripts/dashboard_app/services/worker_service.coffee
260
+ - web/assets/javascripts/ng-prettyjson.js
242
261
  - web/assets/stylesheets/banter.css
262
+ - web/views/_message.haml
263
+ - web/views/_messages.haml
264
+ - web/views/_subscribers.haml
265
+ - web/views/_worker.haml
266
+ - web/views/_workers_list.haml
243
267
  - web/views/index.haml
244
268
  - web/views/layout.haml
245
- - web/views/message.haml
246
- - web/views/messages.haml
247
- - web/views/subscribers.haml
248
- - web/views/worker.haml
249
269
  homepage: https://github.com/honest/banter
250
270
  licenses:
251
271
  - MIT
@@ -266,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
266
286
  version: '0'
267
287
  requirements: []
268
288
  rubyforge_project:
269
- rubygems_version: 2.2.2
289
+ rubygems_version: 2.3.0
270
290
  signing_key:
271
291
  specification_version: 4
272
292
  summary: Library for pub-sub (Message Bus)
@@ -282,6 +302,7 @@ test_files:
282
302
  - spec/banter/subscriber_spec.rb
283
303
  - spec/banter/web/application_spec.rb
284
304
  - spec/config.yml
305
+ - spec/factories/banter_messages.rb
285
306
  - spec/factories/banter_workers.rb
286
307
  - spec/mongoid.yml
287
308
  - spec/spec_helper.rb
@@ -1,52 +0,0 @@
1
- .clearfix
2
- %div.extra-bold.pull-right.padding-large.font-size-lg.rounded-corners-md{ class: (message.executing? ? "bg-info" : (message.succeeded? ? "bg-success" : "bg-danger")) }
3
- - if message.executing?
4
- %span.glyphicon.glyphicon-refresh.spin
5
- WORKING
6
- - elsif message.succeeded?
7
- %span.glyphicon.glyphicon-ok
8
- SUCCESSFUL
9
- - elsif message.failed?
10
- %span.glyphicon.glyphicon-remove
11
- FAILED
12
- %h2
13
- Message
14
-
15
- %ul.list-group
16
- %li.list-group-item.row
17
- .col-sm-3.bold Subscriber
18
- .col-sm-9= message.subscriber_class
19
-
20
- - worker = message.worker
21
- - if worker
22
- %li.list-group-item.row
23
- .col-sm-3.bold Worker
24
- .col-sm-9
25
- %a{href: "#{root_path}workers/#{worker.id}"}= "#{worker.process_name} (PID: #{worker.pid})"
26
- %li.list-group-item.row
27
- .col-sm-3.bold Subscriber Key
28
- .col-sm-9= message.subscribed_key
29
-
30
- %li.list-group-item.row
31
- .col-sm-3.bold Payload Key
32
- .col-sm-9= message.payload_key
33
-
34
- %li.list-group-item.row
35
- .col-sm-3.bold Payload
36
- .col-sm-9
37
- %pre!= AwesomePrint::Inspector.new(html:true, sort_keys: true, index: false).awesome(message.payload)
38
- %li.list-group-item.row
39
- .col-sm-3.bold Context
40
- .col-sm-9
41
- %pre!= AwesomePrint::Inspector.new(html:true, sort_keys: true, index: false).awesome(message.context)
42
- %li.list-group-item.row
43
- .col-sm-3.bold Started Time
44
- .col-sm-9= message.started_at.strftime("%m/%d/%Y %I:%M%p")
45
- - if message.done_at
46
- %li.list-group-item.row
47
- .col-sm-3.bold Finished Time
48
- .col-sm-9 #{message.done_at.strftime("%m/%d/%Y %I:%M%p")}. Took #{(message.done_at - message.started_at) * 1000}ms
49
- %li.list-group-item.row
50
- .col-sm-3.bold Queue
51
- .col-sm-9= message.queue_name
52
-
@@ -1,20 +0,0 @@
1
- %h2 Messages processed on #{worker.process_name} (PID: #{worker.pid})
2
- .table.table-responsive
3
- %table.table.table-striped.table-bordered.table-hover
4
- %thead
5
- %tr
6
- %th Subscriber
7
- %th Started
8
- %th Finished
9
- %th Status
10
- %tbody
11
- - messages.each do |message|
12
- %tr{class: (message.failed? ? 'danger' : '')}
13
- %td
14
- %a{href: "#{root_path}messages/#{message.id}"}= message.subscriber_class
15
- -#%td
16
- -# %pre!= AwesomePrint::Inspector.new(html:true, sort_keys: true, index: false).awesome(message.payload)
17
- %td= message.started_at.strftime("%m/%d/%Y %I:%M%p")
18
- %td= message.done_at.strftime("%m/%d/%Y %I:%M%p") if message.done_at
19
- %td= message.status.titleize
20
-
@@ -1,17 +0,0 @@
1
- %h2 Subscribers
2
- .table.table-responsive
3
- %table.table.table-striped.table-bordered.table-hover
4
- %thead
5
- %tr
6
- %th Subscriber
7
- %th Messages Processed
8
- %th Messages Succeeded
9
- %tbody
10
- - BanterMessage.distinct("subscriber_class").each do |subscriber|
11
- %tr
12
- %td
13
- %a{href: "#{root_path}subscribers/#{subscriber}"}= subscriber
14
- %td= BanterMessage.where(subscriber_class: subscriber).count
15
- %td= BanterMessage.where(subscriber_class: subscriber, status: BanterMessage::STATUS_SUCCESS).count
16
-
17
-