Kaynağa Gözat

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 ay önce
ebeveyn
işleme
24606569c4
2 değiştirilmiş dosya ile 6 ekleme ve 0 silme
  1. 0 0
      lib/index.js
  2. 6 0
      src/pages/Alarm/components/complex.jsx

Dosya farkı çok büyük olduğundan ihmal edildi
+ 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) {

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor