Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve fleet git repo wizard #13162

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions shell/assets/translations/en-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2426,20 +2426,20 @@ fleet:
label: Paths
placeholder: e.g. /directory/in/your/repo
addLabel: Add Path
empty: The root of the repo is used by default. To use one or more different directories, add them here.
empty: The root of the repo is used by default. To use one or more different directories, add them below.
repo:
title: Source
label: Repository URL
placeholder: e.g. https://github.com/rancher/fleet-examples.git or git@github.com:rancher/fleet-examples.git
placeholder: Enter a valid HTTPS or SSH URL to a git repository
addRepo: Add Repository
noRepos: No repositories have been added
noWorkspaces: There are no workspaces. <br/> Please create a workspace before adding repositories
protocolBanner: Enter a valid HTTPS or SSH URL to a git repository.
resources:
label: 'Resource Handling'
keepResources: Always Keep Resources
keepResourcesBanner: When enabled above, resources will be kept when deleting a GitRepo or Bundle - only Helm release secrets will be deleted.
keepResourcesTooltip: When enabled, resources will be kept when deleting a GitRepo or Bundle - only Helm release secrets will be deleted.
correctDrift: Enable Self-Healing
correctDriftBanner: When enabled, Fleet will ensure that the cluster resources are kept in sync with the git repository. All resource changes made on the cluster will be lost.
correctDriftTooltip: When enabled, Fleet will ensure that the cluster resources are kept in sync with the git repository. All resource changes made on the cluster will be lost.
add:
steps:
repoInfo:
Expand Down
5 changes: 2 additions & 3 deletions shell/assets/translations/zh-hans.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2153,13 +2153,12 @@ fleet:
addRepo: 添加仓库
noRepos: 未添加任何仓库
noWorkspaces: 没有工作空间。<br/>请在添加仓库之前创建一个工作空间
protocolBanner: 输入指向 git 仓库的有效 HTTPS 或 SSH URL。
resources:
label: '资源处理'
keepResources: 永远保留资源
keepResourcesBanner: 启用时,删除 GitRepo 或 Bundle 后将保留资源,只会删除 Helm Release Secret。
keepResourcesTooltip: 启用时,删除 GitRepo 或 Bundle 后将保留资源,只会删除 Helm Release Secret。
correctDrift: 启用自我修复
correctDriftBanner: 启用后,Fleet 将确保集群资源与 Git 仓库保持同步。在 ecluster 上进行的所有资源更改都将丢失。
correctDriftTooltip: 启用后,Fleet 将确保集群资源与 Git 仓库保持同步。在 ecluster 上进行的所有资源更改都将丢失。
add:
steps:
repoInfo:
Expand Down
25 changes: 6 additions & 19 deletions shell/edit/fleet.cattle.io.gitrepo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -540,17 +540,7 @@ export default {
@update:value="$emit('input', $event)"
/>

<div class="row">
<div class="col span-6">
<Banner
color="info col span-6"
>
<div>
{{ t('fleet.gitRepo.repo.protocolBanner') }}
</div>
</Banner>
</div>
</div>
<h2 v-t="'fleet.gitRepo.repo.title'" />
<div
class="row"
:class="{'mt-20': isView}"
Expand Down Expand Up @@ -657,7 +647,7 @@ export default {
<div class="resource-handling">
<Checkbox
v-model:value="correctDriftEnabled"
:tooltip="t('fleet.gitRepo.resources.correctDriftBanner')"
:tooltip="t('fleet.gitRepo.resources.correctDriftTooltip')"
data-testid="GitRepo-correctDrift-checkbox"
class="check"
type="checkbox"
Expand All @@ -666,7 +656,7 @@ export default {
/>
<Checkbox
v-model:value="value.spec.keepResources"
:tooltip="t('fleet.gitRepo.resources.keepResourcesBanner')"
:tooltip="t('fleet.gitRepo.resources.keepResourcesTooltip')"
data-testid="GitRepo-keepResources-checkbox"
class="check"
type="checkbox"
Expand All @@ -675,19 +665,16 @@ export default {
/>
</div>
<div class="spacer" />
<h2 v-t="'fleet.gitRepo.paths.label'" />
<ArrayList
v-model:value="value.spec.paths"
data-testid="gitRepo-paths"
:title="t('fleet.gitRepo.paths.label')"
:mode="mode"
:initial-empty-row="false"
:value-placeholder="t('fleet.gitRepo.paths.placeholder')"
:add-label="t('fleet.gitRepo.paths.addLabel')"
>
<template #empty>
<Banner label-key="fleet.gitRepo.paths.empty" />
</template>
</ArrayList>
:protip="t('fleet.gitRepo.paths.empty')"
/>
</template>
<template #stepTargetInfo>
<h2 v-t="isLocal ? 'fleet.gitRepo.target.labelLocal' : 'fleet.gitRepo.target.label'" />
Expand Down
Loading