foreman_rh_cloud 14.7.0 → 15.0.0

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 (57) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/foreman_rh_cloud/locale/fr/foreman_rh_cloud.js +32 -32
  3. data/app/assets/javascripts/foreman_rh_cloud/locale/ja/foreman_rh_cloud.js +43 -43
  4. data/app/assets/javascripts/foreman_rh_cloud/locale/ka/foreman_rh_cloud.js +3 -3
  5. data/app/assets/javascripts/foreman_rh_cloud/locale/ko/foreman_rh_cloud.js +27 -27
  6. data/app/assets/javascripts/foreman_rh_cloud/locale/zh_CN/foreman_rh_cloud.js +26 -26
  7. data/app/services/foreman_rh_cloud/tags_auth.rb +28 -13
  8. data/config/routes.rb +10 -0
  9. data/lib/foreman_rh_cloud/plugin.rb +14 -0
  10. data/lib/foreman_rh_cloud/version.rb +1 -1
  11. data/locale/foreman_rh_cloud.pot +2 -2
  12. data/locale/fr/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
  13. data/locale/fr/foreman_rh_cloud.po +34 -34
  14. data/locale/ja/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
  15. data/locale/ja/foreman_rh_cloud.po +43 -43
  16. data/locale/ka/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
  17. data/locale/ka/foreman_rh_cloud.po +3 -3
  18. data/locale/ko/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
  19. data/locale/ko/foreman_rh_cloud.po +27 -27
  20. data/locale/zh_CN/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
  21. data/locale/zh_CN/foreman_rh_cloud.po +27 -27
  22. data/package.json +1 -1
  23. data/test/controllers/insights_cloud/api/machine_telemetries_controller_test.rb +0 -1
  24. data/test/test_plugin_helper.rb +0 -8
  25. data/test/unit/services/foreman_rh_cloud/cloud_request_forwarder_test.rb +0 -1
  26. data/test/unit/services/foreman_rh_cloud/tags_auth_test.rb +26 -0
  27. data/test/unit/tags_generator_test.rb +0 -1
  28. data/webpack/ComplianceHostDetailsTab/ComplianceHostDetailsTab.js +36 -0
  29. data/webpack/ComplianceHostDetailsTab/ComplianceHostDetailsTab.scss +3 -0
  30. data/webpack/ComplianceHostDetailsTab/__tests__/ComplianceHostDetailsTab.test.js +159 -0
  31. data/webpack/ComplianceHostDetailsTab/index.js +3 -0
  32. data/webpack/ForemanRhCloudFills.js +11 -0
  33. data/webpack/ForemanRhCloudPages.js +7 -0
  34. data/webpack/InsightsCompliance/ComplianceIframe.js +34 -0
  35. data/webpack/InsightsCompliance/ComplianceIframe.scss +12 -0
  36. data/webpack/InsightsCompliance/InsightsCompliancePage.js +11 -0
  37. data/webpack/InsightsCompliance/InsightsCompliancePage.test.js +35 -0
  38. data/webpack/InsightsCompliance/complianceIframeConstants.js +7 -0
  39. data/webpack/InsightsCompliance/complianceIframeHelpers.js +23 -0
  40. data/webpack/InsightsCompliance/complianceIframeHelpers.test.js +50 -0
  41. data/webpack/common/Hooks/PermissionsHooks.js +10 -0
  42. data/webpack/common/IopIframe/IopAppIframe.js +74 -0
  43. data/webpack/common/IopIframe/IopHostDetailsIframe.js +66 -0
  44. data/webpack/common/IopIframe/IopHostDetailsIframe.scss +6 -0
  45. data/webpack/common/IopIframe/IopHostDetailsIframeTab.js +81 -0
  46. data/webpack/common/IopIframe/__tests__/IopAppIframe.test.js +92 -0
  47. data/webpack/common/IopIframe/__tests__/IopHostDetailsIframeTab.test.js +93 -0
  48. data/webpack/common/IopIframe/__tests__/iopIframeHelpers.test.js +63 -0
  49. data/webpack/common/IopIframe/__tests__/postIopChromeToIframe.test.js +60 -0
  50. data/webpack/common/IopIframe/__tests__/useIopIframeHeight.test.js +37 -0
  51. data/webpack/common/IopIframe/iopIframeConstants.js +5 -0
  52. data/webpack/common/IopIframe/iopIframeHelpers.js +49 -0
  53. data/webpack/common/IopIframe/postIopChromeToIframe.js +35 -0
  54. data/webpack/common/IopIframe/useIopIframeChrome.js +54 -0
  55. data/webpack/common/IopIframe/useIopIframeHeight.js +35 -0
  56. data/webpack/common/IopIframe/useIopIframeNavigate.js +40 -0
  57. metadata +27 -1
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_rh_cloud": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_rh_cloud 14.6.1",
6
+ "Project-Id-Version": "foreman_rh_cloud 14.7.0",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2023-01-20 13:26+0000",
9
9
  "Last-Translator": "Ondřej Gajdušek, 2026",
@@ -30,7 +30,7 @@
30
30
  "서브스크립션 감시 정보"
31
31
  ],
32
32
  "Actions": [
33
- ""
33
+ "동작 "
34
34
  ],
35
35
  "Actions history": [
36
36
  "작업 내역"
@@ -90,7 +90,7 @@
90
90
  "현재 페이지"
91
91
  ],
92
92
  "Destroy HBI hosts for organization": [
93
- ""
93
+ "조직의 HBI 호스트 삭제"
94
94
  ],
95
95
  "Details": [
96
96
  "상세 정보"
@@ -156,7 +156,7 @@
156
156
  "설치된 패키지가 Red Hat 클라우드에 업로드되지 않도록 제외합니다. (insights_minimal_data_collection이 true로 설정된 경우 이 설정은 무시되고 설치된 패키지는 항상 제외됩니다.) 로컬 Insights를 사용하는 경우에는 이 설정이 무시됩니다."
157
157
  ],
158
158
  "Excluded from upload to console.redhat.com Inventory service because host_registration_insights_inventory parameter value is false: ": [
159
- ""
159
+ "host_registration_insights_inventory 매개변수 값이 false이므로 console.redhat.com 인벤토리 서비스에 업로드되지 않도록 제외된 호스트:"
160
160
  ],
161
161
  "Failed": [
162
162
  "실패 "
@@ -165,7 +165,7 @@
165
165
  "HBI 호스트 %s 삭제 실패: %s"
166
166
  ],
167
167
  "Failed to destroy HBI hosts for organization %s: %s": [
168
- ""
168
+ "조직 %s의 HBI 호스트를 삭제하지 못했습니다: %s"
169
169
  ],
170
170
  "Failed to fetch hosts": [
171
171
  "호스트를 가져오는 데 실패했습니다"
@@ -192,13 +192,13 @@
192
192
  "서브스크립션 서비스에 대한 자세한 정보는 다음을 참조하십시오:"
193
193
  ],
194
194
  "Force RHEL Lightspeed CLA connection": [
195
- ""
195
+ "RHEL Lightspeed CLA 연결 강제 적용"
196
196
  ],
197
197
  "Foreman plugin that process & upload data to Red Hat Cloud": [
198
198
  "Red Hat Cloud에 데이터를 처리하고 업로드하는 Foreman 플러그인"
199
199
  ],
200
200
  "Forward requests to Lightspeed CLA even when in IoP mode. Ignored when IoP mode is off.": [
201
- ""
201
+ "IoP 모드에서도 요청을 Lightspeed CLA로 전달합니다. IoP 모드가 꺼져 있으면 무시됩니다."
202
202
  ],
203
203
  "Generate and upload report": [
204
204
  "보고서 생성 및 업로드"
@@ -237,13 +237,13 @@
237
237
  "호스트 인벤토리 보고서 작업"
238
238
  ],
239
239
  "Host is excluded from upload to console.redhat.com Inventory service due to host parameter": [
240
- ""
240
+ "호스트 매개변수로 인해 console.redhat.com 인벤토리 서비스에 업로드되지 않도록 제외된 호스트"
241
241
  ],
242
242
  "Host is not present on console.redhat.com Inventory service": [
243
- ""
243
+ "호스트가 console.redhat.com 인벤토리 서비스에 없습니다."
244
244
  ],
245
245
  "Host is uploaded and present on console.redhat.com Inventory service": [
246
- ""
246
+ "호스트가 업로드되어 console.redhat.com 인벤토리 서비스에 표시됩니다."
247
247
  ],
248
248
  "Hostname": [
249
249
  "호스트 이름"
@@ -294,7 +294,7 @@
294
294
  "로딩 중 "
295
295
  ],
296
296
  "Loading...": [
297
- "로딩..."
297
+ "로딩 중..."
298
298
  ],
299
299
  "Low": [
300
300
  "낮음"
@@ -324,7 +324,7 @@
324
324
  "아니오 "
325
325
  ],
326
326
  "No HBI hosts found for organization %s": [
327
- ""
327
+ "조직 %s에 대한 HBI 호스트를 찾을 수 없습니다."
328
328
  ],
329
329
  "No account data available.": [
330
330
  "계정 정보가 없습니다."
@@ -354,13 +354,13 @@
354
354
  "선택된 호스트 중 등록된 호스트는 없습니다."
355
355
  ],
356
356
  "Not present on console.redhat.com Inventory service: ": [
357
- ""
357
+ "console.redhat.com 인벤토리 서비스에 없는 호스트:"
358
358
  ],
359
359
  "Not reporting": [
360
360
  "보고하지 않음"
361
361
  ],
362
362
  "Not reporting because host_registration_insights parameter value is false": [
363
- ""
363
+ "host_registration_insights 매개변수 값이 false이므로 보고하지 않습니다"
364
364
  ],
365
365
  "Nothing to sync, there are no hosts with subscription for this organization.": [
366
366
  "동기화할 것이 없습니다. 이 조직에 대한 서브스크립션이 있는 호스트가 없습니다."
@@ -396,10 +396,10 @@
396
396
  "죄송합니다! 귀하의 쿼리와 일치하는 조직을 찾을 수 없습니다."
397
397
  ],
398
398
  "Organization": [
399
- ""
399
+ "조직 "
400
400
  ],
401
401
  "Organization not found": [
402
- ""
402
+ "조직을 찾을 수 없습니다"
403
403
  ],
404
404
  "Organization status": [
405
405
  "조직 상태"
@@ -423,7 +423,7 @@
423
423
  "RHC 데몬 ID입니다. 로컬 Insights를 사용할 때는 무시됩니다."
424
424
  ],
425
425
  "RHC instance ID to register with Red Hat Sources": [
426
- ""
426
+ "Red Hat Sources에 등록할 RHC 인스턴스 ID"
427
427
  ],
428
428
  "Read more about it in RH cloud insights": [
429
429
  "RH 클라우드 Insights에서 이에 대해 자세히 알아보세요."
@@ -444,7 +444,7 @@
444
444
  "권장 사항"
445
445
  ],
446
446
  "Recommendations actions": [
447
- ""
447
+ "권장 사항 작업"
448
448
  ],
449
449
  "Recommendations selected: %s.": [
450
450
  "선택된 권장 사항:%s ."
@@ -465,7 +465,7 @@
465
465
  "Red Hat 인벤토리"
466
466
  ],
467
467
  "Registered hosts in organization: ": [
468
- ""
468
+ "조직에 등록된 호스트: "
469
469
  ],
470
470
  "Remediate": [
471
471
  "개선 사항"
@@ -507,16 +507,16 @@
507
507
  "Satellite 서버에는 Red Hat의 권장 사항이 %{hits_count} 개 있습니다"
508
508
  ],
509
509
  "Schedule a task to register in Red Hat Sources for cloud connector": [
510
- ""
510
+ "클라우드 커넥터의 Red Hat Sources에 등록하는 작업 예약"
511
511
  ],
512
512
  "Scoped search string for host removal": [
513
513
  "호스트 제거를 위한 범위 검색 문자열"
514
514
  ],
515
515
  "Searching by recommendations count is not available in IoP mode.": [
516
- ""
516
+ "IoP 모드에서는 권장 사항 수를 기준으로 검색할 수 없습니다."
517
517
  ],
518
518
  "Select all recommendations": [
519
- ""
519
+ "모든 권장 사항 선택"
520
520
  ],
521
521
  "Select recommendations from all pages": [
522
522
  "모든 페이지에서 추천을 선택하세요"
@@ -558,7 +558,7 @@
558
558
  "성공 "
559
559
  ],
560
560
  "Successfully deleted all HBI hosts for organization %s": [
561
- ""
561
+ "조직 %s의 모든 HBI 호스트가 성공적으로 삭제되었습니다."
562
562
  ],
563
563
  "Sync automatically": [
564
564
  "자동으로 동기화"
@@ -570,7 +570,7 @@
570
570
  "추천 사항을 자동으로 동기화합니다"
571
571
  ],
572
572
  "Table actions": [
573
- ""
573
+ "테이블 작업"
574
574
  ],
575
575
  "The Foreman inventory upload plugin automatically uploads Foreman host inventory data to the Inventory service of Insights, where it can also be used by the Subscriptions service for subscription reporting. If you use the Subscriptions service, enabling inventory uploads is required.": [
576
576
  "Foreman 인벤토리 업로드 플러그인은 Foreman 호스트 인벤토리 데이터를 자동으로 Insights의 인벤토리 서비스에 업로드하며, 이 데이터는 서브스크립션 보고서를 위한 서브스크립션 서비스에서도 사용할 수 있습니다. 서브스크립션 서비스를 사용하는 경우, 인벤토리 업로드를 활성화하는 것이 필수입니다."
@@ -615,7 +615,7 @@
615
615
  "알 수 없음"
616
616
  ],
617
617
  "Unsupported operator for recommendations count search: %s": [
618
- ""
618
+ "권장 사항 수 검색에 지원되지 않는 연산자: %s"
619
619
  ],
620
620
  "Upload hits from iop-advisor-engine": [
621
621
  "iop-advisor-engine에서 히트 업로드"
@@ -633,7 +633,7 @@
633
633
  "업로드됨"
634
634
  ],
635
635
  "Uploaded and present on console.redhat.com Inventory service: ": [
636
- ""
636
+ "console.redhat.com 인벤토리 서비스에 업로드되어 표시된 호스트: "
637
637
  ],
638
638
  "Value %{value} is not a valid UUID": [
639
639
  "값%{value}이/가 유효한 UUID가 아닙니다"
@@ -672,7 +672,7 @@
672
672
  "해결을 위해 재부팅이 필요한지 여부"
673
673
  ],
674
674
  "You can review this information later by looking at the Inventory status of each host.": [
675
- ""
675
+ "각 호스트의 인벤토리 상태에서 이 정보를 나중에 검토할 수 있습니다."
676
676
  ],
677
677
  "You do not have permission to perform this action": [
678
678
  "이 작업을 수행할 권한이 없습니다."
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_rh_cloud": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_rh_cloud 14.6.1",
6
+ "Project-Id-Version": "foreman_rh_cloud 14.7.0",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2023-01-20 13:26+0000",
9
9
  "Last-Translator": "Ondřej Gajdušek, 2026",
@@ -30,7 +30,7 @@
30
30
  "订阅查看"
31
31
  ],
32
32
  "Actions": [
33
- ""
33
+ "操作"
34
34
  ],
35
35
  "Actions history": [
36
36
  "操作历史记录"
@@ -90,7 +90,7 @@
90
90
  "当前页"
91
91
  ],
92
92
  "Destroy HBI hosts for organization": [
93
- ""
93
+ "为机构销毁 HBI 主机"
94
94
  ],
95
95
  "Details": [
96
96
  "详情"
@@ -156,7 +156,7 @@
156
156
  "在上传到红帽云时排除安装的软件包。(如果 insights_minimal_data_collection 设置为 true,则忽略此设置,且安装的软件包始终被排除。)在使用本地 Insights 时忽略。"
157
157
  ],
158
158
  "Excluded from upload to console.redhat.com Inventory service because host_registration_insights_inventory parameter value is false: ": [
159
- ""
159
+ "因为 host_registration_insights_inventory 参数值为 false,被排除在上传至 console.redhat.com Inventory 服务的范围之外。"
160
160
  ],
161
161
  "Failed": [
162
162
  "失败"
@@ -165,7 +165,7 @@
165
165
  "销毁 HBI 主机 %s 失败:%s"
166
166
  ],
167
167
  "Failed to destroy HBI hosts for organization %s: %s": [
168
- ""
168
+ "为机构 %s 销毁 HBI 主机失败:%s"
169
169
  ],
170
170
  "Failed to fetch hosts": [
171
171
  "获取主机失败"
@@ -192,13 +192,13 @@
192
192
  "有关订阅服务的更多信息,请参阅:"
193
193
  ],
194
194
  "Force RHEL Lightspeed CLA connection": [
195
- ""
195
+ "强制 RHEL Lightspeed CLA 连接"
196
196
  ],
197
197
  "Foreman plugin that process & upload data to Red Hat Cloud": [
198
198
  "处理数据并将其上传到红帽云的 Foreman 插件"
199
199
  ],
200
200
  "Forward requests to Lightspeed CLA even when in IoP mode. Ignored when IoP mode is off.": [
201
- ""
201
+ "即使处于 IoP 模式,也会将请求转发至 Lightspeed CLA。当 IoP 模式未开启时,此设置将被忽略。"
202
202
  ],
203
203
  "Generate and upload report": [
204
204
  "生成并上传报告"
@@ -237,13 +237,13 @@
237
237
  "主机清单报告作业"
238
238
  ],
239
239
  "Host is excluded from upload to console.redhat.com Inventory service due to host parameter": [
240
- ""
240
+ "由于主机参数设置,该主机已被排除在上传至 console.redhat.com Inventory 服务的范围之外。"
241
241
  ],
242
242
  "Host is not present on console.redhat.com Inventory service": [
243
- ""
243
+ "console.redhat.com 清单服务中没有主机"
244
244
  ],
245
245
  "Host is uploaded and present on console.redhat.com Inventory service": [
246
- ""
246
+ "主机已上传并存在于 console.redhat.com Inventory 服务中"
247
247
  ],
248
248
  "Hostname": [
249
249
  "主机名"
@@ -324,7 +324,7 @@
324
324
  "否"
325
325
  ],
326
326
  "No HBI hosts found for organization %s": [
327
- ""
327
+ "未找到用于机构 %s 的 HBI 主机 "
328
328
  ],
329
329
  "No account data available.": [
330
330
  "没有可用的帐户数据。"
@@ -354,13 +354,13 @@
354
354
  "所选主机都没有注册"
355
355
  ],
356
356
  "Not present on console.redhat.com Inventory service: ": [
357
- ""
357
+ "console.redhat.com Inventory 服务没有包括: "
358
358
  ],
359
359
  "Not reporting": [
360
360
  "未报告"
361
361
  ],
362
362
  "Not reporting because host_registration_insights parameter value is false": [
363
- ""
363
+ "未上报数据,因为 host_registration_insights 参数的值为 false。"
364
364
  ],
365
365
  "Nothing to sync, there are no hosts with subscription for this organization.": [
366
366
  "没有同步,此机构没有带有订阅的主机。"
@@ -396,10 +396,10 @@
396
396
  "未找到与您的查询匹配的机构"
397
397
  ],
398
398
  "Organization": [
399
- ""
399
+ "机构"
400
400
  ],
401
401
  "Organization not found": [
402
- ""
402
+ "没有找到机构"
403
403
  ],
404
404
  "Organization status": [
405
405
  "机构标签"
@@ -423,7 +423,7 @@
423
423
  "RHC 守护进程 ID。在使用本地 Insights 时忽略。"
424
424
  ],
425
425
  "RHC instance ID to register with Red Hat Sources": [
426
- ""
426
+ "用于注册 Red Hat Sources 的 RHC 实例 ID"
427
427
  ],
428
428
  "Read more about it in RH cloud insights": [
429
429
  "在 RH Cloud insights 中了解更多有关它的信息"
@@ -444,7 +444,7 @@
444
444
  "建议"
445
445
  ],
446
446
  "Recommendations actions": [
447
- ""
447
+ "建议操作"
448
448
  ],
449
449
  "Recommendations selected: %s.": [
450
450
  "选择的建议:%s。"
@@ -465,7 +465,7 @@
465
465
  "Red Hat 清单"
466
466
  ],
467
467
  "Registered hosts in organization: ": [
468
- ""
468
+ "机构中注册的主机: "
469
469
  ],
470
470
  "Remediate": [
471
471
  "补救"
@@ -507,16 +507,16 @@
507
507
  "Satellite 服务器有 %{hits_count} 个红帽提供的建议"
508
508
  ],
509
509
  "Schedule a task to register in Red Hat Sources for cloud connector": [
510
- ""
510
+ "调度一个在 Red Hat Sources 中注册云连接器的任务"
511
511
  ],
512
512
  "Scoped search string for host removal": [
513
513
  "用于删除主机的有范围的搜索字符串"
514
514
  ],
515
515
  "Searching by recommendations count is not available in IoP mode.": [
516
- ""
516
+ "在 IoP 模式下不支持按推荐数量进行搜索。"
517
517
  ],
518
518
  "Select all recommendations": [
519
- ""
519
+ "选择所有建议"
520
520
  ],
521
521
  "Select recommendations from all pages": [
522
522
  "在所有页面中选择建议"
@@ -558,7 +558,7 @@
558
558
  "成功"
559
559
  ],
560
560
  "Successfully deleted all HBI hosts for organization %s": [
561
- ""
561
+ "为机构 %s 成功删除所有 HBI 主机"
562
562
  ],
563
563
  "Sync automatically": [
564
564
  "自动同步"
@@ -570,7 +570,7 @@
570
570
  "自动同步建议"
571
571
  ],
572
572
  "Table actions": [
573
- ""
573
+ "表操作"
574
574
  ],
575
575
  "The Foreman inventory upload plugin automatically uploads Foreman host inventory data to the Inventory service of Insights, where it can also be used by the Subscriptions service for subscription reporting. If you use the Subscriptions service, enabling inventory uploads is required.": [
576
576
  "Foreman 清单上传插件会自动将 Foreman 主机清单数据上传到 Insights 的 Inventory 服务,订阅服务使用这些信息来提供订阅报告。如果使用订阅服务,则需要启用清单上传。"
@@ -615,7 +615,7 @@
615
615
  "未知"
616
616
  ],
617
617
  "Unsupported operator for recommendations count search: %s": [
618
- ""
618
+ "不支持按推荐数量进行搜索的运算符:%s"
619
619
  ],
620
620
  "Upload hits from iop-advisor-engine": [
621
621
  "从 iop-advisor-engine 上传 hits"
@@ -633,7 +633,7 @@
633
633
  "已上传"
634
634
  ],
635
635
  "Uploaded and present on console.redhat.com Inventory service: ": [
636
- ""
636
+ "上传并存在于 console.redhat.com Inventory 服务中: "
637
637
  ],
638
638
  "Value %{value} is not a valid UUID": [
639
639
  "值 %{value} 不是一个有效的 UUID"
@@ -672,7 +672,7 @@
672
672
  "resolution 是否需要重启"
673
673
  ],
674
674
  "You can review this information later by looking at the Inventory status of each host.": [
675
- ""
675
+ "稍后,您可以通过查看每个主机的 Inventory 状态来查看此信息。"
676
676
  ],
677
677
  "You do not have permission to perform this action": [
678
678
  "您没有执行此操作的权限"
@@ -5,6 +5,7 @@ module ForemanRhCloud
5
5
  TAG_NAMESPACE = 'sat_iam'.freeze
6
6
  TAG_SHORT_NAME = 'scope'.freeze
7
7
  TAG_NAME = "#{TAG_NAMESPACE}/#{TAG_SHORT_NAME}".freeze
8
+ SYNC_CACHE_TTL = 10.seconds
8
9
 
9
10
  def self.auth_tag_for(user, org, loc)
10
11
  new(user, org, loc, nil).auth_tag
@@ -20,20 +21,28 @@ module ForemanRhCloud
20
21
  end
21
22
 
22
23
  def update_tag
23
- loc_name = location_name_for_tag
24
- logger.debug("Updating tags for user: #{@user}, org: #{@org.name}, loc: #{loc_name}")
24
+ cached = Rails.cache.read(sync_identity)
25
+ return cached if cached
25
26
 
26
- payload = tags_query_payload
27
- params = {
28
- organization: @org,
29
- method: :post,
30
- url: "#{InsightsCloud.gateway_url}/tags",
31
- headers: {
32
- content_type: :json,
33
- },
34
- payload: payload.to_json,
35
- }
36
- execute_cloud_request(params) unless payload[:host_id_list].empty?
27
+ Foreman::AdvisoryLockManager.with_session_lock(sync_identity) do
28
+ Rails.cache.fetch(sync_identity, expires_in: SYNC_CACHE_TTL) do
29
+ loc_name = location_name_for_tag
30
+ logger.debug("Updating tags for user: #{@user}, org: #{@org.name}, loc: #{loc_name}")
31
+
32
+ payload = tags_query_payload
33
+ params = {
34
+ organization: @org,
35
+ method: :post,
36
+ url: "#{InsightsCloud.gateway_url}/tags",
37
+ headers: {
38
+ content_type: :json,
39
+ },
40
+ payload: payload.to_json,
41
+ }
42
+ execute_cloud_request(params) unless payload[:host_id_list].empty?
43
+ true
44
+ end
45
+ end
37
46
  end
38
47
 
39
48
  def allowed_hosts
@@ -63,5 +72,11 @@ module ForemanRhCloud
63
72
  def location_name_for_tag
64
73
  @loc ? @loc.name : '*'
65
74
  end
75
+
76
+ # Single identity string reused as BOTH the advisory-lock name and the
77
+ # Rails.cache key, so the lock and the cached entry always correspond 1:1.
78
+ def sync_identity
79
+ "rh_cloud_tags_auth_sync_#{tag_value}"
80
+ end
66
81
  end
67
82
  end
data/config/routes.rb CHANGED
@@ -36,6 +36,16 @@ Rails.application.routes.draw do
36
36
  get 'insights_cloud', to: '/react#index' # Uses foreman's react controller
37
37
  get 'insights_vulnerability', to: '/react#index'
38
38
  get 'insights_vulnerability/:cve_id', to: '/react#index'
39
+ scope 'insights_compliance' do
40
+ get 'reports', to: '/react#index'
41
+ get 'reports/:report_id', to: '/react#index'
42
+ get 'reports/:report_id/delete', to: '/react#index'
43
+ get 'scappolicies', to: '/react#index'
44
+ get 'scappolicies/new', to: '/react#index'
45
+ get 'scappolicies/:policy_id', to: '/react#index'
46
+ get 'scappolicies/:policy_id/edit', to: '/react#index'
47
+ get 'scappolicies/:policy_id/delete', to: '/react#index'
48
+ end
39
49
  end
40
50
 
41
51
  scope :module => :'insights_cloud/api', :path => :redhat_access do
@@ -145,6 +145,20 @@ module ForemanRhCloud
145
145
  url_hash: { controller: :react, action: :index },
146
146
  parent: :insights_menu,
147
147
  if: -> { ForemanRhCloud.with_iop_smart_proxy? }
148
+ menu :top_menu,
149
+ :insights_compliance_reports,
150
+ caption: N_('Compliance Reports'),
151
+ url: '/foreman_rh_cloud/insights_compliance/reports',
152
+ url_hash: { controller: :react, action: :index },
153
+ parent: :insights_menu,
154
+ if: -> { ForemanRhCloud.with_iop_smart_proxy? }
155
+ menu :top_menu,
156
+ :insights_compliance_scappolicies,
157
+ caption: N_('SCAP Policies'),
158
+ url: '/foreman_rh_cloud/insights_compliance/scappolicies',
159
+ url_hash: { controller: :react, action: :index },
160
+ parent: :insights_menu,
161
+ if: -> { ForemanRhCloud.with_iop_smart_proxy? }
148
162
  end
149
163
 
150
164
  # In IoP case we want the page to be in the admin menu
@@ -1,3 +1,3 @@
1
1
  module ForemanRhCloud
2
- VERSION = '14.7.0'.freeze
2
+ VERSION = '15.0.0'.freeze
3
3
  end
@@ -8,8 +8,8 @@ msgid ""
8
8
  msgstr ""
9
9
  "Project-Id-Version: foreman_rh_cloud 1.0.0\n"
10
10
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2026-09-22 17:30+0000\n"
12
- "PO-Revision-Date: 2026-09-22 17:30+0000\n"
11
+ "POT-Creation-Date: 2026-09-29 10:58+0000\n"
12
+ "PO-Revision-Date: 2026-09-29 10:58+0000\n"
13
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
15
  "Language: \n"