foreman_webhooks 2.0.1 → 3.0.0
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/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/__tests__/WebhooksTable.test.js +0 -4
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/__tests__/__snapshots__/WebhooksTable.test.js.snap +0 -4
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/WebhooksIndexPage.js +0 -3
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/WebhooksIndexPage.test.js +0 -1
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/__snapshots__/WebhooksIndexPage.test.js.snap +0 -1
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/index.js +0 -8
- data/webpack/test_setup.js +0 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9acc94d42d1da3f77bd90c0383a6f22ed44ece4fd1dbdadff575a56983dcbd22
|
4
|
+
data.tar.gz: 5b4dfd3d9b5f224182fdd6ab3d320df4ed8fbb2fc1030f5abf823c1e01cf8343
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 824471769ea8d3cf27a8fc14bf8d1780a456cedb3013630636416a89fa0b2405b96b3d8674a290e66b0163636467a0773d23f574a70ec64222ba9a4d43f67dff
|
7
|
+
data.tar.gz: 25c3cc1fc29b99de2eb08ec6e7bdb9b36024d6c2c323e797611c569429822557a103fc4ac9ad839cee01c1ce6c40ff7a5f9ae4294b08195acd2cc1f370d60e7d
|
@@ -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 '>=
|
18
|
+
requires_foreman '>= 3.0'
|
19
19
|
|
20
20
|
apipie_documented_controllers ["#{ForemanWebhooks::Engine.root}/app/controllers/api/v2/*.rb"]
|
21
21
|
ApipieDSL.configuration.sections += ['webhooks']
|
@@ -29,14 +29,12 @@ const fixtures = {
|
|
29
29
|
isLoading: true,
|
30
30
|
hasData: false,
|
31
31
|
hasError: false,
|
32
|
-
toasts: [],
|
33
32
|
}),
|
34
33
|
'should render with no data': propsFactory({
|
35
34
|
...props,
|
36
35
|
isLoading: false,
|
37
36
|
hasData: false,
|
38
37
|
hasError: false,
|
39
|
-
toasts: [],
|
40
38
|
}),
|
41
39
|
'should render with error': propsFactory({
|
42
40
|
isLoading: false,
|
@@ -47,14 +45,12 @@ const fixtures = {
|
|
47
45
|
text: 'this is error',
|
48
46
|
},
|
49
47
|
...props,
|
50
|
-
toasts: [],
|
51
48
|
}),
|
52
49
|
'should render with webhooks': propsFactory({
|
53
50
|
...props,
|
54
51
|
isLoading: false,
|
55
52
|
hasError: false,
|
56
53
|
hasData: true,
|
57
|
-
toasts: [],
|
58
54
|
results: webhooks,
|
59
55
|
itemCount: webhooks.length,
|
60
56
|
}),
|
@@ -29,7 +29,6 @@ exports[`WebhooksTable rendering should render when loading 1`] = `
|
|
29
29
|
}
|
30
30
|
toDelete={Object {}}
|
31
31
|
toEdit={0}
|
32
|
-
toasts={Array []}
|
33
32
|
/>
|
34
33
|
`;
|
35
34
|
|
@@ -68,7 +67,6 @@ exports[`WebhooksTable rendering should render with error 1`] = `
|
|
68
67
|
}
|
69
68
|
toDelete={Object {}}
|
70
69
|
toEdit={0}
|
71
|
-
toasts={Array []}
|
72
70
|
/>
|
73
71
|
`;
|
74
72
|
|
@@ -101,7 +99,6 @@ exports[`WebhooksTable rendering should render with no data 1`] = `
|
|
101
99
|
}
|
102
100
|
toDelete={Object {}}
|
103
101
|
toEdit={0}
|
104
|
-
toasts={Array []}
|
105
102
|
/>
|
106
103
|
`;
|
107
104
|
|
@@ -153,6 +150,5 @@ exports[`WebhooksTable rendering should render with webhooks 1`] = `
|
|
153
150
|
}
|
154
151
|
toDelete={Object {}}
|
155
152
|
toEdit={0}
|
156
|
-
toasts={Array []}
|
157
153
|
/>
|
158
154
|
`;
|
@@ -26,7 +26,6 @@ const WebhooksIndexPage = ({
|
|
26
26
|
itemCount,
|
27
27
|
message,
|
28
28
|
canCreate,
|
29
|
-
toasts,
|
30
29
|
reloadWithSearch,
|
31
30
|
}) => {
|
32
31
|
const [toDelete, setToDelete] = useState({});
|
@@ -62,7 +61,6 @@ const WebhooksIndexPage = ({
|
|
62
61
|
isLoading={isLoading && hasData}
|
63
62
|
onSearch={reloadWithSearch}
|
64
63
|
onBookmarkClick={reloadWithSearch}
|
65
|
-
toastNotifications={toasts}
|
66
64
|
toolbarButtons={canCreate && createBtn}
|
67
65
|
>
|
68
66
|
<WebhooksTable
|
@@ -98,7 +96,6 @@ WebhooksIndexPage.propTypes = {
|
|
98
96
|
itemCount: PropTypes.number.isRequired,
|
99
97
|
message: PropTypes.object,
|
100
98
|
canCreate: PropTypes.bool.isRequired,
|
101
|
-
toasts: PropTypes.array.isRequired,
|
102
99
|
reloadWithSearch: PropTypes.func.isRequired,
|
103
100
|
};
|
104
101
|
|
@@ -1,9 +1,7 @@
|
|
1
|
-
import React from 'react';
|
2
1
|
import { connect } from 'react-redux';
|
3
2
|
import { compose, bindActionCreators } from 'redux';
|
4
3
|
|
5
4
|
import { callOnMount, callOnPopState } from 'foremanReact/common/HOC';
|
6
|
-
import { useForemanContext } from 'foremanReact/Root/Context/ForemanContext';
|
7
5
|
|
8
6
|
import WebhooksIndexPage from './WebhooksIndexPage';
|
9
7
|
import * as actions from '../WebhooksPageActions';
|
@@ -38,14 +36,8 @@ const mapStateToProps = state => ({
|
|
38
36
|
|
39
37
|
const mapDispatchToProps = dispatch => bindActionCreators(actions, dispatch);
|
40
38
|
|
41
|
-
const callWithToastsContext = Component => props => {
|
42
|
-
const { toasts } = useForemanContext();
|
43
|
-
return <Component {...props} toasts={toasts} />;
|
44
|
-
};
|
45
|
-
|
46
39
|
export default compose(
|
47
40
|
connect(mapStateToProps, mapDispatchToProps),
|
48
|
-
callWithToastsContext,
|
49
41
|
callOnMount(({ initializeWebhooks }) => initializeWebhooks()),
|
50
42
|
callOnPopState(({ fetchWebhooks }) => fetchWebhooks())
|
51
43
|
)(WebhooksIndexPage);
|
data/webpack/test_setup.js
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_webhooks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timo Goebel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|