From 1057616fb96c72db3c9c7cc4ed83256ac7e1ea1b Mon Sep 17 00:00:00 2001 From: Mutasem Date: Mon, 28 Mar 2022 22:26:37 +0200 Subject: [PATCH] add more views --- .../editor-ui/src/components/DataDisplay.vue | 10 +- .../editor-ui/src/components/NodeSettings.vue | 3 + packages/editor-ui/src/components/RunData.vue | 491 ++++++++---------- .../src/plugins/i18n/locales/en.json | 13 +- 4 files changed, 247 insertions(+), 270 deletions(-) diff --git a/packages/editor-ui/src/components/DataDisplay.vue b/packages/editor-ui/src/components/DataDisplay.vue index bbb2bd404f..f4d98e34bb 100644 --- a/packages/editor-ui/src/components/DataDisplay.vue +++ b/packages/editor-ui/src/components/DataDisplay.vue @@ -8,8 +8,8 @@ @opened="showDocumentHelp = true" >
- - + +
@@ -68,6 +68,12 @@ export default mixins(externalHooks, nodeHelpers, workflowHelpers).extend({ }, }, methods: { + openSettings() { + const settings = this.$refs.settings as Vue | null; + if (settings) { + settings.$emit('openSettings'); + } + }, valueChanged (parameterData: IUpdateInformation) { this.$emit('valueChanged', parameterData); }, diff --git a/packages/editor-ui/src/components/NodeSettings.vue b/packages/editor-ui/src/components/NodeSettings.vue index 6b98f2a8d9..8963b52e62 100644 --- a/packages/editor-ui/src/components/NodeSettings.vue +++ b/packages/editor-ui/src/components/NodeSettings.vue @@ -519,6 +519,9 @@ export default mixins( }, mounted () { this.setNodeValues(); + this.$on('openSettings', () => { + this.openPanel = 'settings'; + }); }, }); diff --git a/packages/editor-ui/src/components/RunData.vue b/packages/editor-ui/src/components/RunData.vue index bb6d04fcb9..00b5e6df01 100644 --- a/packages/editor-ui/src/components/RunData.vue +++ b/packages/editor-ui/src/components/RunData.vue @@ -1,5 +1,5 @@ @@ -364,6 +358,9 @@ export default mixins( return inputData.length; }, + dataSizeInMB(): string { + return (this.dataSize / 1024 / 1000).toLocaleString(); + }, maxOutputIndex (): number { if (this.node === null) { return 0; @@ -437,6 +434,9 @@ export default mixins( }, }, methods: { + openSettings() { + this.$emit('openSettings'); + }, init() { // Reset the selected output index every time another node gets selected this.outputIndex = 0; @@ -659,6 +659,31 @@ export default mixins( color: var(--color-foreground-dark); } +.center { + display: flex; + height: 80%; + flex-direction: column; + align-items: center; + justify-content: center; + + > * { + max-width: 316px; + margin-bottom: var(--spacing-2xs); + } +} + +.spinner { + * { + color: var(--color-primary); + min-height: 40px; + min-width: 40px; + } + + display: flex; + justify-content: center; + margin-bottom: var(--spacing-s); +} + .title { text-transform: uppercase; color: var(--color-text-light); @@ -683,174 +708,106 @@ export default mixins( flex-grow: 1; } } + +.dataDisplay { + position: absolute; + bottom: 0; + top: 60px; + left: 16px; + right: 0; + overflow-y: auto; + line-height: 1.5; + word-break: normal; + + > * { + margin-bottom: var(--spacing-s); + } +} + +.table { + border-collapse: collapse; + text-align: left; + width: calc(100% - 1px); + border: var(--border-base); + font-size: var(--font-size-2xs); + + th { + padding: var(--spacing-2xs); + background-color: var(--color-background-base); + border: var(--border-base); + } + + td { + padding: var(--spacing-2xs); + border: var(--border-base); + } +} diff --git a/packages/editor-ui/src/plugins/i18n/locales/en.json b/packages/editor-ui/src/plugins/i18n/locales/en.json index f31ee14cbf..0085cc9c97 100644 --- a/packages/editor-ui/src/plugins/i18n/locales/en.json +++ b/packages/editor-ui/src/plugins/i18n/locales/en.json @@ -748,7 +748,7 @@ "ms": "ms", "noBinaryDataFound": "No binary data found", "noData": "No data", - "noTextDataFound": "No text data found", + "": "No text data found", "nodeReturnedALargeAmountOfData": "Node returned a large amount of data", "output": "Output", "showBinaryData": "Show Binary Data", @@ -1147,6 +1147,17 @@ "node.execute.hint": "Executes this {nodeName} node after executing any previous nodes that have not yet returned data", "node.execute.executeNode": "Execute node", "node.execute.executing": "Executing", + "node.output.runNodeHint": "Execute this node to output data", + "node.output.executing": "Executing node...", + "node.output.noOutputData.title": "No output data returned", + "node.output.noOutputData.message": "n8n stops executing the workflow when a node has no output data. You can change this default behaviour via", + "node.output.noOutputData.message.settings": "Settings", + "node.output.noOutputData.message.settingsOption": "> “Always Output Data”.", + "node.output.tooMuchData.title": "Output data is huge!", + "node.output.tooMuchData.message": "The node contains {size} MB of data. Displaying it may cause problems.
If you do decide to display it, avoid the JSON view.", + "node.output.tooMuchData.showDataAnyway": "Show data anyway", + "node.output.items": "items", + "node.output.item": "items", "openWorkflow.workflowImportError": "Could not import workflow", "openWorkflow.workflowNotFoundError": "Could not find workflow", "settings": "Settings",