foreman_rh_cloud 13.2.0 → 13.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.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/foreman_rh_cloud/locale/fr/foreman_rh_cloud.js +133 -1
  3. data/app/assets/javascripts/foreman_rh_cloud/locale/ja/foreman_rh_cloud.js +133 -1
  4. data/app/assets/javascripts/foreman_rh_cloud/locale/ka/foreman_rh_cloud.js +133 -1
  5. data/app/assets/javascripts/foreman_rh_cloud/locale/ko/foreman_rh_cloud.js +133 -1
  6. data/app/assets/javascripts/foreman_rh_cloud/locale/zh_CN/foreman_rh_cloud.js +133 -1
  7. data/lib/foreman_inventory_upload/generators/queries.rb +12 -2
  8. data/lib/foreman_rh_cloud/version.rb +1 -1
  9. data/locale/Makefile +3 -3
  10. data/locale/foreman_rh_cloud.pot +245 -41
  11. data/locale/fr/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
  12. data/locale/fr/foreman_rh_cloud.po +133 -1
  13. data/locale/ja/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
  14. data/locale/ja/foreman_rh_cloud.po +133 -1
  15. data/locale/ka/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
  16. data/locale/ka/foreman_rh_cloud.po +133 -1
  17. data/locale/ko/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
  18. data/locale/ko/foreman_rh_cloud.po +133 -1
  19. data/locale/zh_CN/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
  20. data/locale/zh_CN/foreman_rh_cloud.po +133 -1
  21. data/package.json +1 -1
  22. data/test/controllers/insights_cloud/api/advisor_engine_controller_test.rb +5 -0
  23. data/test/controllers/insights_cloud/api/machine_telemetries_controller_test.rb +5 -0
  24. data/test/controllers/insights_sync/settings_controller_test.rb +5 -0
  25. data/test/jobs/host_inventory_report_job_test.rb +2 -0
  26. data/test/jobs/inventory_scheduled_sync_test.rb +5 -0
  27. data/test/jobs/single_host_report_job_test.rb +2 -0
  28. data/test/jobs/upload_report_direct_job_test.rb +5 -0
  29. data/test/unit/lib/foreman_rh_cloud/registration_manager_extensions_test.rb +5 -0
  30. data/test/unit/lib/insights_cloud/async/vmaas_reposcan_sync_test.rb +5 -0
  31. data/test/unit/rh_cloud_http_proxy_test.rb +5 -0
  32. data/test/unit/slice_generator_test.rb +41 -1
  33. metadata +1 -1
@@ -13,7 +13,7 @@
13
13
  #
14
14
  msgid ""
15
15
  msgstr ""
16
- "Project-Id-Version: foreman_rh_cloud 13.0.5\n"
16
+ "Project-Id-Version: foreman_rh_cloud 13.2.0\n"
17
17
  "Report-Msgid-Bugs-To: \n"
18
18
  "PO-Revision-Date: 2023-01-20 13:26+0000\n"
19
19
  "Last-Translator: Ondřej Gajdušek, 2025\n"
@@ -31,6 +31,9 @@ msgstr " 同步所有清单状态"
31
31
  msgid "%s organizations"
32
32
  msgstr "%s 机构"
33
33
 
34
+ msgid "A specific organization must be selected from the organization context."
35
+ msgstr ""
36
+
34
37
  msgid "About subscription watch"
35
38
  msgstr "订阅查看"
36
39
 
@@ -43,6 +46,9 @@ msgstr "高级清单设置"
43
46
  msgid "All recommendations are now selected."
44
47
  msgstr "现在选择了所有建议。"
45
48
 
49
+ msgid "Analysis disabled"
50
+ msgstr ""
51
+
46
52
  msgid "Analytics data collection"
47
53
  msgstr "数据收集分析"
48
54
 
@@ -52,6 +58,9 @@ msgstr "任意机构"
52
58
  msgid "Apply Insights recommendations"
53
59
  msgstr "应用 Insights 建议"
54
60
 
61
+ msgid "Attempted to destroy HBI host %s, but host does not exist in HBI"
62
+ msgstr ""
63
+
55
64
  msgid "Automatic inventory upload"
56
65
  msgstr "自动清单上传"
57
66
 
@@ -91,6 +100,9 @@ msgstr "云连接器设置现在正在进行: "
91
100
  msgid "Completed"
92
101
  msgstr "完成"
93
102
 
103
+ msgid "Completed with warnings"
104
+ msgstr ""
105
+
94
106
  msgid "Configure"
95
107
  msgstr "配置"
96
108
 
@@ -109,6 +121,15 @@ msgstr "关键"
109
121
  msgid "Current page"
110
122
  msgstr "当前页"
111
123
 
124
+ msgid "Details"
125
+ msgstr ""
126
+
127
+ msgid "Disable"
128
+ msgstr ""
129
+
130
+ msgid "Disable vulnerability analysis"
131
+ msgstr ""
132
+
112
133
  msgid "Disconnected hosts: "
113
134
  msgstr "断开连接的主机:"
114
135
 
@@ -124,6 +145,15 @@ msgstr "下载报告"
124
145
  msgid "Download latest report"
125
146
  msgstr "下载最新的报告"
126
147
 
148
+ msgid "Download report"
149
+ msgstr ""
150
+
151
+ msgid "Duration"
152
+ msgstr ""
153
+
154
+ msgid "Enable"
155
+ msgstr ""
156
+
127
157
  msgid "Enable automatic deletion of mismatched host records from the Red Hat cloud"
128
158
  msgstr "启用自动删除来自红帽云的主机记录"
129
159
 
@@ -148,6 +178,9 @@ msgstr "启用云连接器"
148
178
  msgid "Enable inventory upload"
149
179
  msgstr "启用清单上传"
150
180
 
181
+ msgid "Enable vulnerability analysis"
182
+ msgstr ""
183
+
151
184
  msgid "Encountered an error while trying to access the server:"
152
185
  msgstr "在尝试访问服务器时遇到错误:"
153
186
 
@@ -163,6 +196,18 @@ msgstr ""
163
196
  msgid "Exit Code: %s"
164
197
  msgstr "退出代码:%s"
165
198
 
199
+ msgid "Failed"
200
+ msgstr ""
201
+
202
+ msgid "Failed to destroy HBI host %s: %s"
203
+ msgstr ""
204
+
205
+ msgid "Failed to fetch hosts"
206
+ msgstr ""
207
+
208
+ msgid "Failed to update vulnerability analysis status"
209
+ msgstr ""
210
+
166
211
  msgid "Fetch Insights-related host details"
167
212
  msgstr "获取与 Insights 相关的主机详情"
168
213
 
@@ -199,6 +244,9 @@ msgstr "生成报告"
199
244
  msgid "Generate the report, but do not upload"
200
245
  msgstr "生成报告,但不上传"
201
246
 
247
+ msgid "Generated"
248
+ msgstr ""
249
+
202
250
  msgid "Generating"
203
251
  msgstr "生成中"
204
252
 
@@ -247,6 +295,9 @@ msgstr "在 insights-client 报告中包含参数"
247
295
  msgid "Insights"
248
296
  msgstr "Insights"
249
297
 
298
+ msgid "Invalid response from server"
299
+ msgstr ""
300
+
250
301
  msgid "Inventory"
251
302
  msgstr "清单"
252
303
 
@@ -283,6 +334,9 @@ msgstr "载入中..."
283
334
  msgid "Low"
284
335
  msgstr "低"
285
336
 
337
+ msgid "Manage vulnerability analysis"
338
+ msgstr ""
339
+
286
340
  msgid "Manual"
287
341
  msgstr "手册"
288
342
 
@@ -298,21 +352,42 @@ msgstr "中等"
298
352
  msgid "More details can be found in"
299
353
  msgstr "如需更多详细信息,请参阅"
300
354
 
355
+ msgid "N/A"
356
+ msgstr ""
357
+
301
358
  msgid "Next run: "
302
359
  msgstr "下一次运行 :"
303
360
 
304
361
  msgid "No"
305
362
  msgstr "否"
306
363
 
364
+ msgid "No account data available."
365
+ msgstr ""
366
+
367
+ msgid "No recent tasks"
368
+ msgstr ""
369
+
307
370
  msgid "No recommendations were found for this host!"
308
371
  msgstr "没有找到此主机的建议!"
309
372
 
373
+ msgid "No report generation tasks have been run yet."
374
+ msgstr ""
375
+
310
376
  msgid "No results found"
311
377
  msgstr "没有找到结果"
312
378
 
379
+ msgid "No task history"
380
+ msgstr ""
381
+
313
382
  msgid "No task was found"
314
383
  msgstr "没有找到任务"
315
384
 
385
+ msgid "No tasks have been run yet."
386
+ msgstr ""
387
+
388
+ msgid "None of the selected hosts are registered"
389
+ msgstr ""
390
+
316
391
  msgid "Not reporting"
317
392
  msgstr "未报告"
318
393
 
@@ -358,9 +433,15 @@ msgstr "机构标签"
358
433
  msgid "Pagination"
359
434
  msgstr "分页"
360
435
 
436
+ msgid "Paused"
437
+ msgstr ""
438
+
361
439
  msgid "Playbook"
362
440
  msgstr "运行 playbook"
363
441
 
442
+ msgid "Previous tasks will appear here."
443
+ msgstr ""
444
+
364
445
  msgid "RH Cloud"
365
446
  msgstr "RH Cloud"
366
447
 
@@ -415,6 +496,18 @@ msgstr "补救"
415
496
  msgid "Remediation summary"
416
497
  msgstr "补救概述"
417
498
 
499
+ msgid "Report Generation"
500
+ msgstr ""
501
+
502
+ msgid "Report generation and upload started"
503
+ msgstr ""
504
+
505
+ msgid "Report generation started"
506
+ msgstr ""
507
+
508
+ msgid "Report saved to"
509
+ msgstr ""
510
+
418
511
  msgid "Reporting"
419
512
  msgstr "报告"
420
513
 
@@ -430,6 +523,9 @@ msgstr "运行由红帽补救应用生成的 playbook"
430
523
  msgid "Run remediation playbook generated by Insights"
431
524
  msgstr "运行 Insights 生成的补救 playbook"
432
525
 
526
+ msgid "Running"
527
+ msgstr ""
528
+
433
529
  msgid "Satellite server has %{hits_count} recommendations by Red Hat"
434
530
  msgstr "Satellite 服务器有 %{hits_count} 个红帽提供的建议"
435
531
 
@@ -469,6 +565,15 @@ msgstr "启动清单同步"
469
565
  msgid "Start report generation"
470
566
  msgstr "开始报告生成"
471
567
 
568
+ msgid "Started"
569
+ msgstr ""
570
+
571
+ msgid "Stopped"
572
+ msgstr ""
573
+
574
+ msgid "Success"
575
+ msgstr ""
576
+
472
577
  msgid "Successfully synced hosts: "
473
578
  msgstr "成功同步的主机:"
474
579
 
@@ -526,15 +631,24 @@ msgstr "总风险"
526
631
  msgid "Total risks"
527
632
  msgstr "总风险"
528
633
 
634
+ msgid "Unknown"
635
+ msgstr ""
636
+
529
637
  msgid "Upload hits from iop-advisor-engine"
530
638
  msgstr "从 iop-advisor-engine 上传 hits"
531
639
 
532
640
  msgid "Upload hits information"
533
641
  msgstr "上传 hits 信息"
534
642
 
643
+ msgid "Upload is disabled because subscription connection is not enabled. Enable it in Administer > Settings > Content."
644
+ msgstr ""
645
+
535
646
  msgid "Upload rules related to the hits"
536
647
  msgstr "上传与 hits 相关的 rule"
537
648
 
649
+ msgid "Uploaded"
650
+ msgstr ""
651
+
538
652
  msgid "Uploading"
539
653
  msgstr "上载中"
540
654
 
@@ -547,18 +661,36 @@ msgstr "查看所有建议"
547
661
  msgid "View in Red Hat Insights"
548
662
  msgstr "禁用 Red Hat Insights"
549
663
 
664
+ msgid "View task"
665
+ msgstr ""
666
+
667
+ msgid "View task details"
668
+ msgstr ""
669
+
550
670
  msgid "Vulnerabilities"
551
671
  msgstr "安全漏洞"
552
672
 
553
673
  msgid "Vulnerability"
554
674
  msgstr "安全漏洞"
555
675
 
676
+ msgid "Vulnerability analysis disabled"
677
+ msgstr ""
678
+
679
+ msgid "Vulnerability analysis enabled"
680
+ msgstr ""
681
+
556
682
  msgid "Wait and %s"
557
683
  msgstr "等待和 %s"
558
684
 
685
+ msgid "Warning"
686
+ msgstr ""
687
+
559
688
  msgid "Whether the resolution requires reboot"
560
689
  msgstr "resolution 是否需要重启"
561
690
 
691
+ msgid "You do not have permission to perform this action"
692
+ msgstr ""
693
+
562
694
  msgid "category name"
563
695
  msgstr "类别名称"
564
696
 
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foreman_rh_cloud",
3
- "version": "13.2.0",
3
+ "version": "13.2.1",
4
4
  "description": "Inventory Upload =============",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -12,6 +12,11 @@ module InsightsCloud
12
12
  @host3 = FactoryBot.create(:host, organization: @test_org)
13
13
  end
14
14
 
15
+ teardown do
16
+ # Ensure stubs are cleaned up to avoid leakage into other tests
17
+ ForemanRhCloud.unstub(:with_iop_smart_proxy?)
18
+ end
19
+
15
20
  test 'shows hosts with uuids' do
16
21
  uuids = [@host1.insights_uuid, @host2.insights_uuid]
17
22
  get :host_details, params: { organization_id: @test_org.id, host_uuids: uuids }
@@ -9,6 +9,11 @@ module InsightsCloud::Api
9
9
  FactoryBot.create(:common_parameter, name: InsightsCloud.enable_client_param, key_type: 'boolean', value: true)
10
10
  end
11
11
 
12
+ teardown do
13
+ # Ensure stubs are cleaned up to avoid leakage into other tests
14
+ ForemanRhCloud.unstub(:with_iop_smart_proxy?)
15
+ end
16
+
12
17
  context '#forward_request' do
13
18
  include MockCerts
14
19
 
@@ -6,6 +6,11 @@ class SettingsControllerTest < ActionController::TestCase
6
6
  ForemanRhCloud.stubs(:with_iop_smart_proxy?).returns(false)
7
7
  end
8
8
 
9
+ def teardown
10
+ # Ensure stubs are cleaned up to avoid leakage into other tests
11
+ ForemanRhCloud.unstub(:with_iop_smart_proxy?)
12
+ end
13
+
9
14
  test 'should return allow_auto_insights_sync setting' do
10
15
  Setting[:allow_auto_insights_sync] = false
11
16
 
@@ -12,6 +12,8 @@ class HostInventoryReportJobTest < ActiveSupport::TestCase
12
12
 
13
13
  teardown do
14
14
  FileUtils.remove_entry base_folder if Dir.exist?(base_folder)
15
+ # Ensure stubs are cleaned up to avoid leakage into other tests
16
+ ForemanRhCloud.unstub(:with_iop_smart_proxy?)
15
17
  end
16
18
 
17
19
  test 'plan schedules GenerateHostReport action' do
@@ -4,6 +4,11 @@ require 'foreman_tasks/test_helpers'
4
4
  class InventoryScheduledSyncTest < ActiveSupport::TestCase
5
5
  include Dynflow::Testing::Factories
6
6
 
7
+ teardown do
8
+ # Ensure stubs are cleaned up to avoid leakage into other tests
9
+ ForemanRhCloud.unstub(:with_iop_smart_proxy?)
10
+ end
11
+
7
12
  test 'Schedules an execution if auto upload is enabled' do
8
13
  Setting[:allow_auto_inventory_upload] = true
9
14
  Setting[:allow_auto_insights_mismatch_delete] = true
@@ -25,6 +25,8 @@ class SingleHostReportJobTest < ActiveSupport::TestCase
25
25
 
26
26
  teardown do
27
27
  FileUtils.remove_entry base_folder if Dir.exist?(base_folder)
28
+ # Ensure stubs are cleaned up to avoid leakage into other tests
29
+ ForemanRhCloud.unstub(:with_iop_smart_proxy?)
28
30
  end
29
31
 
30
32
  test 'plan sets host_id in input' do
@@ -30,6 +30,11 @@ class UploadReportDirectJobTest < ActiveSupport::TestCase
30
30
  Organization.any_instance.stubs(:owner_details).returns(@cert_data)
31
31
  end
32
32
 
33
+ teardown do
34
+ # Ensure stubs are cleaned up to avoid leakage into other tests
35
+ ForemanRhCloud.unstub(:with_iop_smart_proxy?)
36
+ end
37
+
33
38
  test 'plan sets input correctly' do
34
39
  action = create_action(ForemanInventoryUpload::Async::UploadReportDirectJob)
35
40
  action.expects(:action_subject).with(@organization)
@@ -14,6 +14,11 @@ module ForemanRhCloud
14
14
  Katello::RegistrationManager.stubs(:execute_cloud_request).returns(true)
15
15
  end
16
16
 
17
+ teardown do
18
+ # Ensure stubs are cleaned up to avoid leakage into other tests
19
+ ForemanRhCloud.unstub(:with_iop_smart_proxy?)
20
+ end
21
+
17
22
  context 'unregister_host' do
18
23
  test 'should call HBI delete in IoP mode when host has insights UUID' do
19
24
  ForemanRhCloud.stubs(:with_iop_smart_proxy?).returns(true)
@@ -20,6 +20,11 @@ class VmaasReposcanSyncTest < ActiveSupport::TestCase
20
20
  ForemanRhCloud.stubs(:with_iop_smart_proxy?).returns(true)
21
21
  end
22
22
 
23
+ teardown do
24
+ # Ensure stubs are cleaned up to avoid leakage into other tests
25
+ ForemanRhCloud.unstub(:with_iop_smart_proxy?)
26
+ end
27
+
23
28
  # Planning behavior
24
29
  test 'plan plans_self when repo payload has id and IoP is available' do
25
30
  InsightsCloud::Async::VmaasReposcanSync.any_instance.expects(:plan_self).once
@@ -7,6 +7,11 @@ class RhCloudHttpProxyTest < ActiveSupport::TestCase
7
7
  ForemanRhCloud.stubs(:with_iop_smart_proxy?).returns(false)
8
8
  end
9
9
 
10
+ teardown do
11
+ # Ensure stubs are cleaned up to avoid leakage into other tests
12
+ ForemanRhCloud.unstub(:with_iop_smart_proxy?)
13
+ end
14
+
10
15
  test 'selects global content proxy' do
11
16
  setup_global_content_proxy
12
17
  setup_global_foreman_proxy
@@ -35,6 +35,11 @@ class SliceGeneratorTest < ActiveSupport::TestCase
35
35
  ForemanInventoryUpload::Generators::Queries.instance_variable_set(:@fact_names, nil)
36
36
  end
37
37
 
38
+ teardown do
39
+ # Ensure stubs are cleaned up to avoid leakage into other tests
40
+ ForemanRhCloud.unstub(:with_iop_smart_proxy?)
41
+ end
42
+
38
43
  def create_fact_values(host, facts)
39
44
  facts.each do |fact_name, value|
40
45
  FactoryBot.create(:fact_value, fact_name: fact_names[fact_name], value: value, host: host)
@@ -749,7 +754,9 @@ class SliceGeneratorTest < ActiveSupport::TestCase
749
754
  assert_equal 1, generator.hosts_count
750
755
  end
751
756
 
752
- test 'excludes hosts with host_registration_insights_inventory set to false' do
757
+ test 'excludes hosts with host_registration_insights_inventory set to false in cloud mode' do
758
+ ForemanRhCloud.stubs(:with_iop_smart_proxy?).returns(false)
759
+
753
760
  @host.host_parameters << HostParameter.create(
754
761
  name: 'host_registration_insights_inventory',
755
762
  value: "false",
@@ -761,6 +768,39 @@ class SliceGeneratorTest < ActiveSupport::TestCase
761
768
  assert_equal 0, count
762
769
  end
763
770
 
771
+ test 'includes hosts with host_registration_insights_inventory set to false in IoP mode' do
772
+ ForemanRhCloud.stubs(:with_iop_smart_proxy?).returns(true)
773
+
774
+ @host.host_parameters << HostParameter.create(
775
+ name: 'host_registration_insights_inventory',
776
+ value: "false",
777
+ parameter_type: 'boolean'
778
+ )
779
+
780
+ count = ForemanInventoryUpload::Generators::Queries.for_org(@host.organization_id).count
781
+
782
+ assert_equal 1, count, 'IoP mode should include all hosts regardless of parameter value'
783
+ end
784
+
785
+ test 'parameter filter applies correctly when switching modes' do
786
+ @host.host_parameters << HostParameter.create(
787
+ name: 'host_registration_insights_inventory',
788
+ value: "false",
789
+ parameter_type: 'boolean'
790
+ )
791
+
792
+ # Cloud mode - should exclude
793
+ ForemanRhCloud.stubs(:with_iop_smart_proxy?).returns(false)
794
+ cloud_count = ForemanInventoryUpload::Generators::Queries.for_org(@host.organization_id).count
795
+ assert_equal 0, cloud_count, 'Cloud mode should exclude opted-out hosts'
796
+
797
+ # IoP mode - should include
798
+ ForemanRhCloud.unstub(:with_iop_smart_proxy?)
799
+ ForemanRhCloud.stubs(:with_iop_smart_proxy?).returns(true)
800
+ iop_count = ForemanInventoryUpload::Generators::Queries.for_org(@host.organization_id).count
801
+ assert_equal 1, iop_count, 'IoP mode should include all hosts'
802
+ end
803
+
764
804
  test 'includes hosts with host_registration_insights set to true' do
765
805
  @host.host_parameters.build(
766
806
  name: 'host_registration_insights_inventory',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_rh_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.2.0
4
+ version: 13.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Red Hat Cloud team