foreman_webhooks 5.0.3 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +0 -15
- data/app/models/webhook.rb +1 -1
- data/lib/foreman_webhooks/version.rb +1 -1
- data/webpack/ForemanWebhooks/Routes/ForemanWebhooksRoutes.js +1 -1
- data/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookTable/Components/Formatters/__tests__/actionCellFormatter.test.js +109 -0
- data/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookTable/Components/Formatters/__tests__/enabledCellFormatter.test.js +38 -0
- data/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookTable/Components/Formatters/__tests__/nameToEditFormatter.test.js +82 -0
- data/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookTable/Components/Formatters/actionCellFormatter.js +23 -0
- data/webpack/ForemanWebhooks/Routes/Webhooks/{WebhooksIndexPage/Components/WebhooksTable/Components/EnabledCell.js → Components/WebhookTable/Components/Formatters/enabledCellFormatter.js} +6 -1
- data/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookTable/Components/Formatters/nameToEditFormatter.js +33 -0
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhookCreateModal.js +1 -0
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhookDeleteModal.js +5 -1
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhookEditModal.js +1 -0
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/WebhooksIndexPage.js +120 -16
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/WebhooksIndexPage.test.js +130 -22
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/integration.test.js +10 -3
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/mocks/MockForemanTableIndexPage.js +37 -0
- data/webpack/ForemanWebhooks/Routes/Webhooks/constants.js +3 -3
- data/webpack/test_setup.js +3 -0
- metadata +18 -93
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/EmptyWebhooksTable/index.js +0 -29
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/__tests__/__snapshots__/enabledCellFormatter.test.js.snap +0 -7
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/__tests__/enabledCellFormatter.test.js +0 -7
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/actionCellFormatter.js +0 -20
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/enabledCellFormatter.js +0 -6
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/index.js +0 -3
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/Formatters/nameToEditFormatter.js +0 -19
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/NameToEditCell.js +0 -42
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/__tests__/EnabledCell.test.js +0 -14
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/Components/__tests__/__snapshots__/EnabledCell.test.js.snap +0 -5
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/WebhooksTable.js +0 -121
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/WebhooksTableSchema.js +0 -48
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/__tests__/WebhooksTable.test.js +0 -64
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/__tests__/__snapshots__/WebhooksTable.test.js.snap +0 -250
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/WebhooksTable/index.js +0 -76
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/__tests__/__snapshots__/WebhooksIndexPage.test.js.snap +0 -17
- data/webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/index.js +0 -3
- data/webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js +0 -1
- data/webpack/__mocks__/foremanReact/common/HOC.js +0 -30
- data/webpack/__mocks__/foremanReact/common/I18n.js +0 -7
- data/webpack/__mocks__/foremanReact/common/helpers.js +0 -7
- data/webpack/__mocks__/foremanReact/common/urlHelpers.js +0 -8
- data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalActions.js +0 -2
- data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalHooks.js +0 -10
- data/webpack/__mocks__/foremanReact/components/ForemanModal/index.js +0 -23
- data/webpack/__mocks__/foremanReact/components/Layout/LayoutActions.js +0 -2
- data/webpack/__mocks__/foremanReact/components/Loading/Loading.js +0 -2
- data/webpack/__mocks__/foremanReact/components/Loading/index.js +0 -3
- data/webpack/__mocks__/foremanReact/components/PF4/TableIndexPage/TableIndexPage.js +0 -10
- data/webpack/__mocks__/foremanReact/components/Pagination/index.js +0 -4
- data/webpack/__mocks__/foremanReact/components/common/ActionButtons/ActionButtons.js +0 -3
- data/webpack/__mocks__/foremanReact/components/common/EmptyState.js +0 -5
- data/webpack/__mocks__/foremanReact/components/common/forms/ForemanForm.js +0 -9
- data/webpack/__mocks__/foremanReact/components/common/forms/FormField.js +0 -3
- data/webpack/__mocks__/foremanReact/components/common/table.js +0 -26
- data/webpack/__mocks__/foremanReact/constants.js +0 -24
- data/webpack/__mocks__/foremanReact/history.js +0 -3
- data/webpack/__mocks__/foremanReact/redux/API/APISelectors.js +0 -6
- data/webpack/__mocks__/foremanReact/redux/API/index.js +0 -10
- data/webpack/__mocks__/foremanReact/redux/actions/common/forms.js +0 -1
- data/webpack/__mocks__/foremanReact/redux/actions/toasts.js +0 -8
- data/webpack/__mocks__/foremanReact/routes/common/PageLayout/PageLayout.js +0 -10
- /data/webpack/ForemanWebhooks/Routes/Webhooks/{WebhooksIndexPage/Components/WebhooksTable → Components/WebhookTable}/Components/ActionButtons/ActionButton.js +0 -0
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export const Table = () => <div className="table" />;
|
|
4
|
-
export const createTableReducer = jest.fn(controller => controller);
|
|
5
|
-
export const cellFormatter = cell => cell;
|
|
6
|
-
export const deleteActionCellFormatter = cell => cell;
|
|
7
|
-
export const sortableColumn = jest.fn();
|
|
8
|
-
export const column = (
|
|
9
|
-
property,
|
|
10
|
-
label,
|
|
11
|
-
headFormat,
|
|
12
|
-
cellFormat,
|
|
13
|
-
headProps = {},
|
|
14
|
-
cellProps = {}
|
|
15
|
-
) => ({
|
|
16
|
-
property,
|
|
17
|
-
header: {
|
|
18
|
-
label,
|
|
19
|
-
props: headProps,
|
|
20
|
-
formatters: headFormat,
|
|
21
|
-
},
|
|
22
|
-
cell: {
|
|
23
|
-
props: cellProps,
|
|
24
|
-
formatters: cellFormat,
|
|
25
|
-
},
|
|
26
|
-
});
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export const STATUS = {
|
|
2
|
-
PENDING: 'PENDING',
|
|
3
|
-
RESOLVED: 'RESOLVED',
|
|
4
|
-
ERROR: 'ERROR',
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export const getControllerSearchProps = (
|
|
8
|
-
controller,
|
|
9
|
-
id = 'searchBar',
|
|
10
|
-
canCreateBookmarks = true
|
|
11
|
-
) => ({
|
|
12
|
-
controller,
|
|
13
|
-
autocomplete: {
|
|
14
|
-
id,
|
|
15
|
-
searchQuery: '',
|
|
16
|
-
url: `${controller}/auto_complete_search`,
|
|
17
|
-
useKeyShortcuts: true,
|
|
18
|
-
},
|
|
19
|
-
bookmarks: {
|
|
20
|
-
url: '/api/bookmarks',
|
|
21
|
-
canCreateBookmarks,
|
|
22
|
-
documentationUrl: `4.1.5Searching`,
|
|
23
|
-
},
|
|
24
|
-
});
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export const selectAPIResponse = (state, key) =>
|
|
2
|
-
selectAPIByKey(state, key).response;
|
|
3
|
-
|
|
4
|
-
export const selectAPIStatus = (state, key) => 'PENDING';
|
|
5
|
-
export const selectAPIByKey = (state, key) => state.API[key];
|
|
6
|
-
export const selectAPIError = (state, key) => ({ error: `${key} ERRROR` });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const submitForm = jest.fn(() => '');
|