mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(editor): add readonly state for nodes (#4299)
* fix(editor): add types to Node.vue component props * fix(editor): some cleanup in NodeView * fix(editor): fix some boolean usage * feat(editor): check foreign credentials * fix(editor): passing readOnly to inputs * fix(editor): add types to component and solve property mutation * fix(editor): add types to component and solve property mutation * fix(editor): component property type * fix(editor): component property type * fix(editor): default prop values * fix(editor): fix FixedCollectionParameter.vue
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
:linkedRuns="linked"
|
||||
:currentNodeName="inputNodeName"
|
||||
:sessionId="sessionId"
|
||||
:readOnly="readOnly"
|
||||
:readOnly="readOnly || hasForeignCredential"
|
||||
@linkRun="onLinkRunToInput"
|
||||
@unlinkRun="() => onUnlinkRun('input')"
|
||||
@runChange="onRunInputIndexChange"
|
||||
@@ -71,7 +71,7 @@
|
||||
:runIndex="outputRun"
|
||||
:linkedRuns="linked"
|
||||
:sessionId="sessionId"
|
||||
:isReadOnly="readOnly"
|
||||
:isReadOnly="readOnly || hasForeignCredential"
|
||||
@linkRun="onLinkRunToOutput"
|
||||
@unlinkRun="() => onUnlinkRun('output')"
|
||||
@runChange="onRunOutputIndexChange"
|
||||
@@ -86,6 +86,7 @@
|
||||
:dragging="isDragging"
|
||||
:sessionId="sessionId"
|
||||
:nodeType="activeNodeType"
|
||||
:isReadOnly="readOnly || hasForeignCredential"
|
||||
@valueChanged="valueChanged"
|
||||
@execute="onNodeExecute"
|
||||
@activate="onWorkflowActivate"
|
||||
@@ -114,7 +115,7 @@ import {
|
||||
Workflow,
|
||||
jsonParse,
|
||||
} from 'n8n-workflow';
|
||||
import { IExecutionResponse, INodeUi, IUpdateInformation, TargetItem } from '../Interface';
|
||||
import { IExecutionResponse, INodeUi, IUpdateInformation, TargetItem } from '@/Interface';
|
||||
|
||||
import { externalHooks } from '@/components/mixins/externalHooks';
|
||||
import { nodeHelpers } from '@/components/mixins/nodeHelpers';
|
||||
@@ -136,7 +137,7 @@ import {
|
||||
} from '@/constants';
|
||||
import { workflowActivate } from './mixins/workflowActivate';
|
||||
import { pinData } from "@/components/mixins/pinData";
|
||||
import { dataPinningEventBus } from '../event-bus/data-pinning-event-bus';
|
||||
import { dataPinningEventBus } from '@/event-bus/data-pinning-event-bus';
|
||||
|
||||
export default mixins(
|
||||
externalHooks,
|
||||
@@ -174,6 +175,7 @@ export default mixins(
|
||||
pinDataDiscoveryTooltipVisible: false,
|
||||
avgInputRowHeight: 0,
|
||||
avgOutputRowHeight: 0,
|
||||
hasForeignCredential: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -360,6 +362,8 @@ export default mixins(
|
||||
nodeSubtitle: this.getNodeSubtitle(node, this.activeNodeType, this.getCurrentWorkflow()),
|
||||
});
|
||||
|
||||
this.checkForeignCredentials();
|
||||
|
||||
setTimeout(() => {
|
||||
if (this.activeNode) {
|
||||
const outogingConnections = this.$store.getters.outgoingConnectionsByNodeName(
|
||||
@@ -603,6 +607,10 @@ export default mixins(
|
||||
input_node_type: this.inputNode ? this.inputNode.type : '',
|
||||
});
|
||||
},
|
||||
checkForeignCredentials() {
|
||||
const issues = this.getNodeCredentialIssues(this.activeNode);
|
||||
this.hasForeignCredential = !!issues?.credentials?.foreign;
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user