fix(Wait Node): Change default wait period to 5 seconds (#8783)

This commit is contained in:
Michael Kret 2024-03-01 15:14:56 +02:00 committed by GitHub
parent 0481e6e6e7
commit a521e7a54d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,6 +32,44 @@ import { formWebhook } from '../Form/utils';
import { updateDisplayOptions } from '../../utils/utilities'; import { updateDisplayOptions } from '../../utils/utilities';
import { Webhook } from '../Webhook/Webhook.node'; import { Webhook } from '../Webhook/Webhook.node';
const toWaitAmount: INodeProperties = {
displayName: 'Wait Amount',
name: 'amount',
type: 'number',
typeOptions: {
minValue: 0,
numberPrecision: 2,
},
default: 1,
description: 'The time to wait',
};
const unitSelector: INodeProperties = {
displayName: 'Wait Unit',
name: 'unit',
type: 'options',
options: [
{
name: 'Seconds',
value: 'seconds',
},
{
name: 'Minutes',
value: 'minutes',
},
{
name: 'Hours',
value: 'hours',
},
{
name: 'Days',
value: 'days',
},
],
default: 'hours',
description: 'The time unit of the Wait Amount value',
};
const waitTimeProperties: INodeProperties[] = [ const waitTimeProperties: INodeProperties[] = [
{ {
displayName: 'Limit Wait Time', displayName: 'Limit Wait Time',
@ -189,7 +227,7 @@ export class Wait extends Webhook {
name: 'wait', name: 'wait',
icon: 'fa:pause-circle', icon: 'fa:pause-circle',
group: ['organization'], group: ['organization'],
version: 1, version: [1, 1.1],
description: 'Wait before continue with execution', description: 'Wait before continue with execution',
defaults: { defaults: {
name: 'Wait', name: 'Wait',
@ -282,50 +320,46 @@ export class Wait extends Webhook {
// resume:timeInterval // resume:timeInterval
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Wait Amount', ...toWaitAmount,
name: 'amount',
type: 'number',
displayOptions: { displayOptions: {
show: { show: {
resume: ['timeInterval'], resume: ['timeInterval'],
'@version': [1],
}, },
}, },
typeOptions: {
minValue: 0,
numberPrecision: 2,
},
default: 1,
description: 'The time to wait',
}, },
{ {
displayName: 'Wait Unit', ...toWaitAmount,
name: 'unit', default: 5,
type: 'options',
displayOptions: { displayOptions: {
show: { show: {
resume: ['timeInterval'], resume: ['timeInterval'],
}, },
hide: {
'@version': [1],
},
}, },
options: [ },
{ {
name: 'Seconds', ...unitSelector,
value: 'seconds', displayOptions: {
show: {
resume: ['timeInterval'],
'@version': [1],
}, },
{ },
name: 'Minutes', },
value: 'minutes', {
...unitSelector,
default: 'seconds',
displayOptions: {
show: {
resume: ['timeInterval'],
}, },
{ hide: {
name: 'Hours', '@version': [1],
value: 'hours',
}, },
{ },
name: 'Days',
value: 'days',
},
],
default: 'hours',
description: 'The time unit of the Wait Amount value',
}, },
// ---------------------------------- // ----------------------------------