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 openldap from '@/assets/ico/vendor/openldap.svg?c';
|
||||||
import proget from '@/assets/ico/vendor/proget.svg?c';
|
import proget from '@/assets/ico/vendor/proget.svg?c';
|
||||||
import quay from '@/assets/ico/vendor/quay.svg?c';
|
import quay from '@/assets/ico/vendor/quay.svg?c';
|
||||||
import beta from '@/assets/ico/beta.svg?c';
|
|
||||||
|
|
||||||
const placeholder = Placeholder;
|
const placeholder = Placeholder;
|
||||||
|
|
||||||
|
@ -77,7 +76,6 @@ export const SvgIcons = {
|
||||||
proget,
|
proget,
|
||||||
quay,
|
quay,
|
||||||
kube,
|
kube,
|
||||||
beta,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
interface SvgProps {
|
interface SvgProps {
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { Form, Formik } from 'formik';
|
||||||
import { addPlural } from '@/portainer/helpers/strings';
|
import { addPlural } from '@/portainer/helpers/strings';
|
||||||
import { useUpdateEnvironmentsRelationsMutation } from '@/react/portainer/environments/queries/useUpdateEnvironmentsRelationsMutation';
|
import { useUpdateEnvironmentsRelationsMutation } from '@/react/portainer/environments/queries/useUpdateEnvironmentsRelationsMutation';
|
||||||
import { notifySuccess } from '@/portainer/services/notifications';
|
import { notifySuccess } from '@/portainer/services/notifications';
|
||||||
|
import { BetaAlert } from '@/react/portainer/environments/update-schedules/common/BetaAlert';
|
||||||
|
|
||||||
import { Checkbox } from '@@/form-components/Checkbox';
|
import { Checkbox } from '@@/form-components/Checkbox';
|
||||||
import { FormControl } from '@@/form-components/FormControl';
|
import { FormControl } from '@@/form-components/FormControl';
|
||||||
|
@ -146,6 +147,16 @@ export function AssignmentDialog({
|
||||||
Associate
|
Associate
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
</Modal.Footer>
|
</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>
|
</Form>
|
||||||
)}
|
)}
|
||||||
</Formik>
|
</Formik>
|
||||||
|
|
|
@ -1,24 +1,26 @@
|
||||||
|
import { ReactNode } from 'react';
|
||||||
|
|
||||||
|
import betaIcon from '@/assets/ico/beta.svg?c';
|
||||||
|
|
||||||
import { TextTip } from '@@/Tip/TextTip';
|
import { TextTip } from '@@/Tip/TextTip';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
message: string;
|
message: ReactNode;
|
||||||
className?: string;
|
className?: string;
|
||||||
isHtml?: boolean;
|
isHtml?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function BetaAlert({ message, className, isHtml }: Props) {
|
export function BetaAlert({ message, className, isHtml }: Props) {
|
||||||
return (
|
return (
|
||||||
<TextTip
|
<TextTip icon={betaIcon} className={className}>
|
||||||
icon="svg-beta"
|
<div className="text-warning">
|
||||||
className={className}
|
{isHtml && typeof message === 'string' ? (
|
||||||
childrenWrapperClassName="text-warning"
|
// eslint-disable-next-line react/no-danger
|
||||||
>
|
<span dangerouslySetInnerHTML={{ __html: message }} />
|
||||||
{!isHtml ? (
|
) : (
|
||||||
message
|
message
|
||||||
) : (
|
)}
|
||||||
// eslint-disable-next-line react/no-danger
|
</div>
|
||||||
<span dangerouslySetInnerHTML={{ __html: message }} />
|
|
||||||
)}
|
|
||||||
</TextTip>
|
</TextTip>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue