소스 검색

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 달 전
부모
커밋
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) {

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.