mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
⚡ Improve hiding of large data
This commit is contained in:
@@ -68,7 +68,9 @@
|
|||||||
|
|
||||||
<div class="text">
|
<div class="text">
|
||||||
The node contains {{parseInt(dataSize/1024).toLocaleString()}} KB of data.<br />
|
The node contains {{parseInt(dataSize/1024).toLocaleString()}} KB of data.<br />
|
||||||
Displaying it could cause problems!
|
Displaying it could cause problems!<br />
|
||||||
|
<br />
|
||||||
|
If you decide to display it anyway avoid the JSON view!
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-button size="small" @click="displayMode = 'Table';showData = true;">
|
<el-button size="small" @click="displayMode = 'Table';showData = true;">
|
||||||
@@ -441,20 +443,16 @@ export default mixins(
|
|||||||
key,
|
key,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
},
|
refreshDataSize () {
|
||||||
watch: {
|
|
||||||
node (newNode, oldNode) {
|
|
||||||
// Reset the selected output index every time another node gets selected
|
|
||||||
this.outputIndex = 0;
|
|
||||||
|
|
||||||
// Hide by default the data from being displayed
|
// Hide by default the data from being displayed
|
||||||
this.showData = false;
|
this.showData = false;
|
||||||
|
|
||||||
// Check how much data there is to display
|
// Check how much data there is to display
|
||||||
const inputData = this.getNodeInputData(this.node, this.runIndex, this.outputIndex);
|
const inputData = this.getNodeInputData(this.node, this.runIndex, this.outputIndex);
|
||||||
this.dataSize = JSON.stringify(inputData).length;
|
this.dataSize = JSON.stringify(inputData).length;
|
||||||
if (this.dataSize < 102400) {
|
|
||||||
// Data is reasonable small (< 100kb) so display it directly
|
if (this.dataSize < 204800) {
|
||||||
|
// Data is reasonable small (< 200kb) so display it directly
|
||||||
this.showData = true;
|
this.showData = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -462,6 +460,16 @@ export default mixins(
|
|||||||
this.displayMode = 'Table';
|
this.displayMode = 'Table';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
node (newNode, oldNode) {
|
||||||
|
// Reset the selected output index every time another node gets selected
|
||||||
|
this.outputIndex = 0;
|
||||||
|
this.refreshDataSize();
|
||||||
|
},
|
||||||
|
jsonData () {
|
||||||
|
this.refreshDataSize();
|
||||||
|
},
|
||||||
displayMode () {
|
displayMode () {
|
||||||
this.closeBinaryDataDisplay();
|
this.closeBinaryDataDisplay();
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user