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 +4 -4
- data/app/controllers/api/v2/job_invocations_controller.rb +5 -0
- data/app/controllers/job_invocations_controller.rb +5 -5
- data/lib/foreman_remote_execution/version.rb +1 -1
- data/test/functional/api/v2/job_invocations_controller_test.rb +6 -0
- data/webpack/react_app/components/jobInvocations/index.js +11 -8
- data/webpack/react_app/redux/reducers/jobInvocations/index.fixtures.js +2 -2
- data/webpack/react_app/redux/reducers/jobInvocations/index.js +1 -1
- data/webpack/react_app/redux/reducers/jobInvocations/index.test.js +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d463927fc0e280ab5b2cc94d4ce6222e3d6f802cb14c47823b467c555a4d725b
|
4
|
+
data.tar.gz: ae0540c25b3f25feba35363e8685200d92722cd19c4ec3a79ec52151185f4177
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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[:
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
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.')
|
@@ -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.
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
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({
|
@@ -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.
|
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-
|
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
|
-
|
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
|