foreman_rh_cloud 4.0.31 → 5.0.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/concerns/inventory_upload/report_actions.rb +1 -1
- data/app/controllers/foreman_inventory_upload/reports_controller.rb +1 -1
- data/app/controllers/insights_cloud/hits_controller.rb +1 -1
- data/app/models/insights_hit.rb +4 -0
- data/app/models/setting/rh_cloud.rb +0 -1
- data/app/models/task_output_line.rb +2 -0
- data/app/models/task_output_status.rb +2 -0
- data/config/Gemfile.lock.gh_test +204 -168
- data/config/package-lock.json.gh_test +14336 -7973
- data/config/package-lock.json.plugin +10551 -7500
- data/config/routes.rb +1 -1
- data/db/migrate/20211027000001_create_task_output.foreman_rh_cloud.rb +18 -0
- data/lib/foreman_inventory_upload/async/generate_all_reports_job.rb +11 -7
- data/lib/foreman_inventory_upload/async/generate_report_job.rb +24 -12
- data/lib/foreman_inventory_upload/async/progress_output.rb +5 -28
- data/lib/foreman_inventory_upload/async/queue_for_upload_job.rb +20 -5
- data/lib/foreman_inventory_upload/async/shell_process.rb +17 -4
- data/lib/foreman_inventory_upload/async/upload_report_job.rb +22 -13
- data/lib/foreman_rh_cloud/engine.rb +12 -11
- data/lib/foreman_rh_cloud/version.rb +1 -1
- data/lib/insights_cloud/async/insights_scheduled_sync.rb +11 -7
- data/lib/tasks/rh_cloud_inventory.rake +2 -2
- data/package.json +7 -12
- data/test/controllers/insights_sync/settings_controller_test.rb +2 -2
- data/test/controllers/uploads_settings_controller_test.rb +2 -2
- data/test/jobs/insights_full_sync_test.rb +2 -2
- data/test/jobs/insights_resolutions_sync_test.rb +1 -1
- data/test/jobs/insights_rules_sync_test.rb +2 -2
- data/test/jobs/inventory_full_sync_test.rb +3 -3
- data/test/jobs/inventory_hosts_sync_test.rb +1 -1
- data/test/jobs/inventory_scheduled_sync_test.rb +2 -2
- data/test/jobs/inventory_self_host_sync_test.rb +1 -1
- data/test/jobs/upload_report_job_test.rb +6 -4
- data/test/test_plugin_helper.rb +0 -2
- data/test/unit/rh_cloud_http_proxy_test.rb +1 -1
- data/test/unit/rh_cloud_permissions_test.rb +14 -0
- data/test/unit/services/foreman_rh_cloud/branch_info_test.rb +1 -1
- data/test/unit/services/foreman_rh_cloud/template_renderer_helper_test.rb +1 -1
- data/test/unit/shell_process_job_test.rb +3 -1
- data/test/unit/slice_generator_test.rb +3 -3
- data/test/unit/tags_generator_test.rb +2 -2
- data/webpack/ForemanInventoryUpload/Components/AccountList/AccountListActions.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/accountList.scss +8 -0
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/InventoryFilter.js +3 -3
- data/webpack/ForemanInventoryUpload/Components/InventoryFilter/index.js +0 -2
- data/webpack/ForemanInventoryUpload/Components/PageHeader/PageHeader.scss +17 -4
- data/webpack/ForemanInventoryUpload/Components/PageHeader/PageTitle.js +29 -17
- data/webpack/ForemanInventoryUpload/Components/PageHeader/__tests__/__snapshots__/PageTitle.test.js.snap +58 -47
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/PageDescription.js +12 -10
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/__tests__/__snapshots__/PageDescription.test.js.snap +10 -10
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButtonActions.js +1 -1
- data/webpack/ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload/__tests__/__snapshots__/InventoryAutoUpload.test.js.snap +1 -1
- data/webpack/ForemanRhCloudFills.js +14 -0
- data/webpack/InsightsCloudSync/Components/InsightsSettings/InsightsSettingsActions.js +1 -1
- data/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTable.js +22 -6
- data/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTableActions.js +23 -16
- data/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTableConstants.js +49 -2
- data/webpack/InsightsCloudSync/Components/InsightsTable/InsightsTableHelpers.js +31 -14
- data/webpack/InsightsCloudSync/Components/InsightsTable/__tests__/__snapshots__/InsightsTable.test.js.snap +19 -2
- data/webpack/InsightsCloudSync/Components/InsightsTable/__tests__/__snapshots__/InsightsTableActions.test.js.snap +0 -1
- data/webpack/InsightsCloudSync/Components/InsightsTable/table.scss +11 -13
- data/webpack/InsightsCloudSync/Components/RemediationModal/RemediationModal.scss +0 -14
- data/webpack/InsightsCloudSync/Components/ToolbarDropdown.js +13 -0
- data/webpack/InsightsCloudSync/Components/__tests__/__snapshots__/NoTokenEmptyState.test.js.snap +24 -13
- data/webpack/InsightsCloudSync/InsightsCloudSyncHelpers.js +8 -0
- data/webpack/InsightsCloudSync/__snapshots__/InsightsCloudSync.test.js.snap +1 -1
- data/webpack/InsightsHostDetailsTab/InsightsTab.scss +4 -0
- data/webpack/InsightsHostDetailsTab/InsightsTabActions.js +1 -1
- data/webpack/InsightsHostDetailsTab/InsightsTabConstants.js +75 -0
- data/webpack/InsightsHostDetailsTab/InsightsTotalRiskChart.js +147 -0
- data/webpack/InsightsHostDetailsTab/NewHostDetailsTab.js +103 -0
- data/webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js +1 -0
- data/webpack/__mocks__/foremanReact/components/Head.js +11 -0
- data/webpack/__mocks__/foremanReact/{redux/actions/toasts.js → components/ToastsList/index.js} +0 -0
- data/webpack/common/DropdownToggle.js +24 -0
- data/webpack/common/ForemanTasks/ForemanTasksActions.js +1 -1
- data/webpack/common/Switcher/__tests__/__snapshots__/SwitcherPF4.test.js.snap +1 -0
- metadata +11 -3
- data/webpack/__mocks__/foremanReact/components/Layout/LayoutSelectors.js +0 -1
@@ -1,6 +1,8 @@
|
|
1
1
|
require 'test_plugin_helper'
|
2
|
+
require 'foreman_tasks/test_helpers'
|
2
3
|
|
3
|
-
class UploadReportJobTest <
|
4
|
+
class UploadReportJobTest < ActiveSupport::TestCase
|
5
|
+
include ForemanTasks::TestHelpers::WithInThreadExecutor
|
4
6
|
include FolderIsolation
|
5
7
|
|
6
8
|
test 'returns aborted state when disconnected' do
|
@@ -10,9 +12,9 @@ class UploadReportJobTest < ActiveJob::TestCase
|
|
10
12
|
'idCert' => 'TEST_CERT',
|
11
13
|
}
|
12
14
|
)
|
13
|
-
|
15
|
+
Setting[:content_disconnected] = true
|
14
16
|
|
15
|
-
ForemanInventoryUpload::Async::UploadReportJob
|
17
|
+
ForemanTasks.sync_task(ForemanInventoryUpload::Async::UploadReportJob, '', organization.id)
|
16
18
|
|
17
19
|
label = ForemanInventoryUpload::Async::UploadReportJob.output_label(organization.id)
|
18
20
|
progress_output = ForemanInventoryUpload::Async::ProgressOutput.get(label)
|
@@ -24,7 +26,7 @@ class UploadReportJobTest < ActiveJob::TestCase
|
|
24
26
|
organization = FactoryBot.create(:organization)
|
25
27
|
Organization.any_instance.expects(:owner_details).returns(nil)
|
26
28
|
|
27
|
-
ForemanInventoryUpload::Async::UploadReportJob
|
29
|
+
ForemanTasks.sync_task(ForemanInventoryUpload::Async::UploadReportJob, '', organization.id)
|
28
30
|
|
29
31
|
label = ForemanInventoryUpload::Async::UploadReportJob.output_label(organization.id)
|
30
32
|
progress_output = ForemanInventoryUpload::Async::ProgressOutput.get(label)
|
data/test/test_plugin_helper.rb
CHANGED
@@ -32,8 +32,6 @@ module KatelloLocationFix
|
|
32
32
|
|
33
33
|
included do
|
34
34
|
setup do
|
35
|
-
FactoryBot.create(:setting, name: 'default_location_subscribed_hosts')
|
36
|
-
FactoryBot.create(:setting, name: 'default_location_puppet_content')
|
37
35
|
Setting[:default_location_subscribed_hosts] = Location.first.title
|
38
36
|
end
|
39
37
|
end
|
@@ -41,7 +41,7 @@ class RhCloudHttpProxyTest < ActiveSupport::TestCase
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def setup_global_foreman_proxy
|
44
|
-
|
44
|
+
Setting[:http_proxy] = @global_foreman_proxy_mock
|
45
45
|
end
|
46
46
|
|
47
47
|
def setup_cdn_proxy
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'test_plugin_helper'
|
2
|
+
require 'unit/shared/access_permissions_test_base'
|
3
|
+
|
4
|
+
class RhCloudPermissionsTest < ActiveSupport::TestCase
|
5
|
+
include AccessPermissionsTestBase
|
6
|
+
|
7
|
+
check_routes(
|
8
|
+
Rails.application.routes,
|
9
|
+
[
|
10
|
+
'insights_cloud/api/machine_telemetries/forward_request',
|
11
|
+
'insights_cloud/api/machine_telemetries/branch_info',
|
12
|
+
],
|
13
|
+
skip_patterns: [/^(?!foreman_inventory_upload|insights_cloud|.*rh_cloud).*/]) # include only plugin paths
|
14
|
+
end
|
@@ -38,7 +38,7 @@ class BranchInfoTest < ActiveSupport::TestCase
|
|
38
38
|
test 'should generate appropriate labels' do
|
39
39
|
2.times { FactoryBot.create(:katello_host_collection, :organization_id => @host.organization.id) }
|
40
40
|
|
41
|
-
|
41
|
+
Setting[:include_parameter_tags] = true
|
42
42
|
|
43
43
|
Katello::HostCollection.all.map do |collection|
|
44
44
|
FactoryBot.create(:katello_host_collection_host, :host_id => @host.id, :host_collection_id => collection.id)
|
@@ -8,7 +8,7 @@ class TemplateRendererHelperTest < ActiveSupport::TestCase
|
|
8
8
|
response.stubs(:body).returns('TEST PLAYBOOK')
|
9
9
|
ForemanRhCloud::RemediationsRetriever.any_instance.stubs(:query_playbook).returns(response)
|
10
10
|
@host1 = FactoryBot.create(:host)
|
11
|
-
|
11
|
+
Setting[:rh_cloud_token] = 'MOCK_TOKEN'
|
12
12
|
end
|
13
13
|
|
14
14
|
test 'Generates a playbook for hit and remediation' do
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'test_plugin_helper'
|
2
|
+
require 'foreman_tasks/test_helpers'
|
2
3
|
|
3
4
|
class ShellProcessJobTest < ActiveSupport::TestCase
|
4
5
|
class TestProcessJob < ForemanInventoryUpload::Async::ShellProcess
|
@@ -13,11 +14,12 @@ class ShellProcessJobTest < ActiveSupport::TestCase
|
|
13
14
|
end
|
14
15
|
end
|
15
16
|
|
17
|
+
include ForemanTasks::TestHelpers::WithInThreadExecutor
|
16
18
|
include FolderIsolation
|
17
19
|
|
18
20
|
test 'Runs a process with environment vars' do
|
19
21
|
label = Foreman.uuid
|
20
|
-
|
22
|
+
ForemanTasks.sync_task(TestProcessJob, label)
|
21
23
|
|
22
24
|
progress_output = ForemanInventoryUpload::Async::ProgressOutput.get(label)
|
23
25
|
|
@@ -189,7 +189,7 @@ class SliceGeneratorTest < ActiveSupport::TestCase
|
|
189
189
|
end
|
190
190
|
|
191
191
|
test 'generates obfuscated ip_address fields without inisghts-client' do
|
192
|
-
|
192
|
+
Setting[:obfuscate_inventory_ips] = true
|
193
193
|
|
194
194
|
@host.interfaces << FactoryBot.build(:nic_managed)
|
195
195
|
batch = Host.where(id: @host.id).in_batches.first
|
@@ -260,7 +260,7 @@ class SliceGeneratorTest < ActiveSupport::TestCase
|
|
260
260
|
end
|
261
261
|
|
262
262
|
test 'obfuscates fqdn when setting set' do
|
263
|
-
|
263
|
+
Setting[:obfuscate_inventory_hostnames] = true
|
264
264
|
|
265
265
|
batch = Host.where(id: @host.id).in_batches.first
|
266
266
|
generator = create_generator(batch)
|
@@ -637,7 +637,7 @@ class SliceGeneratorTest < ActiveSupport::TestCase
|
|
637
637
|
end
|
638
638
|
|
639
639
|
test 'include packages installed in the report' do
|
640
|
-
|
640
|
+
Setting[:exclude_installed_packages] = false
|
641
641
|
installed_package = ::Katello::InstalledPackage.create(name: 'test-package', nvrea: 'test-package-1.0.x86_64', nvra: 'test-package-1.0.x86_64')
|
642
642
|
|
643
643
|
another_host = FactoryBot.create(
|
@@ -63,7 +63,7 @@ class TagsGeneratorTest < ActiveSupport::TestCase
|
|
63
63
|
end
|
64
64
|
|
65
65
|
test 'generates parameter tags' do
|
66
|
-
|
66
|
+
Setting[:include_parameter_tags] = true
|
67
67
|
|
68
68
|
@host.stubs(:host_params).returns(
|
69
69
|
{
|
@@ -85,7 +85,7 @@ class TagsGeneratorTest < ActiveSupport::TestCase
|
|
85
85
|
end
|
86
86
|
|
87
87
|
test 'skips parameter tags if include_parameter_tags setting is off' do
|
88
|
-
|
88
|
+
Setting[:include_parameter_tags] = false
|
89
89
|
|
90
90
|
@host.stubs(:host_params).returns(
|
91
91
|
{
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { API } from 'foremanReact/redux/API';
|
2
|
-
import { addToast } from 'foremanReact/
|
2
|
+
import { addToast } from 'foremanReact/components/ToastsList';
|
3
3
|
import { inventoryUrl } from '../../ForemanInventoryHelpers';
|
4
4
|
import {
|
5
5
|
INVENTORY_ACCOUNT_STATUS_POLLING,
|
@@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
|
|
4
4
|
import { FormGroup, TextInput } from '@patternfly/react-core';
|
5
5
|
import { noop } from 'foremanReact/common/helpers';
|
6
6
|
import { translate as __ } from 'foremanReact/common/I18n';
|
7
|
+
import { useForemanOrganization } from 'foremanReact/Root/Context/ForemanContext';
|
7
8
|
import ClearButton from './Components/ClearButton';
|
8
9
|
import './inventoryFilter.scss';
|
9
10
|
import { ANY_ORGANIZATION } from './InventoryFilterConstants';
|
@@ -12,13 +13,14 @@ const InventoryFilter = ({
|
|
12
13
|
handleFilterChange,
|
13
14
|
handleFilterClear,
|
14
15
|
filterTerm,
|
15
|
-
organization,
|
16
16
|
}) => {
|
17
17
|
useEffect(() => {
|
18
18
|
const initialTerm = organization === ANY_ORGANIZATION ? '' : organization;
|
19
19
|
handleFilterChange(initialTerm);
|
20
20
|
}, []);
|
21
21
|
|
22
|
+
const organization = useForemanOrganization()?.title;
|
23
|
+
|
22
24
|
return (
|
23
25
|
<form id="inventory_filter_form">
|
24
26
|
<FormGroup>
|
@@ -39,14 +41,12 @@ InventoryFilter.propTypes = {
|
|
39
41
|
handleFilterChange: PropTypes.func,
|
40
42
|
handleFilterClear: PropTypes.func,
|
41
43
|
filterTerm: PropTypes.string,
|
42
|
-
organization: PropTypes.string,
|
43
44
|
};
|
44
45
|
|
45
46
|
InventoryFilter.defaultProps = {
|
46
47
|
handleFilterChange: noop,
|
47
48
|
handleFilterClear: noop,
|
48
49
|
filterTerm: '',
|
49
|
-
organization: '',
|
50
50
|
};
|
51
51
|
|
52
52
|
export default InventoryFilter;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { bindActionCreators } from 'redux';
|
2
2
|
import { connect } from 'react-redux';
|
3
|
-
import { selectCurrentOrganization } from 'foremanReact/components/Layout/LayoutSelectors';
|
4
3
|
import reducer from './InventoryFilterReducer';
|
5
4
|
import * as actions from './InventoryFilterActions';
|
6
5
|
import InventoryFilter from './InventoryFilter';
|
@@ -10,7 +9,6 @@ export const reducers = { inventoryFilter: reducer };
|
|
10
9
|
|
11
10
|
const mapStateToProps = state => ({
|
12
11
|
filterTerm: selectFilterTerm(state),
|
13
|
-
organization: selectCurrentOrganization(state),
|
14
12
|
});
|
15
13
|
// map action dispatchers to props
|
16
14
|
const mapDispatchToProps = dispatch => bindActionCreators(actions, dispatch);
|
@@ -1,5 +1,21 @@
|
|
1
1
|
.rh-cloud-inventory-page {
|
2
2
|
.inventory-upload-header {
|
3
|
+
margin-top: 35px;
|
4
|
+
|
5
|
+
h1 {
|
6
|
+
font-family: 'RedHatDisplay';
|
7
|
+
font-weight: 400;
|
8
|
+
margin: 0;
|
9
|
+
}
|
10
|
+
|
11
|
+
p {
|
12
|
+
font-size: 16px;
|
13
|
+
}
|
14
|
+
|
15
|
+
.pf-c-dropdown__toggle {
|
16
|
+
margin-right: -20px;
|
17
|
+
}
|
18
|
+
|
3
19
|
.settings-alert {
|
4
20
|
margin-bottom: 30px;
|
5
21
|
.pf-c-alert {
|
@@ -18,10 +34,7 @@
|
|
18
34
|
|
19
35
|
.inventory-upload-header-title {
|
20
36
|
margin-top: -15px;
|
21
|
-
|
22
|
-
h1 {
|
23
|
-
margin: 0;
|
24
|
-
}
|
37
|
+
margin-bottom: 8px;
|
25
38
|
}
|
26
39
|
|
27
40
|
.title-dropdown {
|
@@ -4,7 +4,10 @@ import {
|
|
4
4
|
DropdownItem,
|
5
5
|
KebabToggle,
|
6
6
|
DropdownPosition,
|
7
|
+
Grid,
|
8
|
+
GridItem,
|
7
9
|
} from '@patternfly/react-core';
|
10
|
+
import Head from 'foremanReact/components/Head';
|
8
11
|
import {
|
9
12
|
INVENTORY_PAGE_TITLE,
|
10
13
|
ACTIONS_HISTORY_BUTTON_TEXT,
|
@@ -43,23 +46,32 @@ const PageTitle = () => {
|
|
43
46
|
</DropdownItem>,
|
44
47
|
];
|
45
48
|
return (
|
46
|
-
<
|
47
|
-
<
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
49
|
+
<Grid className="inventory-upload-header-title">
|
50
|
+
<GridItem span={6}>
|
51
|
+
<Head>
|
52
|
+
<title>{INVENTORY_PAGE_TITLE}</title>
|
53
|
+
</Head>
|
54
|
+
<h1>{INVENTORY_PAGE_TITLE}</h1>
|
55
|
+
</GridItem>
|
56
|
+
<GridItem span={6}>
|
57
|
+
<Dropdown
|
58
|
+
className="title-dropdown"
|
59
|
+
onSelect={() => setIsDropdownOpen(false)}
|
60
|
+
toggle={
|
61
|
+
<KebabToggle onToggle={isOpen => setIsDropdownOpen(isOpen)} />
|
62
|
+
}
|
63
|
+
isOpen={isDropdownOpen}
|
64
|
+
isPlain
|
65
|
+
dropdownItems={dropdownItems}
|
66
|
+
position={DropdownPosition.right}
|
67
|
+
/>
|
68
|
+
<CloudPingModal
|
69
|
+
isOpen={showPingModal}
|
70
|
+
toggle={togglePingModal}
|
71
|
+
title={CLOUD_PING_TITLE}
|
72
|
+
/>
|
73
|
+
</GridItem>
|
74
|
+
</Grid>
|
63
75
|
);
|
64
76
|
};
|
65
77
|
export default PageTitle;
|
@@ -1,53 +1,64 @@
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
2
|
|
3
3
|
exports[`PageTitle rendering render without Props 1`] = `
|
4
|
-
<
|
5
|
-
className="
|
4
|
+
<Grid
|
5
|
+
className="inventory-upload-header-title"
|
6
6
|
>
|
7
|
-
<
|
8
|
-
|
7
|
+
<GridItem
|
8
|
+
span={6}
|
9
9
|
>
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
10
|
+
<Head>
|
11
|
+
<title>
|
12
|
+
Red Hat Inventory
|
13
|
+
</title>
|
14
|
+
</Head>
|
15
|
+
<h1>
|
16
|
+
Red Hat Inventory
|
17
|
+
</h1>
|
18
|
+
</GridItem>
|
19
|
+
<GridItem
|
20
|
+
span={6}
|
21
|
+
>
|
22
|
+
<Dropdown
|
23
|
+
className="title-dropdown"
|
24
|
+
dropdownItems={
|
25
|
+
Array [
|
26
|
+
<DropdownItem
|
27
|
+
href="/foreman_tasks/tasks?search=action++%3D++ForemanInventoryUpload%3A%3AAsync%3A%3AGenerateReportJob+or+action++%3D++ForemanInventoryUpload%3A%3AAsync%3A%3AGenerateAllReportsJob&page=1"
|
28
|
+
rel="noopener noreferrer"
|
29
|
+
target="_blank"
|
30
|
+
>
|
31
|
+
Actions history
|
32
|
+
</DropdownItem>,
|
33
|
+
<DropdownItem
|
34
|
+
href="/links/manual/+?root_url=https%3A%2F%2Faccess.redhat.com%2Fproducts%2Fsubscription-central"
|
35
|
+
rel="noopener noreferrer"
|
36
|
+
target="_blank"
|
37
|
+
>
|
38
|
+
Documentation
|
39
|
+
</DropdownItem>,
|
40
|
+
<DropdownItem
|
41
|
+
onClick={[Function]}
|
42
|
+
>
|
43
|
+
Connectivity test
|
44
|
+
</DropdownItem>,
|
45
|
+
]
|
46
|
+
}
|
47
|
+
isOpen={false}
|
48
|
+
isPlain={true}
|
49
|
+
onSelect={[Function]}
|
50
|
+
position="right"
|
51
|
+
toggle={
|
52
|
+
<KebabToggle
|
53
|
+
onToggle={[Function]}
|
54
|
+
/>
|
55
|
+
}
|
56
|
+
/>
|
57
|
+
<CloudPingModal
|
58
|
+
isOpen={false}
|
59
|
+
title="Connectivity test"
|
60
|
+
toggle={[Function]}
|
61
|
+
/>
|
62
|
+
</GridItem>
|
63
|
+
</Grid>
|
53
64
|
`;
|
@@ -1,24 +1,26 @@
|
|
1
1
|
import React from 'react';
|
2
|
+
import { Text } from '@patternfly/react-core';
|
3
|
+
|
2
4
|
import { translate as __ } from 'foremanReact/common/I18n';
|
3
5
|
|
4
6
|
export const PageDescription = () => (
|
5
7
|
<div id="inventory_page_description">
|
6
|
-
<
|
8
|
+
<Text>
|
7
9
|
{__(
|
8
10
|
'Red Hat Insights is a set of cloud services which provide unified subscription reporting, predictive analysis and remediation of issues through this Satellite instance.'
|
9
11
|
)}
|
10
|
-
</
|
11
|
-
<
|
12
|
+
</Text>
|
13
|
+
<Text>
|
12
14
|
{__(
|
13
15
|
'You can toggle the Auto upload switch to the ON position to enable Satellite to automatically upload your host inventory once a day.'
|
14
16
|
)}
|
15
|
-
</
|
16
|
-
<
|
17
|
+
</Text>
|
18
|
+
<Text>
|
17
19
|
{__(
|
18
20
|
'Click Restart to upload your host inventory to Red Hat Insights. Perform this step for each organization from which you want to manually upload a host inventory.'
|
19
21
|
)}
|
20
|
-
</
|
21
|
-
<
|
22
|
+
</Text>
|
23
|
+
<Text>
|
22
24
|
{__(
|
23
25
|
'Enabling inventory uploads is required by subscription watch. For more information about subscription watch see link:'
|
24
26
|
)}
|
@@ -30,8 +32,8 @@ export const PageDescription = () => (
|
|
30
32
|
>
|
31
33
|
{__('About subscription watch')}
|
32
34
|
</a>
|
33
|
-
</
|
34
|
-
<
|
35
|
+
</Text>
|
36
|
+
<Text>
|
35
37
|
{__('For more information about Insights and Cloud Connector read')}
|
36
38
|
|
37
39
|
<a
|
@@ -41,7 +43,7 @@ export const PageDescription = () => (
|
|
41
43
|
>
|
42
44
|
{__('Red Hat Insights Data and Application Security')}
|
43
45
|
</a>
|
44
|
-
</
|
46
|
+
</Text>
|
45
47
|
</div>
|
46
48
|
);
|
47
49
|
|
@@ -4,16 +4,16 @@ exports[`PageDescription rendering render without Props 1`] = `
|
|
4
4
|
<div
|
5
5
|
id="inventory_page_description"
|
6
6
|
>
|
7
|
-
<
|
7
|
+
<Text>
|
8
8
|
Red Hat Insights is a set of cloud services which provide unified subscription reporting, predictive analysis and remediation of issues through this Satellite instance.
|
9
|
-
</
|
10
|
-
<
|
9
|
+
</Text>
|
10
|
+
<Text>
|
11
11
|
You can toggle the Auto upload switch to the ON position to enable Satellite to automatically upload your host inventory once a day.
|
12
|
-
</
|
13
|
-
<
|
12
|
+
</Text>
|
13
|
+
<Text>
|
14
14
|
Click Restart to upload your host inventory to Red Hat Insights. Perform this step for each organization from which you want to manually upload a host inventory.
|
15
|
-
</
|
16
|
-
<
|
15
|
+
</Text>
|
16
|
+
<Text>
|
17
17
|
Enabling inventory uploads is required by subscription watch. For more information about subscription watch see link:
|
18
18
|
|
19
19
|
<a
|
@@ -23,8 +23,8 @@ exports[`PageDescription rendering render without Props 1`] = `
|
|
23
23
|
>
|
24
24
|
About subscription watch
|
25
25
|
</a>
|
26
|
-
</
|
27
|
-
<
|
26
|
+
</Text>
|
27
|
+
<Text>
|
28
28
|
For more information about Insights and Cloud Connector read
|
29
29
|
|
30
30
|
<a
|
@@ -34,6 +34,6 @@ exports[`PageDescription rendering render without Props 1`] = `
|
|
34
34
|
>
|
35
35
|
Red Hat Insights Data and Application Security
|
36
36
|
</a>
|
37
|
-
</
|
37
|
+
</Text>
|
38
38
|
</div>
|
39
39
|
`;
|
data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButtonActions.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { post } from 'foremanReact/redux/API';
|
3
|
-
import { addToast } from 'foremanReact/
|
3
|
+
import { addToast } from 'foremanReact/components/ToastsList';
|
4
4
|
import { translate as __ } from 'foremanReact/common/I18n';
|
5
5
|
import { inventoryUrl } from '../../../../ForemanInventoryHelpers';
|
6
6
|
import Toast from './components/Toast';
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { addGlobalFill } from 'foremanReact/components/common/Fill/GlobalFill';
|
3
3
|
import InventoryAutoUploadSwitcher from './ForemanInventoryUpload/SubscriptionsPageExtension/InventoryAutoUpload';
|
4
|
+
import NewHostDetailsTab from './InsightsHostDetailsTab/NewHostDetailsTab';
|
5
|
+
import InsightsTotalRiskCard from './InsightsHostDetailsTab/InsightsTotalRiskChart';
|
4
6
|
|
5
7
|
const fills = [
|
6
8
|
{
|
@@ -9,6 +11,18 @@ const fills = [
|
|
9
11
|
component: () => <InventoryAutoUploadSwitcher />,
|
10
12
|
weight: 50,
|
11
13
|
},
|
14
|
+
{
|
15
|
+
slot: 'host-details-page-tabs',
|
16
|
+
name: 'Insights',
|
17
|
+
component: props => <NewHostDetailsTab {...props} />,
|
18
|
+
weight: 400,
|
19
|
+
},
|
20
|
+
{
|
21
|
+
slot: 'details-cards',
|
22
|
+
name: 'insights-total-risk-chart',
|
23
|
+
component: props => <InsightsTotalRiskCard {...props} />,
|
24
|
+
weight: 1100,
|
25
|
+
},
|
12
26
|
];
|
13
27
|
|
14
28
|
export const registerFills = () => {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { API } from 'foremanReact/redux/API';
|
2
|
-
import { addToast } from 'foremanReact/
|
2
|
+
import { addToast } from 'foremanReact/components/ToastsList';
|
3
3
|
import { insightsCloudUrl } from '../../InsightsCloudSyncHelpers';
|
4
4
|
import {
|
5
5
|
INSIGHTS_SYNC_SETTING_SET,
|