1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

feat(upgrade): show subtle banner [EE-5017] (#8489)

This commit is contained in:
Chaim Lev-Ari 2023-02-19 09:47:50 +05:30 committed by GitHub
parent 631503fc1b
commit 9a8e95d017
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 217 additions and 90 deletions

View file

@ -3,6 +3,7 @@ import { object, SchemaOf, string } from 'yup';
import { useUpgradeEditionMutation } from '@/react/portainer/system/useUpgradeEditionMutation';
import { notifySuccess } from '@/portainer/services/notifications';
import { useAnalytics } from '@/angulartics.matomo/analytics-services';
import { Button, LoadingButton } from '@@/buttons';
import { FormControl } from '@@/form-components/FormControl';
@ -30,6 +31,7 @@ export function UploadLicenseDialog({
isGetLicenseSubmitted: boolean;
}) {
const upgradeMutation = useUpgradeEditionMutation();
const { trackEvent } = useAnalytics();
return (
<Modal
@ -99,6 +101,13 @@ export function UploadLicenseDialog({
function handleSubmit(values: FormValues) {
upgradeMutation.mutate(values, {
onSuccess() {
trackEvent('portainer-upgrade-license-key-provided', {
category: 'portainer',
metadata: {
Upgrade: 'true',
},
});
notifySuccess('Starting upgrade', 'License validated successfully');
goToLoading();
},