-
+
-
- {{ $locale.baseText('ndv.output.run') }}
-
-
-
-
-
- {{ $locale.baseText(linkedRuns ? 'runData.unlinking.hint' : 'runData.linking.hint') }}
-
-
+
-
-
-
+ :modelValue="runIndex"
+ @update:modelValue="onRunIndexChange"
+ @click.stop
+ teleported
+ >
+ {{ $locale.baseText('ndv.output.run') }}
+
+
+
+
+ {{ $locale.baseText(linkedRuns ? 'runData.unlinking.hint' : 'runData.linking.hint') }}
+
+
+
+
+
+
@@ -179,18 +184,48 @@
:options="branches"
@update:modelValue="onBranchChange"
/>
+
-
- {{ dataCount }} {{ $locale.baseText('ndv.output.items', { adjustToNumber: dataCount }) }}
+
+ {{
+ $locale.baseText('ndv.search.items', {
+ adjustToNumber: unfilteredDataCount,
+ interpolate: { matched: dataCount, total: unfilteredDataCount },
+ })
+ }}
+
+ {{
+ $locale.baseText('ndv.output.items', {
+ adjustToNumber: dataCount,
+ interpolate: { count: dataCount },
+ })
+ }}
+
+
@@ -258,15 +293,31 @@
-
+
+
{{ noDataInBranchMessage }}
-
+
xxx
@@ -303,7 +354,7 @@
hasNodeRun &&
displayMode === 'table' &&
binaryData.length > 0 &&
- jsonData.length === 1 &&
+ inputData.length === 1 &&
Object.keys(jsonData[0] || {}).length === 0
"
:class="$style.center"
@@ -316,6 +367,21 @@
+
+
@@ -359,6 +427,7 @@
:paneType="paneType"
:runIndex="runIndex"
:totalRuns="maxRunIndex"
+ :search="search"
/>
@@ -461,6 +530,7 @@
!isArtificialRecoveredEventItem
"
v-show="!editMode.enabled"
+ data-test-id="ndv-data-pagination"
>
import('@/components/RunDa
const RunDataJson = defineAsyncComponent(async () => import('@/components/RunDataJson.vue'));
const RunDataSchema = defineAsyncComponent(async () => import('@/components/RunDataSchema.vue'));
const RunDataHtml = defineAsyncComponent(async () => import('@/components/RunDataHtml.vue'));
+const RunDataSearch = defineAsyncComponent(async () => import('@/components/RunDataSearch.vue'));
export type EnterEditModeArgs = {
origin: 'editIconButton' | 'insertTestDataLink';
@@ -569,6 +640,7 @@ export default defineComponent({
RunDataJson,
RunDataSchema,
RunDataHtml,
+ RunDataSearch,
},
props: {
nodeUi: {
@@ -619,6 +691,10 @@ export default defineComponent({
type: Boolean,
default: false,
},
+ isPaneActive: {
+ type: Boolean,
+ default: false,
+ },
},
setup() {
return {
@@ -643,6 +719,7 @@ export default defineComponent({
pinDataDiscoveryTooltipVisible: false,
isControlledPinDataTooltip: false,
+ search: '',
};
},
mounted() {
@@ -656,7 +733,10 @@ export default defineComponent({
branchIndex: this.currentOutputIndex,
});
- if (this.paneType === 'output') this.setDisplayMode();
+ if (this.paneType === 'output') {
+ this.setDisplayMode();
+ this.activatePane();
+ }
},
beforeUnmount() {
this.hidePinDataDiscoveryTooltip();
@@ -777,6 +857,9 @@ export default defineComponent({
dataCount(): number {
return this.getDataCount(this.runIndex, this.currentOutputIndex);
},
+ unfilteredDataCount(): number {
+ return this.pinData ? this.pinData.length : this.rawInputData.length;
+ },
dataSizeInMB(): string {
return (this.dataSize / 1024 / 1000).toLocaleString();
},
@@ -828,7 +911,8 @@ export default defineComponent({
return this.getRawInputData(this.runIndex, this.currentOutputIndex, this.connectionType);
},
inputData(): INodeExecutionData[] {
- return this.getPinDataOrLiveData(this.rawInputData);
+ const pinOrLiveData = this.getPinDataOrLiveData(this.rawInputData);
+ return this.getFilteredData(pinOrLiveData);
},
inputDataPage(): INodeExecutionData[] {
const offset = this.pageSize * (this.currentPage - 1);
@@ -866,8 +950,17 @@ export default defineComponent({
if (this.overrideOutputs && !this.overrideOutputs.includes(i)) {
continue;
}
+ const totalItemsCount = this.getRawInputData(this.runIndex, i).length;
const itemsCount = this.getDataCount(this.runIndex, i);
- const items = this.$locale.baseText('ndv.output.items', { adjustToNumber: itemsCount });
+ const items = this.search
+ ? this.$locale.baseText('ndv.search.items', {
+ adjustToNumber: totalItemsCount,
+ interpolate: { matched: itemsCount, total: totalItemsCount },
+ })
+ : this.$locale.baseText('ndv.output.items', {
+ adjustToNumber: itemsCount,
+ interpolate: { count: itemsCount },
+ });
let outputName = this.getOutputName(i);
if (`${outputName}` === `${i}`) {
@@ -881,7 +974,10 @@ export default defineComponent({
outputName = capitalize(`${this.getOutputName(i)}${appendBranchWord}`);
}
branches.push({
- label: itemsCount ? `${outputName} (${itemsCount} ${items})` : outputName,
+ label:
+ (this.search && itemsCount) || totalItemsCount
+ ? `${outputName} (${items})`
+ : outputName,
value: i,
});
}
@@ -901,6 +997,12 @@ export default defineComponent({
readOnlyEnv(): boolean {
return this.sourceControlStore.preferences.branchReadOnly;
},
+ showIOSearch(): boolean {
+ return this.hasNodeRun && !this.hasRunError;
+ },
+ showIoSearchNoMatchContent(): boolean {
+ return this.hasNodeRun && !this.inputData.length && this.search;
+ },
},
methods: {
getResolvedNodeOutputs() {
@@ -1158,10 +1260,13 @@ export default defineComponent({
getRunLabel(option: number) {
let itemsCount = 0;
for (let i = 0; i <= this.maxOutputIndex; i++) {
- itemsCount += this.getDataCount(option - 1, i);
+ itemsCount += this.getPinDataOrLiveData(this.getRawInputData(option - 1, i)).length;
}
- const items = this.$locale.baseText('ndv.output.items', { adjustToNumber: itemsCount });
- const itemsLabel = itemsCount > 0 ? ` (${itemsCount} ${items})` : '';
+ const items = this.$locale.baseText('ndv.output.items', {
+ adjustToNumber: itemsCount,
+ interpolate: { count: itemsCount },
+ });
+ const itemsLabel = itemsCount > 0 ? ` (${items})` : '';
return option + this.$locale.baseText('ndv.output.of') + (this.maxRunIndex + 1) + itemsLabel;
},
getRawInputData(
@@ -1201,6 +1306,14 @@ export default defineComponent({
}
return inputData;
},
+ getFilteredData(inputData: INodeExecutionData[]): INodeExecutionData[] {
+ if (!this.search) {
+ return inputData;
+ }
+
+ this.currentPage = 1;
+ return inputData.filter(({ json }) => searchInObject(json, this.search));
+ },
getDataCount(
runIndex: number,
outputIndex: number,
@@ -1215,7 +1328,8 @@ export default defineComponent({
}
const rawInputData = this.getRawInputData(runIndex, outputIndex, connectionType);
- return this.getPinDataOrLiveData(rawInputData).length;
+ const pinOrLiveData = this.getPinDataOrLiveData(rawInputData);
+ return this.getFilteredData(pinOrLiveData).length;
},
init() {
// Reset the selected output index every time another node gets selected
@@ -1347,6 +1461,13 @@ export default defineComponent({
});
}
},
+ activatePane() {
+ this.$emit('activatePane');
+ },
+ onSearchClear() {
+ this.search = '';
+ document.dispatchEvent(new KeyboardEvent('keyup', { key: '/' }));
+ },
},
watch: {
node() {
@@ -1384,6 +1505,9 @@ export default defineComponent({
branchIndex,
});
},
+ search(newSearch: string) {
+ this.$emit('search', newSearch);
+ },
},
});
@@ -1465,24 +1589,32 @@ export default defineComponent({
}
.tabs {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
margin-bottom: var(--spacing-s);
}
.itemsCount {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
margin-left: var(--spacing-s);
margin-bottom: var(--spacing-s);
}
.runSelector {
- max-width: 210px;
- margin-left: var(--spacing-s);
- margin-bottom: var(--spacing-s);
+ padding-left: var(--spacing-s);
+ padding-bottom: var(--spacing-s);
+ display: flex;
+ width: 100%;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.runSelectorWrapper {
display: flex;
align-items: center;
-
- > * {
- margin-right: var(--spacing-4xs);
- }
}
.pagination {
@@ -1645,3 +1777,14 @@ export default defineComponent({
}
}
+
+
diff --git a/packages/editor-ui/src/components/RunDataJson.vue b/packages/editor-ui/src/components/RunDataJson.vue
index df7e6589d8..712d847ad3 100644
--- a/packages/editor-ui/src/components/RunDataJson.vue
+++ b/packages/editor-ui/src/components/RunDataJson.vue
@@ -43,11 +43,11 @@
[$style.mappable]: mappingEnabled,
[$style.dragged]: draggingPath === node.path,
}"
- >"{{ node.key }}"
+ v-html="highlightSearchTerm(node.key)"
+ />