foreman_remote_execution 1.8.3 → 1.8.4

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
  SHA256:
3
- metadata.gz: '088390c13c651a79849a384d7745fad23975bacbedf7913be50d6bed8d66db60'
4
- data.tar.gz: 6138f9a4c9cdc374e21254c739ec3c45b5dd95ebd87bd04e40dce2b346874380
3
+ metadata.gz: d463927fc0e280ab5b2cc94d4ce6222e3d6f802cb14c47823b467c555a4d725b
4
+ data.tar.gz: ae0540c25b3f25feba35363e8685200d92722cd19c4ec3a79ec52151185f4177
5
5
  SHA512:
6
- metadata.gz: c866a3ae708c68f9e2176817d74b27c185558cba82e5d3e0c9777fe6e32a538742fac1ff60c472ed8deda93890db3b81e7b0c38af3102dbe0b56590342559a0c
7
- data.tar.gz: c4a1f91be44fb15b78ce1b4ff262b885bb3b325caa7a0ac6078203f3c3011e1ff93e97082869806e14a4428e95b0476cc451d267188bc41ab0b2c4e2eaba1bd3
6
+ metadata.gz: b67d6d69a3ea5464695b7f5b4bce3059dc91b36c9612c69ef5b773e7cfc288b4a0ab8f066c5a61d98b6c70bff75164a53ae6b324a85d11767e408c8b0e990a0a
7
+ data.tar.gz: 491f93734cd5b2c8dbab24f02f00619a747720e2aebc96c783feba8f6909a167816d3d7872f4cac418be23ca28a635d9ad64adf8a529c4b053ed03f7ebab4534
@@ -198,6 +198,11 @@ module Api
198
198
  def delayed_task_output(task, default: nil)
199
199
  { :complete => false, :refresh => true, :output => default, :delayed => true, :start_at => task.start_at }
200
200
  end
201
+
202
+ # Do not try to scope JobInvocations by taxonomies
203
+ def parent_scope
204
+ resource_class.where(nil)
205
+ end
201
206
  end
202
207
  end
203
208
  end
@@ -100,11 +100,11 @@ class JobInvocationsController < ApplicationController
100
100
  result = @job_invocation.cancel(params[:force])
101
101
 
102
102
  if result
103
- flash[:notice] = if params[:force]
104
- _('Trying to abort the job')
105
- else
106
- _('Trying to cancel the job')
107
- end
103
+ flash[:info] = if params[:force]
104
+ _('Trying to abort the job')
105
+ else
106
+ _('Trying to cancel the job')
107
+ end
108
108
  else
109
109
  flash[:warning] = if params[:force]
110
110
  _('The job cannot be aborted at the moment.')
@@ -1,3 +1,3 @@
1
1
  module ForemanRemoteExecution
2
- VERSION = '1.8.3'.freeze
2
+ VERSION = '1.8.4'.freeze
3
3
  end
@@ -28,6 +28,12 @@ module Api
28
28
  assert_equal template['job_category'], @invocation.job_category
29
29
  end
30
30
 
31
+ test 'should get invocation detail when taxonomies are set' do
32
+ taxonomy_params = %w(organization location).reduce({}) { |acc, cur| acc.merge("#{cur}_id" => FactoryBot.create(cur)) }
33
+ get :show, params: taxonomy_params.merge(:id => @invocation.id)
34
+ assert_response :success
35
+ end
36
+
31
37
  context 'creation' do
32
38
  setup do
33
39
  @attrs = { :job_category => @template.job_category,
@@ -40,18 +40,21 @@ const mapStateToProps = (state) => {
40
40
 
41
41
  JobInvocationContainer.propTypes = {
42
42
  startJobInvocationsPolling: PropTypes.func,
43
- data: PropTypes.string,
44
- jobInvocations: PropTypes.arrayOf(PropTypes.arrayOf(
45
- PropTypes.string,
46
- PropTypes.number,
47
- PropTypes.string,
48
- )),
49
- statuses: PropTypes.shape({}),
43
+ data: PropTypes.shape({
44
+ url: PropTypes.string,
45
+ }),
46
+ jobInvocations: PropTypes.arrayOf(PropTypes.array),
47
+ statuses: PropTypes.shape({
48
+ cancelled: PropTypes.number,
49
+ failed: PropTypes.number,
50
+ pending: PropTypes.number,
51
+ success: PropTypes.number,
52
+ }),
50
53
  };
51
54
 
52
55
  JobInvocationContainer.defaultProps = {
53
56
  startJobInvocationsPolling: JobInvocationActions.startJobInvocationsPolling,
54
- data: '',
57
+ data: {},
55
58
  jobInvocations: [['property', 3, 'color']],
56
59
  statuses: {},
57
60
  };
@@ -3,13 +3,13 @@ import Immutable from 'seamless-immutable';
3
3
  export const initialState = Immutable({
4
4
  isPolling: false,
5
5
  jobInvocations: [],
6
- statuses: [],
6
+ statuses: {},
7
7
  });
8
8
 
9
9
  export const pollingStarted = Immutable({
10
10
  isPolling: true,
11
11
  jobInvocations: [],
12
- statuses: [],
12
+ statuses: {},
13
13
  });
14
14
 
15
15
  export const jobInvocationsPayload = Immutable({
@@ -9,7 +9,7 @@ import {
9
9
  const initialState = Immutable({
10
10
  isPolling: false,
11
11
  jobInvocations: [],
12
- statuses: [],
12
+ statuses: {},
13
13
  });
14
14
 
15
15
  export default (state = initialState, action) => {
@@ -25,7 +25,7 @@ describe('job invocations chart reducer', () => {
25
25
  it('should stop polling given JOB_FINISHED', () => {
26
26
  expect(reducer(pollingStarted, {
27
27
  type: JOB_INVOCATIONS_JOB_FINISHED,
28
- payload: { jobInvocations: { job_invocations: [], statuses: [] } },
28
+ payload: { jobInvocations: { job_invocations: [], statuses: {} } },
29
29
  })).toEqual(initialState);
30
30
  });
31
31
  it('should receive job invocations given GET_JOB_INVOCATIONS', () => {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_remote_execution
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.3
4
+ version: 1.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Remote Execution team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-18 00:00:00.000000000 Z
11
+ date: 2019-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface
@@ -427,8 +427,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
427
427
  - !ruby/object:Gem::Version
428
428
  version: '0'
429
429
  requirements: []
430
- rubyforge_project:
431
- rubygems_version: 2.7.6
430
+ rubygems_version: 3.0.3
432
431
  signing_key:
433
432
  specification_version: 4
434
433
  summary: A plugin bringing remote execution to the Foreman, completing the config