1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

feature(helm): move helm charts inside advance deployments (create from manifest) [EE-5999] (#10395)

This commit is contained in:
Prabhat Khera 2023-10-09 11:20:44 +13:00 committed by GitHub
parent 9885694df6
commit b468070945
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 877 additions and 388 deletions

View file

@ -92,18 +92,18 @@ export function BoxSelectorItem<T extends Value>({
}
if (option.iconType === 'badge') {
return <BadgeIcon icon={option.icon} />;
return <BadgeIcon icon={option.icon} iconClass={option.iconClass} />;
}
if (option.iconType === 'raw') {
return (
<Icon
icon={option.icon}
className={clsx(styles.icon, '!flex items-center')}
className={clsx(styles.icon, option.iconClass, '!flex items-center')}
/>
);
}
return <LogoIcon icon={option.icon} />;
return <LogoIcon icon={option.icon} iconClass={option.iconClass} />;
}
}

View file

@ -1,8 +1,10 @@
import clsx from 'clsx';
import { Icon, IconProps } from '@@/Icon';
type Props = IconProps;
export function LogoIcon({ icon }: Props) {
export function LogoIcon({ icon, iconClass }: Props) {
return (
<div
className={`
@ -10,7 +12,7 @@ export function LogoIcon({ icon }: Props) {
items-center justify-center text-7xl
`}
>
<Icon icon={icon} className="!flex" />
<Icon icon={icon} className={clsx('!flex', iconClass)} />
</div>
);
}

View file

@ -1,6 +1,7 @@
import { Edit, FileText, Globe, UploadCloud } from 'lucide-react';
import GitIcon from '@/assets/ico/git.svg?c';
import Helm from '@/assets/ico/helm.svg?c';
import { BoxSelectorOption } from '../types';
@ -49,6 +50,15 @@ export const customTemplate: BoxSelectorOption<'template'> = {
value: 'template',
};
export const helm: BoxSelectorOption<'helm'> = {
id: 'method_helm',
icon: Helm,
label: 'Helm chart',
description: 'Use a Helm chart',
value: 'helm',
iconClass: '!text-[#0f1689] th-dark:!text-white th-highcontrast:!text-white',
};
export const url: BoxSelectorOption<'url'> = {
id: 'method_url',
icon: Globe,

View file

@ -17,4 +17,5 @@ export interface BoxSelectorOption<T extends Value> extends IconProps {
readonly disabledWhenLimited?: boolean;
readonly hide?: boolean;
readonly iconType?: 'raw' | 'badge' | 'logo';
readonly iconClass?: string;
}