diff --git a/packages/frontend/@n8n/i18n/src/locales/en.json b/packages/frontend/@n8n/i18n/src/locales/en.json index 44d0d5fc29..a6d6d67257 100644 --- a/packages/frontend/@n8n/i18n/src/locales/en.json +++ b/packages/frontend/@n8n/i18n/src/locales/en.json @@ -3295,6 +3295,7 @@ "evaluation.executions.toast.addedTo.title": "Execution added to test ", "evaluation.executions.toast.closeTab": "Close this tab", "evaluation.executions.toast.removedFrom.title": "Execution removed from test ", + "evaluations.readOnlyNotice": "Evaluations can't be built in read-only mode. Build your evaluation on your development environment.", "evaluations.paywall.title": "Register to enable evaluation", "evaluations.paywall.description": "Register your Community instance to unlock the evaluation feature", "evaluations.paywall.cta": "Register instance", diff --git a/packages/frontend/editor-ui/src/views/Evaluations.ee/EvaluationsRootView.vue b/packages/frontend/editor-ui/src/views/Evaluations.ee/EvaluationsRootView.vue index cc1d8968b5..81342a79c8 100644 --- a/packages/frontend/editor-ui/src/views/Evaluations.ee/EvaluationsRootView.vue +++ b/packages/frontend/editor-ui/src/views/Evaluations.ee/EvaluationsRootView.vue @@ -9,9 +9,10 @@ import { useToast } from '@/composables/useToast'; import { useI18n } from '@n8n/i18n'; import { useEvaluationStore } from '@/stores/evaluation.store.ee'; import { useNodeTypesStore } from '@/stores/nodeTypes.store'; +import { useSourceControlStore } from '@/stores/sourceControl.store'; import { computed, watch } from 'vue'; -import { N8nLink, N8nText } from '@n8n/design-system'; +import { N8nCallout, N8nLink, N8nText } from '@n8n/design-system'; import EvaluationsPaywall from '@/components/Evaluations.ee/Paywall/EvaluationsPaywall.vue'; import SetupWizard from '@/components/Evaluations.ee/SetupWizard/SetupWizard.vue'; @@ -26,6 +27,7 @@ const nodeTypesStore = useNodeTypesStore(); const telemetry = useTelemetry(); const toast = useToast(); const locale = useI18n(); +const sourceControlStore = useSourceControlStore(); const { initializeWorkspace } = useCanvasOperations(); @@ -33,6 +35,10 @@ const evaluationsLicensed = computed(() => { return usageStore.workflowsWithEvaluationsLimit !== 0; }); +const isProtectedEnvironment = computed(() => { + return sourceControlStore.preferences.branchReadOnly; +}); + const runs = computed(() => { return Object.values(evaluationStore.testRunsById ?? {}).filter( ({ workflowId }) => workflowId === props.name, @@ -142,7 +148,10 @@ watch( -
+ + {{ locale.baseText('evaluations.readOnlyNotice') }} + +