Parcourir la 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 il y a 4 mois
Parent
commit
24606569c4
2 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 0 0
      lib/index.js
  2. 6 0
      src/pages/Alarm/components/complex.jsx

Fichier diff supprimé car celui-ci est trop grand
+ 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) {

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff