banter 0.8.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.travis.yml +8 -0
- data/Gemfile +2 -0
- data/Rakefile +29 -0
- data/lib/banter/subscriber.rb +18 -0
- data/lib/banter/version.rb +1 -1
- data/lib/banter/web.rb +6 -0
- data/lib/banter/web/application.rb +62 -13
- data/lib/banter/web/helpers.rb +6 -2
- data/lib/banter/web/models/banter_message.rb +45 -5
- data/lib/banter/web/models/banter_worker.rb +5 -0
- data/lib/banter/web/serializers/banter_message_serializer.rb +34 -0
- data/lib/banter/web/serializers/banter_worker_serializer.rb +30 -0
- data/lib/banter/web/serializers/subscriber_serializer.rb +26 -0
- data/spec/banter/subscriber_spec.rb +82 -1
- data/spec/banter/web/application_spec.rb +173 -2
- data/spec/factories/banter_messages.rb +28 -0
- data/spec/spec_helper.rb +0 -1
- data/web/assets/javascripts/banter.js +449 -0
- data/web/assets/javascripts/dashboard_app/app.coffee +4 -0
- data/web/assets/javascripts/dashboard_app/controllers/message_controller.coffee +27 -0
- data/web/assets/javascripts/dashboard_app/controllers/messages_controller.coffee +57 -0
- data/web/assets/javascripts/dashboard_app/controllers/subscribers_controller.coffee +25 -0
- data/web/assets/javascripts/dashboard_app/controllers/worker_controller.coffee +30 -0
- data/web/assets/javascripts/dashboard_app/controllers/workers_list_controller.coffee +28 -0
- data/web/assets/javascripts/dashboard_app/routes.coffee +82 -0
- data/web/assets/javascripts/dashboard_app/services/common_methods_service.coffee +6 -0
- data/web/assets/javascripts/dashboard_app/services/message_methods_service.coffee +18 -0
- data/web/assets/javascripts/dashboard_app/services/messages_service.coffee +17 -0
- data/web/assets/javascripts/dashboard_app/services/subscribers_service.coffee +8 -0
- data/web/assets/javascripts/dashboard_app/services/worker_methods_service.coffee +11 -0
- data/web/assets/javascripts/dashboard_app/services/worker_service.coffee +15 -0
- data/web/assets/javascripts/ng-prettyjson.js +15 -0
- data/web/assets/stylesheets/banter.css +13 -1
- data/web/views/_message.haml +59 -0
- data/web/views/_messages.haml +77 -0
- data/web/views/_subscribers.haml +22 -0
- data/web/views/_worker.haml +52 -0
- data/web/views/_workers_list.haml +35 -0
- data/web/views/index.haml +16 -29
- data/web/views/layout.haml +16 -10
- metadata +28 -7
- data/web/views/message.haml +0 -52
- data/web/views/messages.haml +0 -20
- data/web/views/subscribers.haml +0 -17
- data/web/views/worker.haml +0 -51
data/web/views/worker.haml
DELETED
@@ -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
|
-
|
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
|
-
|