feat(waiting-room): add beta alert to assignment [EE-5384] (#9028)
parent
73950f3603
commit
8129e7590b
|
@ -36,7 +36,6 @@ import nomadicon from '@/assets/ico/vendor/nomad-icon.svg?c';
|
|||
import openldap from '@/assets/ico/vendor/openldap.svg?c';
|
||||
import proget from '@/assets/ico/vendor/proget.svg?c';
|
||||
import quay from '@/assets/ico/vendor/quay.svg?c';
|
||||
import beta from '@/assets/ico/beta.svg?c';
|
||||
|
||||
const placeholder = Placeholder;
|
||||
|
||||
|
@ -77,7 +76,6 @@ export const SvgIcons = {
|
|||
proget,
|
||||
quay,
|
||||
kube,
|
||||
beta,
|
||||
};
|
||||
|
||||
interface SvgProps {
|
||||
|
|
|
@ -3,6 +3,7 @@ import { Form, Formik } from 'formik';
|
|||
import { addPlural } from '@/portainer/helpers/strings';
|
||||
import { useUpdateEnvironmentsRelationsMutation } from '@/react/portainer/environments/queries/useUpdateEnvironmentsRelationsMutation';
|
||||
import { notifySuccess } from '@/portainer/services/notifications';
|
||||
import { BetaAlert } from '@/react/portainer/environments/update-schedules/common/BetaAlert';
|
||||
|
||||
import { Checkbox } from '@@/form-components/Checkbox';
|
||||
import { FormControl } from '@@/form-components/FormControl';
|
||||
|
@ -146,6 +147,16 @@ export function AssignmentDialog({
|
|||
Associate
|
||||
</LoadingButton>
|
||||
</Modal.Footer>
|
||||
<div className="mt-2">
|
||||
<BetaAlert
|
||||
message={
|
||||
<>
|
||||
<b>Beta Feature</b> - This feature is currently in beta,
|
||||
some functions might not work as expected.
|
||||
</>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</Form>
|
||||
)}
|
||||
</Formik>
|
||||
|
|
|
@ -1,24 +1,26 @@
|
|||
import { ReactNode } from 'react';
|
||||
|
||||
import betaIcon from '@/assets/ico/beta.svg?c';
|
||||
|
||||
import { TextTip } from '@@/Tip/TextTip';
|
||||
|
||||
interface Props {
|
||||
message: string;
|
||||
message: ReactNode;
|
||||
className?: string;
|
||||
isHtml?: boolean;
|
||||
}
|
||||
|
||||
export function BetaAlert({ message, className, isHtml }: Props) {
|
||||
return (
|
||||
<TextTip
|
||||
icon="svg-beta"
|
||||
className={className}
|
||||
childrenWrapperClassName="text-warning"
|
||||
>
|
||||
{!isHtml ? (
|
||||
message
|
||||
) : (
|
||||
// eslint-disable-next-line react/no-danger
|
||||
<span dangerouslySetInnerHTML={{ __html: message }} />
|
||||
)}
|
||||
<TextTip icon={betaIcon} className={className}>
|
||||
<div className="text-warning">
|
||||
{isHtml && typeof message === 'string' ? (
|
||||
// eslint-disable-next-line react/no-danger
|
||||
<span dangerouslySetInnerHTML={{ __html: message }} />
|
||||
) : (
|
||||
message
|
||||
)}
|
||||
</div>
|
||||
</TextTip>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue