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.
@@ -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.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
@@ -1,3 +1,3 @@
1
1
  module ForemanRhCloud
2
- VERSION = '6.0.45'.freeze
2
+ VERSION = '7.0.45'.freeze
3
3
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foreman_rh_cloud",
3
- "version": "6.0.45",
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": ">= 8.16.0"
25
+ "@theforeman/vendor": ">= 10.1.1"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@babel/core": "~7.7.0",
29
- "@theforeman/builder": ">= 8.16.0",
30
- "@theforeman/stories": ">= 8.16.0",
31
- "@theforeman/test": ">= 8.16.0",
32
- "@theforeman/eslint-plugin-foreman": ">= 8.16.0",
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",
@@ -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 ? <Spinner size="sm" /> : <RedoIcon />}
29
+ {status === STATUS.PENDING && <Spinner size="sm" />}
31
30
  {SYNC_BUTTON_TEXT}
32
31
  </Button>
33
32
  </React.Fragment>
@@ -9,11 +9,6 @@ exports[`SyncButton rendering render with Props 1`] = `
9
9
  size="lg"
10
10
  variant="secondary"
11
11
  >
12
- <RedoIcon
13
- color="currentColor"
14
- noVerticalAlign={false}
15
- size="sm"
16
- />
17
12
  Sync inventory status
18
13
  </Button>
19
14
  </Fragment>
@@ -21,7 +21,7 @@ const fills = [
21
21
  slot: 'host-overview-cards',
22
22
  name: 'insights-total-risk-chart',
23
23
  component: props => <InsightsTotalRiskCard {...props} />,
24
- weight: 1100,
24
+ weight: 2800,
25
25
  },
26
26
  ];
27
27
 
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: 6.0.45
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-04-11 00:00:00.000000000 Z
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.2.33
681
+ rubygems_version: 3.3.26
684
682
  signing_key:
685
683
  specification_version: 4
686
684
  summary: Summary of ForemanRhCloud.
@@ -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
- )
@@ -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