1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 05:19:39 +02:00
portainer/app/react/kubernetes/helm/HelmApplicationView/HelmRevisionList.tsx
Ali 4ee349bd6b feat(helm): helm actions [r8s-259] (#715)
Co-authored-by: James Player <james.player@portainer.io>
Co-authored-by: Cara Ryan <cara.ryan@portainer.io>
Co-authored-by: stevensbkang <skan070@gmail.com>
2025-05-13 22:15:04 +12:00

43 lines
1.1 KiB
TypeScript

import { useCurrentStateAndParams } from '@uirouter/react';
import { History } from 'lucide-react';
import { WidgetIcon } from '@@/Widget/WidgetIcon';
import { HelmRelease } from '../types';
import { HelmRevisionItem } from './HelmRevisionItem';
export function HelmRevisionList({
currentRevision,
history,
}: {
currentRevision?: number;
history: HelmRelease[] | undefined;
}) {
const { params } = useCurrentStateAndParams();
const { name, namespace } = params;
if (!history) {
return null;
}
return (
<div className="h-0 min-h-full overflow-y-auto [scrollbar-gutter:stable]">
<div className="p-5 pb-2.5">
<span className="vertical-center mb-5">
<WidgetIcon icon={History} />
<h2 className="text-base m-0 ml-1">Revisions</h2>
</span>
{history?.map((historyItem) => (
<HelmRevisionItem
key={historyItem.version}
item={historyItem}
namespace={namespace}
name={name}
currentRevision={currentRevision}
/>
))}
</div>
</div>
);
}