@@ -188,8 +203,10 @@ export default mixins(
data () {
return {
binaryDataPreviewActive: false,
+ dataSize: 0,
displayMode: 'Table',
runIndex: 0,
+ showData: false,
outputIndex: 0,
binaryDataDisplayVisible: false,
binaryDataDisplayData: null as IBinaryDisplayData | null,
@@ -427,8 +444,20 @@ export default mixins(
},
watch: {
node (newNode, oldNode) {
- // Reset the selected output index every time another node gest selected
+ // Reset the selected output index every time another node gets selected
this.outputIndex = 0;
+
+ // Hide by default the data from being displayed
+ this.showData = false;
+
+ // Check how much data there is to display
+ const inputData = this.getNodeInputData(this.node, this.runIndex, this.outputIndex);
+ this.dataSize = JSON.stringify(inputData).length;
+ if (this.dataSize < 102400) {
+ // Data is reasonable small (< 100kb) so display it directly
+ this.showData = true;
+ }
+
if (this.displayMode === 'Binary' && this.binaryData.length === 0) {
this.displayMode = 'Table';
}
@@ -544,7 +573,16 @@ export default mixins(
.json-data,
.message,
.no-data {
- margin: 10px;
+ margin: 1em;
+ }
+
+ .to-much-data {
+ margin: 1em;
+ text-align: center;
+
+ .text {
+ margin-bottom: 1em;
+ }
}
.error-display {
diff --git a/packages/editor-ui/src/main.ts b/packages/editor-ui/src/main.ts
index df4ef6d2d9..1784368ded 100644
--- a/packages/editor-ui/src/main.ts
+++ b/packages/editor-ui/src/main.ts
@@ -37,6 +37,7 @@ import {
faDotCircle,
faEdit,
faEnvelope,
+ faEye,
faExclamationTriangle,
faExternalLinkAlt,
faFile,
@@ -107,6 +108,7 @@ library.add(faCopy);
library.add(faDotCircle);
library.add(faEdit);
library.add(faEnvelope);
+library.add(faEye);
library.add(faExclamationTriangle);
library.add(faExternalLinkAlt);
library.add(faFile);