feat(editor): Prevent saving of workflow when canvas is loading (#6497)
* feat(editor): Prevent saving of pristine workflow Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> * Prevent saving if loading Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> * Fix 7-workflow-actions spec Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> * Restrict delay intercept to GET only Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> * Wait for WF patch Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> * Add helper to remove all active WFs in e2e Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> * Use META_KEY env var * Remove cy.wait * Delete debugging DB reset console log Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> * Fix clashin mixins `isReadOnly` property Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> --------- Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
<div class="expression-editor ph-no-capture">
|
||||
<ExpressionEditorModalInput
|
||||
:value="value"
|
||||
:isReadOnly="isReadOnly"
|
||||
:isReadOnly="isReadOnlyRoute"
|
||||
:path="path"
|
||||
@change="valueChanged"
|
||||
@close="closeDialog"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
color="text-dark"
|
||||
data-test-id="credentials-label"
|
||||
>
|
||||
<div v-if="readonly || isReadOnly">
|
||||
<div v-if="readonly || isReadOnlyRoute">
|
||||
<n8n-input
|
||||
:value="getSelectedName(credentialTypeDescription.name)"
|
||||
disabled
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
:class="$style.pinnedDataCallout"
|
||||
>
|
||||
{{ $locale.baseText('runData.pindata.thisDataIsPinned') }}
|
||||
<span class="ml-4xs" v-if="!isReadOnly">
|
||||
<span class="ml-4xs" v-if="!isReadOnlyRoute">
|
||||
<n8n-link
|
||||
theme="secondary"
|
||||
size="small"
|
||||
@@ -59,7 +59,7 @@
|
||||
data-test-id="ndv-run-data-display-mode"
|
||||
/>
|
||||
<n8n-icon-button
|
||||
v-if="canPinData && !isReadOnly"
|
||||
v-if="canPinData && !isReadOnlyRoute"
|
||||
v-show="!editMode.enabled"
|
||||
:title="$locale.baseText('runData.editOutput')"
|
||||
:circle="false"
|
||||
@@ -99,7 +99,9 @@
|
||||
type="tertiary"
|
||||
:active="hasPinData"
|
||||
icon="thumbtack"
|
||||
:disabled="editMode.enabled || (inputData.length === 0 && !hasPinData) || isReadOnly"
|
||||
:disabled="
|
||||
editMode.enabled || (inputData.length === 0 && !hasPinData) || isReadOnlyRoute
|
||||
"
|
||||
@click="onTogglePinData({ source: 'pin-icon-click' })"
|
||||
data-test-id="ndv-pin-data"
|
||||
/>
|
||||
@@ -917,7 +919,7 @@ export default defineComponent({
|
||||
if (
|
||||
value &&
|
||||
value.length > 0 &&
|
||||
!this.isReadOnly &&
|
||||
!this.isReadOnlyRoute &&
|
||||
!localStorage.getItem(LOCAL_STORAGE_PIN_DATA_DISCOVERY_NDV_FLAG)
|
||||
) {
|
||||
this.pinDataDiscoveryComplete();
|
||||
|
||||
@@ -212,7 +212,7 @@ export default defineComponent({
|
||||
copy_type: copyType,
|
||||
workflow_id: this.workflowsStore.workflowId,
|
||||
pane: this.paneType,
|
||||
in_execution_log: this.isReadOnly,
|
||||
in_execution_log: this.isReadOnlyRoute,
|
||||
});
|
||||
|
||||
this.copyToClipboard(value);
|
||||
|
||||
Reference in New Issue
Block a user