create.config.ts
882 Bytes
import { useRuleChainI18n } from '../../../hook/useRuleChainI18n';
import { FormSchema } from '/@/components/Form';
export enum DeviceProfileFieldsEnum {
PERSIST_ALARM_RULES_STATE = 'persistAlarmRulesState',
FETCH_ALARM_RULES_STATE_ON_START = 'fetchAlarmRulesStateOnStart',
}
const { tLabel } = useRuleChainI18n('action', 'deviceProfile');
export const formSchemas: FormSchema[] = [
{
field: DeviceProfileFieldsEnum.PERSIST_ALARM_RULES_STATE,
component: 'Checkbox',
label: '',
renderComponentContent: () => ({
default: () => tLabel(DeviceProfileFieldsEnum.PERSIST_ALARM_RULES_STATE),
}),
},
{
field: DeviceProfileFieldsEnum.FETCH_ALARM_RULES_STATE_ON_START,
component: 'Checkbox',
label: '',
renderComponentContent: () => ({
default: () => tLabel(DeviceProfileFieldsEnum.FETCH_ALARM_RULES_STATE_ON_START),
}),
},
];