2022-08-17 08:50:24 -07:00
|
|
|
import { INodeProperties } from 'n8n-workflow';
|
2021-07-10 04:44:23 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const logOperations: INodeProperties[] = [
|
2021-07-10 04:44:23 -07:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
2022-05-20 14:47:24 -07:00
|
|
|
noDataExpression: true,
|
2021-07-10 04:44:23 -07:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['log'],
|
2021-07-10 04:44:23 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Get Error Logs',
|
|
|
|
value: 'getErroLogs',
|
|
|
|
description: 'Get a log for a specific entity',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Get a log for an entity',
|
2021-07-10 04:44:23 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Get Logbook Entries',
|
|
|
|
value: 'getLogbookEntries',
|
|
|
|
description: 'Get all logs',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Get all logs for an entity',
|
2021-07-10 04:44:23 -07:00
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'getErroLogs',
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|
2021-07-10 04:44:23 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const logFields: INodeProperties[] = [
|
2021-07-10 04:44:23 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* log:getLogbookEntries */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
|
|
|
displayName: 'Additional Fields',
|
|
|
|
name: 'additionalFields',
|
|
|
|
type: 'collection',
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
default: {},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['log'],
|
|
|
|
operation: ['getLogbookEntries'],
|
2021-07-10 04:44:23 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'End Time',
|
|
|
|
name: 'endTime',
|
|
|
|
type: 'dateTime',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The end of the period',
|
2021-07-10 04:44:23 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Entity ID',
|
|
|
|
name: 'entityId',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Start Time',
|
|
|
|
name: 'startTime',
|
|
|
|
type: 'dateTime',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The beginning of the period',
|
2021-07-10 04:44:23 -07:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|