index.ts 1.26 KB
import { ExternalCategoryComponentEnum } from '../../../enum/category';
import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
import type { NodeItemConfigType } from '../../../types/node';
import { RuleNodeTypeEnum } from '../../index.type';
import { useI18n } from '/@/hooks/web/useI18n';

const keys = useCreateNodeKey(ExternalCategoryComponentEnum.ALARM_NOTICE);

const { t } = useI18n(); //加载国际化
export interface AlarmNoticeDataType {
  someConfiguration?: Recordable;
}

export const AlarmNoticeConfig: NodeItemConfigType = {
  ...keys,
  clazz: 'org.thingsboard.rule.engine.notice.AlarmNoticeNode',
  categoryType: RuleNodeTypeEnum.EXTERNAL,
  name: t('designer_config.externals.index.alarmNotice.name'),
  configurationDescriptor: {
    nodeDefinition: {
      details: t('designer_config.externals.index.alarmNotice.details'),
      description: t('designer_config.externals.index.alarmNotice.description'),
      inEnabled: true,
      outEnabled: true,
      relationTypes: ['Success', 'Failure'],
      customRelations: false,
      ruleChainNode: false,
      defaultConfiguration: {
        host: 'localhost',
      },
      uiResources: [],
      configDirective: '',
      icon: 'material-symbols:sms',
      iconUrl: '',
      docUrl: '',
    },
  },
};