foreman_webhooks 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/foreman_webhooks/engine.rb +1 -1
- data/lib/foreman_webhooks/version.rb +1 -1
- data/package.json +7 -10
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/WebhooksTable.js +2 -9
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/__tests__/__snapshots__/WebhooksTable.test.js.snap +4 -4
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/WebhooksIndexPage.fixtures.js +1 -1
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksPageActions.js +5 -4
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksPageHelpers.js +1 -1
- data/webpack/__mocks__/foremanReact/components/Pagination/index.js +4 -0
- metadata +11 -38
- data/webpack/__mocks__/foremanReact/components/Pagination/PaginationWrapper.js +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 523d26d6ef7f9d27e8f07192fccc3d0070118e92aca3e1198259feca505f3915
|
4
|
+
data.tar.gz: a5b860468afc572d9bd102b2fcf098d79f71bf65144b01d927c7e542bf57265c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62cc925323c67e043abae9dd3d7145142b916c07d4c70880fb984d4aabec00860a1d10ea3be5137264d4a5588a06768fb5f7fc7dca89468749d7439877a067fa
|
7
|
+
data.tar.gz: e34dd831d90bfda959ec89d7d5179c8cf6e47bb9f351040acf8c0bbda3fb2502e6b56bcdf361913435c349250218063550414c5aa5da6bd65d2cf97a492a92ce
|
@@ -15,7 +15,7 @@ module ForemanWebhooks
|
|
15
15
|
|
16
16
|
initializer 'foreman_webhooks.register_plugin', before: :finisher_hook do |_app|
|
17
17
|
Foreman::Plugin.register :foreman_webhooks do
|
18
|
-
requires_foreman '>= 3.
|
18
|
+
requires_foreman '>= 3.2'
|
19
19
|
|
20
20
|
apipie_documented_controllers ["#{ForemanWebhooks::Engine.root}/app/controllers/api/v2/*.rb"]
|
21
21
|
ApipieDSL.configuration.sections += ['webhooks']
|
data/package.json
CHANGED
@@ -21,25 +21,22 @@
|
|
21
21
|
"url": "https://projects.theforeman.org/projects/webhooks/issues"
|
22
22
|
},
|
23
23
|
"peerDependencies": {
|
24
|
-
"@theforeman/vendor": "
|
24
|
+
"@theforeman/vendor": "^8.15.0"
|
25
25
|
},
|
26
26
|
"devDependencies": {
|
27
27
|
"@babel/core": "^7.7.0",
|
28
|
-
"@theforeman/builder": "^8.
|
29
|
-
"@theforeman/stories": "^8.
|
30
|
-
"@theforeman/test": "^8.
|
31
|
-
"@theforeman/vendor-dev": "^8.
|
32
|
-
"@theforeman/eslint-plugin-foreman": "^8.
|
28
|
+
"@theforeman/builder": "^8.15.0",
|
29
|
+
"@theforeman/stories": "^8.15.0",
|
30
|
+
"@theforeman/test": "^8.15.0",
|
31
|
+
"@theforeman/vendor-dev": "^8.15.0",
|
32
|
+
"@theforeman/eslint-plugin-foreman": "^8.15.0",
|
33
33
|
"babel-eslint": "^10.0.0",
|
34
34
|
"eslint": "^6.8.0",
|
35
35
|
"eslint-plugin-spellcheck": "^0.0.17",
|
36
|
+
"jed": "^1.1.1",
|
36
37
|
"prettier": "^1.13.5",
|
37
38
|
"stylelint": "^9.3.0",
|
38
39
|
"stylelint-config-standard": "^18.0.0",
|
39
40
|
"surge": "^0.20.3"
|
40
|
-
},
|
41
|
-
"dependencies": {
|
42
|
-
"jed": "^1.1.1",
|
43
|
-
"react-intl": "^2.8.0"
|
44
41
|
}
|
45
42
|
}
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
|
4
4
|
import { Table } from 'foremanReact/components/common/table';
|
5
|
-
import Pagination from 'foremanReact/components/Pagination
|
5
|
+
import Pagination from 'foremanReact/components/Pagination';
|
6
6
|
import { useForemanModal } from 'foremanReact/components/ForemanModal/ForemanModalHooks';
|
7
7
|
|
8
8
|
import WebhookDeleteModal from '../WebhookDeleteModal';
|
@@ -57,15 +57,8 @@ const WebhooksTable = ({
|
|
57
57
|
)}
|
58
58
|
rows={results}
|
59
59
|
id="webhooks-table"
|
60
|
-
style={{ marginBottom: -6 }}
|
61
|
-
/>
|
62
|
-
<Pagination
|
63
|
-
viewType="list"
|
64
|
-
itemCount={itemCount}
|
65
|
-
pagination={pagination}
|
66
|
-
onChange={fetchAndPush}
|
67
|
-
dropdownButtonId="webhooks-page-pagination-dropdown"
|
68
60
|
/>
|
61
|
+
<Pagination itemCount={itemCount} onChange={fetchAndPush} />
|
69
62
|
</React.Fragment>
|
70
63
|
);
|
71
64
|
};
|
@@ -17,7 +17,7 @@ exports[`WebhooksTable rendering should render when loading 1`] = `
|
|
17
17
|
"perPage": 20,
|
18
18
|
}
|
19
19
|
}
|
20
|
-
|
20
|
+
per_page={42}
|
21
21
|
reloadWithSearch={[MockFunction]}
|
22
22
|
results={Array []}
|
23
23
|
search="name=foo"
|
@@ -55,7 +55,7 @@ exports[`WebhooksTable rendering should render with error 1`] = `
|
|
55
55
|
"perPage": 20,
|
56
56
|
}
|
57
57
|
}
|
58
|
-
|
58
|
+
per_page={42}
|
59
59
|
reloadWithSearch={[MockFunction]}
|
60
60
|
results={Array []}
|
61
61
|
search="name=foo"
|
@@ -87,7 +87,7 @@ exports[`WebhooksTable rendering should render with no data 1`] = `
|
|
87
87
|
"perPage": 20,
|
88
88
|
}
|
89
89
|
}
|
90
|
-
|
90
|
+
per_page={42}
|
91
91
|
reloadWithSearch={[MockFunction]}
|
92
92
|
results={Array []}
|
93
93
|
search="name=foo"
|
@@ -119,7 +119,7 @@ exports[`WebhooksTable rendering should render with webhooks 1`] = `
|
|
119
119
|
"perPage": 20,
|
120
120
|
}
|
121
121
|
}
|
122
|
-
|
122
|
+
per_page={42}
|
123
123
|
reloadWithSearch={[MockFunction]}
|
124
124
|
results={
|
125
125
|
Array [
|
@@ -11,7 +11,7 @@ import {
|
|
11
11
|
|
12
12
|
export const initializeWebhooks = () => dispatch => {
|
13
13
|
const params = getParams();
|
14
|
-
dispatch(fetchWebhooks(params));
|
14
|
+
dispatch(fetchWebhooks({ per_page: params.perPage, ...params }));
|
15
15
|
if (!history.action === 'POP') {
|
16
16
|
history.replace({
|
17
17
|
pathname: WEBHOOKS_PATH,
|
@@ -21,7 +21,8 @@ export const initializeWebhooks = () => dispatch => {
|
|
21
21
|
};
|
22
22
|
|
23
23
|
export const fetchWebhooks = (
|
24
|
-
|
24
|
+
/* eslint-disable-next-line camelcase */
|
25
|
+
{ page, per_page, searchQuery, sort },
|
25
26
|
url = WEBHOOKS_API_PATH
|
26
27
|
) => async dispatch => {
|
27
28
|
const sortString =
|
@@ -33,7 +34,7 @@ export const fetchWebhooks = (
|
|
33
34
|
url,
|
34
35
|
params: {
|
35
36
|
page,
|
36
|
-
per_page
|
37
|
+
per_page,
|
37
38
|
search: searchQuery,
|
38
39
|
order: sortString,
|
39
40
|
},
|
@@ -46,7 +47,7 @@ export const fetchAndPush = (params = {}) => (dispatch, getState) => {
|
|
46
47
|
dispatch(fetchWebhooks(query));
|
47
48
|
history.push({
|
48
49
|
pathname: WEBHOOKS_PATH,
|
49
|
-
search: stringifyParams(query),
|
50
|
+
search: stringifyParams({ perPage: query.per_page, ...query }),
|
50
51
|
});
|
51
52
|
};
|
52
53
|
|
@@ -12,7 +12,7 @@ export const buildQuery = (query, state) => {
|
|
12
12
|
|
13
13
|
return {
|
14
14
|
page: query.page || selectPage(state),
|
15
|
-
|
15
|
+
per_page: query.per_page || selectPerPage(state),
|
16
16
|
searchQuery:
|
17
17
|
query.searchQuery === undefined ? selectSearch(state) : query.searchQuery,
|
18
18
|
...(querySort && { sort: querySort }),
|
metadata
CHANGED
@@ -1,43 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_webhooks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timo Goebel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: rdoc
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rubocop
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 0.71.0
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 0.71.0
|
11
|
+
date: 2022-03-07 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
41
13
|
description: Plugin for Foreman that allows to configure Webhooks.
|
42
14
|
email:
|
43
15
|
- mail@timogoebel.name
|
@@ -167,7 +139,7 @@ files:
|
|
167
139
|
- webpack/__mocks__/foremanReact/components/Layout/LayoutActions.js
|
168
140
|
- webpack/__mocks__/foremanReact/components/Loading/Loading.js
|
169
141
|
- webpack/__mocks__/foremanReact/components/Loading/index.js
|
170
|
-
- webpack/__mocks__/foremanReact/components/Pagination/
|
142
|
+
- webpack/__mocks__/foremanReact/components/Pagination/index.js
|
171
143
|
- webpack/__mocks__/foremanReact/components/common/EmptyState.js
|
172
144
|
- webpack/__mocks__/foremanReact/components/common/forms/ForemanForm.js
|
173
145
|
- webpack/__mocks__/foremanReact/components/common/forms/FormField.js
|
@@ -185,7 +157,8 @@ files:
|
|
185
157
|
homepage: https://github.com/theforeman/foreman_webhooks
|
186
158
|
licenses:
|
187
159
|
- GPL-3.0
|
188
|
-
metadata:
|
160
|
+
metadata:
|
161
|
+
is_foreman_plugin: 'true'
|
189
162
|
post_install_message:
|
190
163
|
rdoc_options: []
|
191
164
|
require_paths:
|
@@ -201,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
174
|
- !ruby/object:Gem::Version
|
202
175
|
version: '0'
|
203
176
|
requirements: []
|
204
|
-
rubygems_version: 3.1.
|
177
|
+
rubygems_version: 3.1.6
|
205
178
|
signing_key:
|
206
179
|
specification_version: 4
|
207
180
|
summary: Configure webhooks for Foreman.
|
@@ -213,14 +186,14 @@ test_files:
|
|
213
186
|
- test/factories/webhook_template.rb
|
214
187
|
- test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
|
215
188
|
- test/models/webhook_test.rb
|
216
|
-
- test/unit/foreman_webhooks/webhook_service_test.rb
|
217
189
|
- test/test_plugin_helper.rb
|
190
|
+
- test/unit/foreman_webhooks/webhook_service_test.rb
|
191
|
+
- webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/__tests__/WebhookForm.test.js
|
218
192
|
- webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/__tests__/enabledCellFormatter.test.js
|
219
193
|
- webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/__tests__/EnabledCell.test.js
|
220
194
|
- webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/__tests__/WebhooksTable.test.js
|
221
|
-
- webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/WebhooksIndexPage.fixtures.js
|
222
|
-
- webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
|
223
195
|
- webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/WebhooksIndexPage.test.js
|
196
|
+
- webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js
|
197
|
+
- webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/WebhooksIndexPage.fixtures.js
|
224
198
|
- webpack/ForemanWebhooks/Routes/Webhooks/__tests__/WebhooksPageHelpers.test.js
|
225
199
|
- webpack/ForemanWebhooks/Routes/Webhooks/__tests__/WebhooksPageSelectors.test.js
|
226
|
-
- webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/__tests__/WebhookForm.test.js
|