From 88e025036334cd562a9ca89f1114ee4ee9135301 Mon Sep 17 00:00:00 2001 From: Csaba Tuncsik Date: Wed, 12 Jun 2024 18:09:12 +0200 Subject: [PATCH 1/2] fix(editor): Fix console warning about missing required prop --- packages/editor-ui/src/components/CredentialCard.vue | 2 +- packages/editor-ui/src/components/WorkflowCard.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/editor-ui/src/components/CredentialCard.vue b/packages/editor-ui/src/components/CredentialCard.vue index 82e74c2e0fac0..b772c6e5c630e 100644 --- a/packages/editor-ui/src/components/CredentialCard.vue +++ b/packages/editor-ui/src/components/CredentialCard.vue @@ -23,7 +23,7 @@ const CREDENTIAL_LIST_ITEM_ACTIONS = { const props = withDefaults( defineProps<{ data: ICredentialsResponse; - readOnly: boolean; + readOnly?: boolean; }>(), { data: () => ({ diff --git a/packages/editor-ui/src/components/WorkflowCard.vue b/packages/editor-ui/src/components/WorkflowCard.vue index 1ba4e41b35eac..6509a36e855c6 100644 --- a/packages/editor-ui/src/components/WorkflowCard.vue +++ b/packages/editor-ui/src/components/WorkflowCard.vue @@ -36,7 +36,7 @@ const WORKFLOW_LIST_ITEM_ACTIONS = { const props = withDefaults( defineProps<{ data: IWorkflowDb; - readOnly: boolean; + readOnly?: boolean; }>(), { data: () => ({ From 44c6377bb6af52ddb33f9134d1d60838c1c9e340 Mon Sep 17 00:00:00 2001 From: Csaba Tuncsik Date: Wed, 12 Jun 2024 18:09:35 +0200 Subject: [PATCH 2/2] fix(editor): Add telemetry to resource move --- .../Projects/ProjectMoveResourceConfirmModal.vue | 6 ++++++ .../components/Projects/ProjectMoveResourceModal.vue | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/editor-ui/src/components/Projects/ProjectMoveResourceConfirmModal.vue b/packages/editor-ui/src/components/Projects/ProjectMoveResourceConfirmModal.vue index 962dbaeef16f9..454fe163cb6e2 100644 --- a/packages/editor-ui/src/components/Projects/ProjectMoveResourceConfirmModal.vue +++ b/packages/editor-ui/src/components/Projects/ProjectMoveResourceConfirmModal.vue @@ -7,6 +7,7 @@ import { useProjectsStore } from '@/stores/projects.store'; import Modal from '@/components/Modal.vue'; import { N8nCheckbox, N8nText } from 'n8n-design-system'; import { useToast } from '@/composables/useToast'; +import { useTelemetry } from '@/composables/useTelemetry'; const props = defineProps<{ modalName: string; @@ -21,6 +22,7 @@ const i18n = useI18n(); const toast = useToast(); const uiStore = useUIStore(); const projectsStore = useProjectsStore(); +const telemetry = useTelemetry(); const checks = ref([false, false]); const allChecked = computed(() => checks.value.every(Boolean)); @@ -43,6 +45,10 @@ const confirm = async () => { props.data.projectId, ); closeModal(); + telemetry.track(`User successfully moved ${props.data.resourceType}`, { + [`${props.data.resourceType}_id`]: props.data.resource.id, + project_from_type: projectsStore.currentProject?.type ?? projectsStore.personalProject?.type, + }); } catch (error) { toast.showError( error.message, diff --git a/packages/editor-ui/src/components/Projects/ProjectMoveResourceModal.vue b/packages/editor-ui/src/components/Projects/ProjectMoveResourceModal.vue index c8a8934f5f4ea..5a1255efa43df 100644 --- a/packages/editor-ui/src/components/Projects/ProjectMoveResourceModal.vue +++ b/packages/editor-ui/src/components/Projects/ProjectMoveResourceModal.vue @@ -1,5 +1,5 @@