@rancher/shell 0.3.16 → 0.3.17

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 (144) hide show
  1. package/assets/images/wechat-qr-code.jpg +0 -0
  2. package/assets/translations/en-us.yaml +69 -14
  3. package/assets/translations/zh-hans.yaml +87 -7
  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/CommunityLinks.vue +1 -0
  8. package/components/FileDiff.vue +92 -85
  9. package/components/ResourceDetail/index.vue +4 -12
  10. package/components/ResourceList/index.vue +1 -1
  11. package/components/ResourceTable.vue +50 -2
  12. package/components/YamlEditor.vue +1 -0
  13. package/components/auth/RoleDetailEdit.vue +1 -0
  14. package/components/form/NameNsDescription.vue +28 -12
  15. package/components/form/NodeAffinity.vue +2 -2
  16. package/components/form/PodAffinity.vue +2 -2
  17. package/components/form/ResourceTabs/index.vue +8 -2
  18. package/components/form/Select.vue +16 -0
  19. package/components/form/__tests__/NodeAffinity.test.ts +38 -0
  20. package/components/form/__tests__/PodAffinity.test.ts +46 -0
  21. package/components/formatter/ClusterLink.vue +8 -4
  22. package/components/formatter/ImageName.vue +23 -0
  23. package/components/formatter/PodImages.vue +7 -1
  24. package/components/formatter/__tests__/ClusterLink.test.ts +101 -0
  25. package/components/nav/Header.vue +2 -2
  26. package/config/__test__/home-links.test.ts +62 -0
  27. package/config/home-links.js +15 -3
  28. package/config/labels-annotations.js +5 -1
  29. package/config/router.js +0 -4
  30. package/config/settings.ts +4 -0
  31. package/config/table-headers.js +6 -5
  32. package/config/uiplugins.js +50 -5
  33. package/core/plugin-helpers.js +20 -12
  34. package/core/plugin.ts +9 -0
  35. package/core/plugins.js +1 -1
  36. package/core/types-provisioning.ts +253 -0
  37. package/core/types.ts +17 -3
  38. package/detail/autoscaling.horizontalpodautoscaler/index.vue +50 -1
  39. package/detail/node.vue +6 -6
  40. package/detail/pod.vue +2 -6
  41. package/detail/provisioning.cattle.io.cluster.vue +46 -7
  42. package/detail/workload/index.vue +9 -9
  43. package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +62 -0
  44. package/edit/auth/github.vue +1 -0
  45. package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +130 -0
  46. package/edit/autoscaling.horizontalpodautoscaler/index.vue +79 -0
  47. package/edit/fleet.cattle.io.gitrepo.vue +18 -1
  48. package/edit/namespace.vue +9 -1
  49. package/edit/networking.k8s.io.ingress/RulePath.vue +0 -2
  50. package/edit/provisioning.cattle.io.cluster/AgentConfiguration.vue +1 -30
  51. package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +79 -1
  52. package/edit/provisioning.cattle.io.cluster/index.vue +52 -0
  53. package/edit/provisioning.cattle.io.cluster/rke2.vue +330 -150
  54. package/edit/ui.cattle.io.navlink.vue +2 -1
  55. package/initialize/App.js +3 -13
  56. package/initialize/layouts.ts +26 -0
  57. package/list/provisioning.cattle.io.cluster.vue +8 -1
  58. package/middleware/authenticated.js +93 -5
  59. package/mixins/brand.js +39 -3
  60. package/mixins/child-hook.js +2 -2
  61. package/mixins/create-edit-view/impl.js +2 -2
  62. package/models/fleet.cattle.io.gitrepo.js +1 -0
  63. package/models/provisioning.cattle.io.cluster.js +9 -1
  64. package/package.json +2 -2
  65. package/pages/about.vue +8 -2
  66. package/pages/auth/login.vue +1 -1
  67. package/pages/auth/logout.vue +11 -3
  68. package/pages/c/_cluster/apps/charts/index.vue +5 -2
  69. package/pages/c/_cluster/apps/charts/install.vue +5 -0
  70. package/pages/c/_cluster/explorer/index.vue +1 -10
  71. package/pages/c/_cluster/uiplugins/AddExtensionRepos.vue +177 -0
  72. package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +19 -3
  73. package/pages/c/_cluster/uiplugins/RemoveUIPlugins.vue +90 -21
  74. package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +107 -37
  75. package/pages/c/_cluster/uiplugins/index.vue +155 -44
  76. package/pages/docs/_doc.vue +9 -3
  77. package/pages/home.vue +5 -5
  78. package/pages/support/index.vue +10 -4
  79. package/pkg/auto-import.js +1 -1
  80. package/plugins/clean-tooltip-directive.js +1 -1
  81. package/plugins/dashboard-store/resource-class.js +35 -2
  82. package/plugins/plugin.js +9 -1
  83. package/rancher-components/BadgeState/BadgeState.vue +5 -1
  84. package/rancher-components/Banner/Banner.test.ts +51 -1
  85. package/rancher-components/Banner/Banner.vue +134 -53
  86. package/rancher-components/Card/Card.vue +24 -7
  87. package/rancher-components/Form/Checkbox/Checkbox.test.ts +20 -29
  88. package/rancher-components/Form/Checkbox/Checkbox.vue +45 -20
  89. package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +2 -8
  90. package/rancher-components/Form/LabeledInput/LabeledInput.vue +22 -10
  91. package/rancher-components/Form/Radio/RadioButton.vue +30 -13
  92. package/rancher-components/Form/Radio/RadioGroup.vue +26 -7
  93. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +7 -6
  94. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.test.ts +25 -38
  95. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +23 -11
  96. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +19 -5
  97. package/rancher-components/StringList/StringList.test.ts +453 -49
  98. package/rancher-components/StringList/StringList.vue +44 -26
  99. package/scripts/extension/publish +2 -2
  100. package/scripts/typegen.sh +1 -0
  101. package/server/server-middleware.js +4 -12
  102. package/store/index.js +13 -0
  103. package/store/prefs.js +0 -3
  104. package/store/type-map.js +17 -29
  105. package/types/shell/index.d.ts +236 -83
  106. package/utils/kube.js +9 -0
  107. package/utils/object.js +27 -0
  108. package/utils/settings.ts +2 -2
  109. package/vue.config.js +3 -2
  110. package/components/.DS_Store +0 -0
  111. package/components/__tests__/.DS_Store +0 -0
  112. package/creators/pkg/package-lock.json +0 -37
  113. package/pages/safeMode.vue +0 -17
  114. package/rancher-components/components/BadgeState/BadgeState.spec.ts +0 -12
  115. package/rancher-components/components/BadgeState/BadgeState.vue +0 -111
  116. package/rancher-components/components/BadgeState/index.ts +0 -1
  117. package/rancher-components/components/Banner/Banner.test.ts +0 -63
  118. package/rancher-components/components/Banner/Banner.vue +0 -244
  119. package/rancher-components/components/Banner/index.ts +0 -1
  120. package/rancher-components/components/Card/Card.vue +0 -167
  121. package/rancher-components/components/Card/index.ts +0 -1
  122. package/rancher-components/components/Form/Checkbox/Checkbox.test.ts +0 -68
  123. package/rancher-components/components/Form/Checkbox/Checkbox.vue +0 -420
  124. package/rancher-components/components/Form/Checkbox/index.ts +0 -1
  125. package/rancher-components/components/Form/LabeledInput/LabeledInput.test.ts +0 -23
  126. package/rancher-components/components/Form/LabeledInput/LabeledInput.vue +0 -355
  127. package/rancher-components/components/Form/LabeledInput/index.ts +0 -1
  128. package/rancher-components/components/Form/Radio/RadioButton.vue +0 -287
  129. package/rancher-components/components/Form/Radio/RadioGroup.vue +0 -254
  130. package/rancher-components/components/Form/Radio/index.ts +0 -2
  131. package/rancher-components/components/Form/TextArea/TextAreaAutoGrow.vue +0 -170
  132. package/rancher-components/components/Form/TextArea/index.ts +0 -1
  133. package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.test.ts +0 -94
  134. package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.vue +0 -149
  135. package/rancher-components/components/Form/ToggleSwitch/index.ts +0 -1
  136. package/rancher-components/components/Form/index.ts +0 -5
  137. package/rancher-components/components/LabeledTooltip/LabeledTooltip.vue +0 -151
  138. package/rancher-components/components/LabeledTooltip/index.ts +0 -1
  139. package/rancher-components/components/StringList/StringList.test.ts +0 -484
  140. package/rancher-components/components/StringList/StringList.vue +0 -611
  141. package/rancher-components/components/StringList/index.ts +0 -1
  142. package/yarn-error.log +0 -196
  143. /package/rancher-components/{components/Card → Card}/Card.test.ts +0 -0
  144. /package/rancher-components/{components/Form → Form}/Radio/RadioButton.test.ts +0 -0
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
 
@@ -3989,7 +4024,9 @@ inactivity:
3989
4024
 
3990
4025
  # Rancher Extensions
3991
4026
  plugins:
3992
- incompatibleDisclaimer: "The latest version of this extension ({ version }) is not compatible with the current Rancher version ({ rancherVersion })."
4027
+ incompatibleRancherVersion: "The latest version of this extension ({ version }) is not compatible with the current Rancher version ({ rancherVersion })."
4028
+ incompatibleKubeVersion: "The latest version of this extension ({ version }) is not compatible with the current Kube version ({ kubeVersion })."
4029
+ currentInstalledVersionBlockedByKubeVersion: "This version is not compatible with the current Kubernetes version ({ kubeVersion } Vs { kubeVersionToCheck })."
3993
4030
  labels:
3994
4031
  builtin: Built-in
3995
4032
  experimental: Experimental
@@ -4026,7 +4063,8 @@ plugins:
4026
4063
  detail: Detail
4027
4064
  versions: Versions
4028
4065
  versionError: Could not load version information
4029
- requiresVersion: "Requires Rancher {version}"
4066
+ requiresRancherVersion: "Requires Rancher {version}"
4067
+ requiresKubeVersion: "Requires Kube version {version}"
4030
4068
  empty:
4031
4069
  all: Extensions are neither installed nor available
4032
4070
  available: No Extensions available
@@ -4036,6 +4074,7 @@ plugins:
4036
4074
  loadError: An error occurred loading the code for this extension
4037
4075
  helmError: "An error occurred installing the extension via Helm"
4038
4076
  manageRepos: Manage Repositories
4077
+ addRancherRepos: Add Rancher Repositories
4039
4078
  manageCharts: Manage Extension Charts
4040
4079
  manageCatalog:
4041
4080
  label: Manage Extension Catalogs
@@ -4107,23 +4146,39 @@ plugins:
4107
4146
  safeMode:
4108
4147
  title: Extensions Safe Mode
4109
4148
  message: Extensions were not loaded
4149
+ addRepos:
4150
+ banner: There are new extensions repositories available. To enable them, click the menu button at the top right of this page and select “Add Rancher Repositories”.
4151
+ bannerBtn: Add repositories
4152
+ title: Add Extensions repositories
4153
+ prompt: You can install multiple Rancher extension repositories to increase your extensions catalog
4110
4154
  setup:
4155
+ installed: Already installed
4156
+ uninstalled: Already uninstalled
4111
4157
  title: Extension support is not enabled
4112
4158
  prompt:
4113
4159
  cant: Automatic installation is not available - required Helm Charts could not be found
4114
4160
  can: You need to install the Extension Operator
4161
+ official: The Official Rancher Extensions Repository provides extensions published by Rancher
4162
+ partners: The Partners Extensions Repository provides extensions published by Rancher Partners
4163
+ community: The Community Extensions Repository provides extensions published by Rancher Community
4115
4164
  install:
4116
4165
  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
4166
+ prompt: This will install the Helm charts needed to enable Extension support
4167
+ airgap: Air-gapped installations should NOT enable this feature
4168
+ addRancherRepo: Add Official Rancher Extensions Repository
4169
+ addPartnersRancherRepo: Add Partners Extensions Repository
4170
+ addCommunityRancherRepo: Add Community Extension sRepository
4120
4171
  remove:
4121
4172
  label: Disable Extension Support
4122
4173
  title: Disable Extension Support?
4123
4174
  prompt: This will un-install the Helm charts that enable Extension support
4124
4175
  registry:
4125
- title: Remove the Rancher Extensions Repository
4126
- prompt: The Rancher Extensions Repository provides extensions published by Rancher
4176
+ official:
4177
+ title: Remove the Official Rancher Extensions Repository
4178
+ partners:
4179
+ title: Remove the Partners Extensions Repository
4180
+ community:
4181
+ title: Remove the Community Extensions Repository
4127
4182
  crd:
4128
4183
  title: Remove the Rancher Extensions Custom Resource Definition
4129
4184
  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.
@@ -7356,7 +7411,7 @@ gitPicker:
7356
7411
  repo:
7357
7412
  label: Repository
7358
7413
  inputLabel: Repository
7359
- tooltip: Branch to deploy from
7414
+ tooltip: Repository to deploy from
7360
7415
  commits:
7361
7416
  label: Commits
7362
7417
  tooltip: Commits to deploy from
@@ -7367,7 +7422,7 @@ gitPicker:
7367
7422
  label: Commit Message
7368
7423
  errors:
7369
7424
  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."
7425
+ noBranch: No branch found. Please review your query and try again.
7371
7426
  gitlab:
7372
7427
  label: GitLab
7373
7428
  tableHeaders:
@@ -7393,7 +7448,7 @@ gitPicker:
7393
7448
  repo:
7394
7449
  label: Repository
7395
7450
  inputLabel: Repository
7396
- tooltip: Branch to deploy from
7451
+ tooltip: Repository to deploy from
7397
7452
  commits:
7398
7453
  label: Commits
7399
7454
  tooltip: Commits to deploy from
@@ -7404,7 +7459,7 @@ gitPicker:
7404
7459
  label: Commit Message
7405
7460
  errors:
7406
7461
  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."
7462
+ noBranch: No branch found. Please review your query and try again.
7408
7463
 
7409
7464
  networkAttachmentDefinition:
7410
7465
  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: 值
@@ -1339,7 +1340,6 @@ cluster:
1339
1340
  deprecated: (已弃用)
1340
1341
  deprecatedPatches: 显示已弃用的 Kubernetes 补丁版本
1341
1342
  deprecatedPatchWarning: 建议为每个 Kubernetes 次要版本使用最新的补丁版本,已弃用的补丁版本可能对迁移有用。
1342
- toolsTip: 使用新集群工具来管理和安装 Monitoring、Logging 等工具。
1343
1343
  legacyWarning: 旧版功能开关已开启,但是不是所有旧版功能都在 Kubernetes 1.21+ 中支持。
1344
1344
  log:
1345
1345
  connecting: 正在连接
@@ -2239,6 +2239,7 @@ fleet:
2239
2239
  addLabel: 添加
2240
2240
  banner: "{count, plural, =0 { 在这里添加命名空间会创建一个 GitRepoRestriction。} other { 只有 Git Repo Restriction 的 <code>allowedTargetNamespaces</code> 在此处管理,你可以对 Git Repo Restriction 进行其他更改。} }"
2241
2241
  footer:
2242
+ cnforums: 中文社区
2242
2243
  docs: Rancher 官方文档
2243
2244
  download: 下载 CLI
2244
2245
  forums: 论坛
@@ -2246,7 +2247,8 @@ footer:
2246
2247
  slack: Slack 讨论群
2247
2248
  wechat:
2248
2249
  title: 微信
2249
- modalText: 扫码关注 Rancher 中国微信技术群
2250
+ modalText: 扫描二维码添加 Rancher 小助手
2251
+ modalText2: 加入 Rancher 官方微信群
2250
2252
 
2251
2253
  gatekeeperConstraint:
2252
2254
  downloadViolations: 下载违规
@@ -3996,7 +3998,7 @@ inactivity:
3996
3998
 
3997
3999
  # Rancher Extensions
3998
4000
  plugins:
3999
- incompatibleDisclaimer: "此扩展的最新版本 ({ version }) 与当前的 Rancher 版本 ({ rancherVersion }) 不兼容。"
4001
+ incompatibleRancherVersion: "此扩展的最新版本 ({ version }) 与当前的 Rancher 版本 ({ rancherVersion }) 不兼容。"
4000
4002
  labels:
4001
4003
  builtin: 内置角色
4002
4004
  experimental: 实验功能
@@ -4017,6 +4019,7 @@ plugins:
4017
4019
  host: 此扩展与此应用程序不兼容
4018
4020
  version: 此扩展与此 Rancher 版本不兼容
4019
4021
  load: 加载此扩展的代码时出错
4022
+ developerPkg: 此扩展已在内部加载,因此我们不会加载外部版本
4020
4023
  success:
4021
4024
  title: 已加载扩展 {name}
4022
4025
  message: 扩展加载成功
@@ -4032,7 +4035,7 @@ plugins:
4032
4035
  detail: 详情
4033
4036
  versions: 版本
4034
4037
  versionError: 无法加载版本信息
4035
- requiresVersion: "需要 Rancher {version}"
4038
+ requiresRancherVersion: "需要 Rancher {version}"
4036
4039
  empty:
4037
4040
  all: 扩展未安装或不可用
4038
4041
  available: 没有可用的扩展
@@ -4446,7 +4449,6 @@ rbac:
4446
4449
  members:
4447
4450
  label: 成员
4448
4451
  roletemplate:
4449
- label: 角色
4450
4452
  newUserDefault:
4451
4453
  no: 否
4452
4454
  tooltip: 不影响已有角色的绑定。
@@ -5593,8 +5595,8 @@ validation:
5593
5595
  tooLongPrefix: '"{key}" 前缀的长度不能超过 {max} 个字符'
5594
5596
  minLength: '"{key}" 必须多于 {min} 个字符'
5595
5597
  maxLength: '"{key}" 必须少于 {max} 个字符'
5596
- minValue: '"{key}" 必须多于 {min}'
5597
- maxValue: '"{key}" 必须小于 {max}'
5598
+ minValue: '"{key}" 必须等于或多于 {min}'
5599
+ maxValue: '"{key}" 必须等于或少于 {max}'
5598
5600
  betweenLengths: '"{key}" 必须包含 {min} 到 {max} 个字符'
5599
5601
  betweenValues: '"{key}" 必须介于 {min} 和 {max} 之间'
5600
5602
  noSchema: 没有找到可以验证的 schema
@@ -7237,6 +7239,7 @@ customLinks:
7237
7239
  valueLabel: URL
7238
7240
  showLabel: 显示
7239
7241
  defaults:
7242
+ cnforums: 中文社区
7240
7243
  docs: Rancher 官方文档
7241
7244
  forums: 论坛
7242
7245
  slack: Slack
@@ -7340,6 +7343,7 @@ manager:
7340
7343
  label: 节点模板
7341
7344
 
7342
7345
  auth:
7346
+ roleTemplate: 角色模板
7343
7347
  config:
7344
7348
  label: 认证
7345
7349
  vncConsole:
@@ -7591,6 +7595,82 @@ charts:
7591
7595
  label: 7 层负载均衡主机名
7592
7596
  description: "7 层负载均衡主机名"
7593
7597
 
7598
+ gitPicker:
7599
+ github:
7600
+ label: GitHub
7601
+ tableHeaders:
7602
+ choose:
7603
+ label: 选择
7604
+ sha:
7605
+ label: SHA
7606
+ author:
7607
+ label: 作者
7608
+ unknown: 未知
7609
+ message:
7610
+ label: 消息
7611
+ date:
7612
+ label: 日期
7613
+ username:
7614
+ label: 用户名/组织
7615
+ inputLabel: 用户名/组织
7616
+ tooltip: Git 仓库的用户名/组织
7617
+ branch:
7618
+ label: 分支
7619
+ inputLabel: 分支
7620
+ tooltip: 要部署的分支
7621
+ repo:
7622
+ label: 仓库
7623
+ inputLabel: 仓库
7624
+ tooltip: 要部署的仓库
7625
+ commits:
7626
+ label: Commit
7627
+ tooltip: 要部署的 Commit
7628
+ commit:
7629
+ label: Commit
7630
+ inputLabel: Commit
7631
+ commitMessage:
7632
+ label: Commit Message
7633
+ errors:
7634
+ noAccount: 未找到 GitHub 帐户或组织。请检查你的查询并重试。
7635
+ noBranch: 未找到分支。请检查你的查询并重试。
7636
+ gitlab:
7637
+ label: GitLab
7638
+ tableHeaders:
7639
+ choose:
7640
+ label: 选择
7641
+ sha:
7642
+ label: SHA
7643
+ author:
7644
+ label: 作者
7645
+ unknown: 未知
7646
+ message:
7647
+ label: 消息
7648
+ date:
7649
+ label: 日期
7650
+ username:
7651
+ label: 用户名/组织
7652
+ inputLabel: 用户名/组织
7653
+ tooltip: Git 仓库的用户名/组织
7654
+ branch:
7655
+ label: 分支
7656
+ inputLabel: 分支
7657
+ tooltip: 要部署的分支
7658
+ repo:
7659
+ label: 仓库
7660
+ inputLabel: 仓库
7661
+ tooltip: 要部署的仓库
7662
+ commits:
7663
+ label: Commit
7664
+ tooltip: 要部署的 Commit
7665
+ commit:
7666
+ label: Commit
7667
+ inputLabel: Commit
7668
+ commitMessage:
7669
+ label: Commit Message
7670
+ errors:
7671
+ noAccount: 未找到 GitLab 帐户或组织。请检查你的查询并重试。
7672
+ noBranch: 未找到分支。请检查你的查询并重试。
7673
+
7594
7674
  networkAttachmentDefinition:
7595
7675
  tabs:
7596
7676
  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">
@@ -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