Просмотр исходного кода

Add additional properties to complex alarm configuration

- Introduced new properties: is_complex, type, sub_type, status, defer_unit, and defer_seconds to the alarm object.
- Updated status to reflect the current value's status.
- Set defer_unit to a constant value of 2 and defer_seconds based on the provided dateTime.
valentichu 4 месяцев назад
Родитель
Сommit
24606569c4
2 измененных файлов с 6 добавлено и 0 удалено
  1. 0 0
      lib/index.js
  2. 6 0
      src/pages/Alarm/components/complex.jsx

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
lib/index.js


+ 6 - 0
src/pages/Alarm/components/complex.jsx

@@ -129,6 +129,12 @@ const Complex = (props, ref) => {
         ...value,
         formula: formuRef.current.getFinalStr(),
         ext_notify_list: [],
+        is_complex: true,
+        type: 1,
+        sub_type: 12,
+        status: value.status ? 1 : 2,
+        defer_unit: 2,
+        defer_seconds: Number(dateTime) ?? 0,
       };
       const { state, state_info } = await API2.editRule(obj);
       if (state === 0) {

Некоторые файлы не были показаны из-за большого количества измененных файлов