mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
fix(editor): replace cron node with schedule node (#4371)
* replace cron with schedule * update col
This commit is contained in:
parent
be7aac3279
commit
161cca9494
|
@ -75,7 +75,7 @@ import { workflowHelpers } from '@/components/mixins/workflowHelpers';
|
|||
import mixins from 'vue-typed-mixins';
|
||||
import NodeExecuteButton from './NodeExecuteButton.vue';
|
||||
import WireMeUp from './WireMeUp.vue';
|
||||
import { CRON_NODE_TYPE, INTERVAL_NODE_TYPE, LOCAL_STORAGE_MAPPING_FLAG, START_NODE_TYPE } from '@/constants';
|
||||
import { CRON_NODE_TYPE, INTERVAL_NODE_TYPE, LOCAL_STORAGE_MAPPING_FLAG, MANUAL_TRIGGER_NODE_TYPE, SCHEDULE_TRIGGER_NODE_TYPE, START_NODE_TYPE } from '@/constants';
|
||||
|
||||
export default mixins(
|
||||
workflowHelpers,
|
||||
|
@ -118,7 +118,7 @@ export default mixins(
|
|||
return window.localStorage.getItem(LOCAL_STORAGE_MAPPING_FLAG) === 'true';
|
||||
},
|
||||
showDraggableHint(): boolean {
|
||||
const toIgnore = [START_NODE_TYPE, CRON_NODE_TYPE, INTERVAL_NODE_TYPE];
|
||||
const toIgnore = [START_NODE_TYPE, MANUAL_TRIGGER_NODE_TYPE, CRON_NODE_TYPE, INTERVAL_NODE_TYPE];
|
||||
if (!this.currentNode || toIgnore.includes(this.currentNode.type)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ import mixins from 'vue-typed-mixins';
|
|||
|
||||
import { externalHooks } from '@/components/mixins/externalHooks';
|
||||
import { INodeCreateElement } from '@/Interface';
|
||||
import { CORE_NODES_CATEGORY, CRON_NODE_TYPE, WEBHOOK_NODE_TYPE, OTHER_TRIGGER_NODES_SUBCATEGORY, EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE, MANUAL_TRIGGER_NODE_TYPE, COMMUNICATION_CATEGORY } from '@/constants';
|
||||
import { CORE_NODES_CATEGORY, WEBHOOK_NODE_TYPE, OTHER_TRIGGER_NODES_SUBCATEGORY, EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE, MANUAL_TRIGGER_NODE_TYPE, COMMUNICATION_CATEGORY, SCHEDULE_TRIGGER_NODE_TYPE } from '@/constants';
|
||||
|
||||
import ItemIterator from './ItemIterator.vue';
|
||||
import CategorizedItems from './CategorizedItems.vue';
|
||||
|
@ -66,13 +66,13 @@ export default mixins(externalHooks).extend({
|
|||
},
|
||||
},
|
||||
{
|
||||
key: CRON_NODE_TYPE,
|
||||
key: SCHEDULE_TRIGGER_NODE_TYPE,
|
||||
type: "node",
|
||||
properties: {
|
||||
nodeType: {
|
||||
|
||||
group: [],
|
||||
name: CRON_NODE_TYPE,
|
||||
name: SCHEDULE_TRIGGER_NODE_TYPE,
|
||||
displayName: this.$locale.baseText('nodeCreator.triggerHelperPanel.scheduleTriggerDisplayName'),
|
||||
description: this.$locale.baseText('nodeCreator.triggerHelperPanel.scheduleTriggerDescription'),
|
||||
icon: "fa:clock",
|
||||
|
|
|
@ -100,6 +100,7 @@ export const PAGERDUTY_NODE_TYPE = 'n8n-nodes-base.pagerDuty';
|
|||
export const SALESFORCE_NODE_TYPE = 'n8n-nodes-base.salesforce';
|
||||
export const SEGMENT_NODE_TYPE = 'n8n-nodes-base.segment';
|
||||
export const SET_NODE_TYPE = 'n8n-nodes-base.set';
|
||||
export const SCHEDULE_TRIGGER_NODE_TYPE = 'n8n-nodes-base.scheduleTrigger';
|
||||
export const SERVICENOW_NODE_TYPE = 'n8n-nodes-base.serviceNow';
|
||||
export const SLACK_NODE_TYPE = 'n8n-nodes-base.slack';
|
||||
export const SPREADSHEET_FILE_NODE_TYPE = 'n8n-nodes-base.spreadsheetFile';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
import { CALENDLY_TRIGGER_NODE_TYPE, CLEARBIT_NODE_TYPE, COMPANY_SIZE_1000_OR_MORE, COMPANY_SIZE_500_999, CRON_NODE_TYPE, ELASTIC_SECURITY_NODE_TYPE, EMAIL_SEND_NODE_TYPE, EXECUTE_COMMAND_NODE_TYPE, FINANCE_WORK_AREA, GITHUB_TRIGGER_NODE_TYPE, HTTP_REQUEST_NODE_TYPE, IF_NODE_TYPE, ITEM_LISTS_NODE_TYPE, IT_ENGINEERING_WORK_AREA, JIRA_TRIGGER_NODE_TYPE, MICROSOFT_EXCEL_NODE_TYPE, MICROSOFT_TEAMS_NODE_TYPE, PAGERDUTY_NODE_TYPE, PRODUCT_WORK_AREA, QUICKBOOKS_NODE_TYPE, SALESFORCE_NODE_TYPE, SALES_BUSINESSDEV_WORK_AREA, SECURITY_WORK_AREA, SEGMENT_NODE_TYPE, SET_NODE_TYPE, SLACK_NODE_TYPE, SPREADSHEET_FILE_NODE_TYPE, SWITCH_NODE_TYPE, WEBHOOK_NODE_TYPE, XERO_NODE_TYPE, COMPANY_SIZE_KEY, WORK_AREA_KEY, CODING_SKILL_KEY, COMPANY_TYPE_KEY, ECOMMERCE_COMPANY_TYPE, MSP_COMPANY_TYPE, PERSONAL_COMPANY_TYPE, AUTOMATION_GOAL_KEY, OTHER_AUTOMATION_GOAL, NOT_SURE_YET_GOAL, CUSTOMER_INTEGRATIONS_GOAL, CUSTOMER_SUPPORT_GOAL, FINANCE_ACCOUNTING_GOAL, ZENDESK_TRIGGER_NODE_TYPE, WOOCOMMERCE_TRIGGER_NODE_TYPE, SALES_MARKETING_GOAL, HUBSPOT_TRIGGER_NODE_TYPE, HR_GOAL, WORKABLE_TRIGGER_NODE_TYPE, OPERATIONS_GOAL, PRODUCT_GOAL, NOTION_TRIGGER_NODE_TYPE, SECURITY_GOAL, THE_HIVE_TRIGGER_NODE_TYPE, ZENDESK_NODE_TYPE, SERVICENOW_NODE_TYPE, JIRA_NODE_TYPE, BAMBOO_HR_NODE_TYPE, GOOGLE_SHEETS_NODE_TYPE, CODE_NODE_TYPE } from '@/constants';
|
||||
import { CALENDLY_TRIGGER_NODE_TYPE, CLEARBIT_NODE_TYPE, COMPANY_SIZE_1000_OR_MORE, COMPANY_SIZE_500_999, SCHEDULE_TRIGGER_NODE_TYPE, ELASTIC_SECURITY_NODE_TYPE, EMAIL_SEND_NODE_TYPE, EXECUTE_COMMAND_NODE_TYPE, FINANCE_WORK_AREA, GITHUB_TRIGGER_NODE_TYPE, HTTP_REQUEST_NODE_TYPE, IF_NODE_TYPE, ITEM_LISTS_NODE_TYPE, IT_ENGINEERING_WORK_AREA, JIRA_TRIGGER_NODE_TYPE, MICROSOFT_EXCEL_NODE_TYPE, MICROSOFT_TEAMS_NODE_TYPE, PAGERDUTY_NODE_TYPE, PRODUCT_WORK_AREA, QUICKBOOKS_NODE_TYPE, SALESFORCE_NODE_TYPE, SALES_BUSINESSDEV_WORK_AREA, SECURITY_WORK_AREA, SEGMENT_NODE_TYPE, SET_NODE_TYPE, SLACK_NODE_TYPE, SPREADSHEET_FILE_NODE_TYPE, SWITCH_NODE_TYPE, WEBHOOK_NODE_TYPE, XERO_NODE_TYPE, COMPANY_SIZE_KEY, WORK_AREA_KEY, CODING_SKILL_KEY, COMPANY_TYPE_KEY, ECOMMERCE_COMPANY_TYPE, MSP_COMPANY_TYPE, PERSONAL_COMPANY_TYPE, AUTOMATION_GOAL_KEY, OTHER_AUTOMATION_GOAL, NOT_SURE_YET_GOAL, CUSTOMER_INTEGRATIONS_GOAL, CUSTOMER_SUPPORT_GOAL, FINANCE_ACCOUNTING_GOAL, ZENDESK_TRIGGER_NODE_TYPE, WOOCOMMERCE_TRIGGER_NODE_TYPE, SALES_MARKETING_GOAL, HUBSPOT_TRIGGER_NODE_TYPE, HR_GOAL, WORKABLE_TRIGGER_NODE_TYPE, OPERATIONS_GOAL, PRODUCT_GOAL, NOTION_TRIGGER_NODE_TYPE, SECURITY_GOAL, THE_HIVE_TRIGGER_NODE_TYPE, ZENDESK_NODE_TYPE, SERVICENOW_NODE_TYPE, JIRA_NODE_TYPE, BAMBOO_HR_NODE_TYPE, GOOGLE_SHEETS_NODE_TYPE, CODE_NODE_TYPE } from '@/constants';
|
||||
import { IPermissions, IPersonalizationSurveyAnswersV1, IPersonalizationSurveyAnswersV2, IPersonalizationSurveyAnswersV3, IPersonalizationSurveyVersions, IUser } from '@/Interface';
|
||||
|
||||
import { ILogInStatus, IRole, IUserPermissions } from "@/Interface";
|
||||
|
@ -144,7 +144,7 @@ function getPersonalizationV2(answers: IPersonalizationSurveyAnswersV2 | IPerson
|
|||
} else if((companyType === PERSONAL_COMPANY_TYPE || automationGoal === OTHER_AUTOMATION_GOAL || automationGoal === NOT_SURE_YET_GOAL) && codingSkill !== null && codingSkill >= 4) {
|
||||
nodeTypes = nodeTypes.concat(WEBHOOK_NODE_TYPE);
|
||||
} else if((companyType === PERSONAL_COMPANY_TYPE || automationGoal === OTHER_AUTOMATION_GOAL || automationGoal === NOT_SURE_YET_GOAL) && codingSkill !== null && codingSkill < 3) {
|
||||
nodeTypes = nodeTypes.concat(CRON_NODE_TYPE);
|
||||
nodeTypes = nodeTypes.concat(SCHEDULE_TRIGGER_NODE_TYPE);
|
||||
} else if (automationGoal === CUSTOMER_INTEGRATIONS_GOAL) {
|
||||
nodeTypes = nodeTypes.concat(WEBHOOK_NODE_TYPE);
|
||||
} else if (automationGoal === CUSTOMER_SUPPORT_GOAL || automationGoal === FINANCE_ACCOUNTING_GOAL) {
|
||||
|
@ -154,7 +154,7 @@ function getPersonalizationV2(answers: IPersonalizationSurveyAnswersV2 | IPerson
|
|||
} else if (automationGoal === HR_GOAL) {
|
||||
nodeTypes = nodeTypes.concat(WORKABLE_TRIGGER_NODE_TYPE);
|
||||
} else if (automationGoal === OPERATIONS_GOAL) {
|
||||
nodeTypes = nodeTypes.concat(CRON_NODE_TYPE);
|
||||
nodeTypes = nodeTypes.concat(SCHEDULE_TRIGGER_NODE_TYPE);
|
||||
} else if (automationGoal === PRODUCT_GOAL) {
|
||||
nodeTypes = nodeTypes.concat(NOTION_TRIGGER_NODE_TYPE);
|
||||
} else if (automationGoal === SECURITY_GOAL) {
|
||||
|
@ -268,7 +268,7 @@ function getPersonalizationV1(answers: IPersonalizationSurveyAnswersV1) {
|
|||
nodeTypes = nodeTypes.concat(WEBHOOK_NODE_TYPE);
|
||||
}
|
||||
else {
|
||||
nodeTypes = nodeTypes.concat(CRON_NODE_TYPE);
|
||||
nodeTypes = nodeTypes.concat(SCHEDULE_TRIGGER_NODE_TYPE);
|
||||
}
|
||||
|
||||
if (codingSkill !== null && codingSkill >= 4) {
|
||||
|
|
|
@ -15,7 +15,7 @@ export class ScheduleTrigger implements INodeType {
|
|||
description: INodeTypeDescription = {
|
||||
displayName: 'Schedule Trigger',
|
||||
name: 'scheduleTrigger',
|
||||
icon: 'file:schedule.svg',
|
||||
icon: 'fa:clock',
|
||||
group: ['trigger', 'schedule'],
|
||||
version: 1,
|
||||
description: 'Triggers the workflow on a given schedule',
|
||||
|
@ -24,7 +24,7 @@ export class ScheduleTrigger implements INodeType {
|
|||
'Your schedule trigger will now trigger executions on the schedule you have defined.',
|
||||
defaults: {
|
||||
name: 'Schedule Trigger',
|
||||
color: '#00FF00',
|
||||
color: '#31C49F',
|
||||
},
|
||||
// eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node
|
||||
inputs: [],
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:svgjs="http://svgjs.com/svgjs" xmlns:xlink="http://www.w3.org/1999/xlink" width="288" height="288"><svg xmlns="http://www.w3.org/2000/svg" width="288" height="288" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc.--><path fill="#4ebf32" d="M232 120C232 106.7 242.7 96 256 96C269.3 96 280 106.7 280 120V243.2L365.3 300C376.3 307.4 379.3 322.3 371.1 333.3C364.6 344.3 349.7 347.3 338.7 339.1L242.7 275.1C236 271.5 232 264 232 255.1L232 120zM256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0zM48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48C141.1 48 48 141.1 48 256z" class="color000 svgShape"/></svg></svg>
|
Before Width: | Height: | Size: 883 B |
Loading…
Reference in a new issue