create.config.ts
1.01 KB
import { FormSchema, useComponentRegister } from '/@/components/Form';
import { AttributeConfiguration } from '/@/views/rule/designer/src/components/AttributeConfiguration';
import { useRuleChainI18n } from '../../../hook/useRuleChainI18n';
const { tLabel } = useRuleChainI18n('enrichment', 'tenantAttributes');
export enum TenantAttributesFieldsEnum {
ATTR_MAPING = 'attrMapping',
TELEMETRY = 'telemetry',
}
useComponentRegister('AttributeConfiguration', AttributeConfiguration);
export const formSchemas: FormSchema[] = [
{
field: TenantAttributesFieldsEnum.TELEMETRY,
component: 'Checkbox',
label: '',
renderComponentContent: () => {
return {
default: () => tLabel(TenantAttributesFieldsEnum.TELEMETRY),
};
},
},
{
field: TenantAttributesFieldsEnum.ATTR_MAPING,
component: 'AttributeConfiguration',
label: tLabel(TenantAttributesFieldsEnum.ATTR_MAPING),
slot: TenantAttributesFieldsEnum.ATTR_MAPING,
valueField: 'value',
changeEvent: 'update:value',
},
];