@oneuptime/common 14.0.91 → 14.0.93
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/Alert.js +8 -1
- package/Models/DatabaseModels/AlertEpisodeMember.d.mts +1 -0
- package/Models/DatabaseModels/AlertEpisodeMember.d.ts +1 -0
- package/Models/DatabaseModels/AlertEpisodeMember.js +50 -0
- package/Models/DatabaseModels/AutoRemediationRule.js +1 -1
- package/Models/DatabaseModels/CodeRepository.d.mts +1 -0
- package/Models/DatabaseModels/CodeRepository.d.ts +1 -0
- package/Models/DatabaseModels/CodeRepository.js +69 -6
- package/Models/DatabaseModels/IncidentEpisodeMember.d.mts +1 -0
- package/Models/DatabaseModels/IncidentEpisodeMember.d.ts +1 -0
- package/Models/DatabaseModels/IncidentEpisodeMember.js +50 -0
- package/Models/DatabaseModels/IncomingCallPolicy.js +1 -1
- package/Models/DatabaseModels/LlmProvider.js +1 -1
- package/Models/DatabaseModels/MonitorTemplate.js +10 -4
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +13 -13
- package/Models/DatabaseModels/OnCallDutyPolicy.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +1 -1
- package/Models/DatabaseModels/StatusPage.d.mts +2 -0
- package/Models/DatabaseModels/StatusPage.d.ts +2 -0
- package/Models/DatabaseModels/StatusPage.js +100 -0
- package/Types/AI/CodeTask.d.mts +1 -0
- package/Types/AI/CodeTask.d.ts +1 -0
- package/Types/AI/TelemetryAiActivity.d.mts +1 -0
- package/Types/AI/TelemetryAiActivity.d.ts +1 -0
- package/Types/AI/TelemetryAiActivity.js +4 -0
- package/Types/CodeRepository/CodeRepositorySetting.d.mts +15 -0
- package/Types/CodeRepository/CodeRepositorySetting.d.ts +15 -0
- package/Types/CodeRepository/CodeRepositorySetting.js +49 -0
- package/Types/CodeRepository/CodeRepositorySetting.mjs +3 -0
- package/Types/Database/BlankColumnValue.d.mts +6 -0
- package/Types/Database/BlankColumnValue.d.ts +6 -0
- package/Types/Database/BlankColumnValue.js +77 -0
- package/Types/Database/BlankColumnValue.mjs +4 -0
- package/Types/Date.d.mts +10 -0
- package/Types/Date.d.ts +10 -0
- package/Types/Date.js +385 -98
- package/Types/DateLanguage.d.mts +67 -0
- package/Types/DateLanguage.d.ts +67 -0
- package/Types/DateLanguage.js +478 -0
- package/Types/DateLanguage.mjs +21 -0
- package/Types/Email/EmailTemplateType.d.mts +1 -0
- package/Types/Email/EmailTemplateType.d.ts +1 -0
- package/Types/Email/EmailTemplateType.js +1 -0
- package/Types/IncomingCall/IncomingCallPolicyRepeat.d.mts +6 -0
- package/Types/IncomingCall/IncomingCallPolicyRepeat.d.ts +6 -0
- package/Types/IncomingCall/IncomingCallPolicyRepeat.js +41 -14
- package/Types/IncomingCall/IncomingCallPolicyRepeat.mjs +3 -0
- package/Types/Monitor/CriteriaFilter.d.mts +1 -0
- package/Types/Monitor/CriteriaFilter.d.ts +1 -0
- package/Types/Monitor/CriteriaFilter.js +9 -0
- package/Types/Monitor/DatabaseMetricCatalog.js +2 -2
- package/Types/Monitor/KubernetesEventAlertTemplates.d.mts +20 -0
- package/Types/Monitor/KubernetesEventAlertTemplates.d.ts +20 -0
- package/Types/Monitor/KubernetesEventAlertTemplates.js +232 -0
- package/Types/Monitor/KubernetesEventAlertTemplates.mjs +8 -0
- package/Types/Monitor/MonitorType.js +12 -2
- package/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js +27 -2
- package/Types/Monitor/Recommendation/MonitorRecommendationUtil.d.mts +1 -0
- package/Types/Monitor/Recommendation/MonitorRecommendationUtil.d.ts +1 -0
- package/Types/Monitor/Recommendation/MonitorRecommendationUtil.js +31 -1
- package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.d.mts +3 -1
- package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.d.ts +3 -1
- package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.js +3 -2
- package/Types/Monitor/SnmpMonitor/SnmpMonitorResponse.d.mts +1 -0
- package/Types/Monitor/SnmpMonitor/SnmpMonitorResponse.d.ts +1 -0
- package/Types/NotificationSetting/NotificationEmailRollupCategory.js +2 -0
- package/Types/NotificationSetting/NotificationEmailRollupPolicy.js +10 -3
- package/Types/NotificationSetting/NotificationSettingEventType.d.mts +1 -0
- package/Types/NotificationSetting/NotificationSettingEventType.d.ts +1 -0
- package/Types/NotificationSetting/NotificationSettingEventType.js +7 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.d.mts +7 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.d.ts +7 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.js +51 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRepeat.mjs +4 -0
- package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.d.mts +8 -0
- package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.d.ts +8 -0
- package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.js +55 -0
- package/Types/Reminder/ScheduledMaintenanceReminderNeverReminds.mjs +5 -0
- package/Types/Runner/CodeRepositoryRunner.d.mts +7 -0
- package/Types/Runner/CodeRepositoryRunner.d.ts +7 -0
- package/Types/Runner/CodeRepositoryRunner.js +60 -14
- package/Types/Runner/CodeRepositoryRunner.mjs +1 -0
- package/Types/SecurityEvent/OcsfProcessActivity.d.mts +25 -0
- package/Types/SecurityEvent/OcsfProcessActivity.d.ts +25 -0
- package/Types/SecurityEvent/OcsfProcessActivity.js +131 -0
- package/Types/SecurityEvent/OcsfProcessActivity.mjs +8 -0
- package/Types/Workflow/Templates.js +2 -5
- package/UI/Utils/TranslateTemplate.d.mts +73 -0
- package/UI/Utils/TranslateTemplate.d.ts +73 -0
- package/Utils/ColorContrast.d.mts +3 -0
- package/Utils/ColorContrast.d.ts +3 -0
- package/Utils/ColorContrast.js +41 -3
- package/Utils/ColorContrast.mjs +2 -0
- package/Utils/CronTab.d.mts +41 -3
- package/Utils/CronTab.d.ts +41 -3
- package/Utils/CronTab.js +112 -38
- package/Utils/Incident/WhoOpenedItRootCause.d.mts +2 -0
- package/Utils/Incident/WhoOpenedItRootCause.d.ts +2 -0
- package/Utils/Incident/WhoOpenedItRootCause.js +50 -0
- package/Utils/Incident/WhoOpenedItRootCause.mjs +3 -0
- package/Utils/Monitor/MonitorOverviewTargetUtil.d.mts +2 -0
- package/Utils/Monitor/MonitorOverviewTargetUtil.d.ts +2 -0
- package/Utils/Monitor/MonitorOverviewTargetUtil.js +13 -2
- package/Utils/Monitor/SyntheticMonitorStepsUtil.d.mts +18 -0
- package/Utils/Monitor/SyntheticMonitorStepsUtil.d.ts +18 -0
- package/Utils/Monitor/SyntheticMonitorStepsUtil.js +129 -0
- package/Utils/Monitor/SyntheticMonitorStepsUtil.mjs +4 -0
- package/Utils/Rules/RuleRunSummary.d.mts +1 -0
- package/Utils/Rules/RuleRunSummary.d.ts +1 -0
- package/Utils/Rules/RuleRunSummary.js +19 -1
- package/Utils/Rules/RuleRunSummary.mjs +1 -0
- package/Utils/SecurityEvent/Destinations/GoogleSecOpsUdmMapper.d.mts +5 -0
- package/Utils/SecurityEvent/Destinations/GoogleSecOpsUdmMapper.d.ts +5 -0
- package/Utils/SecurityEvent/Destinations/GoogleSecOpsUdmMapper.js +219 -58
- package/Utils/SecurityEvent/OcsfNormalizer.js +22 -13
- package/Utils/Slo/SloDuration.d.mts +1 -0
- package/Utils/Slo/SloDuration.d.ts +1 -0
- package/Utils/Slo/SloDuration.js +57 -8
- package/Utils/Slo/SloDuration.mjs +1 -0
- package/Utils/Sms/Gsm7Text.js +9 -1
- package/Utils/Sms/OnCallPageSms.d.mts +2 -0
- package/Utils/Sms/OnCallPageSms.d.ts +2 -0
- package/Utils/Sms/OnCallPageSms.js +19 -2
- package/Utils/Sms/OnCallPageSms.mjs +1 -0
- package/Utils/Sms/SubscriberSms.d.mts +2 -0
- package/Utils/Sms/SubscriberSms.d.ts +2 -0
- package/Utils/Sms/SubscriberSms.js +35 -0
- package/Utils/Sms/SubscriberSms.mjs +3 -0
- package/Utils/Suggestions/CodeFixSuggestion.d.mts +15 -0
- package/Utils/Suggestions/CodeFixSuggestion.d.ts +15 -0
- package/Utils/Suggestions/CodeFixSuggestion.js +62 -1
- package/Utils/Suggestions/CodeFixSuggestion.mjs +4 -0
- package/Utils/Suggestions/ProfileFixSuggestion.js +4 -0
- package/Utils/Suggestions/SuggestionBlocker.d.mts +8 -0
- package/Utils/Suggestions/SuggestionBlocker.d.ts +8 -0
- package/Utils/Suggestions/SuggestionBlocker.js +51 -0
- package/Utils/Suggestions/SuggestionBlocker.mjs +4 -0
- package/Utils/Suggestions/SuggestionOffer.d.mts +2 -1
- package/Utils/Suggestions/SuggestionOffer.d.ts +2 -1
- package/Utils/Suggestions/SuggestionOffer.js +5 -0
- package/Utils/Suggestions/TelemetryAiFixSuggestion.d.mts +2 -7
- package/Utils/Suggestions/TelemetryAiFixSuggestion.d.ts +2 -7
- package/Utils/Suggestions/TelemetryAiFixSuggestion.js +8 -36
- package/Utils/Suggestions/TelemetryImprovementSuggestion.d.mts +1 -0
- package/Utils/Suggestions/TelemetryImprovementSuggestion.d.ts +1 -0
- package/Utils/Suggestions/TelemetryImprovementSuggestion.js +1 -0
- package/Utils/Suggestions/TracePerformanceFixSuggestion.d.mts +6 -0
- package/Utils/Suggestions/TracePerformanceFixSuggestion.d.ts +6 -0
- package/Utils/Suggestions/TracePerformanceFixSuggestion.js +46 -5
- package/package.json +8 -1
- package/Utils/Monitor/MonitorCheckScheduleUtil.d.mts +0 -61
- package/Utils/Monitor/MonitorCheckScheduleUtil.d.ts +0 -61
- package/Utils/Monitor/MonitorCheckScheduleUtil.js +0 -476
- package/Utils/Monitor/MonitorCheckScheduleUtil.mjs +0 -3
- package/Utils/Monitor/MonitorOverviewFamily.d.mts +0 -39
- package/Utils/Monitor/MonitorOverviewFamily.d.ts +0 -39
- package/Utils/Monitor/MonitorOverviewFamily.js +0 -206
- package/Utils/Monitor/MonitorOverviewFamily.mjs +0 -4
- package/Utils/Monitor/MonitorOverviewPresentationUtil.d.mts +0 -189
- package/Utils/Monitor/MonitorOverviewPresentationUtil.d.ts +0 -189
- package/Utils/Monitor/MonitorOverviewPresentationUtil.js +0 -1480
- package/Utils/Monitor/MonitorOverviewPresentationUtil.mjs +0 -5
- package/Utils/Monitor/MonitorOverviewProbeUtil.d.mts +0 -112
- package/Utils/Monitor/MonitorOverviewProbeUtil.d.ts +0 -112
- package/Utils/Monitor/MonitorOverviewProbeUtil.js +0 -640
- package/Utils/Monitor/MonitorOverviewProbeUtil.mjs +0 -3
- package/Utils/Monitor/MonitorStatusHistoryUtil.d.mts +0 -27
- package/Utils/Monitor/MonitorStatusHistoryUtil.d.ts +0 -27
- package/Utils/Monitor/MonitorStatusHistoryUtil.js +0 -132
- package/Utils/Monitor/MonitorStatusHistoryUtil.mjs +0 -2
- package/Utils/Monitor/MonitorUptimeSummaryUtil.d.mts +0 -42
- package/Utils/Monitor/MonitorUptimeSummaryUtil.d.ts +0 -42
- package/Utils/Monitor/MonitorUptimeSummaryUtil.js +0 -468
- package/Utils/Monitor/MonitorUptimeSummaryUtil.mjs +0 -2
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import Color from "../../Types/Color";
|
|
2
|
-
import MonitorStatusTimeline from "../../Models/DatabaseModels/MonitorStatusTimeline";
|
|
3
|
-
export interface MonitorStatusChangeRow {
|
|
4
|
-
id: string;
|
|
5
|
-
statusName: string;
|
|
6
|
-
statusColor: string | undefined;
|
|
7
|
-
startsAt: Date;
|
|
8
|
-
endsAt: Date | undefined;
|
|
9
|
-
isOngoing: boolean;
|
|
10
|
-
}
|
|
11
|
-
export default class MonitorStatusHistoryUtil {
|
|
12
|
-
static getStatusSince(data: {
|
|
13
|
-
currentStatusId: string | undefined;
|
|
14
|
-
latestRow: MonitorStatusTimeline | undefined;
|
|
15
|
-
now: Date;
|
|
16
|
-
}): Date | undefined;
|
|
17
|
-
static hasStatusDrift(data: {
|
|
18
|
-
currentStatusId: string | undefined;
|
|
19
|
-
latestRow: MonitorStatusTimeline | undefined;
|
|
20
|
-
}): boolean;
|
|
21
|
-
static getStatusChangeRows(rows: Array<MonitorStatusTimeline>): Array<MonitorStatusChangeRow>;
|
|
22
|
-
static getStatusFingerprint(data: {
|
|
23
|
-
currentStatusId: string | undefined;
|
|
24
|
-
latestRow: MonitorStatusTimeline | undefined;
|
|
25
|
-
}): string;
|
|
26
|
-
static normalizeColor(color: Color | string | undefined | null): string | undefined;
|
|
27
|
-
}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const Color_1 = __importDefault(require("../../Types/Color"));
|
|
7
|
-
const MonitorCheckScheduleUtil_1 = __importDefault(require("./MonitorCheckScheduleUtil"));
|
|
8
|
-
// #rgb, #rgba, #rrggbb and #rrggbbaa.
|
|
9
|
-
const HEX_COLOR = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
|
|
10
|
-
// rgb(), rgba(), hsl() and hsla() with plain numeric arguments.
|
|
11
|
-
const FUNCTIONAL_COLOR = /^(?:rgb|rgba|hsl|hsla)\(\s*[\d.%,\s/]+\)$/i;
|
|
12
|
-
// A CSS named colour such as "red" or "rebeccapurple".
|
|
13
|
-
const NAMED_COLOR = /^[a-z]{3,20}$/i;
|
|
14
|
-
const getStatusId = (row) => {
|
|
15
|
-
var _a;
|
|
16
|
-
return ((_a = row === null || row === void 0 ? void 0 : row.monitorStatusId) === null || _a === void 0 ? void 0 : _a.toString()) || "";
|
|
17
|
-
};
|
|
18
|
-
class MonitorStatusHistoryUtil {
|
|
19
|
-
/*
|
|
20
|
-
* When the current status began, or undefined when the rows cannot vouch
|
|
21
|
-
* for it: no rows, a closed newest row, or a newest row with another
|
|
22
|
-
* status (drift). A headline must not say "Operational for 3 days" off a
|
|
23
|
-
* row that describes something else.
|
|
24
|
-
*/
|
|
25
|
-
static getStatusSince(data) {
|
|
26
|
-
const row = data.latestRow;
|
|
27
|
-
if (!row || !data.currentStatusId) {
|
|
28
|
-
return undefined;
|
|
29
|
-
}
|
|
30
|
-
if (MonitorCheckScheduleUtil_1.default.parseDate(row.endsAt)) {
|
|
31
|
-
return undefined;
|
|
32
|
-
}
|
|
33
|
-
if (getStatusId(row) !== data.currentStatusId) {
|
|
34
|
-
return undefined;
|
|
35
|
-
}
|
|
36
|
-
const startsAt = MonitorCheckScheduleUtil_1.default.parseDate(row.startsAt);
|
|
37
|
-
if (!startsAt) {
|
|
38
|
-
return undefined;
|
|
39
|
-
}
|
|
40
|
-
// Clock skew must not produce a status that began in the future.
|
|
41
|
-
return startsAt.getTime() > data.now.getTime() ? data.now : startsAt;
|
|
42
|
-
}
|
|
43
|
-
/*
|
|
44
|
-
* True when the newest timeline row disagrees with Monitor's stored
|
|
45
|
-
* current status. The overview then waits for refresh-status and reloads
|
|
46
|
-
* once, instead of showing two different statuses on one page.
|
|
47
|
-
*/
|
|
48
|
-
static hasStatusDrift(data) {
|
|
49
|
-
if (!data.latestRow) {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
return getStatusId(data.latestRow) !== (data.currentStatusId || "");
|
|
53
|
-
}
|
|
54
|
-
/*
|
|
55
|
-
* Rows must already be sorted newest first. A row with no end is capped
|
|
56
|
-
* at the start of the row after it: only the newest open row is really
|
|
57
|
-
* ongoing, and an older open row is an orphan the reconciler has not
|
|
58
|
-
* closed yet, which must not read as still running.
|
|
59
|
-
*/
|
|
60
|
-
static getStatusChangeRows(rows) {
|
|
61
|
-
var _a, _b, _c, _d;
|
|
62
|
-
const changeRows = [];
|
|
63
|
-
const list = rows || [];
|
|
64
|
-
for (let i = 0; i < list.length; i++) {
|
|
65
|
-
const row = list[i];
|
|
66
|
-
if (!row) {
|
|
67
|
-
continue;
|
|
68
|
-
}
|
|
69
|
-
const startsAt = MonitorCheckScheduleUtil_1.default.parseDate(row.startsAt);
|
|
70
|
-
if (!startsAt) {
|
|
71
|
-
continue;
|
|
72
|
-
}
|
|
73
|
-
const rowEndsAt = MonitorCheckScheduleUtil_1.default.parseDate(row.endsAt);
|
|
74
|
-
const successorStartsAt = i > 0
|
|
75
|
-
? MonitorCheckScheduleUtil_1.default.parseDate((_a = list[i - 1]) === null || _a === void 0 ? void 0 : _a.startsAt)
|
|
76
|
-
: undefined;
|
|
77
|
-
changeRows.push({
|
|
78
|
-
id: ((_b = row._id) === null || _b === void 0 ? void 0 : _b.toString()) || `row-${i}`,
|
|
79
|
-
statusName: ((_c = row.monitorStatus) === null || _c === void 0 ? void 0 : _c.name) || "Unknown status",
|
|
80
|
-
statusColor: MonitorStatusHistoryUtil.normalizeColor((_d = row.monitorStatus) === null || _d === void 0 ? void 0 : _d.color),
|
|
81
|
-
startsAt: startsAt,
|
|
82
|
-
endsAt: rowEndsAt !== null && rowEndsAt !== void 0 ? rowEndsAt : successorStartsAt,
|
|
83
|
-
isOngoing: i === 0 && !rowEndsAt,
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
return changeRows;
|
|
87
|
-
}
|
|
88
|
-
/*
|
|
89
|
-
* Changes when the current status changes, when a new newest row appears,
|
|
90
|
-
* or when the newest row closes - the three things that should reload the
|
|
91
|
-
* uptime strip and the feed.
|
|
92
|
-
*/
|
|
93
|
-
static getStatusFingerprint(data) {
|
|
94
|
-
var _a, _b, _c;
|
|
95
|
-
const endsAt = MonitorCheckScheduleUtil_1.default.parseDate((_a = data.latestRow) === null || _a === void 0 ? void 0 : _a.endsAt);
|
|
96
|
-
return `${data.currentStatusId || ""}|${((_c = (_b = data.latestRow) === null || _b === void 0 ? void 0 : _b._id) === null || _c === void 0 ? void 0 : _c.toString()) || ""}|${endsAt ? endsAt.toISOString() : ""}`;
|
|
97
|
-
}
|
|
98
|
-
/*
|
|
99
|
-
* A status colour as a CSS value for an inline style, or undefined when
|
|
100
|
-
* there is none or it is not a colour. Accepts the Color class, a plain
|
|
101
|
-
* string, or a typed { _type: "Color", value } envelope.
|
|
102
|
-
*/
|
|
103
|
-
static normalizeColor(color) {
|
|
104
|
-
var _a;
|
|
105
|
-
if (color === null || color === undefined) {
|
|
106
|
-
return undefined;
|
|
107
|
-
}
|
|
108
|
-
let text = "";
|
|
109
|
-
if (typeof color === "string") {
|
|
110
|
-
text = color;
|
|
111
|
-
}
|
|
112
|
-
else if (color instanceof Color_1.default) {
|
|
113
|
-
text = color.toString();
|
|
114
|
-
}
|
|
115
|
-
else if (typeof color === "object") {
|
|
116
|
-
const envelopeValue = color["value"];
|
|
117
|
-
text =
|
|
118
|
-
typeof envelopeValue === "string"
|
|
119
|
-
? envelopeValue
|
|
120
|
-
: String((_a = color.color) !== null && _a !== void 0 ? _a : "");
|
|
121
|
-
}
|
|
122
|
-
text = (text || "").trim();
|
|
123
|
-
if (!text ||
|
|
124
|
-
!(HEX_COLOR.test(text) ||
|
|
125
|
-
FUNCTIONAL_COLOR.test(text) ||
|
|
126
|
-
NAMED_COLOR.test(text))) {
|
|
127
|
-
return undefined;
|
|
128
|
-
}
|
|
129
|
-
return text;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
exports.default = MonitorStatusHistoryUtil;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { JSONObject } from "../../Types/JSON.mjs";
|
|
2
|
-
import { MonitorUptimeSummary, MonitorUptimeSummaryStatus, MonitorUptimeWindowKey, MonitorUptimeWindowTotal } from "../../Types/Monitor/MonitorUptimeSummary.mjs";
|
|
3
|
-
import { UptimeDayBucket } from "../../Types/StatusPage/UptimeDailyAggregate.mjs";
|
|
4
|
-
export type UptimeWindowKind = "Measured" | "NoData";
|
|
5
|
-
export type MonitorUptimeCaveat = "paused" | "not-checking" | "no-results";
|
|
6
|
-
export interface UptimeWindowPresentation {
|
|
7
|
-
key: MonitorUptimeWindowKey;
|
|
8
|
-
kind: UptimeWindowKind;
|
|
9
|
-
uptimePercent: number | null;
|
|
10
|
-
valueText: string;
|
|
11
|
-
description: string;
|
|
12
|
-
downtimeSeconds: number;
|
|
13
|
-
coveredSeconds: number;
|
|
14
|
-
windowSeconds: number;
|
|
15
|
-
isPartial: boolean;
|
|
16
|
-
}
|
|
17
|
-
export default class MonitorUptimeSummaryUtil {
|
|
18
|
-
static readonly COVERAGE_TOLERANCE_SECONDS: number;
|
|
19
|
-
static sumBuckets(data: {
|
|
20
|
-
key: MonitorUptimeWindowKey;
|
|
21
|
-
buckets: Array<UptimeDayBucket>;
|
|
22
|
-
startDate: Date;
|
|
23
|
-
endDate: Date;
|
|
24
|
-
}): MonitorUptimeWindowTotal;
|
|
25
|
-
static getDowntimeStatusIds(statuses: Array<MonitorUptimeSummaryStatus>): Set<string>;
|
|
26
|
-
static getWindowPresentation(data: {
|
|
27
|
-
window: MonitorUptimeWindowTotal | undefined;
|
|
28
|
-
downtimeStatusIds: Set<string>;
|
|
29
|
-
caveat?: MonitorUptimeCaveat | null | undefined;
|
|
30
|
-
isPausedNow?: boolean | undefined;
|
|
31
|
-
}): UptimeWindowPresentation | null;
|
|
32
|
-
static formatUptimePercent(data: {
|
|
33
|
-
uptimePercent: number;
|
|
34
|
-
downtimeSeconds: number;
|
|
35
|
-
}): string;
|
|
36
|
-
static getWindow(summary: MonitorUptimeSummary, key: MonitorUptimeWindowKey): MonitorUptimeWindowTotal | undefined;
|
|
37
|
-
static toJSON(summary: MonitorUptimeSummary): JSONObject;
|
|
38
|
-
static fromJSON(json: JSONObject | null | undefined): MonitorUptimeSummary | null;
|
|
39
|
-
static parseTimezone(raw: unknown): string;
|
|
40
|
-
static getBrowserTimezone(): string;
|
|
41
|
-
private static toKnownZone;
|
|
42
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { JSONObject } from "../../Types/JSON";
|
|
2
|
-
import { MonitorUptimeSummary, MonitorUptimeSummaryStatus, MonitorUptimeWindowKey, MonitorUptimeWindowTotal } from "../../Types/Monitor/MonitorUptimeSummary";
|
|
3
|
-
import { UptimeDayBucket } from "../../Types/StatusPage/UptimeDailyAggregate";
|
|
4
|
-
export type UptimeWindowKind = "Measured" | "NoData";
|
|
5
|
-
export type MonitorUptimeCaveat = "paused" | "not-checking" | "no-results";
|
|
6
|
-
export interface UptimeWindowPresentation {
|
|
7
|
-
key: MonitorUptimeWindowKey;
|
|
8
|
-
kind: UptimeWindowKind;
|
|
9
|
-
uptimePercent: number | null;
|
|
10
|
-
valueText: string;
|
|
11
|
-
description: string;
|
|
12
|
-
downtimeSeconds: number;
|
|
13
|
-
coveredSeconds: number;
|
|
14
|
-
windowSeconds: number;
|
|
15
|
-
isPartial: boolean;
|
|
16
|
-
}
|
|
17
|
-
export default class MonitorUptimeSummaryUtil {
|
|
18
|
-
static readonly COVERAGE_TOLERANCE_SECONDS: number;
|
|
19
|
-
static sumBuckets(data: {
|
|
20
|
-
key: MonitorUptimeWindowKey;
|
|
21
|
-
buckets: Array<UptimeDayBucket>;
|
|
22
|
-
startDate: Date;
|
|
23
|
-
endDate: Date;
|
|
24
|
-
}): MonitorUptimeWindowTotal;
|
|
25
|
-
static getDowntimeStatusIds(statuses: Array<MonitorUptimeSummaryStatus>): Set<string>;
|
|
26
|
-
static getWindowPresentation(data: {
|
|
27
|
-
window: MonitorUptimeWindowTotal | undefined;
|
|
28
|
-
downtimeStatusIds: Set<string>;
|
|
29
|
-
caveat?: MonitorUptimeCaveat | null | undefined;
|
|
30
|
-
isPausedNow?: boolean | undefined;
|
|
31
|
-
}): UptimeWindowPresentation | null;
|
|
32
|
-
static formatUptimePercent(data: {
|
|
33
|
-
uptimePercent: number;
|
|
34
|
-
downtimeSeconds: number;
|
|
35
|
-
}): string;
|
|
36
|
-
static getWindow(summary: MonitorUptimeSummary, key: MonitorUptimeWindowKey): MonitorUptimeWindowTotal | undefined;
|
|
37
|
-
static toJSON(summary: MonitorUptimeSummary): JSONObject;
|
|
38
|
-
static fromJSON(json: JSONObject | null | undefined): MonitorUptimeSummary | null;
|
|
39
|
-
static parseTimezone(raw: unknown): string;
|
|
40
|
-
static getBrowserTimezone(): string;
|
|
41
|
-
private static toKnownZone;
|
|
42
|
-
}
|