@justair/justair-library 4.5.0 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/models/alerts.js +7 -0
- package/.idea/justair-library.iml +0 -9
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
package/package.json
CHANGED
package/src/models/alerts.js
CHANGED
|
@@ -28,6 +28,7 @@ const alertsSchema = mongoose.Schema(
|
|
|
28
28
|
type: String,
|
|
29
29
|
enum: ["Active", "Ack", "Mute"],
|
|
30
30
|
},
|
|
31
|
+
activeUntil: { type: Date },
|
|
31
32
|
actionBy: { type: mongoose.Types.ObjectId, ref: "Admin" },
|
|
32
33
|
actionDate: { type: Date, default: Date.now },
|
|
33
34
|
recipients: [recipientSchema],
|
|
@@ -64,6 +65,7 @@ const alertsAuditSchema = mongoose.Schema(
|
|
|
64
65
|
type: String,
|
|
65
66
|
enum: ["Active", "Ack", "Mute"],
|
|
66
67
|
},
|
|
68
|
+
activeUntil: {type: Date},
|
|
67
69
|
actionBy: { type: mongoose.Types.ObjectId, ref: "Admin" },
|
|
68
70
|
actionDate: { type: Date, default: Date.now },
|
|
69
71
|
recipients: [recipientSchema],
|
|
@@ -94,6 +96,7 @@ alertsSchema.pre("findOneAndDelete", async function () {
|
|
|
94
96
|
alertConfigurationId: docToDelete.alertConfigurationId,
|
|
95
97
|
monitorId: docToDelete.monitorId,
|
|
96
98
|
status: docToDelete.status,
|
|
99
|
+
activeUntil: docToDelete.activeUntil,
|
|
97
100
|
actionBy: docToDelete.actionBy,
|
|
98
101
|
actionDate: docToDelete.actionDate,
|
|
99
102
|
recipients: docToDelete.recipients,
|
|
@@ -118,6 +121,7 @@ alertsSchema.pre("deleteMany", async function () {
|
|
|
118
121
|
orgId: doc.orgId,
|
|
119
122
|
monitorId: doc.monitorId,
|
|
120
123
|
status: doc.status,
|
|
124
|
+
activeUntil: doc.activeUntil,
|
|
121
125
|
actionBy: doc.actionBy,
|
|
122
126
|
actionDate: doc.actionDate,
|
|
123
127
|
recipients: doc.recipients,
|
|
@@ -143,6 +147,7 @@ alertsSchema.pre("deleteOne", async function () {
|
|
|
143
147
|
orgId: docToDelete.orgId,
|
|
144
148
|
monitorId: docToDelete.monitorId,
|
|
145
149
|
status: docToDelete.status,
|
|
150
|
+
activeUntil: docToDelete.activeUntil,
|
|
146
151
|
actionBy: docToDelete.actionBy,
|
|
147
152
|
actionDate: docToDelete.actionDate,
|
|
148
153
|
recipients: docToDelete.recipients,
|
|
@@ -165,6 +170,7 @@ alertsSchema.pre("findOneAndUpdate", async function () {
|
|
|
165
170
|
orgId: docToUpdate.orgId,
|
|
166
171
|
monitorId: docToUpdate.monitorId,
|
|
167
172
|
status: docToUpdate.status,
|
|
173
|
+
activeUntil: docToUpdate.activeUntil,
|
|
168
174
|
actionBy: docToUpdate.actionBy,
|
|
169
175
|
actionDate: docToUpdate.actionDate,
|
|
170
176
|
recipients: docToUpdate.recipients,
|
|
@@ -187,6 +193,7 @@ alertsSchema.pre("updateMany", async function () {
|
|
|
187
193
|
orgId: doc.orgId,
|
|
188
194
|
monitorId: doc.monitorId,
|
|
189
195
|
status: doc.status,
|
|
196
|
+
activeUntil: doc.activeUntil,
|
|
190
197
|
actionBy: doc.actionBy,
|
|
191
198
|
actionDate: doc.actionDate,
|
|
192
199
|
recipients: doc.recipients,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="JAVA_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
-
<exclude-output />
|
|
5
|
-
<content url="file://$MODULE_DIR$" />
|
|
6
|
-
<orderEntry type="inheritedJdk" />
|
|
7
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
8
|
-
</component>
|
|
9
|
-
</module>
|
package/.idea/misc.xml
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="corretto-17" project-jdk-type="JavaSDK">
|
|
4
|
-
<output url="file://$PROJECT_DIR$/out" />
|
|
5
|
-
</component>
|
|
6
|
-
</project>
|
package/.idea/modules.xml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectModuleManager">
|
|
4
|
-
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/justair-library.iml" filepath="$PROJECT_DIR$/.idea/justair-library.iml" />
|
|
6
|
-
</modules>
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|