mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 05:19:39 +02:00
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>
This commit is contained in:
parent
dfa32b6755
commit
4ee349bd6b
117 changed files with 4161 additions and 696 deletions
|
@ -0,0 +1,49 @@
|
|||
import { localizeDate } from '@/react/common/date-utils';
|
||||
|
||||
import { BlocklistItem } from '@@/Blocklist/BlocklistItem';
|
||||
import { Link } from '@@/Link';
|
||||
import { Badge } from '@@/Badge';
|
||||
|
||||
import { HelmRelease } from '../types';
|
||||
import { getStatusColor, getStatusText } from '../helm-status-utils';
|
||||
|
||||
export function HelmRevisionItem({
|
||||
item,
|
||||
currentRevision,
|
||||
namespace,
|
||||
name,
|
||||
}: {
|
||||
item: HelmRelease;
|
||||
currentRevision?: number;
|
||||
namespace: string;
|
||||
name: string;
|
||||
}) {
|
||||
return (
|
||||
<BlocklistItem
|
||||
data-cy="helm-history-item"
|
||||
isSelected={item.version === currentRevision}
|
||||
as={Link}
|
||||
to="kubernetes.helm"
|
||||
params={{ namespace, name, revision: item.version }}
|
||||
>
|
||||
<div className="flex flex-col gap-2 w-full">
|
||||
<div className="flex flex-wrap gap-1 justify-between">
|
||||
<Badge type={getStatusColor(item.info?.status)}>
|
||||
{getStatusText(item.info?.status)}
|
||||
</Badge>
|
||||
<span className="text-xs text-muted">Revision #{item.version}</span>
|
||||
</div>
|
||||
<div className="flex flex-wrap gap-1 justify-between">
|
||||
<span className="text-xs text-muted">
|
||||
{item.chart.metadata?.name}-{item.chart.metadata?.version}
|
||||
</span>
|
||||
{item.info?.last_deployed && (
|
||||
<span className="text-xs text-muted">
|
||||
{localizeDate(new Date(item.info.last_deployed))}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</BlocklistItem>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue