katello 4.7.0.rc1 → 4.7.0.rc2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of katello might be problematic. Click here for more details.

Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/app/lib/actions/candlepin/abstract_async_task.rb +7 -3
  3. data/app/lib/actions/candlepin/owner/{upstream_export.rb → retrieve_upstream_export.rb} +3 -3
  4. data/app/lib/actions/candlepin/owner/start_upstream_export.rb +24 -0
  5. data/app/lib/actions/candlepin/upstream_abstract_async_task.rb +30 -0
  6. data/app/lib/actions/katello/organization/manifest_refresh.rb +12 -7
  7. data/app/lib/actions/middleware/propagate_candlepin_errors.rb +6 -1
  8. data/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb +1 -0
  9. data/app/lib/actions/pulp3/orphan_cleanup/delete_orphan_alternate_content_sources.rb +16 -0
  10. data/app/lib/katello/errors.rb +1 -0
  11. data/app/lib/katello/resources/candlepin/upstream_consumer.rb +1 -1
  12. data/app/lib/katello/resources/candlepin/upstream_job.rb +28 -0
  13. data/app/models/katello/content_view_erratum_filter.rb +5 -4
  14. data/app/models/katello/glue/provider.rb +28 -18
  15. data/app/services/katello/pulp3/docker_manifest.rb +2 -1
  16. data/app/services/katello/pulp3/docker_manifest_list.rb +2 -1
  17. data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +21 -0
  18. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +2 -2
  19. data/lib/katello/repository_types/docker.rb +2 -1
  20. data/lib/katello/version.rb +1 -1
  21. data/locale/action_names.rb +68 -68
  22. data/locale/bn/katello.po +38 -35
  23. data/locale/cs/katello.po +38 -35
  24. data/locale/de/katello.po +130 -126
  25. data/locale/en/katello.po +38 -35
  26. data/locale/es/katello.po +95 -88
  27. data/locale/fr/katello.po +95 -88
  28. data/locale/gu/katello.po +44 -41
  29. data/locale/hi/katello.po +43 -40
  30. data/locale/it/katello.po +61 -56
  31. data/locale/ja/katello.po +615 -614
  32. data/locale/ka/katello.po +8821 -0
  33. data/locale/katello.pot +353 -339
  34. data/locale/kn/katello.po +41 -38
  35. data/locale/ko/katello.po +62 -59
  36. data/locale/mr/katello.po +41 -38
  37. data/locale/or/katello.po +43 -40
  38. data/locale/pa/katello.po +41 -38
  39. data/locale/pt/katello.po +40 -36
  40. data/locale/pt_BR/katello.po +91 -84
  41. data/locale/ru/katello.po +68 -65
  42. data/locale/ta/katello.po +38 -35
  43. data/locale/te/katello.po +41 -38
  44. data/locale/zanata.xml +4 -2
  45. data/locale/zh_CN/katello.po +99 -96
  46. data/locale/zh_TW/katello.po +62 -59
  47. data/webpack/components/Table/EmptyStateMessage.js +3 -3
  48. data/webpack/containers/Application/overrides.scss +13 -1
  49. data/webpack/scenes/ContentViews/Create/ContentViewFormComponents.js +8 -3
  50. data/webpack/scenes/ContentViews/Details/Filters/ArtifactsWithNoErrata.js +8 -8
  51. data/webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js +0 -6
  52. data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +0 -6
  53. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +67 -9
  54. data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +4 -4
  55. data/webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js +6 -6
  56. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js +6 -6
  57. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js +6 -8
  58. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompare.scss +31 -0
  59. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareHeader.js +5 -7
  60. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareTable.js +9 -2
  61. metadata +12 -7
@@ -10,7 +10,7 @@
10
10
  #
11
11
  msgid ""
12
12
  msgstr ""
13
- "Project-Id-Version: katello 2.5.0\n"
13
+ "Project-Id-Version: katello 2.4.0-RC1\n"
14
14
  "Report-Msgid-Bugs-To: \n"
15
15
  "PO-Revision-Date: 2017-12-19 20:14+0000\n"
16
16
  "Last-Translator: Bryan Kearney <bryan.kearney@gmail.com>, 2022\n"
@@ -131,6 +131,9 @@ msgstr "%s 已使用"
131
131
  msgid "%s ago"
132
132
  msgstr "%s 之前"
133
133
 
134
+ msgid "%s guests"
135
+ msgstr ""
136
+
134
137
  msgid "%s has already been deleted"
135
138
  msgstr ""
136
139
 
@@ -689,6 +692,9 @@ msgstr ""
689
692
  msgid "Alternate content sources define new locations to download content from at repository or smart proxy sync time."
690
693
  msgstr ""
691
694
 
695
+ msgid "Alternate content sources use the HTTP proxy of their assigned smart proxy for communication."
696
+ msgstr ""
697
+
692
698
  msgid "Always Use Latest (currently %{version})"
693
699
  msgstr ""
694
700
 
@@ -738,7 +744,7 @@ msgid "Applicability Batch Size"
738
744
  msgstr ""
739
745
 
740
746
  msgid "Applicable"
741
- msgstr ""
747
+ msgstr "可套用"
742
748
 
743
749
  msgid "Applicable Content Hosts"
744
750
  msgstr ""
@@ -922,7 +928,7 @@ msgid "Available Schema Versions"
922
928
  msgstr ""
923
929
 
924
930
  msgid "Back"
925
- msgstr ""
931
+ msgstr "上一步"
926
932
 
927
933
  msgid "Backend System Status"
928
934
  msgstr "後端系統狀態"
@@ -1080,6 +1086,9 @@ msgstr "已取消"
1080
1086
  msgid "Cancelled."
1081
1087
  msgstr "已取消。"
1082
1088
 
1089
+ msgid "Candlepin"
1090
+ msgstr ""
1091
+
1083
1092
  msgid "Candlepin Event"
1084
1093
  msgstr "Candlepin 事件"
1085
1094
 
@@ -1228,7 +1237,7 @@ msgid "Cannot validate contents on non-yum/deb repositories."
1228
1237
  msgstr ""
1229
1238
 
1230
1239
  msgid "Capacity"
1231
- msgstr ""
1240
+ msgstr "容量"
1232
1241
 
1233
1242
  msgid "Change Content Source"
1234
1243
  msgstr ""
@@ -1621,7 +1630,7 @@ msgid "Copy version units to library"
1621
1630
  msgstr ""
1622
1631
 
1623
1632
  msgid "Cores per socket"
1624
- msgstr ""
1633
+ msgstr "每個插槽的核心數"
1625
1634
 
1626
1635
  msgid "Cores: %s"
1627
1636
  msgstr "核心:%s"
@@ -2256,21 +2265,6 @@ msgstr "勘誤諮詢"
2256
2265
  msgid "Edit"
2257
2266
  msgstr "編輯"
2258
2267
 
2259
- msgid "Edit ACS"
2260
- msgstr ""
2261
-
2262
- msgid "Edit ACS credentials"
2263
- msgstr ""
2264
-
2265
- msgid "Edit ACS details"
2266
- msgstr ""
2267
-
2268
- msgid "Edit ACS products"
2269
- msgstr ""
2270
-
2271
- msgid "Edit ACS smart proxies"
2272
- msgstr ""
2273
-
2274
2268
  msgid "Edit RPM rule"
2275
2269
  msgstr ""
2276
2270
 
@@ -2487,11 +2481,11 @@ msgstr ""
2487
2481
  msgid "Exclude"
2488
2482
  msgstr "排除"
2489
2483
 
2490
- msgid "Exclude all Module Streams with no errata."
2484
+ msgid "Exclude all RPMs not associated to any errata"
2491
2485
  msgstr ""
2492
2486
 
2493
- msgid "Exclude all RPMs with no errata."
2494
- msgstr "排除所有不含勘誤的 RPM。"
2487
+ msgid "Exclude all module streams not associated to any errata"
2488
+ msgstr ""
2495
2489
 
2496
2490
  msgid "Exclude filter"
2497
2491
  msgstr ""
@@ -3275,11 +3269,11 @@ msgstr ""
3275
3269
  msgid "Include"
3276
3270
  msgstr "包含"
3277
3271
 
3278
- msgid "Include all Module Streams with no errata."
3272
+ msgid "Include all RPMs not associated to any errata"
3279
3273
  msgstr ""
3280
3274
 
3281
- msgid "Include all RPMs with no errata."
3282
- msgstr "包括所有不含勘誤的 RPM。"
3275
+ msgid "Include all module streams not associated to any errata"
3276
+ msgstr ""
3283
3277
 
3284
3278
  msgid "Include content views generated by imports/exports. Defaults to false"
3285
3279
  msgstr ""
@@ -3345,7 +3339,7 @@ msgid "Initiate a sync of the products attached to the sync plan"
3345
3339
  msgstr "對連上同步計畫的產品進行同步"
3346
3340
 
3347
3341
  msgid "Install"
3348
- msgstr ""
3342
+ msgstr "安裝"
3349
3343
 
3350
3344
  msgid "Install Applicable Errata"
3351
3345
  msgstr "安裝可套用的勘誤"
@@ -3426,7 +3420,7 @@ msgid "Installation status"
3426
3420
  msgstr ""
3427
3421
 
3428
3422
  msgid "Installed"
3429
- msgstr ""
3423
+ msgstr "已安裝"
3430
3424
 
3431
3425
  msgid "Installed Packages"
3432
3426
  msgstr "已安裝的套件"
@@ -3663,7 +3657,7 @@ msgid "Less than"
3663
3657
  msgstr ""
3664
3658
 
3665
3659
  msgid "Library"
3666
- msgstr ""
3660
+ msgstr "函示庫"
3667
3661
 
3668
3662
  msgid "Library lifecycle environments may not be deleted."
3669
3663
  msgstr "不可刪除函式庫生命週期環境。"
@@ -3984,7 +3978,7 @@ msgid "Loading versions"
3984
3978
  msgstr ""
3985
3979
 
3986
3980
  msgid "Loading..."
3987
- msgstr ""
3981
+ msgstr "載入中……"
3988
3982
 
3989
3983
  msgid "Low"
3990
3984
  msgstr ""
@@ -4032,7 +4026,7 @@ msgid "Manifest refreshed"
4032
4026
  msgstr ""
4033
4027
 
4034
4028
  msgid "Manual"
4035
- msgstr ""
4029
+ msgstr "手動式"
4036
4030
 
4037
4031
  msgid "Manual authentication"
4038
4032
  msgstr ""
@@ -4101,7 +4095,7 @@ msgid "Missing arguments %{substitutions} for %{content_url}"
4101
4095
  msgstr "沒有引數 %{substitutions} 給 %{content_url}"
4102
4096
 
4103
4097
  msgid "Model"
4104
- msgstr ""
4098
+ msgstr "型號"
4105
4099
 
4106
4100
  msgid "Moderate"
4107
4101
  msgstr "控管"
@@ -4215,7 +4209,7 @@ msgid "Network Sync"
4215
4209
  msgstr ""
4216
4210
 
4217
4211
  msgid "Never"
4218
- msgstr ""
4212
+ msgstr "永不"
4219
4213
 
4220
4214
  msgid "Never Synced"
4221
4215
  msgstr "從未同步"
@@ -4572,7 +4566,7 @@ msgid "Not all necessary pulp workers running at %s."
4572
4566
  msgstr ""
4573
4567
 
4574
4568
  msgid "Not installed"
4575
- msgstr ""
4569
+ msgstr "未安裝"
4576
4570
 
4577
4571
  msgid "Not running"
4578
4572
  msgstr ""
@@ -5013,7 +5007,7 @@ msgid "Please wait while the task starts.."
5013
5007
  msgstr ""
5014
5008
 
5015
5009
  msgid "Please wait..."
5016
- msgstr ""
5010
+ msgstr "請稍等..."
5017
5011
 
5018
5012
  msgid "Policy to set for mirroring content. Must be one of %s."
5019
5013
  msgstr ""
@@ -5429,7 +5423,7 @@ msgid "Register host '%s' before attaching subscriptions"
5429
5423
  msgstr ""
5430
5424
 
5431
5425
  msgid "Registered"
5432
- msgstr ""
5426
+ msgstr "已註冊"
5433
5427
 
5434
5428
  msgid "Registered by"
5435
5429
  msgstr ""
@@ -5437,9 +5431,6 @@ msgstr ""
5437
5431
  msgid "Registered on"
5438
5432
  msgstr ""
5439
5433
 
5440
- msgid "Registered through"
5441
- msgstr ""
5442
-
5443
5434
  msgid "Registration details"
5444
5435
  msgstr ""
5445
5436
 
@@ -6047,7 +6038,7 @@ msgid "Select content view"
6047
6038
  msgstr ""
6048
6039
 
6049
6040
  msgid "Select environment"
6050
- msgstr ""
6041
+ msgstr "選擇環境"
6051
6042
 
6052
6043
  msgid "Select host collection(s) to associate with host {hostName}."
6053
6044
  msgstr ""
@@ -6263,7 +6254,7 @@ msgid "Skipped pulp_auth check after failed pulp check"
6263
6254
  msgstr "pulp 檢查失敗後,跳過 pulp_auth"
6264
6255
 
6265
6256
  msgid "Smart proxies"
6266
- msgstr ""
6257
+ msgstr "智慧代理"
6267
6258
 
6268
6259
  msgid "Smart proxy IDs"
6269
6260
  msgstr "智慧型代理伺服器的 ID"
@@ -6272,7 +6263,7 @@ msgid "Smart proxy content source not found!"
6272
6263
  msgstr ""
6273
6264
 
6274
6265
  msgid "Sockets"
6275
- msgstr ""
6266
+ msgstr "插槽"
6276
6267
 
6277
6268
  msgid "Sockets: %s"
6278
6269
  msgstr "插槽:%s"
@@ -6482,7 +6473,7 @@ msgid "Starts"
6482
6473
  msgstr "起始"
6483
6474
 
6484
6475
  msgid "State"
6485
- msgstr ""
6476
+ msgstr "狀態"
6486
6477
 
6487
6478
  msgid "Status"
6488
6479
  msgstr "狀態"
@@ -6547,9 +6538,6 @@ msgstr "訂閱狀態"
6547
6538
  msgid "Subscription UUID"
6548
6539
  msgstr ""
6549
6540
 
6550
- msgid "Subscription Watch"
6551
- msgstr ""
6552
-
6553
6541
  msgid "Subscription connection enabled"
6554
6542
  msgstr ""
6555
6543
 
@@ -6595,6 +6583,9 @@ msgstr ""
6595
6583
  msgid "Subscriptions information based on selected activation keys:"
6596
6584
  msgstr "根基於啟動金鑰的訂閱資訊:"
6597
6585
 
6586
+ msgid "Subscriptions service"
6587
+ msgstr ""
6588
+
6598
6589
  msgid "Substitution Mismatch. Unable to update for content: (%{content}). From [%{content_url}] To [%{new_url}]."
6599
6590
  msgstr ""
6600
6591
 
@@ -6763,10 +6754,10 @@ msgstr "系統狀態"
6763
6754
  msgid "System purpose"
6764
6755
  msgstr ""
6765
6756
 
6766
- msgid "System purpose allows you to set the system\\'s intended use on your network and improves the reporting of usage in Subscription Watch."
6757
+ msgid "System purpose attributes updated"
6767
6758
  msgstr ""
6768
6759
 
6769
- msgid "System purpose attributes updated"
6760
+ msgid "System purpose enables you to set the system\\'s intended use on your network and improves reporting accuracy in the Subscriptions service of the Red Hat Hybrid Cloud Console."
6770
6761
  msgstr ""
6771
6762
 
6772
6763
  msgid "Tag name"
@@ -7091,10 +7082,10 @@ msgstr ""
7091
7082
  msgid "This host's organization is in Simple Content Access mode. Auto-attach is disabled"
7092
7083
  msgstr ""
7093
7084
 
7094
- msgid "This is disabled because a manifest related task is in progress."
7085
+ msgid "This is disabled because a manifest task is in progress"
7095
7086
  msgstr ""
7096
7087
 
7097
- msgid "This is disabled because a manifest task is in progress"
7088
+ msgid "This is disabled because a manifest-related task is in progress."
7098
7089
  msgstr ""
7099
7090
 
7100
7091
  msgid "This is disabled because no connection could be made to the upstream Manifest."
@@ -7112,10 +7103,10 @@ msgstr ""
7112
7103
  msgid "This is not a linked repository"
7113
7104
  msgstr ""
7114
7105
 
7115
- msgid "This organization has Simple Content Access enabled. Hosts are not required to have subscriptions attached to access repositories. {br} Learn more about your overall subscription usage at {subscriptionWatch}."
7106
+ msgid "This organization has Simple Content Access enabled. Hosts are not required to have subscriptions attached to access repositories. {br} Learn more about your overall subscription usage with the {subscriptionsService}."
7116
7107
  msgstr ""
7117
7108
 
7118
- msgid "This organization is not using {scaLink}. Legacy subscription management is deprecated and will be removed in a future version."
7109
+ msgid "This organization is not using {scaLink}. Entitlement-based subscription management is deprecated and will be removed in a future version."
7119
7110
  msgstr ""
7120
7111
 
7121
7112
  msgid "This repository is not suggested. Please see additional %(anchorBegin)sdocumentation%(anchorEnd)s prior to use."
@@ -7613,6 +7604,9 @@ msgstr ""
7613
7604
  msgid "Upload request id"
7614
7605
  msgstr "上傳需求 ID"
7615
7606
 
7607
+ msgid "Upstream Candlepin"
7608
+ msgstr ""
7609
+
7616
7610
  msgid "Upstream Content View Label, default: Default_Organization_View. Relevant only for 'upstream_server' type."
7617
7611
  msgstr ""
7618
7612
 
@@ -7716,7 +7710,7 @@ msgid "Value must either be a boolean or 'default' for 'enabled'"
7716
7710
  msgstr ""
7717
7711
 
7718
7712
  msgid "Verify SSL"
7719
- msgstr ""
7713
+ msgstr "驗證 SSL"
7720
7714
 
7721
7715
  msgid "Verify checksum"
7722
7716
  msgstr ""
@@ -7778,6 +7772,9 @@ msgstr ""
7778
7772
  msgid "View %{view} has not been promoted to %{env}"
7779
7773
  msgstr "檢視 %{view} 並未被推送到 %{env}"
7780
7774
 
7775
+ msgid "View Subscription Usage"
7776
+ msgstr ""
7777
+
7781
7778
  msgid "View a report of the affected hosts"
7782
7779
  msgstr ""
7783
7780
 
@@ -7799,6 +7796,12 @@ msgstr ""
7799
7796
  msgid "Virtual"
7800
7797
  msgstr "虛擬"
7801
7798
 
7799
+ msgid "Virtual guests"
7800
+ msgstr ""
7801
+
7802
+ msgid "Virtual host"
7803
+ msgstr ""
7804
+
7802
7805
  msgid "Waiting to start."
7803
7806
  msgstr ""
7804
7807
 
@@ -8126,8 +8129,8 @@ msgstr "無法包含不屬於此內容視域的篩選器"
8126
8129
  msgid "cannot contain more than %s characters"
8127
8130
  msgstr "不可包含超過 %s 個字元"
8128
8131
 
8129
- msgid "checking Candlepin task status"
8130
- msgstr "檢查 Candlepin 任務狀態"
8132
+ msgid "checking %s task status"
8133
+ msgstr ""
8131
8134
 
8132
8135
  msgid "checking Pulp task status"
8133
8136
  msgstr "檢查 Pulp 任務狀態"
@@ -8360,8 +8363,8 @@ msgstr "用來篩選內容的 ID"
8360
8363
  msgid "if true, Katello will verify the upstream url's SSL certifcates are signed by a trusted CA"
8361
8364
  msgstr ""
8362
8365
 
8363
- msgid "initiating Candlepin task"
8364
- msgstr "初始化 Candlepin 任務"
8366
+ msgid "initiating %s task"
8367
+ msgstr ""
8365
8368
 
8366
8369
  msgid "initiating Pulp task"
8367
8370
  msgstr "初始化 Pulp 任務"
@@ -8762,8 +8765,8 @@ msgstr "透過遠端執行"
8762
8765
  msgid "view content view tabs."
8763
8766
  msgstr ""
8764
8767
 
8765
- msgid "waiting for Candlepin to finish the task"
8766
- msgstr "等待 Candlepin 完成任務"
8768
+ msgid "waiting for %s to finish the task"
8769
+ msgstr ""
8767
8770
 
8768
8771
  msgid "waiting for Pulp to finish the task"
8769
8772
  msgstr "等待 Pulp 完成任務"
@@ -11,7 +11,7 @@ import {
11
11
  } from '@patternfly/react-core';
12
12
  import PropTypes from 'prop-types';
13
13
  import { translate as __ } from 'foremanReact/common/I18n';
14
- import { CubeIcon, ExclamationCircleIcon, SearchIcon, CheckCircleIcon } from '@patternfly/react-icons';
14
+ import { CubeIcon, ExclamationCircleIcon, SearchIcon, CheckCircleIcon, PlusCircleIcon } from '@patternfly/react-icons';
15
15
  import { global_danger_color_200 as dangerColor, global_success_color_100 as successColor } from '@patternfly/react-tokens';
16
16
  import { useDispatch, useSelector } from 'react-redux';
17
17
  import { selectHostDetailsClearSearch } from '../extensions/HostDetails/HostDetailsSelectors';
@@ -76,8 +76,8 @@ const EmptyStateMessage = ({
76
76
  >
77
77
  <KatelloEmptyStateIcon
78
78
  error={!!error}
79
- search={search}
80
- customIcon={customIcon}
79
+ search={search && !showPrimaryAction}
80
+ customIcon={PlusCircleIcon}
81
81
  happyIcon={happy}
82
82
  />
83
83
  <Title headingLevel="h2" size="lg" ouiaId="empty-state-title">
@@ -176,4 +176,16 @@ html .pagination-pf-pagesize.btn-group {
176
176
  border-bottom: 0.2px;
177
177
  border-bottom-color: var(--pf-c-table--BorderColor);
178
178
  border-bottom-style: inset;
179
- }
179
+ }
180
+
181
+ .border-left {
182
+ border-left: 0.2px;
183
+ border-left-color: var(--pf-c-table--BorderColor);
184
+ border-left-style: inset;
185
+ }
186
+
187
+ .border-right {
188
+ border-right: 0.2px;
189
+ border-right-color: var(--pf-c-table--BorderColor);
190
+ border-right-style: inset;
191
+ }
@@ -6,11 +6,11 @@ import { Tooltip, TooltipPosition, Flex, FlexItem } from '@patternfly/react-core
6
6
  import { autoPublishHelpText, dependenciesHelpText, importOnlyHelpText, generatedContentViewHelpText } from '../helpers';
7
7
  import ContentViewIcon from '../components/ContentViewIcon';
8
8
 
9
- export const HelpToolTip = ({ tooltip }) => (
10
- <span className="foreman-spaced-icon">
9
+ export const HelpToolTip = props => (
10
+ <span className={props.className ?? 'foreman-spaced-icon'}>
11
11
  <Tooltip
12
12
  position={TooltipPosition.top}
13
- content={tooltip}
13
+ content={props.tooltip}
14
14
  >
15
15
  <OutlinedQuestionCircleIcon />
16
16
  </Tooltip>
@@ -69,4 +69,9 @@ export const LabelGenerated = () => (
69
69
 
70
70
  HelpToolTip.propTypes = {
71
71
  tooltip: PropTypes.string.isRequired,
72
+ className: PropTypes.string,
73
+ };
74
+
75
+ HelpToolTip.defaultProps = {
76
+ className: null,
72
77
  };
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from 'react';
2
2
  import { useDispatch } from 'react-redux';
3
3
  import PropTypes from 'prop-types';
4
- import { Checkbox } from '@patternfly/react-core';
4
+ import { Switch } from '@patternfly/react-core';
5
5
  import { translate as __ } from 'foremanReact/common/I18n';
6
6
  import { editCVFilter } from '../ContentViewDetailActions';
7
7
 
@@ -23,24 +23,24 @@ export const ArtifactsWithNoErrataRenderer = ({ filterDetails }) => {
23
23
  const getLabel = () => {
24
24
  switch (true) {
25
25
  case type === 'modulemd' && inclusion:
26
- return __('Include all Module Streams with no errata.');
26
+ return __('Include all module streams not associated to any errata');
27
27
  case type === 'modulemd' && !inclusion:
28
- return __('Exclude all Module Streams with no errata.');
28
+ return __('Exclude all module streams not associated to any errata');
29
29
  case !inclusion:
30
- return __('Exclude all RPMs with no errata.');
30
+ return __('Exclude all RPMs not associated to any errata');
31
31
  default:
32
- return __('Include all RPMs with no errata.');
32
+ return __('Include all RPMs not associated to any errata');
33
33
  }
34
34
  };
35
35
 
36
- return (<Checkbox
36
+ return (<Switch
37
37
  ouiaId="artifactsNoErrata"
38
38
  id="artifactsNoErrata"
39
39
  name="artifactsNoErrata"
40
- label=<p style={{ marginTop: '4px' }}>{getLabel()}</p>
40
+ label={getLabel()}
41
41
  isChecked={artifactsNoErrata}
42
42
  isDisabled={isLoading}
43
- onChange={setArtifactsNoErrata}
43
+ onChange={checked => setArtifactsNoErrata(checked)}
44
44
  />);
45
45
  };
46
46
 
@@ -25,7 +25,6 @@ import getContentViewDetails, {
25
25
  } from '../ContentViewDetailActions';
26
26
  import AddedStatusLabel from '../../../../components/AddedStatusLabel';
27
27
  import AffectedRepositoryTable from './AffectedRepositories/AffectedRepositoryTable';
28
- import { ArtifactsWithNoErrataRenderer } from './ArtifactsWithNoErrata';
29
28
  import { ADDED, ALL_STATUSES, NOT_ADDED } from '../../ContentViewsConstants';
30
29
  import { hasPermission } from '../../helpers';
31
30
 
@@ -277,11 +276,6 @@ const CVModuleStreamFilterContent = ({
277
276
  }
278
277
  />
279
278
  </SplitItem>
280
- <SplitItem>
281
- <ArtifactsWithNoErrataRenderer
282
- filterDetails={filterDetails}
283
- />
284
- </SplitItem>
285
279
  </Split>
286
280
  }
287
281
  />
@@ -6,7 +6,6 @@ import { TableVariant } from '@patternfly/react-table';
6
6
  import { Tabs, Tab, TabTitleText, Split, SplitItem, Dropdown, DropdownItem, KebabToggle, Button } from '@patternfly/react-core';
7
7
  import { STATUS } from 'foremanReact/constants';
8
8
  import { translate as __ } from 'foremanReact/common/I18n';
9
- import { ArtifactsWithNoErrataRenderer } from './ArtifactsWithNoErrata';
10
9
  import onSelect from '../../../../components/Table/helpers';
11
10
  import TableWrapper from '../../../../components/Table/TableWrapper';
12
11
  import {
@@ -221,11 +220,6 @@ const CVRpmFilterContent = ({
221
220
  }
222
221
  />
223
222
  </SplitItem>
224
- <SplitItem>
225
- <ArtifactsWithNoErrataRenderer
226
- filterDetails={filterDetails}
227
- />
228
- </SplitItem>
229
223
  </Split>}
230
224
  {modalOpen &&
231
225
  <AddEditPackageRuleModal
@@ -1,23 +1,46 @@
1
1
  import React, { useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
+ import { useHistory } from 'react-router-dom';
3
4
  import { head } from 'lodash';
4
- import { Split, SplitItem, Grid, GridItem, TextContent, Text, TextVariants, Label } from '@patternfly/react-core';
5
+ import {
6
+ Split,
7
+ SplitItem,
8
+ Grid,
9
+ GridItem,
10
+ TextContent,
11
+ Text,
12
+ TextVariants,
13
+ Label,
14
+ Dropdown,
15
+ DropdownItem,
16
+ KebabToggle,
17
+ DropdownPosition,
18
+ Flex,
19
+ FlexItem,
20
+ } from '@patternfly/react-core';
5
21
  import { translate as __ } from 'foremanReact/common/I18n';
6
22
  import { useDispatch } from 'react-redux';
7
- import { getCVFilterDetails, editCVFilter } from '../ContentViewDetailActions';
23
+ import {
24
+ getCVFilterDetails,
25
+ editCVFilter,
26
+ deleteContentViewFilter,
27
+ } from '../ContentViewDetailActions';
8
28
  import AffectedRepositorySelection from './AffectedRepositories/AffectedRepositorySelection';
9
29
  import RepoIcon from '../Repositories/RepoIcon';
10
30
  import { repoType } from '../../../../utils/helpers';
11
31
  import { hasPermission } from '../../helpers';
12
32
  import { typeName } from './ContentType';
13
33
  import ActionableDetail from '../../../../components/ActionableDetail';
34
+ import { ArtifactsWithNoErrataRenderer } from './ArtifactsWithNoErrata';
14
35
 
15
36
  const ContentViewFilterDetailsHeader = ({
16
37
  cvId, filterId, filterDetails, setShowAffectedRepos, details,
17
38
  }) => {
18
39
  const dispatch = useDispatch();
40
+ const { push } = useHistory();
19
41
  const [currentAttribute, setCurrentAttribute] = useState('');
20
42
  const [loading, setLoading] = useState(false);
43
+ const [dropDownOpen, setDropdownOpen] = useState(false);
21
44
  const {
22
45
  type, name, inclusion, description, rules,
23
46
  } = filterDetails;
@@ -41,6 +64,20 @@ const ContentViewFilterDetailsHeader = ({
41
64
  ));
42
65
  };
43
66
 
67
+ const dropDownItems = [
68
+ <DropdownItem
69
+ key="delete"
70
+ onClick={() => {
71
+ dispatch(deleteContentViewFilter(filterId, () => {
72
+ push(`/content_views/${cvId}#/filters/`);
73
+ }));
74
+ }}
75
+ >
76
+ {__('Delete')}
77
+ </DropdownItem>,
78
+ ];
79
+
80
+ const showArtifactsWithNoErrata = (type === 'rpm' || type === 'modulemd');
44
81
  return (
45
82
  <Grid className="margin-0-24">
46
83
  <GridItem span={9}>
@@ -58,7 +95,14 @@ const ContentViewFilterDetailsHeader = ({
58
95
  setCurrentAttribute={setCurrentAttribute}
59
96
  />
60
97
  </TextContent>
61
- <TextContent style={{ padding: '24px 0 12px' }}>
98
+ {showArtifactsWithNoErrata &&
99
+ <TextContent style={{ padding: '12px 0 12px' }}>
100
+ <ArtifactsWithNoErrataRenderer
101
+ filterDetails={filterDetails}
102
+ />
103
+ </TextContent>
104
+ }
105
+ <TextContent style={{ padding: '12px 0 12px' }}>
62
106
  <ActionableDetail
63
107
  key={description} // This fixes a render issue with the initial value
64
108
  textArea
@@ -74,12 +118,26 @@ const ContentViewFilterDetailsHeader = ({
74
118
  </TextContent>
75
119
  </GridItem>
76
120
  <GridItem span={3} style={{ float: 'right' }}>
77
- <AffectedRepositorySelection
78
- cvId={cvId}
79
- filterId={filterId}
80
- setShowAffectedRepos={setShowAffectedRepos}
81
- disabled={!hasPermission(permissions, 'edit_content_views')}
82
- />
121
+ <Flex justifyContent={{ lg: 'justifyContentFlexEnd', sm: 'justifyContentFlexStart' }}>
122
+ <FlexItem>
123
+ <AffectedRepositorySelection
124
+ cvId={cvId}
125
+ filterId={filterId}
126
+ setShowAffectedRepos={setShowAffectedRepos}
127
+ disabled={!hasPermission(permissions, 'edit_content_views')}
128
+ />
129
+ </FlexItem>
130
+ <FlexItem>
131
+ <Dropdown
132
+ position={DropdownPosition.right}
133
+ style={{ marginLeft: 'auto' }}
134
+ toggle={<KebabToggle onToggle={setDropdownOpen} id="toggle-dropdown" />}
135
+ isOpen={dropDownOpen}
136
+ isPlain
137
+ dropdownItems={dropDownItems}
138
+ />
139
+ </FlexItem>
140
+ </Flex>
83
141
  </GridItem>
84
142
  <GridItem span={10}>
85
143
  <Split hasGutter style={{ alignItems: 'baseline' }}>
@@ -249,10 +249,10 @@ test('Remove rpm filter rule in a self-closing modal', async (done) => {
249
249
  expect(queryByText(cvFilterName)).toBeNull();
250
250
  await patientlyWaitFor(() => {
251
251
  expect(getByText(cvFilterName)).toBeInTheDocument();
252
- expect(getAllByLabelText('Actions')[0]).toBeInTheDocument();
252
+ expect(getAllByLabelText('Actions')[1]).toBeInTheDocument();
253
253
  });
254
254
 
255
- getAllByLabelText('Actions')[0].click();
255
+ getAllByLabelText('Actions')[1].click();
256
256
 
257
257
  await patientlyWaitFor(() => {
258
258
  expect(getByText('Remove')).toBeInTheDocument();
@@ -311,10 +311,10 @@ test('Edit rpm filter rule in a self-closing modal', async (done) => {
311
311
  expect(queryByText(cvFilterName)).toBeNull();
312
312
  await patientlyWaitFor(() => {
313
313
  expect(getByText(cvFilterName)).toBeInTheDocument();
314
- expect(getAllByLabelText('Actions')[0]).toBeInTheDocument();
314
+ expect(getAllByLabelText('Actions')[1]).toBeInTheDocument();
315
315
  });
316
316
 
317
- getAllByLabelText('Actions')[0].click();
317
+ getAllByLabelText('Actions')[1].click();
318
318
 
319
319
  await patientlyWaitFor(() => {
320
320
  expect(getByText('Edit')).toBeInTheDocument();