@rancher/shell 0.3.16 → 0.3.18

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 (174) hide show
  1. package/assets/images/wechat-qr-code.jpg +0 -0
  2. package/assets/translations/en-us.yaml +75 -16
  3. package/assets/translations/zh-hans.yaml +151 -15
  4. package/chart/__tests__/S3.test.ts +50 -0
  5. package/chart/rancher-backup/S3.vue +21 -0
  6. package/chart/rancher-backup/index.vue +4 -0
  7. package/components/AsyncButton.vue +1 -1
  8. package/components/CommunityLinks.vue +1 -0
  9. package/components/FileDiff.vue +92 -85
  10. package/components/Inactivity.vue +10 -0
  11. package/components/LazyImage.vue +2 -2
  12. package/components/PromptRestore.vue +7 -5
  13. package/components/ResourceDetail/Masthead.vue +1 -1
  14. package/components/ResourceDetail/index.vue +8 -14
  15. package/components/ResourceList/index.vue +1 -1
  16. package/components/ResourceTable.vue +50 -2
  17. package/components/YamlEditor.vue +1 -0
  18. package/components/__tests__/PromptRestore.test.ts +72 -0
  19. package/components/auth/AzureWarning.vue +1 -1
  20. package/components/auth/RoleDetailEdit.vue +1 -0
  21. package/components/fleet/FleetResources.vue +3 -64
  22. package/components/form/FileImageSelector.vue +9 -0
  23. package/components/form/FileSelector.vue +2 -1
  24. package/components/form/MatchExpressions.vue +1 -3
  25. package/components/form/NameNsDescription.vue +28 -12
  26. package/components/form/NodeAffinity.vue +2 -2
  27. package/components/form/PodAffinity.vue +2 -2
  28. package/components/form/ResourceTabs/index.vue +8 -2
  29. package/components/form/Select.vue +16 -0
  30. package/components/form/__tests__/FileImageSelector.test.ts +42 -0
  31. package/components/form/__tests__/FileSelector.test.ts +76 -0
  32. package/components/form/__tests__/NodeAffinity.test.ts +38 -0
  33. package/components/form/__tests__/PodAffinity.test.ts +46 -0
  34. package/components/formatter/ClusterLink.vue +8 -4
  35. package/components/formatter/ClusterProvider.vue +3 -1
  36. package/components/formatter/ImageName.vue +23 -0
  37. package/components/formatter/PodImages.vue +7 -1
  38. package/components/formatter/__tests__/ClusterLink.test.ts +101 -0
  39. package/components/formatter/__tests__/ClusterProvider.test.ts +24 -0
  40. package/components/nav/Header.vue +2 -2
  41. package/components/nav/WindowManager/ContainerShell.vue +60 -36
  42. package/components/nav/WindowManager/__tests__/ContainerShell.test.ts +561 -0
  43. package/config/__test__/home-links.test.ts +62 -0
  44. package/config/home-links.js +15 -3
  45. package/config/labels-annotations.js +7 -2
  46. package/config/persistentVolume.ts +108 -0
  47. package/config/product/manager.js +5 -1
  48. package/config/router.js +0 -4
  49. package/config/settings.ts +4 -0
  50. package/config/table-headers.js +6 -5
  51. package/config/types.js +2 -0
  52. package/config/uiplugins.js +50 -5
  53. package/core/plugin-helpers.js +39 -15
  54. package/core/plugin.ts +9 -0
  55. package/core/plugins.js +1 -1
  56. package/core/types-provisioning.ts +253 -0
  57. package/core/types.ts +21 -3
  58. package/detail/autoscaling.horizontalpodautoscaler/index.vue +50 -1
  59. package/detail/fleet.cattle.io.gitrepo.vue +10 -2
  60. package/detail/node.vue +6 -6
  61. package/detail/pod.vue +38 -9
  62. package/detail/provisioning.cattle.io.cluster.vue +46 -7
  63. package/detail/workload/index.vue +49 -18
  64. package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +62 -0
  65. package/edit/__tests__/ui.cattle.io.navlink.test.ts +110 -0
  66. package/edit/auth/github.vue +1 -0
  67. package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +130 -0
  68. package/edit/autoscaling.horizontalpodautoscaler/index.vue +79 -0
  69. package/edit/fleet.cattle.io.clustergroup.vue +14 -3
  70. package/edit/fleet.cattle.io.gitrepo.vue +18 -1
  71. package/edit/namespace.vue +9 -1
  72. package/edit/networking.k8s.io.ingress/RulePath.vue +0 -2
  73. package/edit/persistentvolume/__tests__/persistentvolume.test.ts +82 -0
  74. package/edit/persistentvolume/index.vue +2 -1
  75. package/edit/persistentvolume/plugins/csi.vue +3 -1
  76. package/edit/persistentvolume/plugins/longhorn.vue +12 -12
  77. package/edit/provisioning.cattle.io.cluster/AgentConfiguration.vue +1 -30
  78. package/edit/provisioning.cattle.io.cluster/RegistryConfigs.vue +15 -11
  79. package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +79 -1
  80. package/edit/provisioning.cattle.io.cluster/index.vue +53 -1
  81. package/edit/provisioning.cattle.io.cluster/rke2.vue +335 -151
  82. package/edit/storage.k8s.io.storageclass/index.vue +1 -2
  83. package/edit/ui.cattle.io.navlink.vue +213 -186
  84. package/initialize/App.js +3 -13
  85. package/initialize/layouts.ts +26 -0
  86. package/layouts/default.vue +1 -1
  87. package/list/group.principal.vue +1 -1
  88. package/list/provisioning.cattle.io.cluster.vue +8 -1
  89. package/middleware/authenticated.js +101 -5
  90. package/mixins/brand.js +39 -3
  91. package/mixins/child-hook.js +2 -2
  92. package/mixins/create-edit-view/impl.js +4 -4
  93. package/models/chart.js +1 -1
  94. package/models/fleet.cattle.io.cluster.js +33 -4
  95. package/models/fleet.cattle.io.gitrepo.js +113 -38
  96. package/models/management.cattle.io.kontainerdriver.js +14 -0
  97. package/models/persistentvolume.js +2 -111
  98. package/models/pod.js +30 -0
  99. package/models/provisioning.cattle.io.cluster.js +9 -1
  100. package/models/rke.cattle.io.etcdsnapshot.js +10 -7
  101. package/package.json +2 -2
  102. package/pages/about.vue +8 -2
  103. package/pages/auth/login.vue +1 -1
  104. package/pages/auth/logout.vue +11 -3
  105. package/pages/c/_cluster/apps/charts/index.vue +5 -2
  106. package/pages/c/_cluster/apps/charts/install.vue +5 -0
  107. package/pages/c/_cluster/auth/group.principal/assign-edit.vue +1 -1
  108. package/pages/c/_cluster/auth/roles/index.vue +1 -1
  109. package/pages/c/_cluster/explorer/index.vue +2 -11
  110. package/pages/c/_cluster/manager/cloudCredential/_id.vue +0 -1
  111. package/pages/c/_cluster/manager/cloudCredential/create.vue +0 -1
  112. package/pages/c/_cluster/settings/brand.vue +11 -8
  113. package/pages/c/_cluster/uiplugins/AddExtensionRepos.vue +177 -0
  114. package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +19 -3
  115. package/pages/c/_cluster/uiplugins/RemoveUIPlugins.vue +90 -21
  116. package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +107 -37
  117. package/pages/c/_cluster/uiplugins/index.vue +160 -44
  118. package/pages/docs/_doc.vue +9 -3
  119. package/pages/home.vue +6 -6
  120. package/pages/support/index.vue +10 -4
  121. package/pkg/auto-import.js +1 -1
  122. package/plugins/clean-tooltip-directive.js +1 -1
  123. package/plugins/dashboard-store/__tests__/actions.spec.ts +165 -0
  124. package/plugins/dashboard-store/__tests__/getters.spec.ts +100 -0
  125. package/plugins/dashboard-store/__tests__/{mutations.spec.js → mutations.spec.ts} +2 -2
  126. package/plugins/dashboard-store/actions.js +1 -1
  127. package/plugins/dashboard-store/resource-class.js +39 -2
  128. package/plugins/plugin.js +9 -1
  129. package/plugins/steve/__tests__/getters.spec.ts +93 -0
  130. package/plugins/steve/getters.js +21 -1
  131. package/plugins/steve/subscribe.js +1 -3
  132. package/rancher-components/BadgeState/BadgeState.vue +5 -1
  133. package/rancher-components/Banner/Banner.test.ts +51 -1
  134. package/rancher-components/Banner/Banner.vue +134 -53
  135. package/rancher-components/Card/Card.test.ts +37 -0
  136. package/rancher-components/Card/Card.vue +24 -7
  137. package/rancher-components/Form/Checkbox/Checkbox.test.ts +20 -29
  138. package/rancher-components/Form/Checkbox/Checkbox.vue +45 -20
  139. package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +2 -8
  140. package/rancher-components/Form/LabeledInput/LabeledInput.vue +22 -10
  141. package/rancher-components/Form/Radio/RadioButton.test.ts +31 -0
  142. package/rancher-components/Form/Radio/RadioButton.vue +30 -13
  143. package/rancher-components/Form/Radio/RadioGroup.vue +26 -7
  144. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +7 -6
  145. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.test.ts +25 -38
  146. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +23 -11
  147. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +19 -5
  148. package/rancher-components/StringList/StringList.test.ts +453 -49
  149. package/rancher-components/StringList/StringList.vue +44 -26
  150. package/scripts/extension/publish +2 -2
  151. package/scripts/typegen.sh +11 -2
  152. package/server/server-middleware.js +4 -12
  153. package/store/index.js +14 -3
  154. package/store/prefs.js +0 -3
  155. package/store/store-types.js +2 -0
  156. package/store/type-map.js +17 -29
  157. package/types/api.d.ts +1 -0
  158. package/types/fleet.d.ts +1 -0
  159. package/types/shell/index.d.ts +931 -85
  160. package/types/userPreferences.d.ts +1 -1
  161. package/utils/__mocks__/socket.js +21 -0
  162. package/utils/grafana.js +23 -11
  163. package/utils/kube.js +9 -0
  164. package/utils/object.js +27 -0
  165. package/utils/selector.js +2 -1
  166. package/utils/settings.ts +2 -2
  167. package/utils/validators/formRules/index.ts +3 -3
  168. package/vue.config.js +3 -2
  169. package/components/.DS_Store +0 -0
  170. package/components/__tests__/.DS_Store +0 -0
  171. package/creators/pkg/package-lock.json +0 -37
  172. package/pages/safeMode.vue +0 -17
  173. package/plugins/steve/urloptions.js +0 -47
  174. package/yarn-error.log +0 -196
Binary file
@@ -197,6 +197,12 @@ nav:
197
197
  accountAndKeys: Account & API Keys
198
198
  logOut: Log Out
199
199
  failWhale:
200
+ authMiddleware: Auth Middleware
201
+ clusterNotFound: Cluster { clusterId } not found
202
+ productNotFound: Product { productNotFound } not found
203
+ resourceNotFound: Resource type { resource } not found
204
+ resourceListNotFound: Resource type { resource } not found, unable to display list
205
+ resourceIdNotFound: Resource { resource } with id { fqid } not found, unable to display resource details
200
206
  reload: Reload
201
207
  separator: or
202
208
 
@@ -588,6 +594,10 @@ asyncButton:
588
594
  action: Apply
589
595
  success: Applied
590
596
  waiting: Applying…
597
+ add:
598
+ action: Add
599
+ success: Added
600
+ waiting: Adding…
591
601
  continue:
592
602
  action: Continue
593
603
  success: Saved
@@ -1332,7 +1342,6 @@ cluster:
1332
1342
  deprecated: (deprecated)
1333
1343
  deprecatedPatches: Show deprecated Kubernetes patch versions
1334
1344
  deprecatedPatchWarning: We recommend using the latest patch version for each minor Kubernetes version. Deprecated patch versions can be useful for migration purposes.
1335
- toolsTip: Use the new Cluster Tools to manage and install Monitoring, Logging and other tools
1336
1345
  legacyWarning: The legacy feature flag is enabled and not all legacy features are supported in Kubernetes 1.21+.
1337
1346
  log:
1338
1347
  connecting: Connecting…
@@ -2150,8 +2159,10 @@ fleet:
2150
2159
  protocolBanner: Enter a valid HTTPS or SSH URL to a git repository.
2151
2160
  resources:
2152
2161
  label: 'Resource Handling'
2153
- keepResources: Keep resources after deletion
2154
- resourceBanner: When enabled above, resources will be kept when deleting a GitRepo or Bundle - only Helm release secrets will be deleted.
2162
+ keepResources: Always Keep Resources
2163
+ keepResourcesBanner: When enabled above, resources will be kept when deleting a GitRepo or Bundle - only Helm release secrets will be deleted.
2164
+ correctDrift: Enable Self-Healing
2165
+ correctDriftBanner: When enabled, Fleet will ensure that the cluster resources are kept in sync with the git repository. All resource changes made on th ecluster will be lost.
2155
2166
  add:
2156
2167
  steps:
2157
2168
  repoInfo:
@@ -2390,11 +2401,32 @@ hpa:
2390
2401
  name:
2391
2402
  label: Referent Name
2392
2403
  placeholder: e.g. php-apache
2404
+ scaleDownRules:
2405
+ label: Scale down behavior
2406
+ enable: Configure scale down behavior
2407
+ scaleUpRules:
2408
+ label: Scale up behavior
2409
+ enable: Configure scale up behavior
2410
+ scalingRule:
2411
+ policyHeader: Policies
2412
+ addPolicy: Add policy
2413
+ selectPolicy: Select policy
2414
+ selectPolicyTooltip: Select the policy with the maximum value, minimum value or disable scaling.
2415
+ stabilizationWindowSeconds: Stabilization window seconds
2416
+ stabilizationWindowSecondsTooltip: Number of seconds for which past recommendations should be considered while scaling up or scaling down.
2417
+ policy:
2418
+ type: Type
2419
+ typeTooltip: Set policy based on the amount of Pods to scale or the percentage of current replicas to scale.
2420
+ value: Value
2421
+ valueTooltip: The amount of change which is permitted by the policy.
2422
+ periodSeconds: Period seconds
2423
+ periodSecondsTooltip: The window of time for which the policy should hold true.
2393
2424
  tabs:
2394
2425
  labels: Labels
2395
2426
  metrics: Metrics
2396
2427
  target: Target
2397
2428
  workload: Workload
2429
+ behavior: Behavior
2398
2430
  types:
2399
2431
  cpu: CPU
2400
2432
  memory: Memory
@@ -3021,6 +3053,9 @@ login:
3021
3053
  remember:
3022
3054
  label: Remember Username
3023
3055
 
3056
+ logout:
3057
+ message: Logging Out...
3058
+
3024
3059
  managementNode:
3025
3060
  customName: Custom Name
3026
3061
 
@@ -3477,10 +3512,13 @@ navLink:
3477
3512
  label: Group name
3478
3513
  tooltip: Assign link to a group
3479
3514
  sideLabel:
3480
- label: Link Label
3515
+ label: Link label
3481
3516
  description:
3482
3517
  label: Link description
3518
+ groupImage:
3519
+ label: Group Image
3483
3520
  iconSrc:
3521
+ tip: 'Image height should be 21 pixels with a max width of 200 pixels. Max file size is 20KB. Accepted formats: JPEG, PNG, SVG.'
3484
3522
  label: Add image
3485
3523
  networkpolicy:
3486
3524
  egress:
@@ -3668,7 +3706,7 @@ persistentVolume:
3668
3706
  label: Storage Policy ID
3669
3707
  placeholder: e.g. sp1
3670
3708
  csi:
3671
- label: CSI (Unsupported)
3709
+ label: CSI
3672
3710
  suffix: (CSI)
3673
3711
  driver:
3674
3712
  label: Driver
@@ -3989,7 +4027,9 @@ inactivity:
3989
4027
 
3990
4028
  # Rancher Extensions
3991
4029
  plugins:
3992
- incompatibleDisclaimer: "The latest version of this extension ({ version }) is not compatible with the current Rancher version ({ rancherVersion })."
4030
+ incompatibleRancherVersion: "The latest version of this extension ({ version }) is not compatible with the current Rancher version ({ rancherVersion })."
4031
+ incompatibleKubeVersion: "The latest version of this extension ({ version }) is not compatible with the current Kube version ({ kubeVersion })."
4032
+ currentInstalledVersionBlockedByKubeVersion: "This version is not compatible with the current Kubernetes version ({ kubeVersion } Vs { kubeVersionToCheck })."
3993
4033
  labels:
3994
4034
  builtin: Built-in
3995
4035
  experimental: Experimental
@@ -4026,7 +4066,8 @@ plugins:
4026
4066
  detail: Detail
4027
4067
  versions: Versions
4028
4068
  versionError: Could not load version information
4029
- requiresVersion: "Requires Rancher {version}"
4069
+ requiresRancherVersion: "Requires Rancher {version}"
4070
+ requiresKubeVersion: "Requires Kube version {version}"
4030
4071
  empty:
4031
4072
  all: Extensions are neither installed nor available
4032
4073
  available: No Extensions available
@@ -4036,6 +4077,7 @@ plugins:
4036
4077
  loadError: An error occurred loading the code for this extension
4037
4078
  helmError: "An error occurred installing the extension via Helm"
4038
4079
  manageRepos: Manage Repositories
4080
+ addRancherRepos: Add Rancher Repositories
4039
4081
  manageCharts: Manage Extension Charts
4040
4082
  manageCatalog:
4041
4083
  label: Manage Extension Catalogs
@@ -4107,23 +4149,39 @@ plugins:
4107
4149
  safeMode:
4108
4150
  title: Extensions Safe Mode
4109
4151
  message: Extensions were not loaded
4152
+ addRepos:
4153
+ banner: There are new extensions repositories available. To enable these repositories, click the button on the right.
4154
+ bannerBtn: Add repositories
4155
+ title: Add Extensions repositories
4156
+ prompt: You can install multiple Rancher extension repositories to increase your extensions catalog
4110
4157
  setup:
4158
+ installed: Already installed
4159
+ uninstalled: Already uninstalled
4111
4160
  title: Extension support is not enabled
4112
4161
  prompt:
4113
4162
  cant: Automatic installation is not available - required Helm Charts could not be found
4114
4163
  can: You need to install the Extension Operator
4164
+ official: The Official Rancher Extensions Repository provides extensions published by Rancher
4165
+ partners: The Partners Extensions Repository provides extensions published by Rancher Partners
4166
+ community: The Community Extensions Repository provides extensions published by Rancher Community
4115
4167
  install:
4116
4168
  title: Enable Extension Support?
4117
- prompt: This will install the Helm charts to enable Extension support
4118
- airgap: The Rancher Extensions Repository provides extensions published by Rancher. Un-check if your Rancher installation is air-gapped
4119
- addRancherRepo: Add the Rancher Extension Repository
4169
+ prompt: This will install the Helm charts needed to enable Extension support
4170
+ airgap: Air-gapped installations should NOT enable this feature
4171
+ addRancherRepo: Add Official Rancher Extensions Repository
4172
+ addPartnersRancherRepo: Add Partners Extensions Repository
4173
+ addCommunityRancherRepo: Add Community Extensions Repository
4120
4174
  remove:
4121
4175
  label: Disable Extension Support
4122
4176
  title: Disable Extension Support?
4123
4177
  prompt: This will un-install the Helm charts that enable Extension support
4124
4178
  registry:
4125
- title: Remove the Rancher Extensions Repository
4126
- prompt: The Rancher Extensions Repository provides extensions published by Rancher
4179
+ official:
4180
+ title: Remove the Official Rancher Extensions Repository
4181
+ partners:
4182
+ title: Remove the Partners Extensions Repository
4183
+ community:
4184
+ title: Remove the Community Extensions Repository
4127
4185
  crd:
4128
4186
  title: Remove the Rancher Extensions Custom Resource Definition
4129
4187
  prompt: There are one or more extensions installed - removing the CRD will require you to manually reinstall these extensions if you subsequently re-enable extensions support.
@@ -5711,6 +5769,7 @@ wm:
5711
5769
  containerShell:
5712
5770
  clear: Clear
5713
5771
  containerName: "Container: {label}"
5772
+ failed: "Unable to open a shell to the container (none of the shell commmands succeeded)\n\r"
5714
5773
  kubectlShell:
5715
5774
  title: "Kubectl: {name}"
5716
5775
 
@@ -7356,7 +7415,7 @@ gitPicker:
7356
7415
  repo:
7357
7416
  label: Repository
7358
7417
  inputLabel: Repository
7359
- tooltip: Branch to deploy from
7418
+ tooltip: Repository to deploy from
7360
7419
  commits:
7361
7420
  label: Commits
7362
7421
  tooltip: Commits to deploy from
@@ -7367,7 +7426,7 @@ gitPicker:
7367
7426
  label: Commit Message
7368
7427
  errors:
7369
7428
  noAccount: No GitHub account or Organization found. Please review your query and try again.
7370
- noBranch: No branch found. Please review your query and try again."
7429
+ noBranch: No branch found. Please review your query and try again.
7371
7430
  gitlab:
7372
7431
  label: GitLab
7373
7432
  tableHeaders:
@@ -7393,7 +7452,7 @@ gitPicker:
7393
7452
  repo:
7394
7453
  label: Repository
7395
7454
  inputLabel: Repository
7396
- tooltip: Branch to deploy from
7455
+ tooltip: Repository to deploy from
7397
7456
  commits:
7398
7457
  label: Commits
7399
7458
  tooltip: Commits to deploy from
@@ -7404,7 +7463,7 @@ gitPicker:
7404
7463
  label: Commit Message
7405
7464
  errors:
7406
7465
  noAccount: No GitLab account or Organization found. Please review your query and try again.
7407
- noBranch: No branch found. Please review your query and try again."
7466
+ noBranch: No branch found. Please review your query and try again.
7408
7467
 
7409
7468
  networkAttachmentDefinition:
7410
7469
  tabs:
@@ -73,6 +73,7 @@ generic:
73
73
  techPreview: 技术预览
74
74
  type: 类型
75
75
  unknown: 未知
76
+ upload: 上传
76
77
  provisioning: '—'
77
78
  key: 键
78
79
  value: 值
@@ -196,6 +197,12 @@ nav:
196
197
  accountAndKeys: 账号 & API 密钥
197
198
  logOut: 登出
198
199
  failWhale:
200
+ authMiddleware: 认证中间件
201
+ clusterNotFound: 未找到集群 { clusterId }
202
+ productNotFound: 未找到产品 {productNotFound}
203
+ resourceNotFound: 未找到资源类型 { resource }
204
+ resourceListNotFound: 未找到资源类型 { resource },无法显示列表
205
+ resourceIdNotFound: 未找到 ID 为 { fqid } 的资源 { resources },无法显示资源详细信息
199
206
  reload: 重新加载
200
207
  separator: 或者
201
208
 
@@ -588,6 +595,10 @@ asyncButton:
588
595
  action: 应用
589
596
  success: 已应用
590
597
  waiting: 正在应用…
598
+ add:
599
+ action: 添加
600
+ success: 已添加
601
+ waiting: 正在添加…
591
602
  continue:
592
603
  action: 继续
593
604
  success: 已保存
@@ -1339,7 +1350,6 @@ cluster:
1339
1350
  deprecated: (已弃用)
1340
1351
  deprecatedPatches: 显示已弃用的 Kubernetes 补丁版本
1341
1352
  deprecatedPatchWarning: 建议为每个 Kubernetes 次要版本使用最新的补丁版本,已弃用的补丁版本可能对迁移有用。
1342
- toolsTip: 使用新集群工具来管理和安装 Monitoring、Logging 等工具。
1343
1353
  legacyWarning: 旧版功能开关已开启,但是不是所有旧版功能都在 Kubernetes 1.21+ 中支持。
1344
1354
  log:
1345
1355
  connecting: 正在连接
@@ -2157,8 +2167,10 @@ fleet:
2157
2167
  protocolBanner: 输入指向 git 仓库的有效 HTTPS 或 SSH URL。
2158
2168
  resources:
2159
2169
  label: '资源处理'
2160
- keepResources: 删除后保留资源
2161
- resourceBanner: 启用时,删除 GitRepo 或 Bundle 后将保留资源,只会删除 Helm Release Secret。
2170
+ keepResources: 永远保留资源
2171
+ keepResourcesBanner: 启用时,删除 GitRepo 或 Bundle 后将保留资源,只会删除 Helm Release Secret。
2172
+ correctDrift: 启用自我修复
2173
+ correctDriftBanner: 启用后,Fleet 将确保集群资源与 Git 仓库保持同步。在 ecluster 上进行的所有资源更改都将丢失。
2162
2174
  add:
2163
2175
  steps:
2164
2176
  repoInfo:
@@ -2239,6 +2251,7 @@ fleet:
2239
2251
  addLabel: 添加
2240
2252
  banner: "{count, plural, =0 { 在这里添加命名空间会创建一个 GitRepoRestriction。} other { 只有 Git Repo Restriction 的 <code>allowedTargetNamespaces</code> 在此处管理,你可以对 Git Repo Restriction 进行其他更改。} }"
2241
2253
  footer:
2254
+ cnforums: 中文社区
2242
2255
  docs: Rancher 官方文档
2243
2256
  download: 下载 CLI
2244
2257
  forums: 论坛
@@ -2246,7 +2259,8 @@ footer:
2246
2259
  slack: Slack 讨论群
2247
2260
  wechat:
2248
2261
  title: 微信
2249
- modalText: 扫码关注 Rancher 中国微信技术群
2262
+ modalText: 扫描二维码添加 Rancher 小助手
2263
+ modalText2: 加入 Rancher 官方微信群
2250
2264
 
2251
2265
  gatekeeperConstraint:
2252
2266
  downloadViolations: 下载违规
@@ -2397,11 +2411,32 @@ hpa:
2397
2411
  name:
2398
2412
  label: 引用名称
2399
2413
  placeholder: 例如:php-apache
2414
+ scaleDownRules:
2415
+ label: 缩减行为
2416
+ enable: 配置缩减行为
2417
+ scaleUpRules:
2418
+ label: 扩展行为
2419
+ enable: 配置扩展行为
2420
+ scalingRule:
2421
+ policyHeader: 策略
2422
+ addPolicy: 添加策略
2423
+ selectPolicy: 选择策略
2424
+ selectPolicyTooltip: 选择具有最大值、最小值或禁用缩放的策略。
2425
+ stabilizationWindowSeconds: 稳定窗口秒数
2426
+ stabilizationWindowSecondsTooltip: 在扩展或缩减时应考虑过去建议的秒数。
2427
+ policy:
2428
+ type: 类型
2429
+ typeTooltip: 根据要扩展的 Pod 数量或要扩展的当前副本百分比设置策略。
2430
+ value: 值
2431
+ valueTooltip: 策略允许的变更数量。
2432
+ periodSeconds: 周期秒数
2433
+ periodSecondsTooltip: 策略生效的时间窗口。
2400
2434
  tabs:
2401
2435
  labels: 标签
2402
2436
  metrics: 指标
2403
2437
  target: 目标
2404
2438
  workload: 工作负载
2439
+ behavior: 行为
2405
2440
  types:
2406
2441
  cpu: CPU
2407
2442
  memory: 内存
@@ -3028,6 +3063,9 @@ login:
3028
3063
  remember:
3029
3064
  label: 记住用户名
3030
3065
 
3066
+ logout:
3067
+ message: 正在登出...
3068
+
3031
3069
  managementNode:
3032
3070
  customName: 自定义名称
3033
3071
 
@@ -3675,7 +3713,7 @@ persistentVolume:
3675
3713
  label: 存储策略 ID
3676
3714
  placeholder: 例如:sp1
3677
3715
  csi:
3678
- label: CSI(不支持)
3716
+ label: CSI
3679
3717
  suffix: (CSI)
3680
3718
  driver:
3681
3719
  label: 驱动
@@ -3996,7 +4034,9 @@ inactivity:
3996
4034
 
3997
4035
  # Rancher Extensions
3998
4036
  plugins:
3999
- incompatibleDisclaimer: "此扩展的最新版本 ({ version }) 与当前的 Rancher 版本 ({ rancherVersion }) 不兼容。"
4037
+ incompatibleRancherVersion: "此扩展的最新版本 ({ version }) 与当前的 Rancher 版本 ({ rancherVersion }) 不兼容。"
4038
+ incompatibleKubeVersion: "此扩展的最新版本 ({ version }) 与当前的 Kube 版本 ({ kubeVersion }) 不兼容。"
4039
+ currentInstalledVersionBlockedByKubeVersion: "此版本与当前 Kubernetes 版本 ({ kubeVersion } Vs { kubeVersionToCheck }) 不兼容。"
4000
4040
  labels:
4001
4041
  builtin: 内置角色
4002
4042
  experimental: 实验功能
@@ -4017,6 +4057,7 @@ plugins:
4017
4057
  host: 此扩展与此应用程序不兼容
4018
4058
  version: 此扩展与此 Rancher 版本不兼容
4019
4059
  load: 加载此扩展的代码时出错
4060
+ developerPkg: 此扩展已在内部加载,因此我们不会加载外部版本
4020
4061
  success:
4021
4062
  title: 已加载扩展 {name}
4022
4063
  message: 扩展加载成功
@@ -4032,7 +4073,8 @@ plugins:
4032
4073
  detail: 详情
4033
4074
  versions: 版本
4034
4075
  versionError: 无法加载版本信息
4035
- requiresVersion: "需要 Rancher {version}"
4076
+ requiresRancherVersion: "需要 Rancher {version}"
4077
+ requiresKubeVersion: "需要 Kube {version}"
4036
4078
  empty:
4037
4079
  all: 扩展未安装或不可用
4038
4080
  available: 没有可用的扩展
@@ -4042,6 +4084,7 @@ plugins:
4042
4084
  loadError: 加载此扩展的代码时出错
4043
4085
  helmError: "通过 Helm 安装扩展时出错"
4044
4086
  manageRepos: 管理仓库
4087
+ addRancherRepos: 添加 Rancher 仓库
4045
4088
  manageCharts: 管理扩展 Chart
4046
4089
  manageCatalog:
4047
4090
  label: 管理扩展商店
@@ -4113,23 +4156,39 @@ plugins:
4113
4156
  safeMode:
4114
4157
  title: 扩展安全模式
4115
4158
  message: 未加载扩展
4159
+ addRepos:
4160
+ banner: 有新的扩展仓库可用。要启用这些仓库,请单击右侧的按钮。
4161
+ bannerBtn: 添加仓库
4162
+ title: 添加扩展仓库
4163
+ prompt: 你可以安装多个 Rancher 扩展仓库来增加你的扩展商店
4116
4164
  setup:
4165
+ installed: 已安装
4166
+ uninstalled: 已卸载
4117
4167
  title: 未启用扩展支持
4118
4168
  prompt:
4119
4169
  cant: 自动安装不可用 - 找不到所需的 Helm Chart
4120
4170
  can: 你需要安装 Extension Operator
4171
+ official: Official Rancher Extensions 仓库提供了由 Rancher 发布的扩展。
4172
+ partners: Partners Extensions 仓库提供了由 Rancher 合作伙伴发布的扩展。
4173
+ community: Community Extensions 仓库提供了由 Rancher 社区发布的扩展。
4121
4174
  install:
4122
4175
  title: 启用扩展支持?
4123
- prompt: 这将安装 Helm Chart 以启用扩展支持
4124
- airgap: Rancher Extensions 仓库提供了由 Rancher 发布的扩展。如果你的 Rancher 是离线的,请取消选中。
4125
- addRancherRepo: 添加 Rancher Extension 仓库
4176
+ prompt: 这将安装启用扩展支持所需的 Helm Chart
4177
+ airgap: 离线安装环境请不要启用此功能
4178
+ addRancherRepo: 添加 Official Rancher Extensions 仓库
4179
+ addPartnersRancherRepo: 添加 Partners Extensions 仓库
4180
+ addCommunityRancherRepo: 添加 Community Extensions 仓库
4126
4181
  remove:
4127
4182
  label: 禁用扩展支持
4128
4183
  title: 禁用扩展支持?
4129
4184
  prompt: 这将卸载启用扩展支持的 Helm Chart
4130
4185
  registry:
4131
- title: 删除 Rancher Rancher Extensions 仓库
4132
- prompt: Rancher Extensions 仓库提供了由 Rancher 发布的扩展。
4186
+ official:
4187
+ title: 删除 Official Rancher Extensions 仓库
4188
+ partners:
4189
+ title: 删除 Partners Rancher Extensions 仓库
4190
+ community:
4191
+ title: 删除 Community Extensions 仓库
4133
4192
  crd:
4134
4193
  title: 删除 Rancher Extensions CRD
4135
4194
  prompt: 目前已安装了一个或多个扩展 - 如果你后续需要重新启用扩展支持,删除 CRD 后你需要手动重新安装这些扩展。
@@ -4446,7 +4505,6 @@ rbac:
4446
4505
  members:
4447
4506
  label: 成员
4448
4507
  roletemplate:
4449
- label: 角色
4450
4508
  newUserDefault:
4451
4509
  no: 否
4452
4510
  tooltip: 不影响已有角色的绑定。
@@ -5593,8 +5651,8 @@ validation:
5593
5651
  tooLongPrefix: '"{key}" 前缀的长度不能超过 {max} 个字符'
5594
5652
  minLength: '"{key}" 必须多于 {min} 个字符'
5595
5653
  maxLength: '"{key}" 必须少于 {max} 个字符'
5596
- minValue: '"{key}" 必须多于 {min}'
5597
- maxValue: '"{key}" 必须小于 {max}'
5654
+ minValue: '"{key}" 必须等于或多于 {min}'
5655
+ maxValue: '"{key}" 必须等于或少于 {max}'
5598
5656
  betweenLengths: '"{key}" 必须包含 {min} 到 {max} 个字符'
5599
5657
  betweenValues: '"{key}" 必须介于 {min} 和 {max} 之间'
5600
5658
  noSchema: 没有找到可以验证的 schema
@@ -7237,6 +7295,7 @@ customLinks:
7237
7295
  valueLabel: URL
7238
7296
  showLabel: 显示
7239
7297
  defaults:
7298
+ cnforums: 中文社区
7240
7299
  docs: Rancher 官方文档
7241
7300
  forums: 论坛
7242
7301
  slack: Slack
@@ -7340,6 +7399,7 @@ manager:
7340
7399
  label: 节点模板
7341
7400
 
7342
7401
  auth:
7402
+ roleTemplate: 角色模板
7343
7403
  config:
7344
7404
  label: 认证
7345
7405
  vncConsole:
@@ -7591,6 +7651,82 @@ charts:
7591
7651
  label: 7 层负载均衡主机名
7592
7652
  description: "7 层负载均衡主机名"
7593
7653
 
7654
+ gitPicker:
7655
+ github:
7656
+ label: GitHub
7657
+ tableHeaders:
7658
+ choose:
7659
+ label: 选择
7660
+ sha:
7661
+ label: SHA
7662
+ author:
7663
+ label: 作者
7664
+ unknown: 未知
7665
+ message:
7666
+ label: 消息
7667
+ date:
7668
+ label: 日期
7669
+ username:
7670
+ label: 用户名/组织
7671
+ inputLabel: 用户名/组织
7672
+ tooltip: Git 仓库的用户名/组织
7673
+ branch:
7674
+ label: 分支
7675
+ inputLabel: 分支
7676
+ tooltip: 要部署的分支
7677
+ repo:
7678
+ label: 仓库
7679
+ inputLabel: 仓库
7680
+ tooltip: 要部署的仓库
7681
+ commits:
7682
+ label: Commit
7683
+ tooltip: 要部署的 Commit
7684
+ commit:
7685
+ label: Commit
7686
+ inputLabel: Commit
7687
+ commitMessage:
7688
+ label: Commit Message
7689
+ errors:
7690
+ noAccount: 未找到 GitHub 帐户或组织。请检查你的查询并重试。
7691
+ noBranch: 未找到分支。请检查你的查询并重试。
7692
+ gitlab:
7693
+ label: GitLab
7694
+ tableHeaders:
7695
+ choose:
7696
+ label: 选择
7697
+ sha:
7698
+ label: SHA
7699
+ author:
7700
+ label: 作者
7701
+ unknown: 未知
7702
+ message:
7703
+ label: 消息
7704
+ date:
7705
+ label: 日期
7706
+ username:
7707
+ label: 用户名/组织
7708
+ inputLabel: 用户名/组织
7709
+ tooltip: Git 仓库的用户名/组织
7710
+ branch:
7711
+ label: 分支
7712
+ inputLabel: 分支
7713
+ tooltip: 要部署的分支
7714
+ repo:
7715
+ label: 仓库
7716
+ inputLabel: 仓库
7717
+ tooltip: 要部署的仓库
7718
+ commits:
7719
+ label: Commit
7720
+ tooltip: 要部署的 Commit
7721
+ commit:
7722
+ label: Commit
7723
+ inputLabel: Commit
7724
+ commitMessage:
7725
+ label: Commit Message
7726
+ errors:
7727
+ noAccount: 未找到 GitLab 帐户或组织。请检查你的查询并重试。
7728
+ noBranch: 未找到分支。请检查你的查询并重试。
7729
+
7594
7730
  networkAttachmentDefinition:
7595
7731
  tabs:
7596
7732
  config: 配置
@@ -0,0 +1,50 @@
1
+ /* eslint-disable jest/no-hooks */
2
+ import { mount, createLocalVue } from '@vue/test-utils';
3
+
4
+ import S3 from '@shell/chart/rancher-backup/S3';
5
+ import Vuex from 'vuex';
6
+
7
+ const localVue = createLocalVue();
8
+
9
+ localVue.use(Vuex);
10
+
11
+ describe('rancher-backup: S3', () => {
12
+ const mockStore = { getters: { 'i18n/t': (text: string) => text, t: (text: string) => text } };
13
+ const wrapper = mount(S3, { mocks: { $store: mockStore } });
14
+
15
+ it('should emit invalid when form is not filled', () => {
16
+ expect(wrapper.emitted('valid')).toHaveLength(1);
17
+ expect(wrapper.emitted('valid')![0][0]).toBeFalsy();
18
+ });
19
+
20
+ it('should emit valid when required fields are filled', async() => {
21
+ const bucketName = wrapper.find('[data-testid="S3-bucketName"]').find('input');
22
+ const endpoint = wrapper.find('[data-testid="S3-endpoint"]').find('input');
23
+ const testCases = [
24
+ {
25
+ bucketNameInput: 'val',
26
+ endpointInput: '',
27
+ result: false
28
+ },
29
+ {
30
+ bucketNameInput: '',
31
+ endpointInput: 'val',
32
+ result: false
33
+ }
34
+ ];
35
+
36
+ for (const testCase of testCases) {
37
+ bucketName.setValue(testCase.bucketNameInput);
38
+ endpoint.setValue(testCase.endpointInput);
39
+ await wrapper.vm.$nextTick();
40
+ expect(wrapper.emitted('valid')).toHaveLength(1);
41
+ expect(wrapper.emitted('valid')![0][0]).toBe(false);
42
+ }
43
+
44
+ bucketName.setValue('val1');
45
+ endpoint.setValue('val2');
46
+ await wrapper.vm.$nextTick();
47
+ expect(wrapper.emitted('valid')).toHaveLength(2);
48
+ expect(wrapper.emitted('valid')![1][0]).toBe(true);
49
+ });
50
+ });
@@ -4,6 +4,7 @@ import { Checkbox } from '@components/Form/Checkbox';
4
4
  import FileSelector from '@shell/components/form/FileSelector';
5
5
  import LabeledSelect from '@shell/components/form/LabeledSelect';
6
6
  import { mapGetters } from 'vuex';
7
+
7
8
  export default {
8
9
  components: {
9
10
  LabeledInput,
@@ -30,6 +31,19 @@ export default {
30
31
  }
31
32
  },
32
33
 
34
+ mounted() {
35
+ this.$emit('valid', this.valid);
36
+ },
37
+
38
+ beforeDestroy() {
39
+ this.$emit('valid', true);
40
+ },
41
+
42
+ watch: {
43
+ valid() {
44
+ this.$emit('valid', this.valid);
45
+ }
46
+ },
33
47
  computed: {
34
48
  credentialSecret: {
35
49
  get() {
@@ -45,6 +59,9 @@ export default {
45
59
  this.$set(this.value, 'credentialSecretNamespace', namespace);
46
60
  }
47
61
  },
62
+ valid() {
63
+ return !!this.value.endpoint && !!this.value.bucketName;
64
+ },
48
65
  ...mapGetters({ t: 'i18n/t' })
49
66
  },
50
67
 
@@ -87,8 +104,10 @@ export default {
87
104
  <div class="col span-6">
88
105
  <LabeledInput
89
106
  v-model="value.bucketName"
107
+ data-testid="S3-bucketName"
90
108
  :mode="mode"
91
109
  :label="t('backupRestoreOperator.s3.bucketName')"
110
+ required
92
111
  />
93
112
  </div>
94
113
  </div>
@@ -114,6 +133,8 @@ export default {
114
133
  v-model="value.endpoint"
115
134
  :mode="mode"
116
135
  :label="t('backupRestoreOperator.s3.endpoint')"
136
+ data-testid="S3-endpoint"
137
+ required
117
138
  />
118
139
  <Checkbox
119
140
  v-model="value.insecureTLSSkipVerify"
@@ -154,6 +154,9 @@ export default {
154
154
  }
155
155
 
156
156
  return 'none';
157
+ },
158
+ updatePageValid(update) {
159
+ this.$emit('valid', update);
157
160
  }
158
161
  },
159
162
  get
@@ -189,6 +192,7 @@ export default {
189
192
  :value="value.s3"
190
193
  :secrets="secrets"
191
194
  :mode="mode"
195
+ @valid="updatePageValid($event)"
192
196
  />
193
197
  <template v-else>
194
198
  <div class="row">
@@ -14,7 +14,7 @@ const TOOLTIP = 'tooltip';
14
14
 
15
15
  export type AsyncButtonCallback = (success: boolean) => void;
16
16
 
17
- export default Vue.extend({
17
+ export default Vue.extend<{ phase: string}, any, any, any>({
18
18
  props: {
19
19
  /**
20
20
  * Mode maps to keys in asyncButton.* translations
@@ -138,6 +138,7 @@ export default {
138
138
  >
139
139
  <div class="wechat-modal">
140
140
  <h1>{{ t('footer.wechat.modalText') }}</h1>
141
+ <h1>{{ t('footer.wechat.modalText2') }}</h1>
141
142
  <div class="qr-img" />
142
143
  <div>
143
144
  <button