Browse Source

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 tháng trước cách đây
mục cha
commit
24606569c4
2 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 0 0
      lib/index.js
  2. 6 0
      src/pages/Alarm/components/complex.jsx

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 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) {

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác