@rancher/shell 3.0.9-rc.5 → 3.0.9-rc.6

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 (142) hide show
  1. package/assets/images/providers/oci-open-containers.svg +22 -0
  2. package/assets/images/providers/traefik.png +0 -0
  3. package/assets/styles/themes/_dark.scss +2 -0
  4. package/assets/styles/themes/_light.scss +2 -0
  5. package/assets/styles/themes/_modern.scss +6 -0
  6. package/assets/translations/en-us.yaml +129 -25
  7. package/components/CruResource.vue +3 -1
  8. package/components/ExplorerProjectsNamespaces.vue +12 -12
  9. package/components/Resource/Detail/Card/StatusCard/__tests__/StatusCard.test.ts +109 -0
  10. package/components/Resource/Detail/Card/StatusCard/index.vue +21 -4
  11. package/components/Resource/Detail/Metadata/IdentifyingInformation/__tests__/identifying-fields.test.ts +19 -2
  12. package/components/Resource/Detail/Metadata/IdentifyingInformation/identifying-fields.ts +19 -11
  13. package/components/Resource/Detail/ResourcePopover/__tests__/index.test.ts +12 -0
  14. package/components/Resource/Detail/ResourcePopover/index.vue +2 -0
  15. package/components/Resource/Detail/ResourceRow.vue +2 -2
  16. package/components/ResourceList/index.vue +7 -4
  17. package/components/Window/ContainerLogs.vue +48 -37
  18. package/components/fleet/FleetClusterTargets/TargetsList.vue +2 -2
  19. package/components/fleet/FleetClusterTargets/index.vue +6 -1
  20. package/components/fleet/GitRepoAdvancedTab.vue +333 -0
  21. package/components/fleet/GitRepoMetadataTab.vue +43 -0
  22. package/components/fleet/GitRepoRepositoryTab.vue +101 -0
  23. package/components/fleet/GitRepoTargetTab.vue +77 -0
  24. package/components/fleet/HelmOpAdvancedTab.vue +247 -0
  25. package/components/fleet/HelmOpChartTab.vue +158 -0
  26. package/components/fleet/HelmOpMetadataTab.vue +46 -0
  27. package/components/fleet/HelmOpTargetTab.vue +84 -0
  28. package/components/fleet/HelmOpValuesTab.vue +147 -0
  29. package/components/fleet/__tests__/FleetClusterTargets.test.ts +119 -70
  30. package/components/form/NodeScheduling.vue +81 -7
  31. package/components/form/PodAffinity.vue +1 -36
  32. package/components/form/ResourceLabeledSelect.vue +8 -4
  33. package/components/form/ResourceQuota/Namespace.vue +30 -9
  34. package/components/form/ResourceQuota/NamespaceRow.vue +25 -7
  35. package/components/form/ResourceQuota/Project.vue +140 -82
  36. package/components/form/ResourceQuota/ResourceQuotaEntry.vue +145 -0
  37. package/components/form/ResourceQuota/__tests__/Namespace.test.ts +307 -0
  38. package/components/form/ResourceQuota/__tests__/NamespaceRow.test.ts +281 -0
  39. package/components/form/ResourceQuota/__tests__/Project.test.ts +274 -27
  40. package/components/form/ResourceQuota/__tests__/ResourceQuotaEntry.test.ts +215 -0
  41. package/components/form/SchedulingCustomization.vue +14 -6
  42. package/components/form/SelectOrCreateAuthSecret.vue +107 -18
  43. package/components/form/__tests__/NodeScheduling.test.ts +12 -9
  44. package/components/form/__tests__/PodAffinity.test.ts +21 -2
  45. package/components/form/__tests__/SchedulingCustomization.test.ts +240 -0
  46. package/components/formatter/ClusterLink.vue +8 -0
  47. package/components/formatter/SecretOrigin.vue +79 -0
  48. package/config/labels-annotations.js +7 -6
  49. package/config/pagination-table-headers.js +6 -4
  50. package/config/product/explorer.js +1 -11
  51. package/config/query-params.js +3 -0
  52. package/config/settings.ts +15 -2
  53. package/config/table-headers.js +21 -17
  54. package/config/types.js +23 -8
  55. package/detail/workload/index.vue +11 -16
  56. package/dialog/DeactivateDriverDialog.vue +1 -1
  57. package/dialog/Ipv6NetworkingDialog.vue +156 -0
  58. package/dialog/ScalePoolDownDialog.vue +2 -2
  59. package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +1 -1
  60. package/edit/__tests__/fleet.cattle.io.helmop.test.ts +1 -0
  61. package/edit/__tests__/management.cattle.io.project.test.js +56 -128
  62. package/edit/auth/oidc.vue +1 -1
  63. package/edit/catalog.cattle.io.clusterrepo.vue +155 -25
  64. package/edit/fleet.cattle.io.gitrepo.vue +153 -283
  65. package/edit/fleet.cattle.io.helmop.vue +190 -332
  66. package/edit/management.cattle.io.project.vue +5 -42
  67. package/edit/management.cattle.io.setting.vue +6 -0
  68. package/edit/provisioning.cattle.io.cluster/__tests__/Basics.test.ts +55 -24
  69. package/edit/provisioning.cattle.io.cluster/__tests__/Networking.test.ts +1 -103
  70. package/edit/provisioning.cattle.io.cluster/__tests__/index.test.ts +13 -1
  71. package/edit/provisioning.cattle.io.cluster/__tests__/rke2-fleet-cluster-agent.test.ts +283 -0
  72. package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +65 -49
  73. package/edit/provisioning.cattle.io.cluster/ingress/IngressCards.vue +112 -0
  74. package/edit/provisioning.cattle.io.cluster/ingress/IngressConfiguration.vue +158 -0
  75. package/edit/provisioning.cattle.io.cluster/rke2.vue +171 -72
  76. package/edit/provisioning.cattle.io.cluster/shared.ts +36 -1
  77. package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +2 -1
  78. package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +55 -7
  79. package/edit/provisioning.cattle.io.cluster/tabs/Ingress.vue +319 -0
  80. package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +2 -1
  81. package/edit/provisioning.cattle.io.cluster/tabs/etcd/__tests__/S3Config.test.ts +13 -1
  82. package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +10 -44
  83. package/edit/secret/index.vue +1 -1
  84. package/edit/token.vue +68 -29
  85. package/edit/workload/__tests__/index.test.ts +2 -37
  86. package/edit/workload/index.vue +6 -2
  87. package/edit/workload/mixins/workload.js +0 -32
  88. package/list/__tests__/management.cattle.io.setting.test.ts +198 -0
  89. package/list/management.cattle.io.setting.vue +13 -0
  90. package/list/provisioning.cattle.io.cluster.vue +50 -1
  91. package/list/secret.vue +4 -9
  92. package/list/service.vue +6 -8
  93. package/machine-config/amazonec2.vue +11 -4
  94. package/machine-config/components/EC2Networking.vue +46 -30
  95. package/machine-config/components/__tests__/EC2Networking.test.ts +7 -7
  96. package/machine-config/components/__tests__/utils/vpcSubnetMockData.js +0 -9
  97. package/machine-config/digitalocean.vue +3 -3
  98. package/models/__tests__/namespace.test.ts +11 -0
  99. package/models/__tests__/provisioning.cattle.io.cluster.test.ts +96 -0
  100. package/models/__tests__/workload.test.ts +42 -1
  101. package/models/catalog.cattle.io.clusterrepo.js +30 -4
  102. package/models/ext.cattle.io.token.js +48 -0
  103. package/models/kontainerdriver.js +2 -2
  104. package/models/namespace.js +7 -1
  105. package/models/nodedriver.js +2 -2
  106. package/models/provisioning.cattle.io.cluster.js +28 -7
  107. package/models/secret.js +0 -17
  108. package/models/service.js +44 -1
  109. package/models/token.js +4 -0
  110. package/models/workload.js +12 -6
  111. package/package.json +1 -1
  112. package/pages/account/index.vue +96 -67
  113. package/pages/auth/setup.vue +5 -14
  114. package/pages/c/_cluster/apps/charts/__tests__/install.test.ts +4 -1
  115. package/pages/c/_cluster/apps/charts/index.vue +93 -4
  116. package/pages/c/_cluster/apps/charts/install.vue +317 -42
  117. package/pages/c/_cluster/manager/drivers/kontainerDriver/index.vue +5 -4
  118. package/pages/c/_cluster/settings/index.vue +3 -1
  119. package/plugins/dashboard-store/__tests__/getters.test.ts +108 -0
  120. package/plugins/dashboard-store/__tests__/resource-class.test.ts +27 -0
  121. package/plugins/dashboard-store/actions.js +3 -8
  122. package/plugins/dashboard-store/getters.js +7 -5
  123. package/plugins/dashboard-store/mutations.js +4 -1
  124. package/plugins/dashboard-store/resource-class.js +3 -3
  125. package/plugins/steve/__tests__/steve-class.test.ts +102 -141
  126. package/plugins/steve/steve-class.js +12 -3
  127. package/plugins/steve/steve-pagination-utils.ts +6 -2
  128. package/rancher-components/RcIcon/types.ts +2 -0
  129. package/rancher-components/RcItemCard/RcItemCard.vue +64 -19
  130. package/store/prefs.js +3 -0
  131. package/types/aws-sdk.d.ts +121 -0
  132. package/types/resources/node.ts +15 -0
  133. package/types/shell/index.d.ts +536 -506
  134. package/types/store/pagination.types.ts +5 -5
  135. package/utils/__tests__/array.test.ts +1 -29
  136. package/utils/__tests__/cluster-agent-configuration.test.ts +203 -0
  137. package/utils/array.ts +0 -11
  138. package/utils/aws.ts +21 -0
  139. package/utils/cluster.js +22 -2
  140. package/utils/selector-typed.ts +1 -1
  141. package/components/__tests__/ProjectRow.test.ts +0 -206
  142. package/components/form/ResourceQuota/ProjectRow.vue +0 -277
@@ -6,6 +6,8 @@ import LazyImage from '@shell/components/LazyImage.vue';
6
6
  import { DropdownOption } from '@components/RcDropdown/types';
7
7
  import ActionMenu from '@shell/components/ActionMenuShell.vue';
8
8
  import RcItemCardAction from './RcItemCardAction';
9
+ import RcIcon from '@components/RcIcon/RcIcon.vue';
10
+ import { RcIconType } from '@components/RcIcon/types';
9
11
 
10
12
  const store = useStore();
11
13
  const { t } = useI18n(store);
@@ -25,11 +27,11 @@ type Label = {
25
27
 
26
28
  /**
27
29
  * Represents an image used in the card.
30
+ * Can be either a traditional image (src) or an icon (icon).
28
31
  */
29
- type Image = {
30
- src: string;
31
- alt?: Label;
32
- };
32
+ type Image =
33
+ | { src?: never, icon: RcIconType; alt: Label; }
34
+ | { src: string; icon?: never, alt: Label; };
33
35
 
34
36
  /**
35
37
  * Optional pill badge, typically used to highlight a tag or state.
@@ -113,6 +115,12 @@ interface RcItemCardProps {
113
115
  /** Makes the card clickable and emits 'card-click' on click/enter/space */
114
116
  clickable?: boolean;
115
117
 
118
+ /** The card will have same style as hover clickable with the blue border when selected */
119
+ selected?: boolean;
120
+
121
+ /** Disables the card, preventing clicks and keyboard interaction */
122
+ disabled?: boolean;
123
+
116
124
  role?: 'link' | 'button' | undefined;
117
125
  }
118
126
 
@@ -131,6 +139,10 @@ const emit = defineEmits<{(e: 'card-click', value?: ItemValue): void; (e: 'actio
131
139
  * which then gets used to ignore 'card-click'
132
140
  */
133
141
  function _handleCardClick(e: MouseEvent | KeyboardEvent) {
142
+ if (props.disabled) {
143
+ return;
144
+ }
145
+
134
146
  const interactiveSelector = '[item-card-action]';
135
147
 
136
148
  // Prevent card click if the user clicks on an inner actionable element like repo, category, or tag
@@ -162,8 +174,8 @@ const statusTooltips = computed(() => props.header.statuses?.map((status) => lab
162
174
 
163
175
  const cardMeta = computed(() => ({
164
176
  ariaLabel: props.clickable ? t('itemCard.ariaLabel.clickable', { cardTitle: labelText(props.header.title) }) : undefined,
165
- tabIndex: props.clickable ? '0' : undefined,
166
- role: props.role ?? (props.clickable ? 'button' : undefined),
177
+ tabIndex: props.clickable && !props.disabled ? '0' : undefined,
178
+ role: props.role ?? (props.clickable && !props.disabled ? 'button' : undefined),
167
179
  actionMenuLabel: props.actions && t('itemCard.actionMenu.label', { cardTitle: labelText(props.header.title) }),
168
180
  }));
169
181
 
@@ -177,7 +189,7 @@ const cursorValue = computed(() => props.clickable ? 'pointer' : 'auto');
177
189
  :data-testid="`item-card-${id}`"
178
190
  :class="{
179
191
  'clickable':
180
- clickable
192
+ clickable && !disabled,'selected': selected, 'disabled': disabled
181
193
  }"
182
194
  @click="_handleCardClick"
183
195
  >
@@ -190,11 +202,19 @@ const cursorValue = computed(() => props.clickable ? 'pointer' : 'auto');
190
202
  :class="['item-card-image', variant]"
191
203
  data-testid="item-card-image"
192
204
  >
193
- <LazyImage
194
- :src="image.src"
195
- :alt="imageAlt"
196
- :style="{'width': '40px', 'height': '40px', 'object-fit': 'contain'}"
197
- />
205
+ <template v-if="image.icon">
206
+ <RcIcon
207
+ :type="image.icon"
208
+ size="xxlarge"
209
+ />
210
+ </template>
211
+ <template v-else-if="image.src">
212
+ <LazyImage
213
+ :src="image.src"
214
+ :alt="imageAlt"
215
+ :style="{'width': '40px', 'height': '40px', 'object-fit': 'contain'}"
216
+ />
217
+ </template>
198
218
  </div>
199
219
  </slot>
200
220
  <slot name="item-card-pill">
@@ -229,11 +249,19 @@ const cursorValue = computed(() => props.clickable ? 'pointer' : 'auto');
229
249
  :class="['item-card-image', variant]"
230
250
  data-testid="item-card-image"
231
251
  >
232
- <LazyImage
233
- :src="image.src"
234
- :alt="imageAlt"
235
- :style="{'width': '24px', 'height': '24px', 'object-fit': 'contain'}"
236
- />
252
+ <template v-if="image.icon">
253
+ <RcIcon
254
+ :type="image.icon"
255
+ size="xlarge"
256
+ />
257
+ </template>
258
+ <template v-else-if="image.src">
259
+ <LazyImage
260
+ :src="image.src"
261
+ :alt="imageAlt"
262
+ :style="{'width': '32px', 'height': '32px', 'object-fit': 'contain'}"
263
+ />
264
+ </template>
237
265
  </div>
238
266
  </slot>
239
267
  </template>
@@ -324,10 +352,26 @@ $image-medium-box-width: 48px;
324
352
  background: var(--body-bg);
325
353
  cursor: v-bind(cursorValue);
326
354
 
327
- &.clickable:hover {
355
+ &.clickable:hover,
356
+ &.selected {
328
357
  border-color: var(--primary);
329
358
  }
330
359
 
360
+ &.disabled {
361
+ cursor: not-allowed;
362
+ background-color: var(--disabled-bg);
363
+ color: var(--disabled-text);
364
+
365
+ .item-card-image {
366
+ background-color: var(--disabled-bg);
367
+ }
368
+
369
+ .item-card-header-title,
370
+ .item-card-content {
371
+ color: var(--disabled-text);
372
+ }
373
+ }
374
+
331
375
  &:has(.item-card-header-left:focus-visible) {
332
376
  border-color: var(--primary);
333
377
  @include focus-outline;
@@ -344,8 +388,9 @@ $image-medium-box-width: 48px;
344
388
  display: flex;
345
389
  align-items: center;
346
390
  justify-content: center;
347
- background: #fff;
391
+ background: var(--rc-image-bg);
348
392
  border-radius: var(--border-radius);
393
+ color: var(--rc-image-color);
349
394
 
350
395
  &.small {
351
396
  width: 32px;
package/store/prefs.js CHANGED
@@ -122,6 +122,9 @@ export const READ_SUPPORT_NOTICE = create('read-support-notice', '', { parseJSON
122
122
  export const READ_UPCOMING_SUPPORT_NOTICE = create('read-upcoming-support-notice', '', { parseJSON });
123
123
  export const READ_ANNOUNCEMENTS = create('read-announcements', '', { parseJSON });
124
124
 
125
+ // Hidden banners
126
+ export const HIDE_SUSE_APP_COLLECTION_REPO_BANNER = create('hide-suse-app-collection-repo-banner', false);
127
+
125
128
  // --------------------
126
129
 
127
130
  const cookiePrefix = 'R_';
@@ -0,0 +1,121 @@
1
+ // data from aws-sdk/client-ec2
2
+ // aws-sdk/client-iam
3
+ // aws-sdk/client-eks
4
+
5
+ export interface InstanceType {
6
+ apiName: string,
7
+ label: string,
8
+ groupLabel: string,
9
+ supportedUsageClasses: string[]
10
+ supportedArchitectures: string[]
11
+ }
12
+
13
+ export interface InstanceTypeOption {
14
+ label: string,
15
+ value?: string,
16
+ group?: string,
17
+ kind?: string
18
+ }
19
+
20
+ // iam describeRoles
21
+ export interface IamRole {
22
+ AssumeRolePolicyDocument: string,
23
+ RoleId: string,
24
+ RoleName: string,
25
+ Arn: string
26
+ }
27
+
28
+ // list of all launch templates from eks describeLaunchTemplates
29
+ export interface LaunchTemplate {
30
+ LaunchTemplateId?: string,
31
+ Versions?: string[],
32
+ LaunchTemplateName: string,
33
+ LatestVersionNumber?: string,
34
+ DefaultVersionNumber?: string,
35
+ }
36
+
37
+ export interface TagSpecification {
38
+ Tags?: {
39
+ Key: string,
40
+ Value: string
41
+ }[],
42
+ ResourceType?: string
43
+ }
44
+
45
+ export interface BlockDeviceMapping {
46
+ Ebs: {
47
+ VolumeSize: string
48
+ }
49
+ }
50
+
51
+ export interface LaunchTemplateVersionData {
52
+ BlockDeviceMappings: BlockDeviceMapping[],
53
+ ImageId:string,
54
+ InstanceType:string,
55
+ TagSpecifications: TagSpecification[],
56
+ UserData: string
57
+ }
58
+ export interface LaunchTemplateVersion {
59
+ VersionNumber: number,
60
+ LaunchTemplateName: string,
61
+ LaunchTemplateData: LaunchTemplateVersionData,
62
+ LaunchTemplateId: string,
63
+ DefaultVersion: boolean
64
+ }
65
+
66
+ // information about a specific launch template returned from eks describeLaunchTemplateVersions
67
+ export interface LaunchTemplateDetail {
68
+ LaunchTemplateVersions: LaunchTemplateVersion[]
69
+ }
70
+
71
+ // ec2 describeVpcs
72
+ export interface VPC {
73
+ VpcId: string,
74
+ Tags?: {
75
+ Key: string,
76
+ Value: string
77
+ }[],
78
+ CidrBlock?: string,
79
+ Ipv6CidrBlockAssociationSet?: {
80
+ Ipv6CidrBlock: string
81
+ }[]
82
+ }
83
+
84
+ // ec2 describeSubnets
85
+ export interface Subnet {
86
+ VpcId: string,
87
+ SubnetId: string,
88
+ Tags?: {
89
+ Key: string,
90
+ Value: string
91
+ }[],
92
+ CidrBlock?: string,
93
+ Ipv6CidrBlockAssociationSet?: {
94
+ Ipv6CidrBlock: string
95
+ }[]
96
+ }
97
+
98
+ // kms listKeys
99
+ export interface KmsKey {
100
+ KeyArn: string
101
+ }
102
+
103
+ // eks describeAddonVersions
104
+ export interface EKSAddon {
105
+ addonVersions: {
106
+ compatibilities: {
107
+ clusterVersion: string
108
+ }[]
109
+ }[]
110
+ }
111
+
112
+ export interface EC2Region {
113
+ RegionName: string
114
+ }
115
+
116
+ // ec2 describeSecurityGroups
117
+ export interface SecurityGroup {
118
+ GroupId: string,
119
+ GroupName: string,
120
+ VpcId: string
121
+ }
@@ -0,0 +1,15 @@
1
+ import { KubeMetadata } from '@shell/types/kube/kube-api';
2
+
3
+ export interface KubeNodeTaint {
4
+ key: string,
5
+ effect: string,
6
+ }
7
+
8
+ export interface KubeNode {
9
+ metadata: KubeMetadata,
10
+ spec: {
11
+ taints: KubeNodeTaint[],
12
+ [key: string]: any,
13
+ }
14
+ [key: string]: any,
15
+ }