mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-16 01:24:05 -08:00
6461423a5c
* ⚡ Generalize unique entity name generation * ⚡ Standardize variable names * redo credentials * revert some changes, replace got with was * fix v-if order * fix v-if order * update linting * update gulpfile * update ssh display name * update height * update params * update info tip sizes * address design comments * update google button disabled * update icon size to 28px * update design issues * update info tab design * address design comments * update tab size * update run data spacing * address comments, update logo design * fix spacing issues * clean up store * fix create new bug * add loading state * rename prop * remove unused prop * fix select bug * remove label tag * update word break * build * address design comments * update font family of button * update menu opacity * update text * update title * address more comments * update oauth messages * add oauth validation * hide disabled state * update warning modal * show button on text input * clean up cred details * add validation errors * fix bug when deleting cred * Frontend hack to display test button * Created interfaces for testing and endpoint * Testing slack node credentials working * Adding test with node to endpoint for credential testing * Fixed linting and test detectability * Adding required for slack token * Added google sheets credential testing * update message * Adding suggestions by Ivan and Mutasem * Address comments * keep blurred when focused * update font weight of errors * add oauth banner * remove toast * Fixed code bug and added telegram credential testing * scroll to top on success * clean up duplication * Fixed telegram trigger node and added tests to typeform * refactor modal * add more validation support * refactor info tab * scroll to bottom on save, handle cred saving * refactor save button * save cred on valid * save cred on valid * scroll to top if has error * add targets on input labels * delete credentails input * revert fe changes * update validation logic * clean interface * test credentials * update banner design * show testing state * update x position * fix issues * fix focus issues * clean up validation behavior * make error relative * update banner component * update error spacing * don't close dialog * rename button * update how banners behave * if has unsaved changes first * move confirm message * add success banner * update time state * disable transitions * test on open * clean up banner behavior * update banner styling * capitalize * update error banner styling to handle long texts * avoid unnessary content jostling * add loading label * show validation warnings when opening modal * retest cred if not all props req * update scroll to auto * add error warning * update color saturation * set overflow to auto * fix bug to get credentials when connected * round down to minutes * change tab name * update casing oauth * disable credential testing if it has expressions * label same as title * add more space between close and save * remove check on making any changes * hide close on confirm modals * don't accept clicks outside dialog * fix build issues * undo test changes * fix table scrollbar logs * rename modals * fix bug with same name * refactor modal * fix tslint issue * refactor name * update name behavior * update monospace font * remove comment * refactor inputs * refactor error handling * reduce spacing changes * fix doc url oauth1 oauth2 * build * add toast for waiting executions * hide infotip if no inputs * address most comments * rename file * fix menu alignment * gst * update types * update language * refactor toast behavior, add support for links clicking * allow closing workflow modal from notification * refactor how modals work * fix data display * update toast behavior * fix type issues * rename prop * update overflow behavior for settings * only expand used properties * fix edge bug * make scrollable prop, add margin to tags footer * remove max height from tag manager * rewrite message * fix notice word break * update property names * clear sticky notifications on run * build * refactor function out * use destruction Co-authored-by: Iván Ovejero <ivov.src@gmail.com> Co-authored-by: Omar Ajoue <krynble@gmail.com>
188 lines
5.1 KiB
Vue
188 lines
5.1 KiB
Vue
<template>
|
|
<el-dialog
|
|
:visible="!!node"
|
|
:before-close="close"
|
|
:custom-class="`classic data-display-wrapper`"
|
|
width="80%"
|
|
append-to-body
|
|
@opened="showDocumentHelp = true"
|
|
>
|
|
<div class="data-display" >
|
|
<NodeSettings @valueChanged="valueChanged" />
|
|
<RunData />
|
|
|
|
</div>
|
|
<transition name="fade">
|
|
<div v-if="nodeType && showDocumentHelp" class="doc-help-wrapper">
|
|
<svg id="help-logo" :href="documentationUrl" target="_blank" width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<title>Node Documentation</title>
|
|
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
<g transform="translate(-1127.000000, -836.000000)" fill-rule="nonzero">
|
|
<g transform="translate(1117.000000, 825.000000)">
|
|
<g transform="translate(10.000000, 11.000000)">
|
|
<g transform="translate(2.250000, 2.250000)" fill="#FF6150">
|
|
<path d="M6,11.25 L7.5,11.25 L7.5,9.75 L6,9.75 L6,11.25 M6.75,2.25 C5.09314575,2.25 3.75,3.59314575 3.75,5.25 L5.25,5.25 C5.25,4.42157288 5.92157288,3.75 6.75,3.75 C7.57842712,3.75 8.25,4.42157288 8.25,5.25 C8.25,6.75 6,6.5625 6,9 L7.5,9 C7.5,7.3125 9.75,7.125 9.75,5.25 C9.75,3.59314575 8.40685425,2.25 6.75,2.25 M1.5,0 L12,0 C12.8284271,0 13.5,0.671572875 13.5,1.5 L13.5,12 C13.5,12.8284271 12.8284271,13.5 12,13.5 L1.5,13.5 C0.671572875,13.5 0,12.8284271 0,12 L0,1.5 C0,0.671572875 0.671572875,0 1.5,0 Z"></path>
|
|
</g>
|
|
<rect x="0" y="0" width="18" height="18"></rect>
|
|
</g>
|
|
</g>
|
|
</g>
|
|
</g>
|
|
</svg>
|
|
|
|
<div class="text">
|
|
Need help? <a id="doc-hyperlink" :href="documentationUrl" target="_blank" @click="onDocumentationUrlClick">Open {{nodeType.displayName}} documentation</a>
|
|
</div>
|
|
</div>
|
|
</transition>
|
|
</el-dialog>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import {
|
|
INodeTypeDescription,
|
|
} from 'n8n-workflow';
|
|
import {
|
|
INodeUi,
|
|
IUpdateInformation,
|
|
} from '../Interface';
|
|
|
|
import { externalHooks } from '@/components/mixins/externalHooks';
|
|
import { nodeHelpers } from '@/components/mixins/nodeHelpers';
|
|
import { workflowHelpers } from '@/components/mixins/workflowHelpers';
|
|
|
|
import NodeSettings from '@/components/NodeSettings.vue';
|
|
import RunData from '@/components/RunData.vue';
|
|
|
|
import mixins from 'vue-typed-mixins';
|
|
|
|
export default mixins(externalHooks, nodeHelpers, workflowHelpers).extend({
|
|
name: 'DataDisplay',
|
|
components: {
|
|
NodeSettings,
|
|
RunData,
|
|
},
|
|
data () {
|
|
return {
|
|
basePath: this.$store.getters.getBaseUrl,
|
|
showDocumentHelp: false,
|
|
};
|
|
},
|
|
computed: {
|
|
documentationUrl (): string {
|
|
if (!this.nodeType) {
|
|
return '';
|
|
}
|
|
|
|
if (this.nodeType.documentationUrl && this.nodeType.documentationUrl.startsWith('http')) {
|
|
return this.nodeType.documentationUrl;
|
|
}
|
|
|
|
return 'https://docs.n8n.io/nodes/' + (this.nodeType.documentationUrl || this.nodeType.name) + '?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=' + this.nodeType.name;
|
|
},
|
|
node (): INodeUi {
|
|
return this.$store.getters.activeNode;
|
|
},
|
|
nodeType (): INodeTypeDescription | null {
|
|
if (this.node) {
|
|
return this.$store.getters.nodeType(this.node.type);
|
|
}
|
|
return null;
|
|
},
|
|
},
|
|
watch: {
|
|
node (node, oldNode) {
|
|
if(node && !oldNode) {
|
|
this.$externalHooks().run('dataDisplay.nodeTypeChanged', { nodeSubtitle: this.getNodeSubtitle(node, this.nodeType, this.getWorkflow()) });
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
valueChanged (parameterData: IUpdateInformation) {
|
|
this.$emit('valueChanged', parameterData);
|
|
},
|
|
nodeTypeSelected (nodeTypeName: string) {
|
|
this.$emit('nodeTypeSelected', nodeTypeName);
|
|
},
|
|
close () {
|
|
this.$externalHooks().run('dataDisplay.nodeEditingFinished');
|
|
this.showDocumentHelp = false;
|
|
this.$store.commit('setActiveNode', null);
|
|
},
|
|
onDocumentationUrlClick () {
|
|
this.$externalHooks().run('dataDisplay.onDocumentationUrlClick', { nodeType: this.nodeType, documentationUrl: this.documentationUrl });
|
|
},
|
|
},
|
|
});
|
|
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.data-display-wrapper {
|
|
height: 85%;
|
|
|
|
.el-dialog__header {
|
|
padding: 0 !important;
|
|
}
|
|
|
|
.el-dialog__body {
|
|
padding: 0 !important;
|
|
height: 100%;
|
|
min-height: 400px;
|
|
overflow: hidden;
|
|
border-radius: 8px;
|
|
}
|
|
}
|
|
|
|
.data-display {
|
|
background-color: #fff;
|
|
border-radius: 8px;
|
|
display: flex;
|
|
height: 100%;
|
|
}
|
|
|
|
.doc-help-wrapper {
|
|
position: absolute;
|
|
right: 0;
|
|
transition-delay: 2s;
|
|
background-color: #fff;
|
|
margin-top: 1%;
|
|
box-sizing: border-box;
|
|
border: 1px solid #DCDFE6;
|
|
border-radius: 4px;
|
|
background-color: #FFFFFF;
|
|
box-shadow: 0 2px 7px 0 rgba(0,0,0,0.15);
|
|
min-width: 319px;
|
|
height: 40px;
|
|
float: right;
|
|
padding: 5px;
|
|
display: flex;
|
|
flex-direction: row;
|
|
padding-top: 10px;
|
|
padding-right: 12px;
|
|
|
|
#help-logo {
|
|
flex: 1;
|
|
}
|
|
|
|
.text {
|
|
margin-left: 5px;
|
|
flex: 9;
|
|
font-family: "Open Sans";
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
line-height: 17px;
|
|
white-space: nowrap;
|
|
}
|
|
}
|
|
|
|
.fade-enter-active, .fade-enter-to, .fade-leave-active {
|
|
transition: all .75s ease;
|
|
opacity: 1;
|
|
}
|
|
|
|
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
|
|
opacity: 0;
|
|
}
|
|
</style>
|