mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
31 lines
660 B
TypeScript
31 lines
660 B
TypeScript
|
import { EnvironmentId } from '@/react/portainer/environments/types';
|
||
|
import { useAuthorizations } from '@/react/hooks/useUser';
|
||
|
|
||
|
import { UninstallButton } from './UninstallButton';
|
||
|
|
||
|
export function ChartActions({
|
||
|
environmentId,
|
||
|
releaseName,
|
||
|
namespace,
|
||
|
}: {
|
||
|
environmentId: EnvironmentId;
|
||
|
releaseName: string;
|
||
|
namespace?: string;
|
||
|
}) {
|
||
|
const { authorized } = useAuthorizations('K8sApplicationsW');
|
||
|
|
||
|
if (!authorized) {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
return (
|
||
|
<div className="inline-flex gap-x-2">
|
||
|
<UninstallButton
|
||
|
environmentId={environmentId}
|
||
|
releaseName={releaseName}
|
||
|
namespace={namespace}
|
||
|
/>
|
||
|
</div>
|
||
|
);
|
||
|
}
|