foreman_webhooks 3.1.1 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/foreman_webhooks/locale/ca/foreman_webhooks.js +238 -0
  3. data/app/assets/javascripts/foreman_webhooks/locale/cs_CZ/foreman_webhooks.js +238 -0
  4. data/app/assets/javascripts/foreman_webhooks/locale/de/foreman_webhooks.js +238 -0
  5. data/app/assets/javascripts/foreman_webhooks/locale/en/foreman_webhooks.js +262 -0
  6. data/app/assets/javascripts/foreman_webhooks/locale/en_GB/foreman_webhooks.js +238 -0
  7. data/app/assets/javascripts/foreman_webhooks/locale/es/foreman_webhooks.js +238 -0
  8. data/app/assets/javascripts/foreman_webhooks/locale/fr/foreman_webhooks.js +238 -0
  9. data/app/assets/javascripts/foreman_webhooks/locale/it/foreman_webhooks.js +238 -0
  10. data/app/assets/javascripts/foreman_webhooks/locale/ja/foreman_webhooks.js +238 -0
  11. data/app/assets/javascripts/foreman_webhooks/locale/ka/foreman_webhooks.js +238 -0
  12. data/app/assets/javascripts/foreman_webhooks/locale/ko/foreman_webhooks.js +238 -0
  13. data/app/assets/javascripts/foreman_webhooks/locale/pl/foreman_webhooks.js +238 -0
  14. data/app/assets/javascripts/foreman_webhooks/locale/pt_BR/foreman_webhooks.js +238 -0
  15. data/app/assets/javascripts/foreman_webhooks/locale/ru/foreman_webhooks.js +238 -0
  16. data/app/assets/javascripts/foreman_webhooks/locale/zh_CN/foreman_webhooks.js +238 -0
  17. data/app/assets/javascripts/foreman_webhooks/locale/zh_TW/foreman_webhooks.js +238 -0
  18. data/app/controllers/api/v2/webhooks_controller.rb +24 -1
  19. data/app/graphql/foreman_webhooks/types/webhook.rb +25 -0
  20. data/app/graphql/foreman_webhooks/types/webhook_template.rb +25 -0
  21. data/app/models/webhook.rb +18 -0
  22. data/app/models/webhook_template.rb +2 -0
  23. data/app/services/foreman_webhooks/webhook_service.rb +1 -1
  24. data/app/views/foreman_webhooks/webhook_templates/katello_-_promote.erb +1 -0
  25. data/app/views/foreman_webhooks/webhook_templates/katello_-_publish.erb +1 -0
  26. data/app/views/foreman_webhooks/webhook_templates/katello_-_repo_sync.erb +1 -0
  27. data/app/views/foreman_webhooks/webhook_templates/remote_execution_-_host_job.erb +0 -1
  28. data/config/routes.rb +3 -0
  29. data/lib/foreman_webhooks/engine.rb +9 -2
  30. data/lib/foreman_webhooks/version.rb +1 -1
  31. data/locale/ca/LC_MESSAGES/foreman_webhooks.mo +0 -0
  32. data/locale/ca/foreman_webhooks.po +237 -0
  33. data/locale/cs_CZ/LC_MESSAGES/foreman_webhooks.mo +0 -0
  34. data/locale/cs_CZ/foreman_webhooks.po +240 -0
  35. data/locale/de/LC_MESSAGES/foreman_webhooks.mo +0 -0
  36. data/locale/de/foreman_webhooks.po +244 -0
  37. data/locale/en/LC_MESSAGES/foreman_webhooks.mo +0 -0
  38. data/locale/en/foreman_webhooks.po +258 -0
  39. data/locale/en_GB/LC_MESSAGES/foreman_webhooks.mo +0 -0
  40. data/locale/en_GB/foreman_webhooks.po +239 -0
  41. data/locale/es/LC_MESSAGES/foreman_webhooks.mo +0 -0
  42. data/locale/es/foreman_webhooks.po +241 -0
  43. data/locale/fr/LC_MESSAGES/foreman_webhooks.mo +0 -0
  44. data/locale/fr/foreman_webhooks.po +241 -0
  45. data/locale/it/LC_MESSAGES/foreman_webhooks.mo +0 -0
  46. data/locale/it/foreman_webhooks.po +240 -0
  47. data/locale/ja/LC_MESSAGES/foreman_webhooks.mo +0 -0
  48. data/locale/ja/foreman_webhooks.po +240 -0
  49. data/locale/ka/LC_MESSAGES/foreman_webhooks.mo +0 -0
  50. data/locale/ka/foreman_webhooks.po +237 -0
  51. data/locale/ko/LC_MESSAGES/foreman_webhooks.mo +0 -0
  52. data/locale/ko/foreman_webhooks.po +238 -0
  53. data/locale/pl/LC_MESSAGES/foreman_webhooks.mo +0 -0
  54. data/locale/pl/foreman_webhooks.po +240 -0
  55. data/locale/pt_BR/LC_MESSAGES/foreman_webhooks.mo +0 -0
  56. data/locale/pt_BR/foreman_webhooks.po +241 -0
  57. data/locale/ru/LC_MESSAGES/foreman_webhooks.mo +0 -0
  58. data/locale/ru/foreman_webhooks.po +241 -0
  59. data/locale/zh_CN/LC_MESSAGES/foreman_webhooks.mo +0 -0
  60. data/locale/zh_CN/foreman_webhooks.po +240 -0
  61. data/locale/zh_TW/LC_MESSAGES/foreman_webhooks.mo +0 -0
  62. data/locale/zh_TW/foreman_webhooks.po +239 -0
  63. data/package.json +0 -3
  64. data/test/factories/webhook_template.rb +10 -0
  65. data/test/graphql/foreman_webhooks/queries/webhook_query_test.rb +59 -0
  66. data/test/graphql/foreman_webhooks/queries/webhook_template_query_test.rb +64 -0
  67. data/test/graphql/foreman_webhooks/queries/webhook_templates_query_test.rb +47 -0
  68. data/test/graphql/foreman_webhooks/queries/webhooks_query_test.rb +47 -0
  69. data/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/Components/WebhookFormTabs.js +19 -4
  70. data/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/WebhookFormSelectors.js +4 -5
  71. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhookTestModal.js +100 -0
  72. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/ActionButtons/ActionButton.js +40 -0
  73. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/actionCellFormatter.js +20 -0
  74. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/index.js +1 -0
  75. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/WebhooksTable.js +7 -3
  76. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/WebhooksTableSchema.js +3 -4
  77. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/__tests__/WebhooksTable.test.js +2 -0
  78. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/__tests__/__snapshots__/WebhooksTable.test.js.snap +32 -0
  79. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/index.js +23 -2
  80. data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/WebhooksIndexPage.js +3 -0
  81. data/webpack/ForemanWebhooks/Routes/Webhooks/constants.js +1 -0
  82. data/webpack/__mocks__/foremanReact/components/common/ActionButtons/ActionButtons.js +3 -0
  83. metadata +64 -4
  84. data/test/factories/webhook_target.rb +0 -9
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { cellFormatter } from 'foremanReact/components/common/table';
3
+ import { ActionButton } from '../ActionButtons/ActionButton';
4
+
5
+ const actionCellFormatter = webhookActions => (
6
+ _,
7
+ { rowData: { id, name, canEdit, canDelete } }
8
+ ) =>
9
+ cellFormatter(
10
+ canEdit && (
11
+ <ActionButton
12
+ canDelete={canDelete}
13
+ id={id}
14
+ name={name}
15
+ webhookActions={webhookActions}
16
+ />
17
+ )
18
+ );
19
+
20
+ export default actionCellFormatter;
@@ -1,2 +1,3 @@
1
1
  export { default as enabledCellFormatter } from './enabledCellFormatter';
2
2
  export { default as nameToEditFormatter } from './nameToEditFormatter';
3
+ export { default as actionCellFormatter } from './actionCellFormatter';
@@ -10,6 +10,7 @@ import { useForemanModal } from 'foremanReact/components/ForemanModal/ForemanMod
10
10
 
11
11
  import WebhookDeleteModal from '../WebhookDeleteModal';
12
12
  import WebhookEditModal from '../WebhookEditModal';
13
+ import WebhookTestModal from '../WebhookTestModal';
13
14
  import EmptyWebhooksTable from './Components/EmptyWebhooksTable';
14
15
 
15
16
  import createWebhooksTableSchema from './WebhooksTableSchema';
@@ -32,10 +33,11 @@ import {
32
33
  const WebhooksTable = ({
33
34
  fetchAndPush,
34
35
  toDelete,
35
- onDeleteClick,
36
+ toTest,
36
37
  toEdit,
37
38
  onEditClick,
38
39
  reloadWithSearch,
40
+ webhookActions,
39
41
  }) => {
40
42
  const webhooks = useSelector(selectWebhooks);
41
43
  const page = useSelector(selectPage);
@@ -75,13 +77,14 @@ const WebhooksTable = ({
75
77
  }}
76
78
  onCancel={setEditModalClosed}
77
79
  />
80
+ <WebhookTestModal toTest={toTest} />
78
81
  <Table
79
82
  key="webhooks-table"
80
83
  columns={createWebhooksTableSchema(
81
84
  fetchAndPush,
82
85
  sort.by,
83
86
  sort.order,
84
- onDeleteClick,
87
+ webhookActions,
85
88
  onEditClick
86
89
  )}
87
90
  rows={webhooks}
@@ -94,11 +97,12 @@ const WebhooksTable = ({
94
97
 
95
98
  WebhooksTable.propTypes = {
96
99
  fetchAndPush: PropTypes.func.isRequired,
97
- onDeleteClick: PropTypes.func.isRequired,
98
100
  onEditClick: PropTypes.func.isRequired,
99
101
  toDelete: PropTypes.object.isRequired,
102
+ toTest: PropTypes.object.isRequired,
100
103
  toEdit: PropTypes.number.isRequired,
101
104
  reloadWithSearch: PropTypes.func.isRequired,
105
+ webhookActions: PropTypes.object.isRequired,
102
106
  };
103
107
 
104
108
  export default WebhooksTable;
@@ -3,13 +3,12 @@ import {
3
3
  column,
4
4
  sortableColumn,
5
5
  headerFormatterWithProps,
6
- deleteActionCellFormatter,
7
- cellFormatter,
8
6
  } from 'foremanReact/components/common/table';
9
7
 
10
8
  import {
11
9
  enabledCellFormatter,
12
10
  nameToEditFormatter,
11
+ actionCellFormatter,
13
12
  } from './Components/Formatters';
14
13
 
15
14
  const sortControllerFactory = (apiCall, sortBy, sortOrder) => ({
@@ -24,7 +23,7 @@ const createWebhooksTableSchema = (
24
23
  apiCall,
25
24
  by,
26
25
  order,
27
- onDeleteClick,
26
+ webhookActions,
28
27
  onEditClick
29
28
  ) => {
30
29
  const sortController = sortControllerFactory(apiCall, by, order);
@@ -41,7 +40,7 @@ const createWebhooksTableSchema = (
41
40
  'actions',
42
41
  __('Actions'),
43
42
  [headerFormatterWithProps],
44
- [deleteActionCellFormatter(onDeleteClick), cellFormatter]
43
+ [actionCellFormatter(webhookActions)]
45
44
  ),
46
45
  ];
47
46
  };
@@ -11,6 +11,7 @@ const props = {
11
11
  onDeleteClick: jest.fn(),
12
12
  setToDelete: jest.fn(),
13
13
  setToEdit: jest.fn(),
14
+ setToTest: jest.fn(),
14
15
  reloadWithSearch: jest.fn(),
15
16
  itemCount: 0,
16
17
  canCreate: true,
@@ -20,6 +21,7 @@ const props = {
20
21
  perPage: 20,
21
22
  },
22
23
  toDelete: {},
24
+ toTest: {},
23
25
  toEdit: 0,
24
26
  };
25
27
 
@@ -10,6 +10,7 @@ exports[`WebhooksTable rendering should render when loading 1`] = `
10
10
  itemCount={0}
11
11
  onDeleteClick={[MockFunction]}
12
12
  onEditClick={[Function]}
13
+ onTestClick={[Function]}
13
14
  page={5}
14
15
  pagination={
15
16
  Object {
@@ -29,6 +30,13 @@ exports[`WebhooksTable rendering should render when loading 1`] = `
29
30
  }
30
31
  toDelete={Object {}}
31
32
  toEdit={0}
33
+ toTest={Object {}}
34
+ webhookActions={
35
+ Object {
36
+ "deleteWebhook": [Function],
37
+ "testWebhook": [Function],
38
+ }
39
+ }
32
40
  />
33
41
  `;
34
42
 
@@ -48,6 +56,7 @@ exports[`WebhooksTable rendering should render with error 1`] = `
48
56
  }
49
57
  onDeleteClick={[MockFunction]}
50
58
  onEditClick={[Function]}
59
+ onTestClick={[Function]}
51
60
  page={5}
52
61
  pagination={
53
62
  Object {
@@ -67,6 +76,13 @@ exports[`WebhooksTable rendering should render with error 1`] = `
67
76
  }
68
77
  toDelete={Object {}}
69
78
  toEdit={0}
79
+ toTest={Object {}}
80
+ webhookActions={
81
+ Object {
82
+ "deleteWebhook": [Function],
83
+ "testWebhook": [Function],
84
+ }
85
+ }
70
86
  />
71
87
  `;
72
88
 
@@ -80,6 +96,7 @@ exports[`WebhooksTable rendering should render with no data 1`] = `
80
96
  itemCount={0}
81
97
  onDeleteClick={[MockFunction]}
82
98
  onEditClick={[Function]}
99
+ onTestClick={[Function]}
83
100
  page={5}
84
101
  pagination={
85
102
  Object {
@@ -99,6 +116,13 @@ exports[`WebhooksTable rendering should render with no data 1`] = `
99
116
  }
100
117
  toDelete={Object {}}
101
118
  toEdit={0}
119
+ toTest={Object {}}
120
+ webhookActions={
121
+ Object {
122
+ "deleteWebhook": [Function],
123
+ "testWebhook": [Function],
124
+ }
125
+ }
102
126
  />
103
127
  `;
104
128
 
@@ -112,6 +136,7 @@ exports[`WebhooksTable rendering should render with webhooks 1`] = `
112
136
  itemCount={2}
113
137
  onDeleteClick={[MockFunction]}
114
138
  onEditClick={[Function]}
139
+ onTestClick={[Function]}
115
140
  page={5}
116
141
  pagination={
117
142
  Object {
@@ -150,5 +175,12 @@ exports[`WebhooksTable rendering should render with webhooks 1`] = `
150
175
  }
151
176
  toDelete={Object {}}
152
177
  toEdit={0}
178
+ toTest={Object {}}
179
+ webhookActions={
180
+ Object {
181
+ "deleteWebhook": [Function],
182
+ "testWebhook": [Function],
183
+ }
184
+ }
153
185
  />
154
186
  `;
@@ -7,6 +7,7 @@ import WebhooksTable from './WebhooksTable';
7
7
  import {
8
8
  WEBHOOK_DELETE_MODAL_ID,
9
9
  WEBHOOK_EDIT_MODAL_ID,
10
+ WEBHOOK_TEST_MODAL_ID,
10
11
  } from '../../../constants';
11
12
 
12
13
  const WrappedWebhooksTable = props => {
@@ -18,7 +19,11 @@ const WrappedWebhooksTable = props => {
18
19
  id: WEBHOOK_EDIT_MODAL_ID,
19
20
  });
20
21
 
21
- const { setToDelete, setToEdit, ...rest } = props;
22
+ const { setModalOpen: setTestModalOpen } = useForemanModal({
23
+ id: WEBHOOK_TEST_MODAL_ID,
24
+ });
25
+
26
+ const { setToDelete, setToEdit, setToTest, ...rest } = props;
22
27
 
23
28
  const onDeleteClick = rowData => {
24
29
  setToDelete(rowData);
@@ -30,10 +35,25 @@ const WrappedWebhooksTable = props => {
30
35
  setEditModalOpen();
31
36
  };
32
37
 
38
+ const onTestClick = rowData => {
39
+ setToTest(rowData);
40
+ setTestModalOpen();
41
+ };
42
+
43
+ const webhookActions = {
44
+ deleteWebhook: (id, name) => {
45
+ onDeleteClick({ id, name });
46
+ },
47
+ testWebhook: (id, name) => {
48
+ onTestClick({ id, name });
49
+ },
50
+ };
51
+
33
52
  return (
34
53
  <WebhooksTable
35
- onDeleteClick={onDeleteClick}
36
54
  onEditClick={onEditClick}
55
+ onTestClick={onTestClick}
56
+ webhookActions={webhookActions}
37
57
  {...rest}
38
58
  />
39
59
  );
@@ -42,6 +62,7 @@ const WrappedWebhooksTable = props => {
42
62
  WrappedWebhooksTable.propTypes = {
43
63
  setToDelete: PropTypes.func.isRequired,
44
64
  setToEdit: PropTypes.func.isRequired,
65
+ setToTest: PropTypes.func.isRequired,
45
66
  };
46
67
 
47
68
  export default WrappedWebhooksTable;
@@ -24,6 +24,7 @@ const WebhooksIndexPage = () => {
24
24
  const search = useSelector(selectSearch);
25
25
 
26
26
  const [toDelete, setToDelete] = useState({});
27
+ const [toTest, setToTest] = useState({});
27
28
  const [toEdit, setToEdit] = useState(0);
28
29
 
29
30
  const {
@@ -55,6 +56,8 @@ const WebhooksIndexPage = () => {
55
56
  setToDelete={setToDelete}
56
57
  toEdit={toEdit}
57
58
  setToEdit={setToEdit}
59
+ toTest={toTest}
60
+ setToTest={setToTest}
58
61
  reloadWithSearch={query => dispatch(reloadWithSearch(query))}
59
62
  />
60
63
  </TableIndexPage>
@@ -18,3 +18,4 @@ export const WEBHOOK_EVENTS_API_REQUEST_KEY = 'WEBHOOK_EVENTS';
18
18
  export const WEBHOOK_CREATE_MODAL_ID = 'webhookCreateModal';
19
19
  export const WEBHOOK_EDIT_MODAL_ID = 'webhookEditModal';
20
20
  export const WEBHOOK_DELETE_MODAL_ID = 'webhookDeleteModal';
21
+ export const WEBHOOK_TEST_MODAL_ID = 'webhookTestModal';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+
3
+ export const ActionButtons = () => <div />;
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: 3.1.1
4
+ version: 3.2.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: 2023-08-10 00:00:00.000000000 Z
11
+ date: 2023-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -48,12 +48,30 @@ files:
48
48
  - LICENSE
49
49
  - README.md
50
50
  - Rakefile
51
+ - app/assets/javascripts/foreman_webhooks/locale/ca/foreman_webhooks.js
52
+ - app/assets/javascripts/foreman_webhooks/locale/cs_CZ/foreman_webhooks.js
53
+ - app/assets/javascripts/foreman_webhooks/locale/de/foreman_webhooks.js
54
+ - app/assets/javascripts/foreman_webhooks/locale/en/foreman_webhooks.js
55
+ - app/assets/javascripts/foreman_webhooks/locale/en_GB/foreman_webhooks.js
56
+ - app/assets/javascripts/foreman_webhooks/locale/es/foreman_webhooks.js
57
+ - app/assets/javascripts/foreman_webhooks/locale/fr/foreman_webhooks.js
58
+ - app/assets/javascripts/foreman_webhooks/locale/it/foreman_webhooks.js
59
+ - app/assets/javascripts/foreman_webhooks/locale/ja/foreman_webhooks.js
60
+ - app/assets/javascripts/foreman_webhooks/locale/ka/foreman_webhooks.js
61
+ - app/assets/javascripts/foreman_webhooks/locale/ko/foreman_webhooks.js
62
+ - app/assets/javascripts/foreman_webhooks/locale/pl/foreman_webhooks.js
63
+ - app/assets/javascripts/foreman_webhooks/locale/pt_BR/foreman_webhooks.js
64
+ - app/assets/javascripts/foreman_webhooks/locale/ru/foreman_webhooks.js
65
+ - app/assets/javascripts/foreman_webhooks/locale/zh_CN/foreman_webhooks.js
66
+ - app/assets/javascripts/foreman_webhooks/locale/zh_TW/foreman_webhooks.js
51
67
  - app/controllers/api/v2/webhook_templates_controller.rb
52
68
  - app/controllers/api/v2/webhooks_controller.rb
53
69
  - app/controllers/concerns/foreman_webhooks/controller/parameters/webhook.rb
54
70
  - app/controllers/concerns/foreman_webhooks/controller/parameters/webhook_template.rb
55
71
  - app/controllers/webhook_templates_controller.rb
56
72
  - app/controllers/webhooks_controller.rb
73
+ - app/graphql/foreman_webhooks/types/webhook.rb
74
+ - app/graphql/foreman_webhooks/types/webhook_template.rb
57
75
  - app/jobs/foreman_webhooks/deliver_webhook_job.rb
58
76
  - app/lib/foreman_webhooks/renderer/scope/webhook_template.rb
59
77
  - app/models/concerns/foreman_webhooks/taxonomy_extensions.rb
@@ -102,12 +120,47 @@ files:
102
120
  - lib/foreman_webhooks/engine.rb
103
121
  - lib/foreman_webhooks/version.rb
104
122
  - lib/tasks/foreman_webhooks_tasks.rake
123
+ - locale/ca/LC_MESSAGES/foreman_webhooks.mo
124
+ - locale/ca/foreman_webhooks.po
125
+ - locale/cs_CZ/LC_MESSAGES/foreman_webhooks.mo
126
+ - locale/cs_CZ/foreman_webhooks.po
127
+ - locale/de/LC_MESSAGES/foreman_webhooks.mo
128
+ - locale/de/foreman_webhooks.po
129
+ - locale/en/LC_MESSAGES/foreman_webhooks.mo
130
+ - locale/en/foreman_webhooks.po
131
+ - locale/en_GB/LC_MESSAGES/foreman_webhooks.mo
132
+ - locale/en_GB/foreman_webhooks.po
133
+ - locale/es/LC_MESSAGES/foreman_webhooks.mo
134
+ - locale/es/foreman_webhooks.po
135
+ - locale/fr/LC_MESSAGES/foreman_webhooks.mo
136
+ - locale/fr/foreman_webhooks.po
137
+ - locale/it/LC_MESSAGES/foreman_webhooks.mo
138
+ - locale/it/foreman_webhooks.po
139
+ - locale/ja/LC_MESSAGES/foreman_webhooks.mo
140
+ - locale/ja/foreman_webhooks.po
141
+ - locale/ka/LC_MESSAGES/foreman_webhooks.mo
142
+ - locale/ka/foreman_webhooks.po
143
+ - locale/ko/LC_MESSAGES/foreman_webhooks.mo
144
+ - locale/ko/foreman_webhooks.po
145
+ - locale/pl/LC_MESSAGES/foreman_webhooks.mo
146
+ - locale/pl/foreman_webhooks.po
147
+ - locale/pt_BR/LC_MESSAGES/foreman_webhooks.mo
148
+ - locale/pt_BR/foreman_webhooks.po
149
+ - locale/ru/LC_MESSAGES/foreman_webhooks.mo
150
+ - locale/ru/foreman_webhooks.po
151
+ - locale/zh_CN/LC_MESSAGES/foreman_webhooks.mo
152
+ - locale/zh_CN/foreman_webhooks.po
153
+ - locale/zh_TW/LC_MESSAGES/foreman_webhooks.mo
154
+ - locale/zh_TW/foreman_webhooks.po
105
155
  - package.json
106
156
  - test/controllers/api/v2/webhook_templates_controller_test.rb
107
157
  - test/controllers/api/v2/webhooks_controller_test.rb
108
158
  - test/factories/webhook.rb
109
- - test/factories/webhook_target.rb
110
159
  - test/factories/webhook_template.rb
160
+ - test/graphql/foreman_webhooks/queries/webhook_query_test.rb
161
+ - test/graphql/foreman_webhooks/queries/webhook_template_query_test.rb
162
+ - test/graphql/foreman_webhooks/queries/webhook_templates_query_test.rb
163
+ - test/graphql/foreman_webhooks/queries/webhooks_query_test.rb
111
164
  - test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
112
165
  - test/models/webhook_test.rb
113
166
  - test/test_plugin_helper.rb
@@ -127,10 +180,13 @@ files:
127
180
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhookEditModal.js
128
181
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhookEditModalSelectors.js
129
182
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhookModal.scss
183
+ - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhookTestModal.js
184
+ - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/ActionButtons/ActionButton.js
130
185
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/EmptyWebhooksTable/index.js
131
186
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/EnabledCell.js
132
187
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/__tests__/__snapshots__/enabledCellFormatter.test.js.snap
133
188
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/__tests__/enabledCellFormatter.test.js
189
+ - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/actionCellFormatter.js
134
190
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/enabledCellFormatter.js
135
191
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/index.js
136
192
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/nameToEditFormatter.js
@@ -169,6 +225,7 @@ files:
169
225
  - webpack/__mocks__/foremanReact/components/Loading/index.js
170
226
  - webpack/__mocks__/foremanReact/components/PF4/TableIndexPage/TableIndexPage.js
171
227
  - webpack/__mocks__/foremanReact/components/Pagination/index.js
228
+ - webpack/__mocks__/foremanReact/components/common/ActionButtons/ActionButtons.js
172
229
  - webpack/__mocks__/foremanReact/components/common/EmptyState.js
173
230
  - webpack/__mocks__/foremanReact/components/common/forms/ForemanForm.js
174
231
  - webpack/__mocks__/foremanReact/components/common/forms/FormField.js
@@ -211,12 +268,15 @@ test_files:
211
268
  - test/controllers/api/v2/webhook_templates_controller_test.rb
212
269
  - test/controllers/api/v2/webhooks_controller_test.rb
213
270
  - test/factories/webhook.rb
214
- - test/factories/webhook_target.rb
215
271
  - test/factories/webhook_template.rb
216
272
  - test/jobs/foreman_webhooks/deliver_webhook_job_test.rb
217
273
  - test/models/webhook_test.rb
218
274
  - test/test_plugin_helper.rb
219
275
  - test/unit/foreman_webhooks/webhook_service_test.rb
276
+ - test/graphql/foreman_webhooks/queries/webhook_query_test.rb
277
+ - test/graphql/foreman_webhooks/queries/webhook_template_query_test.rb
278
+ - test/graphql/foreman_webhooks/queries/webhook_templates_query_test.rb
279
+ - test/graphql/foreman_webhooks/queries/webhooks_query_test.rb
220
280
  - webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/__tests__/WebhookForm.test.js
221
281
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/__tests__/enabledCellFormatter.test.js
222
282
  - webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/__tests__/EnabledCell.test.js
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- FactoryBot.define do
4
- factory :webhook_target do
5
- sequence(:name) { |n| "Webhook Target #{n}" }
6
- target_url { 'https://hook.example.com/api/callback' }
7
- events { ['subnet_created.event.foreman'] }
8
- end
9
- end