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:
parent
631503fc1b
commit
9a8e95d017
21 changed files with 217 additions and 90 deletions
|
@ -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();
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue