2022-05-23 08:56:15 -07:00
|
|
|
<template>
|
|
|
|
<RunData
|
2024-01-05 03:23:28 -08:00
|
|
|
ref="runData"
|
2024-01-04 01:22:56 -08:00
|
|
|
:node="node"
|
2023-12-28 00:49:58 -08:00
|
|
|
:run-index="runIndex"
|
|
|
|
:linked-runs="linkedRuns"
|
|
|
|
:can-link-runs="canLinkRuns"
|
|
|
|
:too-much-data-title="$locale.baseText('ndv.output.tooMuchData.title')"
|
|
|
|
:no-data-in-branch-message="$locale.baseText('ndv.output.noOutputDataInBranch')"
|
|
|
|
:is-executing="isNodeRunning"
|
|
|
|
:executing-message="$locale.baseText('ndv.output.executing')"
|
2024-04-03 04:43:14 -07:00
|
|
|
:push-ref="pushRef"
|
2023-12-28 00:49:58 -08:00
|
|
|
:block-u-i="blockUI"
|
|
|
|
:is-production-execution-preview="isProductionExecutionPreview"
|
|
|
|
:is-pane-active="isPaneActive"
|
|
|
|
pane-type="output"
|
|
|
|
:data-output-type="outputMode"
|
2024-03-26 06:22:57 -07:00
|
|
|
@activate-pane="activatePane"
|
|
|
|
@run-change="onRunIndexChange"
|
|
|
|
@link-run="onLinkRun"
|
|
|
|
@unlink-run="onUnlinkRun"
|
|
|
|
@table-mounted="$emit('tableMounted', $event)"
|
|
|
|
@item-hover="$emit('itemHover', $event)"
|
2023-11-15 07:19:48 -08:00
|
|
|
@search="$emit('search', $event)"
|
2022-05-23 08:56:15 -07:00
|
|
|
>
|
2022-11-18 05:59:31 -08:00
|
|
|
<template #header>
|
2022-05-23 08:56:15 -07:00
|
|
|
<div :class="$style.titleSection">
|
2023-10-02 08:33:43 -07:00
|
|
|
<template v-if="hasAiMetadata">
|
|
|
|
<n8n-radio-buttons
|
|
|
|
v-model="outputMode"
|
2023-12-28 00:49:58 -08:00
|
|
|
:options="outputTypes"
|
2024-03-26 06:22:57 -07:00
|
|
|
@update:model-value="onUpdateOutputMode"
|
2023-10-02 08:33:43 -07:00
|
|
|
/>
|
|
|
|
</template>
|
2023-12-28 00:49:58 -08:00
|
|
|
<span v-else :class="$style.title">
|
2022-07-20 08:50:39 -07:00
|
|
|
{{ $locale.baseText(outputPanelEditMode.enabled ? 'ndv.output.edit' : 'ndv.output') }}
|
|
|
|
</span>
|
|
|
|
<RunInfo
|
2024-01-04 01:22:56 -08:00
|
|
|
v-if="hasNodeRun && !pinnedData.hasData.value && runsCount === 1"
|
2022-07-20 08:50:39 -07:00
|
|
|
v-show="!outputPanelEditMode.enabled"
|
2023-12-28 00:49:58 -08:00
|
|
|
:task-data="runTaskData"
|
|
|
|
:has-stale-data="staleData"
|
2024-01-04 01:22:56 -08:00
|
|
|
:has-pin-data="pinnedData.hasData.value"
|
2022-07-20 08:50:39 -07:00
|
|
|
/>
|
2022-05-23 08:56:15 -07:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-11-18 05:59:31 -08:00
|
|
|
<template #node-not-run>
|
2022-12-01 00:26:38 -08:00
|
|
|
<n8n-text v-if="workflowRunning && !isTriggerNode" data-test-id="ndv-output-waiting">{{
|
|
|
|
$locale.baseText('ndv.output.waitingToRun')
|
|
|
|
}}</n8n-text>
|
|
|
|
<n8n-text v-if="!workflowRunning" data-test-id="ndv-output-run-node-hint">
|
2024-01-04 01:22:56 -08:00
|
|
|
<template v-if="isSubNodeType.value">
|
2023-11-28 07:47:28 -08:00
|
|
|
{{ $locale.baseText('ndv.output.runNodeHintSubNode') }}
|
|
|
|
</template>
|
|
|
|
<template v-else>
|
|
|
|
{{ $locale.baseText('ndv.output.runNodeHint') }}
|
2023-12-28 00:49:58 -08:00
|
|
|
<span v-if="canPinData" @click="insertTestData">
|
2023-11-28 07:47:28 -08:00
|
|
|
<br />
|
|
|
|
{{ $locale.baseText('generic.or') }}
|
|
|
|
<n8n-text tag="a" size="medium" color="primary">
|
|
|
|
{{ $locale.baseText('ndv.output.insertTestData') }}
|
|
|
|
</n8n-text>
|
|
|
|
</span>
|
|
|
|
</template>
|
2022-07-20 08:50:39 -07:00
|
|
|
</n8n-text>
|
2022-05-23 08:56:15 -07:00
|
|
|
</template>
|
|
|
|
|
2022-11-18 05:59:31 -08:00
|
|
|
<template #no-output-data>
|
2022-05-23 08:56:15 -07:00
|
|
|
<n8n-text :bold="true" color="text-dark" size="large">{{
|
|
|
|
$locale.baseText('ndv.output.noOutputData.title')
|
|
|
|
}}</n8n-text>
|
|
|
|
<n8n-text>
|
|
|
|
{{ $locale.baseText('ndv.output.noOutputData.message') }}
|
|
|
|
<a @click="openSettings">{{
|
|
|
|
$locale.baseText('ndv.output.noOutputData.message.settings')
|
|
|
|
}}</a>
|
|
|
|
{{ $locale.baseText('ndv.output.noOutputData.message.settingsOption') }}
|
|
|
|
</n8n-text>
|
|
|
|
</template>
|
|
|
|
|
2023-12-28 00:49:58 -08:00
|
|
|
<template v-if="outputMode === 'logs'" #content>
|
|
|
|
<RunDataAi :node="node" :run-index="runIndex" />
|
2023-10-02 08:33:43 -07:00
|
|
|
</template>
|
2023-04-25 07:57:21 -07:00
|
|
|
<template #recovered-artificial-output-data>
|
2023-02-17 01:54:07 -08:00
|
|
|
<div :class="$style.recoveredOutputData">
|
|
|
|
<n8n-text tag="div" :bold="true" color="text-dark" size="large">{{
|
|
|
|
$locale.baseText('executionDetails.executionFailed.recoveredNodeTitle')
|
|
|
|
}}</n8n-text>
|
|
|
|
<n8n-text>
|
|
|
|
{{ $locale.baseText('executionDetails.executionFailed.recoveredNodeMessage') }}
|
|
|
|
</n8n-text>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2024-01-04 01:22:56 -08:00
|
|
|
<template v-if="!pinnedData.hasData.value && runsCount > 1" #run-info>
|
2023-12-28 00:49:58 -08:00
|
|
|
<RunInfo :task-data="runTaskData" />
|
2022-05-23 08:56:15 -07:00
|
|
|
</template>
|
|
|
|
</RunData>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2023-05-16 02:43:46 -07:00
|
|
|
import { defineComponent } from 'vue';
|
2023-04-24 03:18:24 -07:00
|
|
|
import type { IExecutionResponse, INodeUi } from '@/Interface';
|
|
|
|
import type { INodeTypeDescription, IRunData, IRunExecutionData, ITaskData } from 'n8n-workflow';
|
2023-04-25 02:47:03 -07:00
|
|
|
import RunData from './RunData.vue';
|
2022-05-23 08:56:15 -07:00
|
|
|
import RunInfo from './RunInfo.vue';
|
2024-01-04 01:22:56 -08:00
|
|
|
import { mapStores, storeToRefs } from 'pinia';
|
2023-05-05 01:41:54 -07:00
|
|
|
import { useUIStore } from '@/stores/ui.store';
|
|
|
|
import { useWorkflowsStore } from '@/stores/workflows.store';
|
|
|
|
import { useNDVStore } from '@/stores/ndv.store';
|
|
|
|
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
2023-10-02 08:33:43 -07:00
|
|
|
import RunDataAi from './RunDataAi/RunDataAi.vue';
|
|
|
|
import { ndvEventBus } from '@/event-bus';
|
2024-01-04 01:22:56 -08:00
|
|
|
import { useNodeType } from '@/composables/useNodeType';
|
|
|
|
import { usePinnedData } from '@/composables/usePinnedData';
|
2022-07-20 08:50:39 -07:00
|
|
|
|
2023-04-21 06:59:04 -07:00
|
|
|
type RunDataRef = InstanceType<typeof RunData>;
|
2022-05-23 08:56:15 -07:00
|
|
|
|
2023-10-02 08:33:43 -07:00
|
|
|
const OUTPUT_TYPE = {
|
|
|
|
REGULAR: 'regular',
|
|
|
|
LOGS: 'logs',
|
|
|
|
};
|
|
|
|
|
2023-05-16 02:43:46 -07:00
|
|
|
export default defineComponent({
|
2022-05-23 08:56:15 -07:00
|
|
|
name: 'OutputPanel',
|
2023-10-02 08:33:43 -07:00
|
|
|
components: { RunData, RunInfo, RunDataAi },
|
2022-05-23 08:56:15 -07:00
|
|
|
props: {
|
|
|
|
runIndex: {
|
|
|
|
type: Number,
|
2023-11-03 04:07:04 -07:00
|
|
|
required: true,
|
2022-05-23 08:56:15 -07:00
|
|
|
},
|
2022-07-20 08:50:39 -07:00
|
|
|
isReadOnly: {
|
|
|
|
type: Boolean,
|
|
|
|
},
|
2022-05-23 08:56:15 -07:00
|
|
|
linkedRuns: {
|
|
|
|
type: Boolean,
|
|
|
|
},
|
|
|
|
canLinkRuns: {
|
|
|
|
type: Boolean,
|
|
|
|
},
|
2024-04-03 04:43:14 -07:00
|
|
|
pushRef: {
|
2022-05-23 08:56:15 -07:00
|
|
|
type: String,
|
|
|
|
},
|
2022-10-31 10:59:53 -07:00
|
|
|
blockUI: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false,
|
|
|
|
},
|
2022-11-14 04:28:26 -08:00
|
|
|
isProductionExecutionPreview: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false,
|
|
|
|
},
|
2023-11-15 07:19:48 -08:00
|
|
|
isPaneActive: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false,
|
|
|
|
},
|
2022-05-23 08:56:15 -07:00
|
|
|
},
|
2024-01-04 01:22:56 -08:00
|
|
|
setup(props) {
|
|
|
|
const ndvStore = useNDVStore();
|
|
|
|
const { activeNode } = storeToRefs(ndvStore);
|
|
|
|
const { isSubNodeType } = useNodeType({
|
|
|
|
node: activeNode,
|
|
|
|
});
|
|
|
|
const pinnedData = usePinnedData(activeNode, {
|
|
|
|
runIndex: props.runIndex,
|
|
|
|
displayMode: ndvStore.getPanelDisplayMode('output'),
|
|
|
|
});
|
|
|
|
|
|
|
|
return {
|
|
|
|
pinnedData,
|
|
|
|
isSubNodeType,
|
|
|
|
};
|
|
|
|
},
|
2023-12-28 00:49:58 -08:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
outputMode: 'regular',
|
|
|
|
outputTypes: [
|
|
|
|
{ label: this.$locale.baseText('ndv.output.outType.regular'), value: OUTPUT_TYPE.REGULAR },
|
|
|
|
{ label: this.$locale.baseText('ndv.output.outType.logs'), value: OUTPUT_TYPE.LOGS },
|
|
|
|
],
|
|
|
|
};
|
|
|
|
},
|
2022-05-23 08:56:15 -07:00
|
|
|
computed: {
|
2022-11-04 06:04:31 -07:00
|
|
|
...mapStores(useNodeTypesStore, useNDVStore, useUIStore, useWorkflowsStore),
|
|
|
|
node(): INodeUi | null {
|
|
|
|
return this.ndvStore.activeNode;
|
2022-05-23 08:56:15 -07:00
|
|
|
},
|
|
|
|
nodeType(): INodeTypeDescription | null {
|
|
|
|
if (this.node) {
|
2022-11-04 06:04:31 -07:00
|
|
|
return this.nodeTypesStore.getNodeType(this.node.type, this.node.typeVersion);
|
2022-05-23 08:56:15 -07:00
|
|
|
}
|
|
|
|
return null;
|
|
|
|
},
|
|
|
|
isTriggerNode(): boolean {
|
2022-11-04 06:04:31 -07:00
|
|
|
return this.nodeTypesStore.isTriggerNode(this.node.type);
|
2022-05-23 08:56:15 -07:00
|
|
|
},
|
2023-10-02 08:33:43 -07:00
|
|
|
hasAiMetadata(): boolean {
|
|
|
|
if (this.node) {
|
|
|
|
const resultData = this.workflowsStore.getWorkflowResultDataByNodeName(this.node.name);
|
|
|
|
|
2023-10-20 01:52:56 -07:00
|
|
|
if (!resultData || !Array.isArray(resultData) || resultData.length === 0) {
|
2023-10-02 08:33:43 -07:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2023-10-20 01:52:56 -07:00
|
|
|
return !!resultData[resultData.length - 1].metadata;
|
2023-10-02 08:33:43 -07:00
|
|
|
}
|
|
|
|
return false;
|
|
|
|
},
|
2022-05-23 08:56:15 -07:00
|
|
|
isPollingTypeNode(): boolean {
|
2023-11-23 02:55:02 -08:00
|
|
|
return !!this.nodeType?.polling;
|
2022-05-23 08:56:15 -07:00
|
|
|
},
|
|
|
|
isScheduleTrigger(): boolean {
|
|
|
|
return !!(this.nodeType && this.nodeType.group.includes('schedule'));
|
|
|
|
},
|
|
|
|
isNodeRunning(): boolean {
|
2023-10-02 08:33:43 -07:00
|
|
|
return this.node && this.workflowsStore.isNodeExecuting(this.node.name);
|
2022-05-23 08:56:15 -07:00
|
|
|
},
|
|
|
|
workflowRunning(): boolean {
|
2022-11-04 06:04:31 -07:00
|
|
|
return this.uiStore.isActionActive('workflowRunning');
|
2022-05-23 08:56:15 -07:00
|
|
|
},
|
|
|
|
workflowExecution(): IExecutionResponse | null {
|
2022-11-04 06:04:31 -07:00
|
|
|
return this.workflowsStore.getWorkflowExecution;
|
2022-05-23 08:56:15 -07:00
|
|
|
},
|
|
|
|
workflowRunData(): IRunData | null {
|
|
|
|
if (this.workflowExecution === null) {
|
|
|
|
return null;
|
|
|
|
}
|
2022-09-21 02:51:20 -07:00
|
|
|
const executionData: IRunExecutionData | undefined = this.workflowExecution.data;
|
2023-10-02 08:33:43 -07:00
|
|
|
if (!executionData?.resultData?.runData) {
|
2022-09-21 02:51:20 -07:00
|
|
|
return null;
|
|
|
|
}
|
2022-05-23 08:56:15 -07:00
|
|
|
return executionData.resultData.runData;
|
|
|
|
},
|
|
|
|
hasNodeRun(): boolean {
|
2022-11-04 06:04:31 -07:00
|
|
|
if (this.workflowsStore.subWorkflowExecutionError) return true;
|
feat(editor, core, cli): implement new workflow experience (#4358)
* feat(ExecuteWorkflowTrigger node): Implement ExecuteWorkflowTrigger node (#4108)
* feat(ExecuteWorkflowTrigger node): Implement ExecuteWorkflowTrigger node
* feat(editor): Do not show duplicate button if canvas contains `maxNodes` amount of nodes
* feat(ManualTrigger node): Implement ManualTrigger node (#4110)
* feat(ManualTrigger node): Implement ManualTrigger node
* :memo: Remove generics doc items from ManualTrigger node
* feat(editor-ui): Trigger tab redesign (#4150)
* :construction: Begin with TriggerPanel implementation, add Other Trigger Nodes subcategory
* :construction: Extracted categorized categories/subcategory/nodes rendering into its own component — CategorizedItems, removed SubcategoryPanel, added translations
* :sparkles: Implement MainPanel background scrim
* :recycle: Move `categoriesWithNodes`, 'visibleNodeTypes` and 'categorizedItems` to store, implemented dynamic categories count based on `selectedType`
* :bug: Fix SlideTransition for all the NodeCreato panels
* :lipstick: Fix cursos for CategoryItem and NodeItem
* :bug: Make sure ALL_NODE_FILTER is always set when MainPanel is mounted
* :art: Address PR comments
* label: Use Array type for CategorizedItems props
* :label: Add proper types for Vue props
* 🎨 Use standard component registration for CategorizedItems inside TriggerHelperPanel
* 🎨 Use kebab case for main-panel and icon component
* :label: Improve types
* feat(editor-ui): Redesign search input inside node creator panel (#4204)
* :construction: Begin with TriggerPanel implementation, add Other Trigger Nodes subcategory
* :construction: Extracted categorized categories/subcategory/nodes rendering into its own component — CategorizedItems, removed SubcategoryPanel, added translations
* :sparkles: Implement MainPanel background scrim
* :recycle: Move `categoriesWithNodes`, 'visibleNodeTypes` and 'categorizedItems` to store, implemented dynamic categories count based on `selectedType`
* :bug: Fix SlideTransition for all the NodeCreato panels
* :lipstick: Fix cursos for CategoryItem and NodeItem
* :bug: Make sure ALL_NODE_FILTER is always set when MainPanel is mounted
* :art: Address PR comments
* label: Use Array type for CategorizedItems props
* :label: Add proper types for Vue props
* 🎨 Use standard component registration for CategorizedItems inside TriggerHelperPanel
* :sparkles: Redesign search input and unify usage of categorized items
* :label: Use lowercase "Boolean" as `isSearchVisible` computed return type
* :fire: Remove useless emit
* :sparkles: Implement no result view based on subcategory, minor fixes
* :art: Remove unused properties
* feat(node-email): Change EmailReadImap display name and name (#4239)
* feat(editor-ui): Implement "Choose a Triger" action and related behaviour (#4226)
* :sparkles: Implement "Choose a Triger" action and related behaviour
* :mute: Lint fix
* :recycle: Remove PlaceholderTrigger node, add a button instead
* :art: Merge onMouseEnter and onMouseLeave to a single function
* :bulb: Add comment
* :fire: Remove PlaceholderNode registration
* :art: Rename TriggerPlaceholderButton to CanvasAddButton
* :sparkles: Add method to unregister custom action and rework CanvasAddButton centering logic
* :art: Run `setRecenteredCanvasAddButtonPosition` on `CanvasAddButton` mount
* fix(editor): Fix selecting of node from node-creator panel by clicking
* :twisted_rightwards_arrows: Merge fixes
* fix(editor): Show execute workflow trigger instead of workflow trigger in the trigger helper panel
* feat(editor): Fix node creator panel slide transition (#4261)
* fix(editor): Fix node creator panel slide-in/slide-out transitions
* :art: Fix naming
* :art: Use kebab-case for transition component name
* feat(editor): Disable execution and show notice when user tries to run workflow without enabled triggers
* fix(editor): Address first batch of new WF experience review (#4279)
* fix(editor): Fix first batch of review items
* bug(editor): Fix nodeview canvas add button centering
* :mute: Fix linter errors
* bug(ManualTrigger Node): Fix manual trigger node execution
* fix(editor): Do not show canvas add button in execution or demo mode and prevent clicking if creator is open
* fix(editor): do not show pin data tooltip for manual trigger node
* fix(editor): do not use nodeViewOffset on zoomToFit
* :lipstick: Add margin for last node creator item and set font-weight to 700 for category title
* :sparkles: Position welcome note next to the added trigger node
* :bug: Remve always true welcome note
* feat(editor): Minor UI and UX tweaks (#4328)
* :lipstick: Make top viewport buttons less prominent
* :sparkles: Allow user to switch to all tabs if it contains filter results, move nodecreator state props to its own module
* :mute: Fix linting errors
* :mute: Fix linting errors
* :mute: Fix linting errors
* chore(build): Ping Turbo version to 1.5.5
* :lipstick: Minor traigger panel and node view style changes
* :speech_balloon: Update display name of execute workflow trigger
* feat(core, editor): Update subworkflow execution logic (#4269)
* :sparkles: Implement `findWorkflowStart`
* :zap: Extend `WorkflowOperationError`
* :zap: Add `WorkflowOperationError` to toast
* :blue_book: Extend interface
* :sparkles: Add `subworkflowExecutionError` to store
* :sparkles: Create `SubworkflowOperationError`
* :zap: Render subworkflow error as node error
* :truck: Move subworkflow start validation to `cli`
* :zap: Reset subworkflow execution error state
* :fire: Remove unused import
* :zap: Adjust CLI commands
* :fire: Remove unneeded check
* :fire: Remove stray log
* :zap: Simplify syntax
* :zap: Sort in case both Start and EWT present
* :recycle: Address Omar's feedback
* :fire: Remove unneeded lint exception
* :pencil2: Fix copy
* :shirt: Fix lint
* fix: moved find start node function to catchable place
Co-authored-by: Omar Ajoue <krynble@gmail.com>
* :lipstick: Change ExecuteWorkflow node to primary
* :sparkles: Allow user to navigate to all tab if it contains search results
* :bug: Fixed canvas control button while in demo, disable workflow activation for non-activavle nodes and revert zoomToFit bottom offset
* :fix: Do not chow request text if there's results
* :speech_balloon: Update noResults text
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
Co-authored-by: Omar Ajoue <krynble@gmail.com>
2022-10-18 05:23:22 -07:00
|
|
|
|
2022-05-23 08:56:15 -07:00
|
|
|
return Boolean(
|
|
|
|
this.node && this.workflowRunData && this.workflowRunData.hasOwnProperty(this.node.name),
|
|
|
|
);
|
|
|
|
},
|
|
|
|
runTaskData(): ITaskData | null {
|
|
|
|
if (!this.node || this.workflowExecution === null) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
const runData = this.workflowRunData;
|
|
|
|
|
|
|
|
if (runData === null || !runData.hasOwnProperty(this.node.name)) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (runData[this.node.name].length <= this.runIndex) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
return runData[this.node.name][this.runIndex];
|
|
|
|
},
|
|
|
|
runsCount(): number {
|
|
|
|
if (this.node === null) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
const runData: IRunData | null = this.workflowRunData;
|
|
|
|
|
|
|
|
if (runData === null || !runData.hasOwnProperty(this.node.name)) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (runData[this.node.name].length) {
|
|
|
|
return runData[this.node.name].length;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
},
|
|
|
|
staleData(): boolean {
|
|
|
|
if (!this.node) {
|
|
|
|
return false;
|
|
|
|
}
|
2022-11-04 06:04:31 -07:00
|
|
|
const updatedAt = this.workflowsStore.getParametersLastUpdate(this.node.name);
|
2022-05-23 08:56:15 -07:00
|
|
|
if (!updatedAt || !this.runTaskData) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
const runAt = this.runTaskData.startTime;
|
|
|
|
return updatedAt > runAt;
|
|
|
|
},
|
2022-07-20 08:50:39 -07:00
|
|
|
outputPanelEditMode(): { enabled: boolean; value: string } {
|
2022-11-04 06:04:31 -07:00
|
|
|
return this.ndvStore.outputPanelEditMode;
|
2022-07-20 08:50:39 -07:00
|
|
|
},
|
|
|
|
canPinData(): boolean {
|
2024-01-04 01:22:56 -08:00
|
|
|
return this.pinnedData.isValidNodeType.value && !this.isReadOnly;
|
2022-07-20 08:50:39 -07:00
|
|
|
},
|
2022-05-23 08:56:15 -07:00
|
|
|
},
|
|
|
|
methods: {
|
2022-07-20 08:50:39 -07:00
|
|
|
insertTestData() {
|
2023-04-21 06:59:04 -07:00
|
|
|
const runDataRef = this.$refs.runData as RunDataRef | undefined;
|
|
|
|
if (runDataRef) {
|
|
|
|
runDataRef.enterEditMode({
|
2022-07-20 08:50:39 -07:00
|
|
|
origin: 'insertTestDataLink',
|
|
|
|
});
|
|
|
|
|
|
|
|
this.$telemetry.track('User clicked ndv link', {
|
2022-11-04 06:04:31 -07:00
|
|
|
workflow_id: this.workflowsStore.workflowId,
|
2024-04-03 04:43:14 -07:00
|
|
|
push_ref: this.pushRef,
|
2022-07-20 08:50:39 -07:00
|
|
|
node_type: this.node.type,
|
|
|
|
pane: 'output',
|
|
|
|
type: 'insert-test-data',
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
2022-05-23 08:56:15 -07:00
|
|
|
onLinkRun() {
|
|
|
|
this.$emit('linkRun');
|
|
|
|
},
|
|
|
|
onUnlinkRun() {
|
|
|
|
this.$emit('unlinkRun');
|
|
|
|
},
|
|
|
|
openSettings() {
|
|
|
|
this.$emit('openSettings');
|
|
|
|
this.$telemetry.track('User clicked ndv link', {
|
|
|
|
node_type: this.node.type,
|
2022-11-04 06:04:31 -07:00
|
|
|
workflow_id: this.workflowsStore.workflowId,
|
2024-04-03 04:43:14 -07:00
|
|
|
push_ref: this.pushRef,
|
2022-05-23 08:56:15 -07:00
|
|
|
pane: 'output',
|
|
|
|
type: 'settings',
|
|
|
|
});
|
|
|
|
},
|
|
|
|
onRunIndexChange(run: number) {
|
|
|
|
this.$emit('runChange', run);
|
|
|
|
},
|
2023-10-02 08:33:43 -07:00
|
|
|
onUpdateOutputMode(outputMode: (typeof OUTPUT_TYPE)[string]) {
|
|
|
|
if (outputMode === OUTPUT_TYPE.LOGS) {
|
|
|
|
ndvEventBus.emit('setPositionByName', 'minLeft');
|
|
|
|
} else {
|
|
|
|
ndvEventBus.emit('setPositionByName', 'initial');
|
|
|
|
}
|
|
|
|
},
|
2023-11-15 07:19:48 -08:00
|
|
|
activatePane() {
|
|
|
|
this.$emit('activatePane');
|
|
|
|
},
|
2022-05-23 08:56:15 -07:00
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" module>
|
2023-10-02 08:33:43 -07:00
|
|
|
// The items count and displayModes are rendered in the RunData component
|
|
|
|
// this is a workaround to hide it in the output panel(for ai type) to not add unnecessary one-time props
|
|
|
|
:global([data-output-type='logs'] [class*='itemsCount']),
|
|
|
|
:global([data-output-type='logs'] [class*='displayModes']) {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
.outputTypeSelect {
|
|
|
|
margin-bottom: var(--spacing-4xs);
|
|
|
|
width: fit-content;
|
|
|
|
}
|
2022-05-23 08:56:15 -07:00
|
|
|
.titleSection {
|
|
|
|
display: flex;
|
2023-12-22 03:50:36 -08:00
|
|
|
align-items: center;
|
2022-05-23 08:56:15 -07:00
|
|
|
|
|
|
|
> * {
|
|
|
|
margin-right: var(--spacing-2xs);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.title {
|
|
|
|
text-transform: uppercase;
|
|
|
|
color: var(--color-text-light);
|
|
|
|
letter-spacing: 3px;
|
|
|
|
font-weight: var(--font-weight-bold);
|
|
|
|
font-size: var(--font-size-s);
|
|
|
|
}
|
2023-02-17 01:54:07 -08:00
|
|
|
|
|
|
|
.noOutputData {
|
|
|
|
max-width: 180px;
|
|
|
|
|
|
|
|
> *:first-child {
|
|
|
|
margin-bottom: var(--spacing-m);
|
|
|
|
}
|
|
|
|
|
|
|
|
> * {
|
|
|
|
margin-bottom: var(--spacing-2xs);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.recoveredOutputData {
|
|
|
|
margin: auto;
|
|
|
|
max-width: 250px;
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
> *:first-child {
|
|
|
|
margin-bottom: var(--spacing-m);
|
|
|
|
}
|
|
|
|
}
|
2022-05-23 08:56:15 -07:00
|
|
|
</style>
|