@oneuptime/common 7.0.3815 → 7.0.3826
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/Models/DatabaseModels/AlertStateTimeline.ts +1 -1
- package/Models/DatabaseModels/IncidentStateTimeline.ts +1 -1
- package/Models/DatabaseModels/MonitorStatusTimeline.ts +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.ts +1 -1
- package/Models/DatabaseModels/WorkspaceNotificationRule.ts +8 -0
- package/Server/Services/AlertStateTimelineService.ts +192 -86
- package/Server/Services/IncidentStateTimelineService.ts +205 -103
- package/Server/Services/MonitorStatusTimelineService.ts +202 -101
- package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +201 -101
- package/UI/Components/Forms/BasicForm.tsx +4 -0
- package/UI/Components/Forms/Types/Field.ts +3 -0
- package/build/dist/Models/DatabaseModels/AlertStateTimeline.js +1 -1
- package/build/dist/Models/DatabaseModels/AlertStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentStateTimeline.js +1 -1
- package/build/dist/Models/DatabaseModels/IncidentStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MonitorStatusTimeline.js +1 -1
- package/build/dist/Models/DatabaseModels/MonitorStatusTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/WorkspaceNotificationRule.js +8 -0
- package/build/dist/Models/DatabaseModels/WorkspaceNotificationRule.js.map +1 -1
- package/build/dist/Server/Services/AlertStateTimelineService.js +171 -72
- package/build/dist/Server/Services/AlertStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentStateTimelineService.js +171 -73
- package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/MonitorStatusTimelineService.js +168 -72
- package/build/dist/Server/Services/MonitorStatusTimelineService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +174 -80
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
- package/build/dist/UI/Components/Forms/BasicForm.js +3 -0
- package/build/dist/UI/Components/Forms/BasicForm.js.map +1 -1
- package/package.json +2 -2
|
@@ -14,7 +14,7 @@ export class Service extends DatabaseService {
|
|
|
14
14
|
constructor() {
|
|
15
15
|
super(MonitorStatusTimeline);
|
|
16
16
|
if (IsBillingEnabled) {
|
|
17
|
-
this.hardDeleteItemsOlderThanInDays("
|
|
17
|
+
this.hardDeleteItemsOlderThanInDays("startsAt", 120);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
async onBeforeCreate(createBy) {
|
|
@@ -52,28 +52,58 @@ export class Service extends DatabaseService {
|
|
|
52
52
|
})}`;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
const
|
|
55
|
+
const stateBeforeThis = await this.findOneBy({
|
|
56
56
|
query: {
|
|
57
57
|
monitorId: createBy.data.monitorId,
|
|
58
|
+
startsAt: QueryHelper.lessThanEqualTo(createBy.data.startsAt),
|
|
58
59
|
},
|
|
59
60
|
sort: {
|
|
60
|
-
|
|
61
|
+
startsAt: SortOrder.Descending,
|
|
61
62
|
},
|
|
62
63
|
props: {
|
|
63
64
|
isRoot: true,
|
|
64
65
|
},
|
|
65
66
|
select: {
|
|
66
|
-
|
|
67
|
+
monitorStatusId: true,
|
|
68
|
+
startsAt: true,
|
|
69
|
+
endsAt: true,
|
|
67
70
|
},
|
|
68
71
|
});
|
|
69
|
-
|
|
72
|
+
logger.debug("State Before this");
|
|
73
|
+
logger.debug(stateBeforeThis);
|
|
74
|
+
// If this is the first state, then do not notify the owner.
|
|
75
|
+
if (!stateBeforeThis) {
|
|
70
76
|
// since this is the first status, do not notify the owner.
|
|
71
77
|
createBy.data.isOwnerNotified = true;
|
|
72
78
|
}
|
|
79
|
+
const stateAfterThis = await this.findOneBy({
|
|
80
|
+
query: {
|
|
81
|
+
monitorId: createBy.data.monitorId,
|
|
82
|
+
startsAt: QueryHelper.greaterThan(createBy.data.startsAt),
|
|
83
|
+
},
|
|
84
|
+
sort: {
|
|
85
|
+
startsAt: SortOrder.Ascending,
|
|
86
|
+
},
|
|
87
|
+
props: {
|
|
88
|
+
isRoot: true,
|
|
89
|
+
},
|
|
90
|
+
select: {
|
|
91
|
+
monitorStatusId: true,
|
|
92
|
+
startsAt: true,
|
|
93
|
+
endsAt: true,
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
// compute ends at. It's the start of the next status.
|
|
97
|
+
if (stateAfterThis && stateAfterThis.startsAt) {
|
|
98
|
+
createBy.data.endsAt = stateAfterThis.startsAt;
|
|
99
|
+
}
|
|
100
|
+
logger.debug("State After this");
|
|
101
|
+
logger.debug(stateAfterThis);
|
|
73
102
|
return {
|
|
74
103
|
createBy,
|
|
75
104
|
carryForward: {
|
|
76
|
-
|
|
105
|
+
statusTimelineBeforeThisStatus: stateBeforeThis || null,
|
|
106
|
+
statusTimelineAfterThisStatus: stateAfterThis || null,
|
|
77
107
|
mutex: mutex,
|
|
78
108
|
},
|
|
79
109
|
};
|
|
@@ -87,26 +117,68 @@ export class Service extends DatabaseService {
|
|
|
87
117
|
throw new BadDataException("monitorStatusId is null");
|
|
88
118
|
}
|
|
89
119
|
// update the last status as ended.
|
|
90
|
-
|
|
120
|
+
logger.debug("Status Timeline Before this");
|
|
121
|
+
logger.debug(onCreate.carryForward.statusTimelineBeforeThisStatus);
|
|
122
|
+
logger.debug("Status Timeline After this");
|
|
123
|
+
logger.debug(onCreate.carryForward.statusTimelineAfterThisStatus);
|
|
124
|
+
logger.debug("Created Item");
|
|
125
|
+
logger.debug(createdItem);
|
|
126
|
+
// now there are three cases.
|
|
127
|
+
// 1. This is the first status OR there's no status after this.
|
|
128
|
+
if (!onCreate.carryForward.statusTimelineBeforeThisStatus) {
|
|
129
|
+
// This is the first status, no need to update previous status.
|
|
130
|
+
logger.debug("This is the first status.");
|
|
131
|
+
}
|
|
132
|
+
else if (!onCreate.carryForward.statusTimelineAfterThisStatus) {
|
|
133
|
+
// 2. This is the last status.
|
|
134
|
+
// Update the previous status to end at the start of this status.
|
|
91
135
|
await this.updateOneById({
|
|
92
|
-
id: onCreate.carryForward.
|
|
136
|
+
id: onCreate.carryForward.statusTimelineBeforeThisStatus.id,
|
|
93
137
|
data: {
|
|
94
|
-
endsAt: createdItem.
|
|
138
|
+
endsAt: createdItem.startsAt,
|
|
95
139
|
},
|
|
96
140
|
props: {
|
|
97
141
|
isRoot: true,
|
|
98
142
|
},
|
|
99
143
|
});
|
|
144
|
+
logger.debug("This is the last status.");
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
// 3. This is in the middle.
|
|
148
|
+
// Update the previous status to end at the start of this status.
|
|
149
|
+
await this.updateOneById({
|
|
150
|
+
id: onCreate.carryForward.statusTimelineBeforeThisStatus.id,
|
|
151
|
+
data: {
|
|
152
|
+
endsAt: createdItem.startsAt,
|
|
153
|
+
},
|
|
154
|
+
props: {
|
|
155
|
+
isRoot: true,
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
// Update the next status to start at the end of this status.
|
|
159
|
+
await this.updateOneById({
|
|
160
|
+
id: onCreate.carryForward.statusTimelineAfterThisStatus.id,
|
|
161
|
+
data: {
|
|
162
|
+
startsAt: createdItem.endsAt,
|
|
163
|
+
},
|
|
164
|
+
props: {
|
|
165
|
+
isRoot: true,
|
|
166
|
+
},
|
|
167
|
+
});
|
|
168
|
+
logger.debug("This status is in the middle.");
|
|
169
|
+
}
|
|
170
|
+
if (!createdItem.endsAt) {
|
|
171
|
+
// if this is the last status, then update the monitor status.
|
|
172
|
+
await MonitorService.updateOneBy({
|
|
173
|
+
query: {
|
|
174
|
+
_id: (_a = createdItem.monitorId) === null || _a === void 0 ? void 0 : _a.toString(),
|
|
175
|
+
},
|
|
176
|
+
data: {
|
|
177
|
+
currentMonitorStatusId: createdItem.monitorStatusId,
|
|
178
|
+
},
|
|
179
|
+
props: onCreate.createBy.props,
|
|
180
|
+
});
|
|
100
181
|
}
|
|
101
|
-
await MonitorService.updateOneBy({
|
|
102
|
-
query: {
|
|
103
|
-
_id: (_a = createdItem.monitorId) === null || _a === void 0 ? void 0 : _a.toString(),
|
|
104
|
-
},
|
|
105
|
-
data: {
|
|
106
|
-
currentMonitorStatusId: createdItem.monitorStatusId,
|
|
107
|
-
},
|
|
108
|
-
props: onCreate.createBy.props,
|
|
109
|
-
});
|
|
110
182
|
if (onCreate.carryForward.mutex) {
|
|
111
183
|
const mutex = onCreate.carryForward.mutex;
|
|
112
184
|
await Semaphore.release(mutex);
|
|
@@ -120,6 +192,7 @@ export class Service extends DatabaseService {
|
|
|
120
192
|
select: {
|
|
121
193
|
monitorId: true,
|
|
122
194
|
startsAt: true,
|
|
195
|
+
endsAt: true,
|
|
123
196
|
},
|
|
124
197
|
props: {
|
|
125
198
|
isRoot: true,
|
|
@@ -135,69 +208,92 @@ export class Service extends DatabaseService {
|
|
|
135
208
|
isRoot: true,
|
|
136
209
|
},
|
|
137
210
|
});
|
|
211
|
+
if (!monitorStatusTimelineToBeDeleted) {
|
|
212
|
+
throw new BadDataException("Monitor status timeline not found.");
|
|
213
|
+
}
|
|
138
214
|
if (monitorStatusTimeline.isOne()) {
|
|
139
215
|
throw new BadDataException("Cannot delete the only status timeline. Monitor should have at least one status timeline.");
|
|
140
216
|
}
|
|
141
|
-
//
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
217
|
+
// There are three cases.
|
|
218
|
+
// 1. This is the first status.
|
|
219
|
+
// 2. This is the last status.
|
|
220
|
+
// 3. This is in the middle.
|
|
221
|
+
const stateBeforeThis = await this.findOneBy({
|
|
222
|
+
query: {
|
|
223
|
+
_id: QueryHelper.notEquals(deleteBy.query._id),
|
|
224
|
+
monitorId: monitorId,
|
|
225
|
+
startsAt: QueryHelper.lessThanEqualTo(monitorStatusTimelineToBeDeleted.startsAt),
|
|
226
|
+
},
|
|
227
|
+
sort: {
|
|
228
|
+
startsAt: SortOrder.Descending,
|
|
229
|
+
},
|
|
230
|
+
props: {
|
|
231
|
+
isRoot: true,
|
|
232
|
+
},
|
|
233
|
+
select: {
|
|
234
|
+
monitorStatusId: true,
|
|
235
|
+
startsAt: true,
|
|
236
|
+
endsAt: true,
|
|
237
|
+
},
|
|
238
|
+
});
|
|
239
|
+
const stateAfterThis = await this.findOneBy({
|
|
240
|
+
query: {
|
|
241
|
+
monitorId: monitorId,
|
|
242
|
+
startsAt: QueryHelper.greaterThan(monitorStatusTimelineToBeDeleted.startsAt),
|
|
243
|
+
},
|
|
244
|
+
sort: {
|
|
245
|
+
startsAt: SortOrder.Ascending,
|
|
246
|
+
},
|
|
247
|
+
props: {
|
|
248
|
+
isRoot: true,
|
|
249
|
+
},
|
|
250
|
+
select: {
|
|
251
|
+
monitorStatusId: true,
|
|
252
|
+
startsAt: true,
|
|
253
|
+
endsAt: true,
|
|
254
|
+
},
|
|
255
|
+
});
|
|
256
|
+
if (!stateBeforeThis) {
|
|
257
|
+
// This is the first status, no need to update previous status.
|
|
258
|
+
logger.debug("This is the first status.");
|
|
259
|
+
}
|
|
260
|
+
else if (!stateAfterThis) {
|
|
261
|
+
// This is the last status.
|
|
262
|
+
// Update the previous status to end at the start of this status.
|
|
263
|
+
await this.updateOneById({
|
|
264
|
+
id: stateBeforeThis.id,
|
|
265
|
+
data: {
|
|
266
|
+
endsAt: monitorStatusTimelineToBeDeleted.endsAt,
|
|
267
|
+
},
|
|
268
|
+
props: {
|
|
269
|
+
isRoot: true,
|
|
147
270
|
},
|
|
148
|
-
|
|
149
|
-
|
|
271
|
+
});
|
|
272
|
+
logger.debug("This is the last status.");
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
// This status is in the middle.
|
|
276
|
+
// Update the previous status to end at the start of this status.
|
|
277
|
+
await this.updateOneById({
|
|
278
|
+
id: stateBeforeThis.id,
|
|
279
|
+
data: {
|
|
280
|
+
endsAt: stateAfterThis.startsAt,
|
|
150
281
|
},
|
|
151
282
|
props: {
|
|
152
283
|
isRoot: true,
|
|
153
284
|
},
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
285
|
+
});
|
|
286
|
+
// Update the next status to start at the end of this status.
|
|
287
|
+
await this.updateOneById({
|
|
288
|
+
id: stateAfterThis.id,
|
|
289
|
+
data: {
|
|
290
|
+
startsAt: monitorStatusTimelineToBeDeleted.startsAt,
|
|
291
|
+
},
|
|
292
|
+
props: {
|
|
293
|
+
isRoot: true,
|
|
157
294
|
},
|
|
158
295
|
});
|
|
159
|
-
|
|
160
|
-
const afterState = await this.findOneBy({
|
|
161
|
-
query: {
|
|
162
|
-
monitorId: monitorId,
|
|
163
|
-
startsAt: QueryHelper.greaterThan(monitorStatusTimelineToBeDeleted === null || monitorStatusTimelineToBeDeleted === void 0 ? void 0 : monitorStatusTimelineToBeDeleted.startsAt),
|
|
164
|
-
},
|
|
165
|
-
sort: {
|
|
166
|
-
createdAt: SortOrder.Ascending,
|
|
167
|
-
},
|
|
168
|
-
props: {
|
|
169
|
-
isRoot: true,
|
|
170
|
-
},
|
|
171
|
-
select: {
|
|
172
|
-
_id: true,
|
|
173
|
-
startsAt: true,
|
|
174
|
-
},
|
|
175
|
-
});
|
|
176
|
-
if (!afterState) {
|
|
177
|
-
// if there's nothing after then end date of before state is null.
|
|
178
|
-
await this.updateOneById({
|
|
179
|
-
id: beforeState.id,
|
|
180
|
-
data: {
|
|
181
|
-
endsAt: null,
|
|
182
|
-
},
|
|
183
|
-
props: {
|
|
184
|
-
isRoot: true,
|
|
185
|
-
},
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
// if there's something after then end date of before state is start date of after state.
|
|
190
|
-
await this.updateOneById({
|
|
191
|
-
id: beforeState.id,
|
|
192
|
-
data: {
|
|
193
|
-
endsAt: afterState.startsAt,
|
|
194
|
-
},
|
|
195
|
-
props: {
|
|
196
|
-
isRoot: true,
|
|
197
|
-
},
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
}
|
|
296
|
+
logger.debug("This status is in the middle.");
|
|
201
297
|
}
|
|
202
298
|
}
|
|
203
299
|
return { deleteBy, carryForward: monitorId };
|
|
@@ -214,7 +310,7 @@ export class Service extends DatabaseService {
|
|
|
214
310
|
monitorId: monitorId,
|
|
215
311
|
},
|
|
216
312
|
sort: {
|
|
217
|
-
|
|
313
|
+
startsAt: SortOrder.Descending,
|
|
218
314
|
},
|
|
219
315
|
props: {
|
|
220
316
|
isRoot: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MonitorStatusTimelineService.js","sourceRoot":"","sources":["../../../../Server/Services/MonitorStatusTimelineService.ts"],"names":[],"mappings":"AAAA,OAAO,SAA6B,MAAM,6BAA6B,CAAC;AAIxE,OAAO,WAAW,MAAM,+BAA+B,CAAC;AACxD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,SAAS,MAAM,oCAAoC,CAAC;AAC3D,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,gBAAgB,MAAM,wCAAwC,CAAC;AACtE,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAE5C,OAAO,qBAAqB,MAAM,oDAAoD,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,OAAO,OAAQ,SAAQ,eAAsC;IACjE;QACE,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC7B,IAAI,gBAAgB,EAAE,CAAC;YACrB,IAAI,CAAC,8BAA8B,CAAC,
|
|
1
|
+
{"version":3,"file":"MonitorStatusTimelineService.js","sourceRoot":"","sources":["../../../../Server/Services/Monit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