1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-08 23:35:31 +02:00

fix(ui): update search placeholder [EE-6667] (#11190)

* update search placeholder

* remove box selector description
This commit is contained in:
Prabhat Khera 2024-02-16 12:34:06 +13:00 committed by GitHub
parent bdeedb4018
commit 6b3f30e32f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 12 deletions

View file

@ -2,6 +2,7 @@ import { useMemo, useEffect } from 'react';
import { useCurrentUser } from '@/react/hooks/useUser';
import helm from '@/assets/ico/vendor/helm.svg?c';
import { isPureAdmin } from '@/portainer/users/user.helpers';
import { Link } from '@@/Link';
import { Datatable } from '@@/datatables';
@ -22,6 +23,8 @@ export function HelmRepositoryDatatable() {
const { user } = useCurrentUser();
const helmReposQuery = useHelmRepositories(user.Id);
const isAdminUser = isPureAdmin(user);
const tableState = useTableState(settingsStore, storageKey);
const helmRepos = useMemo(() => {
@ -58,7 +61,7 @@ export function HelmRepositoryDatatable() {
<Datatable
getRowId={(row) => String(row.Id)}
dataset={helmRepos}
description={<HelmDatatableDescription />}
description={<HelmDatatableDescription isAdmin={isAdminUser} />}
settingsManager={tableState}
columns={columns}
title="Helm repositories"
@ -74,15 +77,19 @@ export function HelmRepositoryDatatable() {
);
}
function HelmDatatableDescription() {
function HelmDatatableDescription({ isAdmin }: { isAdmin: boolean }) {
return (
<TextTip color="blue" className="mb-3">
Adding a Helm repo here only makes it available in your own user
account&apos;s Portainer UI. Helm charts are pulled down from these repos
(plus the{' '}
<Link to="portainer.settings" params={{ '#': 'kubernetes-settings' }}>
{isAdmin ? (
<Link to="portainer.settings" params={{ '#': 'kubernetes-settings' }}>
<span>globally-set Helm repo</span>
</Link>
) : (
<span>globally-set Helm repo</span>
</Link>
)}
) and shown in the Create from Manifest screen&apos;s Helm charts list.
</TextTip>
);