bumbleworks-gui 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bumbleworks-gui.gemspec +1 -1
- data/config.ru +4 -2
- data/lib/bumbleworks/gui/assets/css/application.css +5 -2
- data/lib/bumbleworks/gui/assets/css/side-menu.css +0 -1
- data/lib/bumbleworks/gui/config/routes.rb +3 -0
- data/lib/bumbleworks/gui/controllers/errors_controller.rb +32 -0
- data/lib/bumbleworks/gui/version.rb +1 -1
- data/lib/bumbleworks/gui/views/dashboards/show.html.erb +7 -0
- data/lib/bumbleworks/gui/views/errors/actions.html.erb +8 -0
- data/lib/bumbleworks/gui/views/errors/index.html.erb +3 -0
- data/lib/bumbleworks/gui/views/errors/show.html.erb +24 -0
- data/lib/bumbleworks/gui/views/expressions/show.html.erb +5 -20
- data/lib/bumbleworks/gui/views/layouts/default.html.erb +2 -0
- data/lib/bumbleworks/gui/views/processes/show.html.erb +7 -0
- data/lib/bumbleworks/gui/views/shared/errors.html.erb +38 -0
- data/lib/bumbleworks/gui/views/shared/expressions.html.erb +1 -1
- data/spec/features/error_administration_spec.rb +49 -0
- data/spec/features/expression_administration_spec.rb +2 -2
- data/spec/fixtures/participants/naughty_participant.rb +9 -1
- data/spec/spec_helper.rb +4 -0
- data/spec/support/drivers/error_detail.rb +6 -0
- data/spec/support/drivers/error_index.rb +12 -0
- data/spec/support/drivers/expression_detail.rb +1 -1
- metadata +15 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8899a29374d7292f4913d0497a443c5b07887f80
|
4
|
+
data.tar.gz: 96be83f74b4edb10a5c3a5f23eef9b4821fafac0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebf9b88d3264d43f2575da665f977d08e21bdac9ac52ce0b0600bc9a44136dfae3354ec467cdf5fac46ef0f9e2f0b788c187222eb9b4f000e71072341e928da2
|
7
|
+
data.tar.gz: edd2af1199839d98de6b7358c396a80f0bb38640a01da96831d35d69d467a2f311853b8ae52248fe178f7a7986985c01ac78be6f178c6353a4f517526218052f
|
data/bumbleworks-gui.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.add_runtime_dependency "bumbleworks", ">= 0.0.
|
22
|
+
spec.add_runtime_dependency "bumbleworks", ">= 0.0.87"
|
23
23
|
spec.add_runtime_dependency "rory", ">= 0.3.11"
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.3"
|
data/config.ru
CHANGED
@@ -22,8 +22,10 @@ wp = Bumbleworks.launch!('waiting_process')
|
|
22
22
|
|
23
23
|
wait_until(:timeout => 30) { wp.reload.trackers.count == 4 }
|
24
24
|
|
25
|
-
widget_processes.first.
|
26
|
-
t
|
25
|
+
widget_processes.first(3).each do |p|
|
26
|
+
p.tasks.each do |t|
|
27
|
+
t.complete
|
28
|
+
end
|
27
29
|
end
|
28
30
|
|
29
31
|
if ENV['MOUNT_AT']
|
@@ -61,13 +61,16 @@ dd {
|
|
61
61
|
.button-secondary { background: rgb(66, 184, 221); } /* lt. blue */
|
62
62
|
|
63
63
|
.action-button-group {
|
64
|
-
width:
|
64
|
+
width: 100%;
|
65
65
|
}
|
66
66
|
|
67
|
+
.inline {
|
68
|
+
display: inline;
|
69
|
+
}
|
67
70
|
/* pagination */
|
68
71
|
|
69
72
|
.pagination li.active a {
|
70
73
|
color: #000;
|
71
74
|
pointer-events: none;
|
72
75
|
cursor: default;
|
73
|
-
}
|
76
|
+
}
|
@@ -12,6 +12,9 @@ Bumbleworks::Gui::Application.set_routes do
|
|
12
12
|
match '/processes/:pid/expressions/:id', :to => 'expressions#show', :methods => [:get]
|
13
13
|
match '/processes/:pid/expressions/:id/cancel', :to => 'expressions#cancel', :methods => [:delete]
|
14
14
|
match '/processes/:pid/expressions/:id/kill', :to => 'expressions#kill', :methods => [:delete]
|
15
|
+
match '/errors', :to => 'errors#index', :methods => [:get]
|
16
|
+
match '/processes/:pid/expressions/:id/error', :to => 'errors#show', :methods => [:get]
|
17
|
+
match '/processes/:pid/expressions/:id/error/replay', :to => 'errors#replay', :methods => [:put]
|
15
18
|
match '/processes/:id', :to => 'processes#show', :methods => [:get]
|
16
19
|
match '/processes/page/:page', :to => 'processes#index', :methods => [:get]
|
17
20
|
match '/processes', :to => 'processes#index', :methods => [:get]
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Bumbleworks
|
2
|
+
module Gui
|
3
|
+
class ErrorsController < ApplicationController
|
4
|
+
def index
|
5
|
+
expose :errors => Bumbleworks.errors
|
6
|
+
end
|
7
|
+
|
8
|
+
def show
|
9
|
+
expose :expression => expression, :process => process, :error => error
|
10
|
+
end
|
11
|
+
|
12
|
+
def replay
|
13
|
+
error.replay
|
14
|
+
redirect path_to('expressions_show', :pid => process.id, :id => expression.expid)
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def expression
|
20
|
+
process.expression_at_position(params[:id])
|
21
|
+
end
|
22
|
+
|
23
|
+
def error
|
24
|
+
expression.error
|
25
|
+
end
|
26
|
+
|
27
|
+
def process
|
28
|
+
Bumbleworks::Process.new(params[:pid])
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -1,4 +1,11 @@
|
|
1
1
|
<dl>
|
2
|
+
<% unless Bumbleworks.errors.empty? %>
|
3
|
+
<dt>Errors</dt>
|
4
|
+
<dd>
|
5
|
+
<%= render 'shared/errors', :locals => { :errors => Bumbleworks.errors } %>
|
6
|
+
</dd>
|
7
|
+
<% end %>
|
8
|
+
|
2
9
|
<dt>Entities</dt>
|
3
10
|
<dd>
|
4
11
|
<%= render 'shared/entity_types', :locals => { :entity_classes => entity_classes} %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<div class="action-button-group">
|
2
|
+
<form action="<%= path_to 'errors_replay', :pid => error.process.id, :id => error.expression.expid %>" class="inline" method="post">
|
3
|
+
<input type="hidden" name="_method" value="put">
|
4
|
+
<button type="submit" class="pure-button button-warning button-top" id="replay-button">
|
5
|
+
Replay
|
6
|
+
</button>
|
7
|
+
</form>
|
8
|
+
</div>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<dl>
|
2
|
+
<dt>Process</dt>
|
3
|
+
<dd><a href="<%= path_to 'processes_show', :id => process.id %>"><%= process.id %></a></dd>
|
4
|
+
|
5
|
+
<dt>Expression ID</dt>
|
6
|
+
<dd><%= expression.expid %></dd>
|
7
|
+
|
8
|
+
<dt>Error Type</dt>
|
9
|
+
<dd><%= error.error_class_name %></dd>
|
10
|
+
|
11
|
+
<dt>Message</dt>
|
12
|
+
<dd><%= error.message %></dd>
|
13
|
+
|
14
|
+
<dt>Backtrace</dt>
|
15
|
+
<dd>
|
16
|
+
<pre class="prettyprint linenums" style="overflow-x: scroll; white-space: nowrap"><code class="language-ruby"><% error.backtrace.each do |btl| %><%= "#{btl.inspect}\n" %><% end %></code></pre>
|
17
|
+
</dd>
|
18
|
+
|
19
|
+
<dt>Actions</dt>
|
20
|
+
<dd>
|
21
|
+
<%= render 'errors/actions', :locals => { :error => error } %>
|
22
|
+
</dd>
|
23
|
+
</dl>
|
24
|
+
|
@@ -9,24 +9,9 @@
|
|
9
9
|
<dd>
|
10
10
|
<%= render 'expressions/actions', :locals => { :expression => expression } %>
|
11
11
|
</dd>
|
12
|
-
<% if expression.error %>
|
13
|
-
<h3>Error</h3>
|
14
|
-
<dl>
|
15
|
-
<dd>
|
16
|
-
<dt>Type</dt>
|
17
|
-
<dd><%= expression.error.error_class_name %></dd>
|
18
|
-
|
19
|
-
<dt>Message</dt>
|
20
|
-
<dd><%= expression.error.message %></dd>
|
21
12
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
<% end %>
|
28
|
-
</ul>
|
29
|
-
</dd>
|
30
|
-
</dd>
|
31
|
-
</dl>
|
32
|
-
<% end %>
|
13
|
+
<% if expression.error %>
|
14
|
+
<dt>Error</dt>
|
15
|
+
<dd><%= render 'shared/errors', :locals => { :errors => [expression.error], :context => :expression } %></dd>
|
16
|
+
<% end %>
|
17
|
+
</dl>
|
@@ -13,6 +13,7 @@
|
|
13
13
|
<script src="<%= base_path %>/assets/js/jquery.js"></script>
|
14
14
|
<script src="<%= base_path %>/assets/js/list.min.js"></script>
|
15
15
|
<script src="<%= base_path %>/assets/js/list.pagination.min.js"></script>
|
16
|
+
<script src="//google-code-prettify.googlecode.com/svn/loader/run_prettify.js?skin=sons-of-obsidian"></script>
|
16
17
|
|
17
18
|
</head>
|
18
19
|
<body>
|
@@ -32,6 +33,7 @@
|
|
32
33
|
<li><a href="<%= path_to 'trackers_index' %>">Trackers</a></li>
|
33
34
|
<li><a href="<%= path_to 'tasks_index' %>">Tasks</a></li>
|
34
35
|
<li><a href="<%= path_to 'workers_index' %>">Workers</a></li>
|
36
|
+
<li><a href="<%= path_to 'errors_index' %>">Errors</a></li>
|
35
37
|
</ul>
|
36
38
|
</div>
|
37
39
|
</div>
|
@@ -27,6 +27,13 @@
|
|
27
27
|
<%= render 'shared/expressions', :locals => { :expressions => process.leaves } %>
|
28
28
|
</dd>
|
29
29
|
|
30
|
+
<% unless process.errors.empty? %>
|
31
|
+
<dt>Errors</dt>
|
32
|
+
<dd>
|
33
|
+
<%= render 'shared/errors', :locals => { :errors => process.errors, :context => :process } %>
|
34
|
+
</dd>
|
35
|
+
<% end %>
|
36
|
+
|
30
37
|
<script>
|
31
38
|
var Fluos = {
|
32
39
|
'fluo': {
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<% view_context = (defined?(context) && context) || :global %>
|
2
|
+
<div id="errors">
|
3
|
+
<table class="pure-table pure-table-bordered">
|
4
|
+
<thead>
|
5
|
+
<tr>
|
6
|
+
<% if view_context == :global %>
|
7
|
+
<th class="sort" data-sort="process">Process</th>
|
8
|
+
<% end %>
|
9
|
+
<% if [:global, :process].include?(view_context) %>
|
10
|
+
<th class="sort" data-sort="expression">Expression</th>
|
11
|
+
<% end %>
|
12
|
+
<th class="sort" data-sort="type">Error Class</th>
|
13
|
+
<th class="sort" data-sort="message">Message</th>
|
14
|
+
<th></th>
|
15
|
+
</tr>
|
16
|
+
</thead>
|
17
|
+
<tbody class="list">
|
18
|
+
<% errors.each do |err| %>
|
19
|
+
<tr>
|
20
|
+
<% if view_context == :global %>
|
21
|
+
<td class="process"><a href="<%= path_to 'processes_show', :id => err.process.id %>"><%= err.wfid %></a></td>
|
22
|
+
<% end %>
|
23
|
+
<% if [:global, :process].include?(view_context) %>
|
24
|
+
<td class="expression"><a href="<%= path_to 'expressions_show', :pid => err.process.id, :id => err.expression.expid %>"><%= err.expression.expid %></a></td>
|
25
|
+
<% end %>
|
26
|
+
<td class="type"><a href="<%= path_to 'errors_show', :pid => err.process.id, :id => err.expression.expid %>"><%= err.error_class_name %></a></td>
|
27
|
+
<td class="message"><%= err.message %></td>
|
28
|
+
<td><%= render 'errors/actions', :locals => { :error => err } %></td>
|
29
|
+
</tr>
|
30
|
+
<% end %>
|
31
|
+
</tbody>
|
32
|
+
</table>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<%= render 'shared/list_js_script', :locals => {
|
36
|
+
:list_id => 'expressions',
|
37
|
+
:rows => errors.count
|
38
|
+
} %>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<tr>
|
14
14
|
<td class="id"><a href="<%= path_to 'expressions_show', :pid => exp.process.id, :id => exp.expid %>"><%= exp.expid %></a></td>
|
15
15
|
<td class="tree"><%= exp.tree %></td>
|
16
|
-
<td class="error"><%= exp.error.message if exp.error %></td>
|
16
|
+
<td class="error"><a href="<%= path_to 'errors_show', :pid => exp.process.id, :id => exp.expid %>"><%= exp.error.message if exp.error %></a></td>
|
17
17
|
<td><%= render 'expressions/actions', :locals => { :expression => exp } %></td>
|
18
18
|
</tr>
|
19
19
|
<% end %>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
feature "Error administration" do
|
2
|
+
let(:error_index) { ErrorIndex.new(Capybara) }
|
3
|
+
let(:expression_detail) { ExpressionDetail.new(Capybara) }
|
4
|
+
let(:error_detail) { ErrorDetail.new(Capybara) }
|
5
|
+
let(:process) {
|
6
|
+
process = Bumbleworks.launch!('task_process')
|
7
|
+
wait_until { process.reload.tasks.count == 2 }
|
8
|
+
process
|
9
|
+
}
|
10
|
+
let(:error_expression) {
|
11
|
+
process.tasks.each { |t| t.complete }
|
12
|
+
wait_until(:timeout => 10) { process.reload.leaves.first.error }
|
13
|
+
process.leaves.first
|
14
|
+
}
|
15
|
+
|
16
|
+
after(:each) do
|
17
|
+
NaughtyParticipant.naughty_is_ok = false
|
18
|
+
end
|
19
|
+
|
20
|
+
scenario "Admin views error index" do
|
21
|
+
process2 = Bumbleworks.launch!('task_process')
|
22
|
+
wait_until { process2.reload.tasks.count == 2 }
|
23
|
+
process2.tasks.each { |t| t.complete }
|
24
|
+
error_expression
|
25
|
+
|
26
|
+
visit_scoped "/errors"
|
27
|
+
|
28
|
+
expect(error_index).to have_errors([error_expression.error, process2.errors.first])
|
29
|
+
end
|
30
|
+
|
31
|
+
scenario "Admin views error detail" do
|
32
|
+
expression = error_expression
|
33
|
+
|
34
|
+
visit_scoped "/processes/#{process.id}/expressions/#{expression.expid}/error"
|
35
|
+
|
36
|
+
expect(error_detail).to have_error(expression.error)
|
37
|
+
end
|
38
|
+
|
39
|
+
scenario "Admin replays error" do
|
40
|
+
expression = error_expression
|
41
|
+
NaughtyParticipant.naughty_is_ok = true
|
42
|
+
visit_scoped "/processes/#{process.id}/expressions/#{expression.expid}/error"
|
43
|
+
click_button 'Replay'
|
44
|
+
|
45
|
+
wait_until { process.reload.tasks.count == 1 }
|
46
|
+
visit_scoped "/processes/#{process.id}"
|
47
|
+
expect(expression_detail).not_to have_error(expression.error)
|
48
|
+
end
|
49
|
+
end
|
@@ -37,12 +37,12 @@ feature "Expression administration" do
|
|
37
37
|
|
38
38
|
wait_until { process.reload.errors.empty? }
|
39
39
|
visit_scoped "/processes/#{process.id}"
|
40
|
-
expect(process_detail).not_to have_error(
|
40
|
+
expect(process_detail).not_to have_error(error_expression.error)
|
41
41
|
end
|
42
42
|
|
43
43
|
scenario "Admin views expression errors" do
|
44
44
|
visit_scoped "/processes/#{process.id}/expressions/#{error_expression.expid}"
|
45
45
|
|
46
|
-
expect(expression_detail).to have_error(
|
46
|
+
expect(expression_detail).to have_error(error_expression.error)
|
47
47
|
end
|
48
48
|
end
|
@@ -2,7 +2,15 @@ class NaughtyParticipant
|
|
2
2
|
class StupidError < StandardError; end
|
3
3
|
include Bumbleworks::LocalParticipant
|
4
4
|
|
5
|
+
class << self
|
6
|
+
attr_accessor :naughty_is_ok
|
7
|
+
end
|
8
|
+
|
5
9
|
def on_workitem
|
6
|
-
|
10
|
+
if self.class.naughty_is_ok
|
11
|
+
reply
|
12
|
+
else
|
13
|
+
raise StupidError, 'Oh crumb.'
|
14
|
+
end
|
7
15
|
end
|
8
16
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bumbleworks-gui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ravi Gadad
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bumbleworks
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.0.
|
19
|
+
version: 0.0.87
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.0.
|
26
|
+
version: 0.0.87
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rory
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,6 +154,7 @@ files:
|
|
154
154
|
- lib/bumbleworks/gui/controllers/application_controller.rb
|
155
155
|
- lib/bumbleworks/gui/controllers/dashboards_controller.rb
|
156
156
|
- lib/bumbleworks/gui/controllers/entities_controller.rb
|
157
|
+
- lib/bumbleworks/gui/controllers/errors_controller.rb
|
157
158
|
- lib/bumbleworks/gui/controllers/expressions_controller.rb
|
158
159
|
- lib/bumbleworks/gui/controllers/processes_controller.rb
|
159
160
|
- lib/bumbleworks/gui/controllers/tasks_controller.rb
|
@@ -165,12 +166,16 @@ files:
|
|
165
166
|
- lib/bumbleworks/gui/views/entities/index.html.erb
|
166
167
|
- lib/bumbleworks/gui/views/entities/show.html.erb
|
167
168
|
- lib/bumbleworks/gui/views/entities/types.html.erb
|
169
|
+
- lib/bumbleworks/gui/views/errors/actions.html.erb
|
170
|
+
- lib/bumbleworks/gui/views/errors/index.html.erb
|
171
|
+
- lib/bumbleworks/gui/views/errors/show.html.erb
|
168
172
|
- lib/bumbleworks/gui/views/expressions/actions.html.erb
|
169
173
|
- lib/bumbleworks/gui/views/expressions/show.html.erb
|
170
174
|
- lib/bumbleworks/gui/views/layouts/default.html.erb
|
171
175
|
- lib/bumbleworks/gui/views/processes/index.html.erb
|
172
176
|
- lib/bumbleworks/gui/views/processes/show.html.erb
|
173
177
|
- lib/bumbleworks/gui/views/shared/entity_types.html.erb
|
178
|
+
- lib/bumbleworks/gui/views/shared/errors.html.erb
|
174
179
|
- lib/bumbleworks/gui/views/shared/expressions.html.erb
|
175
180
|
- lib/bumbleworks/gui/views/shared/list_js_script.html.erb
|
176
181
|
- lib/bumbleworks/gui/views/shared/pagination.html.erb
|
@@ -187,6 +192,7 @@ files:
|
|
187
192
|
- lib/bumbleworks/gui/views/workers/show.html.erb
|
188
193
|
- spec/features/dashboard_display_spec.rb
|
189
194
|
- spec/features/entity_administration_spec.rb
|
195
|
+
- spec/features/error_administration_spec.rb
|
190
196
|
- spec/features/expression_administration_spec.rb
|
191
197
|
- spec/features/process_administration_spec.rb
|
192
198
|
- spec/features/task_administration_spec.rb
|
@@ -206,6 +212,8 @@ files:
|
|
206
212
|
- spec/support/drivers/entity_detail.rb
|
207
213
|
- spec/support/drivers/entity_index.rb
|
208
214
|
- spec/support/drivers/entity_type_index.rb
|
215
|
+
- spec/support/drivers/error_detail.rb
|
216
|
+
- spec/support/drivers/error_index.rb
|
209
217
|
- spec/support/drivers/expression_detail.rb
|
210
218
|
- spec/support/drivers/process_detail.rb
|
211
219
|
- spec/support/drivers/process_index.rb
|
@@ -246,6 +254,7 @@ summary: This gem enables a Rory application (mountable in your own app) to make
|
|
246
254
|
test_files:
|
247
255
|
- spec/features/dashboard_display_spec.rb
|
248
256
|
- spec/features/entity_administration_spec.rb
|
257
|
+
- spec/features/error_administration_spec.rb
|
249
258
|
- spec/features/expression_administration_spec.rb
|
250
259
|
- spec/features/process_administration_spec.rb
|
251
260
|
- spec/features/task_administration_spec.rb
|
@@ -265,6 +274,8 @@ test_files:
|
|
265
274
|
- spec/support/drivers/entity_detail.rb
|
266
275
|
- spec/support/drivers/entity_index.rb
|
267
276
|
- spec/support/drivers/entity_type_index.rb
|
277
|
+
- spec/support/drivers/error_detail.rb
|
278
|
+
- spec/support/drivers/error_index.rb
|
268
279
|
- spec/support/drivers/expression_detail.rb
|
269
280
|
- spec/support/drivers/process_detail.rb
|
270
281
|
- spec/support/drivers/process_index.rb
|