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
@@ -1,51 +0,0 @@
1
- .clearfix
2
- %div.extra-bold.pull-right.padding-large.font-size-lg.rounded-corners-md{ class: (worker.executing? ? "bg-success" : "bg-info") }
3
- - if worker.executing?
4
- %span.glyphicon.glyphicon-refresh.spin
5
- WORKING
6
- - else
7
- IDLE
8
- %h2
9
- Worker
10
-
11
- %ul.list-group
12
- %li.list-group-item.row
13
- .col-sm-3.bold Host Name
14
- .col-sm-9= worker.hostname
15
- %li.list-group-item.row
16
- .col-sm-3.bold Process Name
17
- .col-sm-9= "#{worker.process_name} (PID: #{worker.pid})"
18
- %li.list-group-item.row
19
- .col-sm-3.bold Subscriber Classes
20
- .col-sm-9= Array.wrap(worker.worker_classes).join("<br/>").html_safe
21
- %li.list-group-item.row
22
- .col-sm-3.bold Started Time
23
- .col-sm-9= worker.started_at.strftime("%m/%d/%Y %I:%M%p")
24
- - if worker.stopped_at
25
- %li.list-group-item.row
26
- .col-sm-3.bold Stopped Time
27
- .col-sm-9= worker.stopped_at.strftime("%m/%d/%Y %I:%M%p")
28
- %li.list-group-item.row
29
- .col-sm-3.bold
30
- %a{href: "#{root_path}workers/#{worker.id}/messages"} Messages Processed
31
- .col-sm-9
32
- %a{href: "#{root_path}workers/#{worker.id}/messages"}= worker.job_count
33
- &nbsp;
34
- (
35
- %span.text-success #{worker.success_count} Succeeded
36
- \/
37
- %span.text-warning #{worker.failed_count} Failed
38
- )
39
- - if worker.executing?
40
- %li.list-group-item.row
41
- .col-sm-3.bold
42
- %a{href: "#{root_path}messages/#{worker.current_message['_id']}"} Current Job
43
- .col-sm-9
44
- = worker.current_message[:subscriber_class]
45
- %li.list-group-item.row
46
- .col-sm-3.bold Current Payload
47
- .col-sm-9
48
- %pre!= AwesomePrint::Inspector.new(html:true, sort_keys: true, index: false).awesome(worker.current_message[:payload])
49
-
50
-
51
-