foreman_rh_cloud 6.0.45 → 7.0.45
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/app/helpers/foreman_inventory_upload_host_helper.rb +1 -3
- data/app/models/concerns/rh_cloud_host.rb +10 -0
- data/config/package-lock.json.plugin +9880 -6929
- data/lib/foreman_rh_cloud/engine.rb +8 -1
- data/lib/foreman_rh_cloud/version.rb +1 -1
- data/package.json +6 -6
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButton.js +1 -2
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/__tests__/__snapshots__/SyncButton.test.js.snap +0 -5
- data/webpack/ForemanRhCloudFills.js +1 -1
- metadata +3 -5
- data/app/overrides/hosts_list.rb +0 -13
- data/lib/tasks/hybrid_cloud.rake +0 -64
|
@@ -42,7 +42,7 @@ module ForemanRhCloud
|
|
|
42
42
|
|
|
43
43
|
initializer 'foreman_rh_cloud.register_plugin', :before => :finisher_hook do |_app|
|
|
44
44
|
Foreman::Plugin.register :foreman_rh_cloud do
|
|
45
|
-
requires_foreman '>= 3.
|
|
45
|
+
requires_foreman '>= 3.4'
|
|
46
46
|
|
|
47
47
|
apipie_documented_controllers ["#{ForemanRhCloud::Engine.root}/app/controllers/api/v2/**/*.rb"]
|
|
48
48
|
|
|
@@ -125,6 +125,13 @@ module ForemanRhCloud
|
|
|
125
125
|
onlyif: proc { |host| host.insights }
|
|
126
126
|
end
|
|
127
127
|
|
|
128
|
+
extend_page 'hosts/_list' do |context|
|
|
129
|
+
context.with_profile :cloud, _('RH Cloud'), default: true do
|
|
130
|
+
add_pagelet :hosts_table_column_header, key: :insights_recommendations_count, label: _('Recommendations'), sortable: true, width: '12%', class: 'hidden-xs ellipsis', priority: 100
|
|
131
|
+
add_pagelet :hosts_table_column_content, key: :insights_recommendations_count, callback: ->(host) { hits_counts_cell(host) }, class: 'hidden-xs ellipsis text-center', priority: 100
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
128
135
|
extend_template_helpers ForemanRhCloud::TemplateRendererHelper
|
|
129
136
|
allowed_template_helpers :remediations_playbook, :download_rh_playbook
|
|
130
137
|
end
|
data/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foreman_rh_cloud",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.45",
|
|
4
4
|
"description": "Inventory Upload =============",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"url": "http://projects.theforeman.org/projects/foreman_rh_cloud/issues"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@theforeman/vendor": ">=
|
|
25
|
+
"@theforeman/vendor": ">= 10.1.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/core": "~7.7.0",
|
|
29
|
-
"@theforeman/builder": ">=
|
|
30
|
-
"@theforeman/stories": ">=
|
|
31
|
-
"@theforeman/test": ">=
|
|
32
|
-
"@theforeman/eslint-plugin-foreman": ">=
|
|
29
|
+
"@theforeman/builder": ">= 10.1.1",
|
|
30
|
+
"@theforeman/stories": ">= 10.1.1",
|
|
31
|
+
"@theforeman/test": ">= 10.1.1",
|
|
32
|
+
"@theforeman/eslint-plugin-foreman": ">= 10.1.1",
|
|
33
33
|
"babel-eslint": "~10.0.0",
|
|
34
34
|
"eslint": "~6.7.2",
|
|
35
35
|
"eslint-plugin-spellcheck": "~0.0.17",
|
data/webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/SyncButton.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Spinner, Button } from '@patternfly/react-core';
|
|
4
|
-
import { RedoIcon } from '@patternfly/react-icons';
|
|
5
4
|
import { STATUS } from 'foremanReact/constants';
|
|
6
5
|
import { SYNC_BUTTON_TEXT } from '../../../../ForemanInventoryConstants';
|
|
7
6
|
|
|
@@ -27,7 +26,7 @@ class SyncButton extends React.Component {
|
|
|
27
26
|
isDisabled={status === STATUS.PENDING}
|
|
28
27
|
variant="secondary"
|
|
29
28
|
>
|
|
30
|
-
{status === STATUS.PENDING
|
|
29
|
+
{status === STATUS.PENDING && <Spinner size="sm" />}
|
|
31
30
|
{SYNC_BUTTON_TEXT}
|
|
32
31
|
</Button>
|
|
33
32
|
</React.Fragment>
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foreman_rh_cloud
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 7.0.45
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Foreman Red Hat Cloud team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-01-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: katello
|
|
@@ -160,7 +160,6 @@ files:
|
|
|
160
160
|
- app/models/inventory_sync/inventory_status.rb
|
|
161
161
|
- app/models/task_output_line.rb
|
|
162
162
|
- app/models/task_output_status.rb
|
|
163
|
-
- app/overrides/hosts_list.rb
|
|
164
163
|
- app/overrides/layouts/base/styles.html.erb.deface
|
|
165
164
|
- app/services/foreman_rh_cloud/branch_info.rb
|
|
166
165
|
- app/services/foreman_rh_cloud/cert_auth.rb
|
|
@@ -241,7 +240,6 @@ files:
|
|
|
241
240
|
- lib/inventory_sync/async/inventory_self_host_sync.rb
|
|
242
241
|
- lib/inventory_sync/async/query_inventory_job.rb
|
|
243
242
|
- lib/tasks/foreman_rh_cloud_tasks.rake
|
|
244
|
-
- lib/tasks/hybrid_cloud.rake
|
|
245
243
|
- lib/tasks/insights.rake
|
|
246
244
|
- lib/tasks/rh_cloud_inventory.rake
|
|
247
245
|
- locale/Makefile
|
|
@@ -680,7 +678,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
680
678
|
- !ruby/object:Gem::Version
|
|
681
679
|
version: '0'
|
|
682
680
|
requirements: []
|
|
683
|
-
rubygems_version: 3.
|
|
681
|
+
rubygems_version: 3.3.26
|
|
684
682
|
signing_key:
|
|
685
683
|
specification_version: 4
|
|
686
684
|
summary: Summary of ForemanRhCloud.
|
data/app/overrides/hosts_list.rb
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Deface::Override.new(
|
|
2
|
-
virtual_path: 'hosts/_list',
|
|
3
|
-
name: 'insights_hits_header',
|
|
4
|
-
insert_before: 'thead tr th.hidden-xs:first-of-type',
|
|
5
|
-
text: '<th class="hidden-xs ellipsis" width="12%"><%= sort :insights_recommendations_count, :as => _("Recommendations")%></th>'
|
|
6
|
-
)
|
|
7
|
-
|
|
8
|
-
Deface::Override.new(
|
|
9
|
-
virtual_path: 'hosts/_list',
|
|
10
|
-
name: 'insights_hits_cells',
|
|
11
|
-
insert_before: 'tbody tr td.hidden-xs:first-of-type',
|
|
12
|
-
text: '<%= hits_counts_cell(host) %>'
|
|
13
|
-
)
|
data/lib/tasks/hybrid_cloud.rake
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
require 'io/console'
|
|
2
|
-
|
|
3
|
-
namespace :rh_cloud do |args|
|
|
4
|
-
desc 'Register Satellite Organization with Hybrid Cloud API. \
|
|
5
|
-
Specify org_id=x replace your organization ID with x. \
|
|
6
|
-
Specify SATELLITE_RH_CLOUD_URL=https://x with the Hybrid Cloud endpoint you are connecting to.'
|
|
7
|
-
task hybridcloud_register: [:environment] do
|
|
8
|
-
include ::ForemanRhCloud::CertAuth
|
|
9
|
-
include ::InsightsCloud::CandlepinCache
|
|
10
|
-
|
|
11
|
-
def logger
|
|
12
|
-
@logger ||= Logger.new(STDOUT)
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def registrations_url
|
|
16
|
-
logger.warn("Custom url is not set, using the default one: #{ForemanRhCloud.base_url}") if ENV['SATELLITE_RH_CLOUD_URL'].empty?
|
|
17
|
-
ForemanRhCloud.base_url + '/api/identity/certificate/registrations'
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
if ENV['org_id'].nil?
|
|
21
|
-
logger.error('ERROR: org_id needs to be specified.')
|
|
22
|
-
exit(1)
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
@organization = Organization.find_by(id: ENV['org_id'].to_i) # saw this coming in as a string, so making sure it gets passed as an integer.
|
|
26
|
-
@uid = cp_owner_id(@organization)
|
|
27
|
-
@hostname = ForemanRhCloud.foreman_host_name
|
|
28
|
-
logger.error('Organization provided does not have a manifest imported.') + exit(1) if @uid.nil?
|
|
29
|
-
|
|
30
|
-
puts 'Paste your token, output will be hidden.'
|
|
31
|
-
@token = STDIN.noecho(&:gets).chomp
|
|
32
|
-
logger.error('Token was not entered.') + exit(1) if @token.empty?
|
|
33
|
-
|
|
34
|
-
def headers
|
|
35
|
-
{
|
|
36
|
-
Authorization: "Bearer #{@token}"
|
|
37
|
-
}
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
def payload
|
|
41
|
-
{
|
|
42
|
-
"uid": @uid,
|
|
43
|
-
"display_name": "#{@hostname}+#{@organization.label}"
|
|
44
|
-
}
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def method
|
|
48
|
-
:post
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
begin
|
|
52
|
-
response = execute_cloud_request(
|
|
53
|
-
organization: @organization,
|
|
54
|
-
method: method,
|
|
55
|
-
url: registrations_url,
|
|
56
|
-
headers: headers,
|
|
57
|
-
payload: payload.to_json
|
|
58
|
-
)
|
|
59
|
-
logger.debug(response)
|
|
60
|
-
rescue Exception => ex
|
|
61
|
-
logger.error(ex)
|
|
62
|
-
end
|
|
63
|
-
end
|
|
64
|
-
end
|