houston-core 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: baaf1dd02fe0e6a89799650205ddcb173a4e91b3
4
- data.tar.gz: 5aabee4c509624eefc8bf87358631814a38b04b6
3
+ metadata.gz: bf0ac73eb3d8a6d5977d5ddbc3fa9e0fb3606963
4
+ data.tar.gz: 66f2cd060849457e67edf8aa391cd22a526bb23b
5
5
  SHA512:
6
- metadata.gz: 95d5b8cca3bdc4acc0db433c33ffa4e4fef717fccabc70fe97c3ce8c9603c432c1a98766c7a0522fac6e207d27121c93025e0c12a3024ca6a610fca4c832de21
7
- data.tar.gz: 62a96ab002967a8152abe8727f127e80bfaf721bb021229376164539322a3b1c5317178b5201465e67f617c9765deb4bd7c916a60eddaa2efedda317c546f3a6
6
+ metadata.gz: 8b6cbfb3977ab6a5fc3e3975a298bbd4663dbc529cc815b2604e2ddc969628d05d19d0f49c5c28d150656208ea1799a3f1e533a0ed80a9a16b5f574c365bcf27
7
+ data.tar.gz: 7bf5d4111369ac82f6cf90bae84ac075cc0095f0b7c743955bb1dcfb7fb8aea8b0ebddde30cd4809f092eecdf5b10b5cfb8306f43a9c85c4d659b46215cf331d
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- houston-core (0.8.1)
4
+ houston-core (0.8.2)
5
5
  activerecord-import
6
6
  activerecord-pluck_in_batches (~> 0.2.0)
7
7
  addressable (~> 2.3.8)
@@ -1,3 +1,8 @@
1
1
  .modal-body.noscroll {
2
2
  overflow-y: visible;
3
3
  }
4
+ .modal-header code {
5
+ background: transparent;
6
+ color: inherit;
7
+ padding: 0;
8
+ }
@@ -44,4 +44,11 @@ class ActionsController < ApplicationController
44
44
  redirect_to "/actions", notice: "#{params[:slug]} is running"
45
45
  end
46
46
 
47
+ def retry
48
+ authorize! :run, Action
49
+ action = Action.find(params[:id])
50
+ action.retry!
51
+ redirect_to "/actions/#{action.name}", notice: "#{action.name} is running"
52
+ end
53
+
47
54
  end
@@ -5,7 +5,7 @@ class TeamsController < ApplicationController
5
5
 
6
6
  def index
7
7
  @title = "Teams"
8
- @teams = Team.all.select { |team| can?(:read, team) }
8
+ @teams = Team.all.preload(:projects, roles: :user).select { |team| can?(:read, team) }
9
9
  authorize! :read, :teams
10
10
  end
11
11
 
@@ -6,8 +6,14 @@ module ActionsHelper
6
6
  <div class="action-params-short">
7
7
  <pre>{ #{params.keys.map(&:inspect).join(", ")} }</pre>
8
8
  </div>
9
- <div class="action-params-full">
10
- <pre>#{_add_white_space Houston::ParamsSerializer.new.dump(params)}</pre>
9
+ <div class="action-params-full modal">
10
+ <div class="modal-header">
11
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
12
+ <h3><code>{ #{params.keys.map(&:inspect).join(", ")} }</code></h3>
13
+ </div>
14
+ <div class="modal-body">
15
+ <pre>#{_add_white_space Houston::ParamsSerializer.new.dump(params)}</pre>
16
+ </div>
11
17
  </div>
12
18
  HTML
13
19
  end
@@ -75,6 +75,10 @@ class Action < ActiveRecord::Base
75
75
 
76
76
 
77
77
 
78
+ def retry!
79
+ Houston.actions.run name, params
80
+ end
81
+
78
82
  def exception=(exception)
79
83
  self.error = Error.find_or_create_for_exception(exception) if exception
80
84
  end
@@ -14,6 +14,7 @@
14
14
  <%= action.error.message %>
15
15
  <% end %>
16
16
  <td>
17
+ <td class="action-retry"><%= button_to "Retry", retry_action_path(action), class: "btn-retry btn btn-mini btn-default" %></td>
17
18
  <td class="table-margin"></td>
18
19
  </tr>
19
20
  <% end %>
@@ -40,7 +40,7 @@
40
40
  $('#actions')
41
41
  .tablesorter()
42
42
  .on('click', '.action-params-short', function() {
43
- $(this).hide().next().show();
43
+ $(this).next().modal();
44
44
  });
45
45
  });
46
46
  </script>
@@ -16,6 +16,7 @@
16
16
  <th class="action-params">Params</th>
17
17
  <th class="action-succeded">Succeeded</th>
18
18
  <th class="action-exception">Exception</th>
19
+ <th class="action-retry">Retry</th>
19
20
  <td class="table-margin"></td>
20
21
  </tr>
21
22
  </thead>
@@ -31,7 +32,7 @@
31
32
  $('#actions')
32
33
  .tablesorter()
33
34
  .on('click', '.action-params-short', function() {
34
- $(this).hide().next().show();
35
+ $(this).next().modal();
35
36
  });
36
37
  });
37
38
  new InfiniteScroll({
@@ -11,6 +11,7 @@
11
11
  <% end %>
12
12
  <%= action.error.message %>
13
13
  </td>
14
+ <td class="action-retry"><%= button_to "Retry", retry_action_path(action), class: "btn-retry btn btn-mini btn-default" %></td>
14
15
  <td class="table-margin"></td>
15
16
  </tr>
16
17
  <% end %>
@@ -14,6 +14,7 @@
14
14
  <th class="action-trigger">Trigger</th>
15
15
  <th class="action-params">Params</th>
16
16
  <th class="action-error-message">Message</th>
17
+ <th class="action-retry">Retry</th>
17
18
  <td class="table-margin"></td>
18
19
  </tr>
19
20
  </thead>
@@ -27,10 +28,10 @@
27
28
  <% content_for :javascripts do %>
28
29
  <script type="text/javascript">
29
30
  $(function() {
30
- $('#actions')
31
+ $('#errors')
31
32
  .tablesorter()
32
33
  .on('click', '.action-params-short', function() {
33
- $(this).hide().next().show();
34
+ $(this).next().modal();
34
35
  });
35
36
  });
36
37
  new InfiniteScroll({
@@ -95,6 +95,7 @@ Rails.application.routes.draw do
95
95
  get "actions/running", to: "actions#running", as: :running_actions
96
96
  get "actions/:slug", to: "actions#show", as: :action, constraints: { slug: /[^\/]+/ }
97
97
  post "actions/:slug", to: "actions#run", as: :run_action, constraints: { slug: /[^\/]+/ }
98
+ post "actions/:id/retry", to: "actions#retry", as: :retry_action
98
99
 
99
100
 
100
101
 
@@ -1,3 +1,3 @@
1
1
  module Houston
2
- VERSION = "0.8.1"
2
+ VERSION = "0.8.2"
3
3
  end
@@ -33,7 +33,6 @@ module Houston
33
33
  #
34
34
  # add_navigation_renderer :<%= name %> do
35
35
  # name "<%= camelized %>"
36
- # icon "fa-thumbs-up"
37
36
  # path { Houston::<%= camelized %>::Engine.routes.url_helpers.<%= name %>_path }
38
37
  # ability { |ability| ability.can? :read, Project }
39
38
  # end
@@ -43,7 +42,6 @@ module Houston
43
42
  #
44
43
  # add_project_feature :<%= name %> do
45
44
  # name "<%= camelized %>"
46
- # icon "fa-thumbs-up"
47
45
  # path { |project| Houston::<%= camelized %>::Engine.routes.url_helpers.project_<%= name %>_path(project) }
48
46
  # ability { |ability, project| ability.can? :read, project }
49
47
  # end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: houston-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Lail
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-05 00:00:00.000000000 Z
11
+ date: 2017-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails