foreman_rh_cloud 14.2.0 → 14.2.1
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/lib/foreman_rh_cloud/version.rb +1 -1
- data/package.json +1 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/EmptyResults.js +15 -6
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/emptyResults.scss +1 -5
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/EmptyState.js +15 -7
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/__tests__/EmptyState.test.js +1 -3
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/emptyState.scss +1 -5
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/ErrorState.js +2 -2
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/ListItem.test.js +0 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountList.test.js +2 -6
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/Components/ClearButton/ClearButton.js +13 -10
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilter.js +30 -11
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/integration.test.js +3 -1
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/inventoryFilter.scss +28 -22
- data/webpack/ForemanInventoryUpload/Components/InventorySettings/InventorySettings.js +4 -4
- data/webpack/ForemanInventoryUpload/Components/InventorySettings/InventorySettings.scss +16 -3
- data/webpack/ForemanInventoryUpload/Components/InventorySettings/MinimalInventoryDropdown.js +13 -14
- data/webpack/ForemanInventoryUpload/Components/PageHeader/PageHeader.js +7 -7
- data/webpack/ForemanInventoryUpload/Components/PageHeader/PageHeader.scss +3 -2
- data/webpack/ForemanInventoryUpload/Components/PageHeader/PageTitle.js +63 -46
- data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/PageHeader.test.js +4 -7
- data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/PageTitle.test.js +83 -12
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/CloudPingModal/index.js +31 -38
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/SyncButton.test.js +3 -1
- data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/InventoryAutoUpload.js +29 -22
- data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/InventoryAutoUpload.test.js +6 -2
- data/webpack/ForemanInventoryUpload/__tests__/ForemanInventoryHelpers.test.js +6 -3
- data/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTable.js +90 -23
- data/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTableActions.js +1 -2
- data/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTableConstants.js +24 -30
- data/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTableHelpers.js +5 -6
- data/webpack/InsightsCloudSync/Components/InsightsTable/__tests__/InsightsTable.test.js +193 -8
- data/webpack/InsightsCloudSync/Components/InsightsTable/__tests__/InsightsTableActions.test.js +4 -1
- data/webpack/InsightsCloudSync/Components/RemediationModal/RemediationHelpers.js +8 -9
- data/webpack/InsightsCloudSync/Components/RemediationModal/RemediationModal.js +26 -13
- data/webpack/InsightsCloudSync/Components/RemediationModal/RemediationTableConstants.js +12 -10
- data/webpack/InsightsCloudSync/Components/ToolbarDropdown.js +21 -9
- data/webpack/InsightsCloudSync/InsightsCloudSync.test.js +12 -19
- data/webpack/InsightsCloudSync/__tests__/InsightsCloudSyncActions.test.js +0 -1
- data/webpack/common/DropdownToggle.js +20 -6
- metadata +1 -44
- data/webpack/ForemanInventoryUpload/Components/FileDownload/FileDownload.fixtures.js +0 -0
- data/webpack/ForemanInventoryUpload/Components/FileDownload/FileDownload.js +0 -25
- data/webpack/ForemanInventoryUpload/Components/FileDownload/FileDownloadHelper.js +0 -0
- data/webpack/ForemanInventoryUpload/Components/FileDownload/__tests__/FileDownload.test.js +0 -17
- data/webpack/ForemanInventoryUpload/Components/FileDownload/fileDownload.scss +0 -5
- data/webpack/ForemanInventoryUpload/Components/FileDownload/index.js +0 -1
- data/webpack/ForemanInventoryUpload/Components/NavContainer/NavContainer.fixtures.js +0 -20
- data/webpack/ForemanInventoryUpload/Components/NavContainer/NavContainer.js +0 -66
- data/webpack/ForemanInventoryUpload/Components/NavContainer/NavContainerHelper.js +0 -0
- data/webpack/ForemanInventoryUpload/Components/NavContainer/__tests__/NavContainer.test.js +0 -69
- data/webpack/ForemanInventoryUpload/Components/NavContainer/index.js +0 -1
- data/webpack/ForemanInventoryUpload/Components/NavContainer/navContainer.scss +0 -9
- data/webpack/ForemanInventoryUpload/Components/ScheduledRun/ScheduledRun.fixtures.js +0 -4
- data/webpack/ForemanInventoryUpload/Components/ScheduledRun/ScheduledRun.js +0 -29
- data/webpack/ForemanInventoryUpload/Components/ScheduledRun/ScheduledRunHelper.js +0 -0
- data/webpack/ForemanInventoryUpload/Components/ScheduledRun/__tests__/ScheduledRun.test.js +0 -33
- data/webpack/ForemanInventoryUpload/Components/ScheduledRun/index.js +0 -12
- data/webpack/ForemanInventoryUpload/Components/ScheduledRun/scheduledRun.scss +0 -13
- data/webpack/ForemanInventoryUpload/Components/StatusChart/StatusChart.fixtures.js +0 -0
- data/webpack/ForemanInventoryUpload/Components/StatusChart/StatusChart.js +0 -57
- data/webpack/ForemanInventoryUpload/Components/StatusChart/StatusChartHelper.js +0 -0
- data/webpack/ForemanInventoryUpload/Components/StatusChart/__tests__/StatusChart.test.js +0 -30
- data/webpack/ForemanInventoryUpload/Components/StatusChart/index.js +0 -1
- data/webpack/ForemanInventoryUpload/Components/StatusChart/statusChart.scss +0 -10
- data/webpack/ForemanInventoryUpload/Components/TabContainer/TabContainer.fixtures.js +0 -0
- data/webpack/ForemanInventoryUpload/Components/TabContainer/TabContainer.js +0 -24
- data/webpack/ForemanInventoryUpload/Components/TabContainer/TabContainerHelper.js +0 -0
- data/webpack/ForemanInventoryUpload/Components/TabContainer/__tests__/TabContainer.test.js +0 -15
- data/webpack/ForemanInventoryUpload/Components/TabContainer/index.js +0 -1
- data/webpack/ForemanInventoryUpload/Components/TabContainer/tabContainer.scss +0 -10
- data/webpack/ForemanInventoryUpload/Components/TabFooter/TabFooter.fixtures.js +0 -0
- data/webpack/ForemanInventoryUpload/Components/TabFooter/TabFooter.js +0 -19
- data/webpack/ForemanInventoryUpload/Components/TabFooter/TabFooterHelper.js +0 -0
- data/webpack/ForemanInventoryUpload/Components/TabFooter/__tests__/TabFooter.test.js +0 -15
- data/webpack/ForemanInventoryUpload/Components/TabFooter/index.js +0 -1
- data/webpack/ForemanInventoryUpload/Components/TabFooter/tabFooter.scss +0 -0
- data/webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.fixtures.js +0 -0
- data/webpack/ForemanInventoryUpload/Components/TabHeader/TabHeader.js +0 -85
- data/webpack/ForemanInventoryUpload/Components/TabHeader/TabHeaderHelper.js +0 -0
- data/webpack/ForemanInventoryUpload/Components/TabHeader/__tests__/TabHeader.test.js +0 -114
- data/webpack/ForemanInventoryUpload/Components/TabHeader/index.js +0 -1
- data/webpack/ForemanInventoryUpload/Components/TabHeader/tabHeader.scss +0 -23
- data/webpack/common/Switcher/index.js +0 -80
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 89dec7188d18373800314f614305ccece5e477bb6d1db9ce24c35c288b101ee2
|
|
4
|
+
data.tar.gz: 4d7fe9c4aff407cbf2945a45f4d2c032f7a2d5672740c890e3691287c3cd35c6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6e2daa770c20d244f2b86f81cc447661de17c1b7ead87cf1989bf1a5fe50858601a1f847c4fdaff88501313da45cb0d826d169906cd4682f32ebb8b0c6e3e5f4
|
|
7
|
+
data.tar.gz: 830c5dc063d390c5b76d8e637b89eebbafc77add2d2245f71a5372b292c324057c5ba0c3394f4ae436c2a718979c352a405b127b8f38e578513d3460b1c1fffa
|
data/package.json
CHANGED
data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyResults/EmptyResults.js
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
EmptyState,
|
|
4
|
+
EmptyStateHeader,
|
|
5
|
+
EmptyStateIcon,
|
|
6
|
+
EmptyStateVariant,
|
|
7
|
+
} from '@patternfly/react-core';
|
|
8
|
+
import { OutlinedMehIcon } from '@patternfly/react-icons';
|
|
3
9
|
import { translate as __ } from 'foremanReact/common/I18n';
|
|
4
10
|
import './emptyResults.scss';
|
|
5
11
|
|
|
6
12
|
const inventoryEmptyResults = () => (
|
|
7
|
-
<EmptyState>
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
|
|
13
|
+
<EmptyState variant={EmptyStateVariant.lg}>
|
|
14
|
+
<EmptyStateIcon icon={OutlinedMehIcon} />
|
|
15
|
+
<EmptyStateHeader
|
|
16
|
+
titleText={
|
|
17
|
+
<>{__("Oops! Couldn't find organization that matches your query")}</>
|
|
18
|
+
}
|
|
19
|
+
headingLevel="h2"
|
|
20
|
+
/>
|
|
12
21
|
</EmptyState>
|
|
13
22
|
);
|
|
14
23
|
|
data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/EmptyState.js
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
EmptyState,
|
|
4
|
+
EmptyStateHeader,
|
|
5
|
+
EmptyStateIcon,
|
|
6
|
+
EmptyStateBody,
|
|
7
|
+
EmptyStateVariant,
|
|
8
|
+
Spinner,
|
|
9
|
+
} from '@patternfly/react-core';
|
|
3
10
|
import { translate as __ } from 'foremanReact/common/I18n';
|
|
4
11
|
import './emptyState.scss';
|
|
5
12
|
|
|
6
13
|
const inventoryEmptyState = () => (
|
|
7
|
-
<EmptyState>
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
{__('Fetching data about your accounts')}
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
<EmptyState variant={EmptyStateVariant.lg}>
|
|
15
|
+
<EmptyStateIcon icon={Spinner} />
|
|
16
|
+
<EmptyStateHeader
|
|
17
|
+
titleText={<>{__('Fetching data about your accounts')}</>}
|
|
18
|
+
headingLevel="h2"
|
|
19
|
+
/>
|
|
20
|
+
<EmptyStateBody>{__('Loading...')}</EmptyStateBody>
|
|
13
21
|
</EmptyState>
|
|
14
22
|
);
|
|
15
23
|
|
|
@@ -5,9 +5,7 @@ import EmptyState from '../EmptyState';
|
|
|
5
5
|
describe('EmptyState', () => {
|
|
6
6
|
it('renders fetching data message', () => {
|
|
7
7
|
render(<EmptyState />);
|
|
8
|
-
expect(
|
|
9
|
-
screen.getByText('Fetching data about your accounts')
|
|
10
|
-
).toBeTruthy();
|
|
8
|
+
expect(screen.getByText('Fetching data about your accounts')).toBeTruthy();
|
|
11
9
|
});
|
|
12
10
|
|
|
13
11
|
it('renders loading indicator', () => {
|
data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/ErrorState.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import {
|
|
3
|
+
import { TimesIcon } from '@patternfly/react-icons';
|
|
4
4
|
import { translate as __ } from 'foremanReact/common/I18n';
|
|
5
5
|
import './errorState.scss';
|
|
6
6
|
|
|
7
7
|
const ErrorState = ({ error }) => (
|
|
8
8
|
<div className="error_state">
|
|
9
|
-
<
|
|
9
|
+
<TimesIcon className="error_icon" size="xl" />
|
|
10
10
|
<p>{__('Encountered an error while trying to access the server:')}</p>
|
|
11
11
|
<p className="error_description">{error}</p>
|
|
12
12
|
</div>
|
|
@@ -3,9 +3,7 @@ import { render, screen } from '@testing-library/react';
|
|
|
3
3
|
import AccountList from '../AccountList';
|
|
4
4
|
import { accounts } from '../AccountList.fixtures';
|
|
5
5
|
|
|
6
|
-
jest.mock('../Components/ListItem', () => ({ label }) =>
|
|
7
|
-
<div>{label}</div>
|
|
8
|
-
));
|
|
6
|
+
jest.mock('../Components/ListItem', () => ({ label }) => <div>{label}</div>);
|
|
9
7
|
|
|
10
8
|
describe('AccountList', () => {
|
|
11
9
|
it('renders account labels', () => {
|
|
@@ -26,9 +24,7 @@ describe('AccountList', () => {
|
|
|
26
24
|
|
|
27
25
|
it('shows empty state when accounts are empty', () => {
|
|
28
26
|
render(<AccountList accounts={{}} />);
|
|
29
|
-
expect(
|
|
30
|
-
screen.getByText('Fetching data about your accounts')
|
|
31
|
-
).toBeTruthy();
|
|
27
|
+
expect(screen.getByText('Fetching data about your accounts')).toBeTruthy();
|
|
32
28
|
});
|
|
33
29
|
|
|
34
30
|
it('shows error state when error is present', () => {
|
data/webpack/ForemanInventoryUpload/Components/InventoryFilter/Components/ClearButton/ClearButton.js
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { noop } from 'foremanReact/common/helpers';
|
|
4
|
-
import {
|
|
4
|
+
import { Tooltip, Button } from '@patternfly/react-core';
|
|
5
|
+
import { TimesIcon } from '@patternfly/react-icons';
|
|
5
6
|
import { translate as __ } from 'foremanReact/common/I18n';
|
|
6
7
|
|
|
7
8
|
const ClearButton = ({ onClear }) => (
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
<Tooltip content={__('Clear')} position="top">
|
|
10
|
+
<Button
|
|
11
|
+
variant="plain"
|
|
12
|
+
className="inventory-clear-button"
|
|
13
|
+
onClick={onClear}
|
|
14
|
+
aria-label={__('Clear')}
|
|
15
|
+
ouiaId="inventory-clear-button"
|
|
16
|
+
>
|
|
17
|
+
<TimesIcon />
|
|
18
|
+
</Button>
|
|
19
|
+
</Tooltip>
|
|
17
20
|
);
|
|
18
21
|
|
|
19
22
|
ClearButton.propTypes = {
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2
2
|
import React, { useEffect } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
FormGroup,
|
|
6
|
+
TextInput,
|
|
7
|
+
InputGroup,
|
|
8
|
+
InputGroupItem,
|
|
9
|
+
Button,
|
|
10
|
+
} from '@patternfly/react-core';
|
|
11
|
+
import { TimesIcon } from '@patternfly/react-icons';
|
|
5
12
|
import { noop } from 'foremanReact/common/helpers';
|
|
6
13
|
import { translate as __ } from 'foremanReact/common/I18n';
|
|
7
14
|
import { useForemanOrganization } from 'foremanReact/Root/Context/ForemanContext';
|
|
8
|
-
import ClearButton from './Components/ClearButton';
|
|
9
15
|
import './inventoryFilter.scss';
|
|
10
16
|
import { ANY_ORGANIZATION } from './InventoryFilterConstants';
|
|
11
17
|
|
|
@@ -24,15 +30,28 @@ const InventoryFilter = ({
|
|
|
24
30
|
return (
|
|
25
31
|
<form id="inventory_filter_form">
|
|
26
32
|
<FormGroup>
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
<InputGroup>
|
|
34
|
+
<InputGroupItem isFill>
|
|
35
|
+
<TextInput
|
|
36
|
+
id="inventory_filter_input"
|
|
37
|
+
ouiaId="inventory_filter_input"
|
|
38
|
+
value={filterTerm}
|
|
39
|
+
type="text"
|
|
40
|
+
placeholder={__('Filter..')}
|
|
41
|
+
onChange={(e, v) => handleFilterChange(v)}
|
|
42
|
+
/>
|
|
43
|
+
</InputGroupItem>
|
|
44
|
+
<InputGroupItem>
|
|
45
|
+
<Button
|
|
46
|
+
ouiaId="inventory-filter-clear-button"
|
|
47
|
+
variant="plain"
|
|
48
|
+
aria-label={__('Clear')}
|
|
49
|
+
onClick={handleFilterClear}
|
|
50
|
+
>
|
|
51
|
+
<TimesIcon />
|
|
52
|
+
</Button>
|
|
53
|
+
</InputGroupItem>
|
|
54
|
+
</InputGroup>
|
|
36
55
|
</FormGroup>
|
|
37
56
|
</form>
|
|
38
57
|
);
|
data/webpack/ForemanInventoryUpload/Components/InventoryFilter/__tests__/integration.test.js
CHANGED
|
@@ -31,7 +31,9 @@ describe('InventoryFilter integration test', () => {
|
|
|
31
31
|
|
|
32
32
|
const actions = store.getActions();
|
|
33
33
|
const filterAction = actions.find(
|
|
34
|
-
a =>
|
|
34
|
+
a =>
|
|
35
|
+
a.type === INVENTORY_FILTER_UPDATE &&
|
|
36
|
+
a.payload.filterTerm === 'some_new_filter'
|
|
35
37
|
);
|
|
36
38
|
expect(filterAction).toBeTruthy();
|
|
37
39
|
});
|
|
@@ -1,28 +1,34 @@
|
|
|
1
1
|
#inventory_filter_form {
|
|
2
|
-
.pf-v5-c-form__group
|
|
3
|
-
display: -ms-flexbox;
|
|
4
|
-
display: -webkit-flex;
|
|
5
|
-
display: flex;
|
|
6
|
-
-webkit-flex-direction: row;
|
|
7
|
-
-ms-flex-direction: row;
|
|
8
|
-
flex-direction: row;
|
|
9
|
-
-webkit-flex-wrap: nowrap;
|
|
10
|
-
-ms-flex-wrap: nowrap;
|
|
11
|
-
flex-wrap: nowrap;
|
|
12
|
-
-webkit-justify-content: flex-end;
|
|
13
|
-
-ms-flex-pack: end;
|
|
14
|
-
justify-content: flex-end;
|
|
15
|
-
-webkit-align-content: center;
|
|
16
|
-
-ms-flex-line-pack: center;
|
|
17
|
-
align-content: center;
|
|
18
|
-
-webkit-align-items: center;
|
|
19
|
-
-ms-flex-align: center;
|
|
20
|
-
align-items: center;
|
|
2
|
+
.pf-v5-c-form__group {
|
|
21
3
|
margin-bottom: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.pf-v5-c-input-group {
|
|
7
|
+
width: 100%;
|
|
8
|
+
position: relative;
|
|
9
|
+
|
|
10
|
+
.pf-v5-c-input-group__item {
|
|
11
|
+
&:last-child {
|
|
12
|
+
position: absolute;
|
|
13
|
+
right: 0;
|
|
14
|
+
top: 0;
|
|
15
|
+
bottom: 0;
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
pointer-events: auto;
|
|
19
|
+
|
|
20
|
+
.pf-v5-c-button {
|
|
21
|
+
margin-right: 8px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:first-child {
|
|
26
|
+
flex: 1;
|
|
22
27
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
.pf-v5-c-form-control {
|
|
29
|
+
padding-right: 40px;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
26
32
|
}
|
|
27
33
|
}
|
|
28
34
|
}
|
|
@@ -52,12 +52,12 @@ const InventorySettings = () => {
|
|
|
52
52
|
})}
|
|
53
53
|
<MinimalInventoryDropdown setChosenValue={setChosenValue} />
|
|
54
54
|
{Object.keys(childSettingsDict).length > 0 && ( // Only render this section if there are child settings
|
|
55
|
-
<div
|
|
55
|
+
<div className="child-settings">
|
|
56
56
|
<Flex>
|
|
57
|
-
<FlexItem>
|
|
58
|
-
<span
|
|
57
|
+
<FlexItem flex={{ default: 'flexNone' }}>
|
|
58
|
+
<span className="child-settings-spacer" />
|
|
59
59
|
</FlexItem>
|
|
60
|
-
<FlexItem>
|
|
60
|
+
<FlexItem flex={{ default: 'flex_1' }}>
|
|
61
61
|
{Object.keys(childSettingsDict).map(key => (
|
|
62
62
|
<AdvancedSetting
|
|
63
63
|
key={key}
|
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
.rh-cloud-inventory-page {
|
|
2
2
|
.inventory-settings {
|
|
3
|
-
border: 1px solid
|
|
4
|
-
border-radius:
|
|
3
|
+
border: 1px solid var(--pf-v5-global--BorderColor--100);
|
|
4
|
+
border-radius: var(--pf-v5-global--BorderRadius--sm);
|
|
5
5
|
padding: 10px;
|
|
6
|
-
margin-bottom:
|
|
6
|
+
margin-bottom: var(--pf-v5-global--spacer--md);
|
|
7
|
+
margin-left: 20px;
|
|
7
8
|
float: right;
|
|
9
|
+
max-width: 450px;
|
|
8
10
|
|
|
9
11
|
h3 {
|
|
10
12
|
margin-top: 0;
|
|
13
|
+
margin-bottom: 10px;
|
|
11
14
|
font-weight: 600;
|
|
15
|
+
font-size: var(--pf-v5-global--FontSize--md);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.child-settings {
|
|
19
|
+
margin-top: 10px;
|
|
20
|
+
margin-left: 0;
|
|
21
|
+
|
|
22
|
+
.child-settings-spacer {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
12
25
|
}
|
|
13
26
|
}
|
|
14
27
|
}
|
data/webpack/ForemanInventoryUpload/Components/InventorySettings/MinimalInventoryDropdown.js
CHANGED
|
@@ -72,6 +72,7 @@ const MinimalInventoryDropdown = ({ setChosenValue }) => {
|
|
|
72
72
|
isOpen={isOpen}
|
|
73
73
|
onSelect={onSelect}
|
|
74
74
|
onOpenChange={val => setIsOpen(val)}
|
|
75
|
+
popperProps={{ width: '350px' }}
|
|
75
76
|
toggle={toggleRef => (
|
|
76
77
|
<MenuToggle
|
|
77
78
|
ref={toggleRef}
|
|
@@ -84,20 +85,18 @@ const MinimalInventoryDropdown = ({ setChosenValue }) => {
|
|
|
84
85
|
)}
|
|
85
86
|
shouldFocusToggleOnSelect
|
|
86
87
|
>
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
</DropdownList>
|
|
100
|
-
</div>
|
|
88
|
+
<DropdownList>
|
|
89
|
+
{Object.entries(dropdownValues).map(([value, item]) => (
|
|
90
|
+
<DropdownItem
|
|
91
|
+
value={value}
|
|
92
|
+
key={value}
|
|
93
|
+
description={item.description}
|
|
94
|
+
ouiaId={`inventory-dropdownItem-${value}`}
|
|
95
|
+
>
|
|
96
|
+
{item.title}
|
|
97
|
+
</DropdownItem>
|
|
98
|
+
))}
|
|
99
|
+
</DropdownList>
|
|
101
100
|
</Dropdown>
|
|
102
101
|
);
|
|
103
102
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Grid } from 'patternfly-
|
|
2
|
+
import { Grid, GridItem } from '@patternfly/react-core';
|
|
3
3
|
import InventorySettings from '../InventorySettings';
|
|
4
4
|
import PageDescription from './components/PageDescription';
|
|
5
5
|
import InventoryFilter from '../InventoryFilter';
|
|
@@ -20,14 +20,14 @@ const PageHeader = () => {
|
|
|
20
20
|
<PageDescription />
|
|
21
21
|
</div>
|
|
22
22
|
)}
|
|
23
|
-
<Grid
|
|
24
|
-
<
|
|
23
|
+
<Grid hasGutter>
|
|
24
|
+
<GridItem span={4}>
|
|
25
25
|
<InventoryFilter />
|
|
26
|
-
</
|
|
27
|
-
<
|
|
26
|
+
</GridItem>
|
|
27
|
+
<GridItem span={8}>
|
|
28
28
|
<ToolbarButtons />
|
|
29
|
-
</
|
|
30
|
-
</Grid
|
|
29
|
+
</GridItem>
|
|
30
|
+
</Grid>
|
|
31
31
|
</div>
|
|
32
32
|
);
|
|
33
33
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.rh-cloud-inventory-page {
|
|
2
2
|
.inventory-upload-header {
|
|
3
|
-
padding: var(--pf-v5-global--spacer--md)
|
|
3
|
+
padding: var(--pf-v5-global--spacer--md) 0 var(--pf-v5-global--spacer--lg) var(--pf-v5-global--spacer--lg);
|
|
4
4
|
|
|
5
5
|
h1 {
|
|
6
6
|
font-family: 'RedHatDisplay';
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.pf-v5-c-dropdown__toggle {
|
|
16
|
-
margin-right:
|
|
16
|
+
margin-right: 0;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.settings-alert {
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
.title-dropdown {
|
|
40
40
|
float: right;
|
|
41
|
+
margin-right: -24px;
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { Grid, GridItem } from '@patternfly/react-core';
|
|
3
2
|
import {
|
|
3
|
+
Grid,
|
|
4
|
+
GridItem,
|
|
4
5
|
Dropdown,
|
|
5
6
|
DropdownItem,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from '@patternfly/react-core
|
|
7
|
+
DropdownList,
|
|
8
|
+
MenuToggle,
|
|
9
|
+
} from '@patternfly/react-core';
|
|
10
|
+
import { EllipsisVIcon } from '@patternfly/react-icons';
|
|
11
|
+
import { translate as __ } from 'foremanReact/common/I18n';
|
|
9
12
|
import Head from 'foremanReact/components/Head';
|
|
10
13
|
import {
|
|
11
14
|
INVENTORY_PAGE_TITLE,
|
|
@@ -25,37 +28,7 @@ const PageTitle = () => {
|
|
|
25
28
|
const isIop = useIopConfig();
|
|
26
29
|
const [showPingModal, setPingModal] = useState(false);
|
|
27
30
|
const togglePingModal = () => setPingModal(v => !v);
|
|
28
|
-
|
|
29
|
-
<DropdownItem
|
|
30
|
-
key="tasks-history-button"
|
|
31
|
-
ouiaId="tasks-history-button"
|
|
32
|
-
href={getActionsHistoryUrl()}
|
|
33
|
-
target="_blank"
|
|
34
|
-
rel="noopener noreferrer"
|
|
35
|
-
>
|
|
36
|
-
{ACTIONS_HISTORY_BUTTON_TEXT}
|
|
37
|
-
</DropdownItem>,
|
|
38
|
-
<DropdownItem
|
|
39
|
-
key="inventory-documentation-button"
|
|
40
|
-
ouiaId="inventory-documentation-button"
|
|
41
|
-
href={getInventoryDocsUrl()}
|
|
42
|
-
target="_blank"
|
|
43
|
-
rel="noopener noreferrer"
|
|
44
|
-
>
|
|
45
|
-
{DOCS_BUTTON_TEXT}
|
|
46
|
-
</DropdownItem>,
|
|
47
|
-
...(!isIop
|
|
48
|
-
? [
|
|
49
|
-
<DropdownItem
|
|
50
|
-
key="cloud-ping"
|
|
51
|
-
ouiaId="dropdownItem-cloud-ping"
|
|
52
|
-
onClick={togglePingModal}
|
|
53
|
-
>
|
|
54
|
-
{CLOUD_PING_TITLE}
|
|
55
|
-
</DropdownItem>,
|
|
56
|
-
]
|
|
57
|
-
: []),
|
|
58
|
-
];
|
|
31
|
+
|
|
59
32
|
return (
|
|
60
33
|
<Grid className="inventory-upload-header-title">
|
|
61
34
|
<GridItem span={6}>
|
|
@@ -64,21 +37,65 @@ const PageTitle = () => {
|
|
|
64
37
|
</Head>
|
|
65
38
|
<h1>{INVENTORY_PAGE_TITLE}</h1>
|
|
66
39
|
</GridItem>
|
|
67
|
-
<GridItem
|
|
40
|
+
<GridItem
|
|
41
|
+
span={6}
|
|
42
|
+
style={{
|
|
43
|
+
display: 'flex',
|
|
44
|
+
justifyContent: 'flex-end',
|
|
45
|
+
marginRight: '-16px',
|
|
46
|
+
}}
|
|
47
|
+
>
|
|
68
48
|
<Dropdown
|
|
69
49
|
className="title-dropdown"
|
|
70
50
|
ouiaId="title-dropdown"
|
|
71
|
-
onSelect={() => setIsDropdownOpen(false)}
|
|
72
|
-
toggle={
|
|
73
|
-
<KebabToggle
|
|
74
|
-
onToggle={(_event, isOpen) => setIsDropdownOpen(isOpen)}
|
|
75
|
-
/>
|
|
76
|
-
}
|
|
77
51
|
isOpen={isDropdownOpen}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
52
|
+
onSelect={() => setIsDropdownOpen(false)}
|
|
53
|
+
onOpenChange={val => setIsDropdownOpen(val)}
|
|
54
|
+
popperProps={{ position: 'end' }}
|
|
55
|
+
toggle={toggleRef => (
|
|
56
|
+
<MenuToggle
|
|
57
|
+
ref={toggleRef}
|
|
58
|
+
aria-label={__('Actions')}
|
|
59
|
+
variant="plain"
|
|
60
|
+
onClick={() => setIsDropdownOpen(prev => !prev)}
|
|
61
|
+
isExpanded={isDropdownOpen}
|
|
62
|
+
>
|
|
63
|
+
<EllipsisVIcon />
|
|
64
|
+
</MenuToggle>
|
|
65
|
+
)}
|
|
66
|
+
>
|
|
67
|
+
<DropdownList>
|
|
68
|
+
<DropdownItem
|
|
69
|
+
key="tasks-history-button"
|
|
70
|
+
ouiaId="tasks-history-button"
|
|
71
|
+
to={getActionsHistoryUrl()}
|
|
72
|
+
component="a"
|
|
73
|
+
target="_blank"
|
|
74
|
+
rel="noopener noreferrer"
|
|
75
|
+
>
|
|
76
|
+
{ACTIONS_HISTORY_BUTTON_TEXT}
|
|
77
|
+
</DropdownItem>
|
|
78
|
+
<DropdownItem
|
|
79
|
+
key="inventory-documentation-button"
|
|
80
|
+
ouiaId="inventory-documentation-button"
|
|
81
|
+
to={getInventoryDocsUrl()}
|
|
82
|
+
component="a"
|
|
83
|
+
target="_blank"
|
|
84
|
+
rel="noopener noreferrer"
|
|
85
|
+
>
|
|
86
|
+
{DOCS_BUTTON_TEXT}
|
|
87
|
+
</DropdownItem>
|
|
88
|
+
{!isIop && (
|
|
89
|
+
<DropdownItem
|
|
90
|
+
key="cloud-ping"
|
|
91
|
+
ouiaId="dropdownItem-cloud-ping"
|
|
92
|
+
onClick={togglePingModal}
|
|
93
|
+
>
|
|
94
|
+
{CLOUD_PING_TITLE}
|
|
95
|
+
</DropdownItem>
|
|
96
|
+
)}
|
|
97
|
+
</DropdownList>
|
|
98
|
+
</Dropdown>
|
|
82
99
|
<CloudPingModal
|
|
83
100
|
isOpen={showPingModal}
|
|
84
101
|
toggle={togglePingModal}
|
|
@@ -121,14 +121,11 @@ describe('PageHeader', () => {
|
|
|
121
121
|
},
|
|
122
122
|
});
|
|
123
123
|
|
|
124
|
-
const
|
|
125
|
-
expect(
|
|
124
|
+
const grid = container.querySelector('.pf-v5-l-grid');
|
|
125
|
+
expect(grid).toBeTruthy();
|
|
126
126
|
|
|
127
|
-
|
|
128
|
-
expect(
|
|
129
|
-
|
|
130
|
-
const toolbarColumn = container.querySelector('.col-xs-7');
|
|
131
|
-
expect(toolbarColumn).toBeTruthy();
|
|
127
|
+
expect(screen.getByTestId('inventory-filter')).toBeTruthy();
|
|
128
|
+
expect(screen.getByTestId('toolbar-buttons')).toBeTruthy();
|
|
132
129
|
});
|
|
133
130
|
|
|
134
131
|
test('renders description section only when not in IoP mode', () => {
|