Skip to content

Commit

Permalink
Merge pull request #2543 from headlamp-k8s/cluster-origin
Browse files Browse the repository at this point in the history
frontend: Home: Improve cluster origin labels
  • Loading branch information
joaquimrocha authored Nov 13, 2024
2 parents 60f43fc + 966111e commit d24fc9f
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 12 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/App/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ function HomeComponent(props: HomeComponentProps) {
function getOrigin(cluster: Cluster): string {
if (cluster.meta_data?.source === 'kubeconfig') {
const kubeconfigPath = process.env.KUBECONFIG ?? '~/.kube/config';
return t('translation|Kubeconfig') + ` (${kubeconfigPath})`;
return `Kubeconfig: ${kubeconfigPath}`;
} else if (cluster.meta_data?.source === 'dynamic_cluster') {
return t('translation|Dynamic cluster');
return t('translation|Plugin');
} else if (cluster.meta_data?.source === 'in_cluster') {
return t('translation|In-cluster');
}
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/i18n/locales/de/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"Delete Cluster": "",
"Are you sure you want to remove the cluster \"{{ clusterName }}\"?": "Sind Sie sicher, dass Sie den Cluster \"{{ clusterName }}\" entfernen möchten?",
"Active": "Aktiv",
"Kubeconfig": "",
"Dynamic cluster": "",
"Plugin": "",
"In-cluster": "",
"Home": "Startseite",
"All Clusters": "Alle Cluster",
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"Delete Cluster": "Delete Cluster",
"Are you sure you want to remove the cluster \"{{ clusterName }}\"?": "Are you sure you want to remove the cluster \"{{ clusterName }}\"?",
"Active": "Active",
"Kubeconfig": "Kubeconfig",
"Dynamic cluster": "Dynamic cluster",
"Plugin": "Plugin",
"In-cluster": "In-cluster",
"Home": "Home",
"All Clusters": "All Clusters",
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/i18n/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"Delete Cluster": "",
"Are you sure you want to remove the cluster \"{{ clusterName }}\"?": "¿Está seguro de que desea eliminar el cluster \"{{ clusterName }}\"?",
"Active": "Activo",
"Kubeconfig": "",
"Dynamic cluster": "",
"Plugin": "",
"In-cluster": "",
"Home": "Inicio",
"All Clusters": "Todos los Clusters",
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/i18n/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"Delete Cluster": "",
"Are you sure you want to remove the cluster \"{{ clusterName }}\"?": "Voulez-vous vraiment supprimer le cluster \"{{ clusterName }}\"?",
"Active": "Actif",
"Kubeconfig": "",
"Dynamic cluster": "",
"Plugin": "",
"In-cluster": "",
"Home": "Accueil",
"All Clusters": "Tous les clusters",
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/i18n/locales/pt/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"Delete Cluster": "",
"Are you sure you want to remove the cluster \"{{ clusterName }}\"?": "Tem a certeza que quer remover o cluster \"{{ clusterName }}\"?",
"Active": "Activo",
"Kubeconfig": "",
"Dynamic cluster": "",
"Plugin": "",
"In-cluster": "",
"Home": "Início",
"All Clusters": "Todos os Clusters",
Expand Down

0 comments on commit d24fc9f

Please sign in to comment.