@rancher/shell 2.0.1 → 2.0.2

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 (112) hide show
  1. package/assets/translations/en-us.yaml +73 -34
  2. package/assets/translations/zh-hans.yaml +1 -0
  3. package/components/AssignTo.vue +2 -0
  4. package/components/PromptRemove.vue +8 -3
  5. package/components/Questions/index.vue +2 -2
  6. package/components/ResourceDetail/Masthead.vue +1 -0
  7. package/components/auth/RoleDetailEdit.vue +5 -4
  8. package/components/fleet/FleetClusters.vue +0 -3
  9. package/components/form/Members/ClusterPermissionsEditor.vue +1 -1
  10. package/components/form/ProjectMemberEditor.vue +1 -1
  11. package/components/form/ResourceLabeledSelect.vue +11 -3
  12. package/components/form/labeled-select-utils/labeled-select.utils.ts +1 -1
  13. package/components/formatter/CloudCredExpired.vue +69 -0
  14. package/components/formatter/Date.vue +1 -1
  15. package/components/nav/Header.vue +9 -5
  16. package/components/nav/TopLevelMenu.vue +115 -51
  17. package/components/nav/__tests__/TopLevelMenu.test.ts +53 -27
  18. package/config/labels-annotations.js +2 -0
  19. package/config/pagination-table-headers.js +5 -4
  20. package/config/roles.ts +34 -19
  21. package/config/router/navigation-guards/attempt-first-login.js +1 -1
  22. package/config/router/navigation-guards/authentication.js +1 -1
  23. package/config/router/navigation-guards/i18n.js +1 -1
  24. package/config/router/navigation-guards/index.js +2 -1
  25. package/config/router/navigation-guards/load-initial-settings.js +1 -1
  26. package/config/router/navigation-guards/runtime-extension-route.js +31 -0
  27. package/config/router/routes.js +10 -1
  28. package/config/uiplugins.js +130 -61
  29. package/core/plugin.ts +5 -0
  30. package/core/plugins.js +7 -1
  31. package/detail/catalog.cattle.io.app.vue +17 -4
  32. package/detail/fleet.cattle.io.cluster.vue +11 -9
  33. package/detail/fleet.cattle.io.gitrepo.vue +1 -1
  34. package/edit/provisioning.cattle.io.cluster/__tests__/Basics.test.ts +86 -13
  35. package/edit/provisioning.cattle.io.cluster/__tests__/DirectoryConfig.test.ts +3 -134
  36. package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +209 -0
  37. package/edit/provisioning.cattle.io.cluster/index.vue +8 -4
  38. package/edit/provisioning.cattle.io.cluster/rke2.vue +128 -17
  39. package/edit/provisioning.cattle.io.cluster/tabs/AddOnAdditionalManifest.vue +50 -0
  40. package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +29 -64
  41. package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +42 -3
  42. package/edit/provisioning.cattle.io.cluster/tabs/DirectoryConfig.vue +22 -86
  43. package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +8 -2
  44. package/edit/provisioning.cattle.io.cluster/tabs/registries/__tests__/RegistryConfigs.test.ts +61 -0
  45. package/initialize/entry-helpers.js +4 -21
  46. package/list/provisioning.cattle.io.cluster.vue +56 -5
  47. package/mixins/__tests__/chart.test.ts +4 -1
  48. package/mixins/chart.js +36 -16
  49. package/models/__tests__/apps.deployment.test.ts +93 -0
  50. package/models/apps.deployment.js +18 -4
  51. package/models/catalog.cattle.io.app.js +108 -21
  52. package/models/cloudcredential.js +159 -2
  53. package/models/fleet.cattle.io.gitrepo.js +4 -13
  54. package/models/management.cattle.io.cluster.js +15 -4
  55. package/models/management.cattle.io.user.js +3 -3
  56. package/models/nodedriver.js +5 -0
  57. package/models/provisioning.cattle.io.cluster.js +41 -3
  58. package/package.json +1 -1
  59. package/pages/404.vue +15 -0
  60. package/pages/auth/login.vue +4 -1
  61. package/pages/auth/setup.vue +4 -1
  62. package/pages/c/_cluster/apps/charts/install.vue +2 -1
  63. package/pages/c/_cluster/explorer/__tests__/index.test.ts +1 -1
  64. package/pages/c/_cluster/explorer/index.vue +6 -2
  65. package/pages/c/_cluster/fleet/index.vue +11 -5
  66. package/pages/c/_cluster/manager/cloudCredential/index.vue +68 -4
  67. package/pages/c/_cluster/manager/jwt.authentication/index.vue +10 -4
  68. package/pages/c/_cluster/settings/performance.vue +2 -2
  69. package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +7 -10
  70. package/pages/c/_cluster/uiplugins/index.vue +28 -18
  71. package/pages/home.vue +2 -13
  72. package/plugins/dashboard-store/actions.js +1 -1
  73. package/plugins/dashboard-store/getters.js +1 -1
  74. package/plugins/steve/__tests__/getters.test.ts +5 -5
  75. package/plugins/steve/getters.js +6 -4
  76. package/plugins/steve/hybrid-class.js +1 -5
  77. package/scripts/extension/bundle +1 -1
  78. package/scripts/extension/helm/charts/ui-plugin-server/Chart.yaml +1 -1
  79. package/scripts/publish-shell.sh +56 -59
  80. package/scripts/test-plugins-build.sh +45 -39
  81. package/scripts/typegen.sh +26 -23
  82. package/store/type-map.js +4 -2
  83. package/types/shell/index.d.ts +10 -0
  84. package/types/store/pagination.types.ts +1 -1
  85. package/utils/cluster.js +9 -0
  86. package/utils/settings.ts +3 -1
  87. package/utils/string.js +9 -0
  88. package/utils/v-sphere.ts +251 -0
  89. package/creators/app/app.package.json +0 -14
  90. package/creators/app/files/.eslintignore +0 -16
  91. package/creators/app/files/.eslintrc.js +0 -173
  92. package/creators/app/files/.gitignore +0 -70
  93. package/creators/app/files/.gitlab-ci.yml +0 -14
  94. package/creators/app/files/.vscode/settings.json +0 -21
  95. package/creators/app/files/babel.config.js +0 -1
  96. package/creators/app/files/tsconfig.json +0 -42
  97. package/creators/app/files/vue.config.js +0 -6
  98. package/creators/app/init +0 -120
  99. package/creators/app/package.json +0 -25
  100. package/creators/pkg/files/.github/workflows/build-extension-catalog.yml +0 -24
  101. package/creators/pkg/files/.github/workflows/build-extension-charts.yml +0 -22
  102. package/creators/pkg/files/babel.config.js +0 -1
  103. package/creators/pkg/files/index.ts +0 -14
  104. package/creators/pkg/files/tsconfig.json +0 -53
  105. package/creators/pkg/files/vue.config.js +0 -1
  106. package/creators/pkg/init +0 -286
  107. package/creators/pkg/package.json +0 -19
  108. package/creators/pkg/pkg.package.json +0 -21
  109. package/creators/pkg/vue-shim.ts +0 -4
  110. package/creators/update/init +0 -56
  111. package/creators/update/package.json +0 -20
  112. package/creators/update/upgrade +0 -56
@@ -360,8 +360,8 @@ addClusterMemberDialog:
360
360
  title: Add Cluster Member
361
361
 
362
362
  addonConfigConfirmation:
363
- title: Add-On Config Reset
364
- body: Changing the Kubernetes Version can reset the Add-On Config values. You should check that the values are as expected before continuing.
363
+ title: Add-On Reset
364
+ body: Changing the Kubernetes Version can reset Add-On values. You should check that the values are as expected before continuing.
365
365
 
366
366
  addProjectMemberDialog:
367
367
  title: Add Project Member
@@ -1186,17 +1186,39 @@ cluster:
1186
1186
  banner: "Service Account access with JWT authentication can be configured after cluster creation from <br>
1187
1187
  <code>Cluster Management > Advanced > JWT Authentication</code>"
1188
1188
  addonChart:
1189
- rancher-vsphere-cpi: vSphere CPI Configuration
1190
- rancher-vsphere-csi: vSphere CSI Configuration
1191
- rke2-calico: Calico Configuration
1192
- rke2-calico-crd: Calico Configuration
1193
- rke2-canal: Canal Configuration
1194
- rke2-cilium: Cilium Configuration
1195
- rke2-coredns: CoreDNS Configuration
1196
- rke2-ingress-nginx: NGINX Ingress Configuration
1197
- rke2-kube-proxy: Kube Proxy Configuration
1198
- rke2-metrics-server: Metrics Server Configuration
1199
- rke2-multus: Multus Configuration
1189
+ rancher-vsphere-cpi:
1190
+ label: "Add-on: vSphere CPI"
1191
+ configuration: vSphere CPI
1192
+ rancher-vsphere-csi:
1193
+ label: "Add-on: vSphere CSI"
1194
+ configuration: vSphere CSI
1195
+ rke2-calico:
1196
+ label: "Add-on: Calico"
1197
+ configuration: Calico
1198
+ rke2-calico-crd:
1199
+ label: "Add-on: Calico"
1200
+ configuration: Calico
1201
+ rke2-canal:
1202
+ label: "Add-on: Canal"
1203
+ configuration: Canal
1204
+ rke2-cilium:
1205
+ label: "Add-on: Cilium"
1206
+ configuration: Cilium
1207
+ rke2-coredns:
1208
+ label: "Add-on: CoreDNS"
1209
+ configuration: CoreDNS
1210
+ rke2-ingress-nginx:
1211
+ label: "Add-on: NGINX"
1212
+ configuration: NGINX Ingress
1213
+ rke2-kube-proxy:
1214
+ label: "Add-on: Kube Proxy"
1215
+ configuration: Kube Proxy
1216
+ rke2-metrics-server:
1217
+ label: "Add-on: Metrics Server"
1218
+ configuration: Metrics Server
1219
+ rke2-multus:
1220
+ label: "Add-on: Multus"
1221
+ configuration: Multus
1200
1222
  agentEnvVars:
1201
1223
  label: Agent Environment
1202
1224
  detail: Add additional environment variables to the agent container. This is most commonly useful for configuring a HTTP proxy.
@@ -1212,7 +1234,7 @@ cluster:
1212
1234
  label: Google
1213
1235
  rancher-vsphere:
1214
1236
  label: vSphere
1215
- note: '<b>Important:</b> Configure the vSphere Cloud Provider and Storage Provider options in the Add-On Config tab.'
1237
+ note: '<b>Important:</b> Configure the vSphere Cloud Provider and Storage Provider options in the Add-on tabs.'
1216
1238
  harvester:
1217
1239
  label: Harvester
1218
1240
  copyConfig: Copy KubeConfig to Clipboard
@@ -1358,8 +1380,10 @@ cluster:
1358
1380
  macAddress: Mac Address
1359
1381
  macFormat: 'Invalid MAC address format.'
1360
1382
  vGpus:
1383
+ warnings:
1384
+ minimumAllocatable: It's highly recommended to select a vGPU with a number of allocatable devices greater than the number of nodes (Machine Count) to avoid "un-schedulable" errors after cluster updates.
1361
1385
  errors:
1362
- notAllocatable: '"VGPUs" not allocatable. There are not enough [{vGpus}] devices to be allocated to each node in machine pool [{pool}]'
1386
+ notAllocatable: '[{vGpu}] vGPU device is not allocatable; required: {allocated}, allocatable: {allocatable}'
1363
1387
  volume:
1364
1388
  title: Volumes
1365
1389
  volume: Volume
@@ -1443,10 +1467,6 @@ cluster:
1443
1467
  placeholder: A unique name for the cluster
1444
1468
  directoryConfig:
1445
1469
  title: Data directory configuration
1446
- checkboxText: Use the same path for System-agent, Provisioning and K8s Distro data directories configuration
1447
- common:
1448
- label: Data directory configuration path
1449
- tooltip: Data directory configuration for System-agent, Provisioning and K8s Distro
1450
1470
  systemAgent:
1451
1471
  label: System-agent directory path
1452
1472
  tooltip: Data directory for the system-agent connection info and plans
@@ -1727,7 +1747,7 @@ cluster:
1727
1747
  serverOs:
1728
1748
  label: OS
1729
1749
  addOns:
1730
- dependencyBanner: Add-On Configurations can vary between Kubernetes versions. Changing the Kubernetes version may reset the values below.
1750
+ dependencyBanner: Add-On Configuration can vary between Kubernetes versions. Changing the Kubernetes version may reset the values below.
1731
1751
  additionalManifest:
1732
1752
  title: Additional Manifest
1733
1753
  tooltip: 'Additional Kubernetes Manifest YAML to be applied to the cluster on startup.'
@@ -1782,18 +1802,27 @@ cluster:
1782
1802
  rke2-k3-reprovisioning: 'Making changes to cluster configuration may result in nodes reprovisioning. For more information see the <a href="{docsBase}/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/rke1-vs-rke2-differences#cluster-api" target="_blank" rel="noopener nofollow">documentation</a>.'
1783
1803
  desiredNodeGroupWarning: There are 0 nodes available to run the cluster agent. The cluster will not become active until at least one node is available.
1784
1804
  haveArgInfo: Configuration information is not available for the selected Kubernetes version. The options available on this screen will be limited; you may want to use the YAML editor.
1785
- cloudProviderAddConfig: 'On Kubernetes 1.27 or greater, the Amazon Cloud Provider requires additional configuration. See <a href="https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/amazon" target="_blank" rel="noopener noreferrer nofollow">the documentation</a> for more information.'
1805
+ cloudProviderAddConfig: 'On Kubernetes 1.27 or greater, the <b>Amazon</b> Cloud Provider requires additional configuration. See <a href="https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/amazon" target="_blank" rel="noopener noreferrer nofollow">the documentation</a> for more information.'
1806
+ cloudProviderUnsupportedAzure: 'On Kubernetes 1.30 or greater, the <b>Azure</b> Cloud Provider has been removed. See <a href="https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/azure" target="_blank" rel="noopener noreferrer nofollow">the documentation</a> for more information.'
1807
+ cloudProviderMigrateAzure: 'On Kubernetes 1.30 or greater, the <b>Azure</b> Cloud Provider has been removed. To upgrade Kubernetes, the cluster should be migrated to External provider first.<br> See <a href="https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/azure" target="_blank" rel="noopener noreferrer nofollow">the documentation</a> for more information.'
1786
1808
  machinePoolError: |-
1787
1809
  {count, plural,
1788
1810
  =1 { {pool_name}: The provided value for {fields} was not found in the list of expected values. This can happen with clusters provisioned outside of Rancher or when options for the provider have changed. }
1789
1811
  other { {pool_name}: The provided values for {fields} were not found in the list of expected values. This can happen with clusters provisioned outside of Rancher or when options for the provider have changed. }
1790
1812
  }
1791
1813
  rkeTemplateUpgrade: Template revision {name} available for upgrade
1814
+ cloudCredentials:
1815
+ renew: Renew Cloud Credentials
1816
+ expired: Cloud Credential expired, please Renew Cloud Credentials
1817
+ expiring: Cloud Credential will expire on { expires }, please Renew Cloud Credentials
1818
+ banners:
1819
+ expiring: "{count} {count, plural, =1 { Cluster has a Cloud Credential that expires soon} other { Clusters have Cloud Credentials that expire soon}}, please Renew Cloud {count, plural, =1 { Credential} other { Credentials}}"
1820
+ expired: "{count} {count, plural, =1 { Cluster has a Cloud Credential that has expired} other { Clusters have Cloud Credentials that have expired}}, please Renew Cloud {count, plural, =1 { Credential} other { Credentials}}"
1792
1821
 
1793
1822
  architecture:
1794
1823
  label:
1795
- unknown: Unknown
1796
- mixed: Mixed
1824
+ unknown: unknown
1825
+ mixed: mixed
1797
1826
 
1798
1827
  availabilityWarnings:
1799
1828
  node: Node {name} is inactive
@@ -1920,6 +1949,7 @@ cluster:
1920
1949
  oracleoke: Oracle OKE
1921
1950
  otc: Open Telekom Cloud
1922
1951
  other: Other
1952
+ ovhcloudmks: OVHcloud MKS
1923
1953
  packet: Equinix Metal
1924
1954
  pinganyunecs: Pinganyun ECS
1925
1955
  pnap: phoenixNAP
@@ -2082,7 +2112,7 @@ cluster:
2082
2112
  s3: s3
2083
2113
  tabs:
2084
2114
  ace: Authorized Endpoint
2085
- addons: Add-On Config
2115
+ addOnAdditionalManifest: Additional Manifest
2086
2116
  advanced: Advanced
2087
2117
  agentEnv: Agent Environment Vars
2088
2118
  basic: Basics
@@ -4250,8 +4280,10 @@ inactivity:
4250
4280
 
4251
4281
  # Rancher Extensions
4252
4282
  plugins:
4253
- incompatibleRancherVersion: "The latest version of this extension ({ version }) is not compatible with the current Rancher version ({ rancherVersion })."
4254
- incompatibleKubeVersion: "The latest version of this extension ({ version }) is not compatible with the current Kube version ({ kubeVersion })."
4283
+ incompatibleRancherVersion: "The latest version of this extension ({ version }) is not compatible with the current Rancher version ({ required })."
4284
+ incompatibleKubeVersion: "The latest version of this extension ({ version }) is not compatible with the current Kube version ({ required })."
4285
+ incompatibleUiExtensionsApiVersion: "The latest version of this extension ({ version }) is not compatible with the current Extensions API version ({ required })."
4286
+ incompatibleHost: 'The latest version of this extension ({ version }) has a host of "{ required }" which is not compatible with this application "{ mainHost }".'
4255
4287
  currentInstalledVersionBlockedByKubeVersion: "This version is not compatible with the current Kubernetes version ({ kubeVersion } Vs { kubeVersionToCheck })."
4256
4288
  labels:
4257
4289
  builtin: Built-in
@@ -4289,8 +4321,10 @@ plugins:
4289
4321
  detail: Detail
4290
4322
  versions: Versions
4291
4323
  versionError: Could not load version information
4292
- requiresRancherVersion: "Requires Rancher {version}"
4293
- requiresKubeVersion: "Requires Kube version {version}"
4324
+ requiresRancherVersion: "Requires Rancher {required}"
4325
+ requiresKubeVersion: "Requires Kube version {required}"
4326
+ requiresExtensionApiVersion: "Requires Extensions API version {required}"
4327
+ requiresHost: 'Requires a host that matches "{required}"'
4294
4328
  empty:
4295
4329
  all: Extensions are neither installed nor available
4296
4330
  available: No Extensions available
@@ -5599,7 +5633,6 @@ tableHeaders:
5599
5633
  createdAt: Created At
5600
5634
  customVerbs: Custom Verbs
5601
5635
  description: Description
5602
- expires: Expires
5603
5636
  cpu: CPU
5604
5637
  currentReplicas: Current Replicas
5605
5638
  date: Date
@@ -5616,6 +5649,7 @@ tableHeaders:
5616
5649
  distinguisherMethod: Distinguisher Method
5617
5650
  effect: Effect
5618
5651
  endpoints: Endpoints
5652
+ expires: Expires
5619
5653
  firstSeen: First Seen
5620
5654
  fleetBundleType: Type
5621
5655
  flow: Flow
@@ -7402,7 +7436,7 @@ performance:
7402
7436
  When enabled, resources will appear more quickly, but it may take slightly longer to load the entire set of resources. This setting only applies to resources that come from the Kubernetes API
7403
7437
  checkboxLabel: Enable incremental loading
7404
7438
  inputLabel: Resource Threshold
7405
- incompatibleDescription: "Incremental Loading is incomaptible with Namespace/Project filtering and Server-side Pagination. Enabling this will disable them."
7439
+ incompatibleDescription: "Incremental Loading is incompatible with Namespace/Project filtering and Server-side Pagination. Enabling this will disable them."
7406
7440
  manualRefresh:
7407
7441
  label: Manual Refresh
7408
7442
  setting: You can configure a threshold above which manual refresh will be enabled.
@@ -7411,7 +7445,7 @@ performance:
7411
7445
  When enabled, list data will not auto-update but instead the user must manually trigger a list-view refresh. This setting only applies to resources that come from the Kubernetes API
7412
7446
  checkboxLabel: Enable manual refresh of data for lists
7413
7447
  inputLabel: Resource Threshold
7414
- incompatibleDescription: "Manual Refresh is incomaptible with Namespace/Project filtering and Server-side Pagination. Enabling this will disable them."
7448
+ incompatibleDescription: "Manual Refresh is incompatible with Namespace/Project filtering and Server-side Pagination. Enabling this will disable them."
7415
7449
  websocketNotification:
7416
7450
  label: Websocket Notifications
7417
7451
  description: |-
@@ -7442,7 +7476,7 @@ performance:
7442
7476
  label: Require Namespace / Project Filtering
7443
7477
  description: Require the user to select namespaces and/or projects. This restricts the number of resources fetched when viewing lists and should help the responsiveness of the UI in systems with a lot of resources.
7444
7478
  checkboxLabel: Enable Required Namespace / Project Filtering
7445
- incompatibleDescription: "Required Namespace / Project Filtering is incomaptible with Manual Refresh and Incremental Loading. Enabling this will disable them."
7479
+ incompatibleDescription: "Required Namespace / Project Filtering is incompatible with Manual Refresh and Incremental Loading. Enabling this will disable them."
7446
7480
  advancedWorker:
7447
7481
  label: Websocket Web Worker
7448
7482
  description: Updates to resources pushed to the UI come via WebSocket and are handled in the UI thread. Enable this option to handle cluster WebSocket updates in a Web Worker in a separate thread. This should help the responsiveness of the UI in systems where resources change often.
@@ -7459,7 +7493,7 @@ performance:
7459
7493
  description: By default Lists will fetch all resources and paginate in the browser (create the page given sorting and filtering settings). Change this setting to enable pagination server-side. This should help the responsiveness of the UI in systems with a lot of resources.
7460
7494
  checkboxLabel: Enable Server-side Pagination
7461
7495
  applicable: "This applies to the following resource types"
7462
- incompatibleDescription: "Server-side Pagination is incomaptible with Manual Refresh and Incremental Loading. Enabling this will disable them."
7496
+ incompatibleDescription: "Server-side Pagination is incompatible with Manual Refresh and Incremental Loading. Enabling this will disable them."
7463
7497
  featureFlag: The&nbsp;<a href="{ffUrl}">Feature Flag</a>&nbsp;`ui-sql-cache` must be enabled to use this feature
7464
7498
  resources:
7465
7499
  generic: most resources in the cluster's 'More Resources' section
@@ -7694,6 +7728,11 @@ volumeClaimTemplate:
7694
7728
  manager:
7695
7729
  cloudCredentials:
7696
7730
  label: Cloud Credentials
7731
+ renew: Renew
7732
+ expired: Expired
7733
+ banners:
7734
+ expiring: "{count} Cloud {count, plural, =1 { Credential expires soon} other { Credentials expire soon}}, please Renew"
7735
+ expired: "{count} Cloud {count, plural, =1 { Credential has expired} other { Credentials have expired}}, please Renew"
7697
7736
  drivers:
7698
7737
  label: Drivers
7699
7738
  rkeTemplates:
@@ -7789,4 +7828,4 @@ gitPicker:
7789
7828
 
7790
7829
  networkAttachmentDefinition:
7791
7830
  tabs:
7792
- config: Config
7831
+ config: Config
@@ -1796,6 +1796,7 @@ cluster:
1796
1796
  oracleoke: Oracle OKE
1797
1797
  otc: Open Telekom Cloud
1798
1798
  other: 其他
1799
+ ovhcloudmks: OVHcloud MKS
1799
1800
  packet: Equinix Metal
1800
1801
  pinganyunecs: 平安云 ECS
1801
1802
  pnap: phoenixNAP
@@ -4,6 +4,7 @@ import { FLEET, NORMAN } from '@shell/config/types';
4
4
  import LabeledSelect from '@shell/components/form/LabeledSelect';
5
5
  import KeyValue from '@shell/components/form/KeyValue';
6
6
  import AsyncButton from '@shell/components/AsyncButton';
7
+ import AppModal from '@shell/components/AppModal.vue';
7
8
  import { Card } from '@components/Card';
8
9
  import { Banner } from '@components/Banner';
9
10
  import { exceptionToErrorsArray } from '@shell/utils/error';
@@ -16,6 +17,7 @@ export default {
16
17
  KeyValue,
17
18
  AsyncButton,
18
19
  Banner,
20
+ AppModal
19
21
  },
20
22
 
21
23
  data() {
@@ -105,8 +105,8 @@ export default {
105
105
  return null;
106
106
  }
107
107
 
108
- if (this.toRemove[0].doneLocationRemove) {
109
- return this.toRemove[0].doneLocationRemove;
108
+ if (this.toRemove[0].doneOverride) {
109
+ return this.toRemove[0].doneOverride;
110
110
  }
111
111
 
112
112
  const currentRoute = this.toRemove[0].currentRoute();
@@ -300,7 +300,12 @@ export default {
300
300
  },
301
301
  done() {
302
302
  if ( this.cachedDoneLocation && !isEmpty(this.cachedDoneLocation) ) {
303
- this.currentRouter.push(this.cachedDoneLocation);
303
+ // Only push if the route will change otherwise we'll get a `NavigationDuplicated` exception
304
+ const resolvedRoute = this.currentRouter.resolve(this.cachedDoneLocation);
305
+
306
+ if (resolvedRoute.resolved.fullPath !== this.$route.fullPath) {
307
+ this.currentRouter.push(this.cachedDoneLocation);
308
+ }
304
309
  }
305
310
  this.close();
306
311
  },
@@ -45,9 +45,9 @@ export function componentForQuestion(q) {
45
45
 
46
46
  if ( knownTypes[type] ) {
47
47
  return type;
48
- } else if ( type.startsWith('array[') ) { // This only really works for array[string|multiline], but close enough for now.
48
+ } else if ( type.startsWith('array') ) { // This only really works for array[string|multiline], but close enough for now.
49
49
  return ArrayType;
50
- } else if ( type.startsWith('map[') ) { // Same, only works with map[string|multiline]
50
+ } else if ( type.startsWith('map') ) { // Same, only works with map[string|multiline]
51
51
  return MapType;
52
52
  } else if ( type.startsWith('reference[') ) { // Same, only works with map[string|multiline]
53
53
  return ReferenceType;
@@ -516,6 +516,7 @@ export default {
516
516
  <button
517
517
  v-if="isView"
518
518
  ref="actions"
519
+ data-testid="mathead-action-menu"
519
520
  aria-haspopup="true"
520
521
  type="button"
521
522
  class="btn role-multi-action actions"
@@ -14,7 +14,7 @@ import Tabbed from '@shell/components/Tabbed';
14
14
  import { ucFirst } from '@shell/utils/string';
15
15
  import SortableTable from '@shell/components/SortableTable';
16
16
  import { _CLONE, _DETAIL } from '@shell/config/query-params';
17
- import { SCOPED_RESOURCES } from '@shell/config/roles';
17
+ import { SCOPED_RESOURCES, SCOPED_RESOURCE_GROUPS } from '@shell/config/roles';
18
18
  import { Banner } from '@components/Banner';
19
19
 
20
20
  import { SUBTYPE_MAPPING, VERBS } from '@shell/models/management.cattle.io.roletemplate';
@@ -195,16 +195,17 @@ export default {
195
195
  const scopes = Object.keys(this.scopedResources);
196
196
 
197
197
  scopes.forEach((scope) => {
198
- if (scope === 'globalScopedApiGroups' && this.value.type !== MANAGEMENT.GLOBAL_ROLE) {
198
+ if (scope === SCOPED_RESOURCE_GROUPS.GLOBAL && this.value.type !== MANAGEMENT.GLOBAL_ROLE) {
199
199
  // If we are not in the global role creation form,
200
200
  // skip adding the global-scoped resources.
201
201
  return;
202
202
  }
203
- if (scope === 'clusterScopedApiGroups' && (this.value.type === RBAC.ROLE || this.value.subtype === NAMESPACE)) {
203
+ if (scope === SCOPED_RESOURCE_GROUPS.CLUSTER && (this.value.type === RBAC.ROLE || this.value.subtype === NAMESPACE)) {
204
204
  // If we are in a project/namespace role creation form,
205
205
  // additionally skip adding the cluster-scoped resources.
206
206
  return;
207
207
  }
208
+
208
209
  const apiGroupsInScope = this.scopedResources[scope];
209
210
 
210
211
  const apiGroupNames = Object.keys(apiGroupsInScope);
@@ -237,7 +238,7 @@ export default {
237
238
  const labelForNamespaceScoped = this.t('rbac.roletemplate.tabs.grantResources.neuvector.labelNamespaceScoped');
238
239
 
239
240
  apiGroupLabel = scope.includes('cluster') ? labelForClusterScoped : labelForNamespaceScoped;
240
- apiGroupValue = 'api.neuvector.com';
241
+ apiGroupValue = 'permission.neuvector.com';
241
242
  }
242
243
 
243
244
  options.push({
@@ -42,7 +42,6 @@ export default {
42
42
  value: 'status.display.readyBundles',
43
43
  sort: 'status.summary.ready',
44
44
  search: false,
45
- align: 'center',
46
45
  },
47
46
  {
48
47
  name: 'reposReady',
@@ -50,7 +49,6 @@ export default {
50
49
  value: 'status.readyGitRepos',
51
50
  sort: 'status.summary.ready',
52
51
  search: false,
53
- align: 'center',
54
52
  },
55
53
  FLEET_SUMMARY,
56
54
  {
@@ -62,7 +60,6 @@ export default {
62
60
  formatter: 'LiveDate',
63
61
  formatterOpts: { addSuffix: true },
64
62
  width: 120,
65
- align: 'right'
66
63
  },
67
64
  AGE,
68
65
  ];
@@ -177,7 +177,7 @@ export default {
177
177
  },
178
178
  customPermissionsUpdate() {
179
179
  return this.customPermissions.reduce((acc, customPermissionsItem) => {
180
- const lockedExist = this.roleTemplates.find((roleTemplateItem) => roleTemplateItem.displayName === customPermissionsItem.label);
180
+ const lockedExist = this.roleTemplates.find((roleTemplateItem) => roleTemplateItem.id === customPermissionsItem.key);
181
181
 
182
182
  if (lockedExist.locked) {
183
183
  customPermissionsItem['locked'] = true;
@@ -192,7 +192,7 @@ export default {
192
192
  },
193
193
  customPermissionsUpdate() {
194
194
  return this.customPermissions.reduce((acc, customPermissionsItem) => {
195
- const lockedExist = this.roleTemplates.find((roleTemplateItem) => roleTemplateItem.displayName === customPermissionsItem.label);
195
+ const lockedExist = this.roleTemplates.find((roleTemplateItem) => roleTemplateItem.id === customPermissionsItem.key);
196
196
 
197
197
  if (lockedExist.locked) {
198
198
  customPermissionsItem['locked'] = true;
@@ -126,11 +126,17 @@ export default defineComponent({
126
126
 
127
127
  computed: {
128
128
  labelSelectAttributes() {
129
+ // This component is a wrapper for LabelSelect, so pass through everything
130
+ const allAttrs = {
131
+ ...this.$attrs, // Attributes (other than props)
132
+ ...this.$props, // Attributes that are props
133
+ };
134
+
129
135
  return this.paginate ? {
130
- ...this.$attrs,
136
+ ...allAttrs,
131
137
  ...this.paginatedResourceSettings?.labelSelectOptions || {}
132
138
  } : {
133
- ...this.$attrs,
139
+ ...allAttrs,
134
140
  ...this.allResourcesSettings?.labelSelectOptions || {}
135
141
  };
136
142
  },
@@ -156,7 +162,9 @@ export default defineComponent({
156
162
  }
157
163
 
158
164
  const { filter } = opts;
159
- const filters = !!filter ? [PaginationParamFilter.createSingleField({ field: 'metadata.name', value: filter })] : [];
165
+ const filters = !!filter ? [PaginationParamFilter.createSingleField({
166
+ field: 'metadata.name', value: filter, exact: false
167
+ })] : [];
160
168
  const defaultOptions: LabelSelectPaginationFunctionOptions = {
161
169
  opts,
162
170
  filters,
@@ -109,7 +109,7 @@ export async function labelSelectPaginationFunction<T>({
109
109
 
110
110
  return {
111
111
  page: resPage,
112
- pages: res.pages,
112
+ pages: res.pages || Math.ceil(res.count / (pageSize || Number.MAX_SAFE_INTEGER)),
113
113
  total: res.count
114
114
  };
115
115
  } catch (err) {
@@ -0,0 +1,69 @@
1
+ <script>
2
+
3
+ export default {
4
+ props: {
5
+ value: {
6
+ type: [Number, String],
7
+ required: true
8
+ },
9
+
10
+ row: {
11
+ type: Object,
12
+ default: () => {
13
+ return {};
14
+ }
15
+ },
16
+
17
+ verbose: {
18
+ type: Boolean,
19
+ default: false,
20
+ }
21
+
22
+ },
23
+
24
+ computed: {
25
+ outputString() {
26
+ return this.verbose ? this.verboseOutputString : this.row.expiresString;
27
+ },
28
+
29
+ verboseOutputString() {
30
+ const expireData = this.row?.expireData;
31
+
32
+ if (expireData?.expired) {
33
+ return this.t('cluster.cloudCredentials.expired');
34
+ } else if (expireData?.expiring) {
35
+ return this.t('cluster.cloudCredentials.expiring', { expires: this.row.expiresString });
36
+ }
37
+
38
+ return null;
39
+ }
40
+ }
41
+ };
42
+ </script>
43
+
44
+ <template>
45
+ <div
46
+ v-if="outputString"
47
+ class="cloud-cred-expired"
48
+ :class="{ 'text-error': row.expireData.expired, 'text-warning': row.expireData.expiring}"
49
+ >
50
+ <div class="token-icon mr-5">
51
+ <i
52
+ class="icon"
53
+ :class="{'icon-error': row.expireData.expired, 'icon-warning': row.expireData.expiring}"
54
+ />
55
+ </div>
56
+ {{ outputString }}
57
+ </div>
58
+ </template>
59
+
60
+ <style lang="scss" scoped>
61
+ .cloud-cred-expired {
62
+ display: flex;
63
+ align-items: center;
64
+ .token-icon {
65
+ display: flex;
66
+ align-items: center;
67
+ }
68
+ }
69
+ </style>
@@ -11,7 +11,7 @@ export default {
11
11
  },
12
12
 
13
13
  value: {
14
- type: [String, Date],
14
+ type: [String, Date, Number],
15
15
  default: ''
16
16
  },
17
17
 
@@ -188,12 +188,16 @@ export default {
188
188
  }
189
189
  },
190
190
  // since the Header is a "persistent component" we need to update it at every route change...
191
- $route(nue) {
192
- if (nue) {
193
- this.extensionHeaderActions = getApplicableExtensionEnhancements(this, ExtensionPoint.ACTION, ActionLocation.HEADER, nue);
191
+ $route: {
192
+ handler(nue) {
193
+ if (nue) {
194
+ this.extensionHeaderActions = getApplicableExtensionEnhancements(this, ExtensionPoint.ACTION, ActionLocation.HEADER, nue);
194
195
 
195
- this.navHeaderRight = this.$plugin?.getDynamic('component', 'NavHeaderRight');
196
- }
196
+ this.navHeaderRight = this.$plugin?.getDynamic('component', 'NavHeaderRight');
197
+ }
198
+ },
199
+ immediate: true,
200
+ deep: true,
197
201
  }
198
202
  },
199
203