1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 05:19:39 +02:00

feat(helm): rollback helm chart [r8s-287] (#660)

This commit is contained in:
Ali 2025-04-23 08:58:34 +12:00 committed by GitHub
parent 61d6ac035d
commit c91c8a6467
13 changed files with 701 additions and 32 deletions

View file

@ -1,22 +1,20 @@
import { EnvironmentId } from '@/react/portainer/environments/types';
import { useAuthorizations } from '@/react/hooks/useUser';
import { RollbackButton } from './RollbackButton';
import { UninstallButton } from './UninstallButton';
export function ChartActions({
environmentId,
releaseName,
namespace,
currentRevision,
}: {
environmentId: EnvironmentId;
releaseName: string;
namespace?: string;
currentRevision?: number;
}) {
const { authorized } = useAuthorizations('K8sApplicationsW');
if (!authorized) {
return null;
}
const hasPreviousRevision = currentRevision && currentRevision >= 2;
return (
<div className="inline-flex gap-x-2">
@ -25,6 +23,14 @@ export function ChartActions({
releaseName={releaseName}
namespace={namespace}
/>
{hasPreviousRevision && (
<RollbackButton
latestRevision={currentRevision}
environmentId={environmentId}
releaseName={releaseName}
namespace={namespace}
/>
)}
</div>
);
}