@oneuptime/common 14.0.106 → 14.0.107
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/AnalyticsModels/AuditLog.js +1 -1
- package/Models/AnalyticsModels/Index.js +3 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.d.mts +5 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.d.ts +5 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.js +300 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.mjs +3 -0
- package/Models/DatabaseModels/CallLog.d.mts +4 -0
- package/Models/DatabaseModels/CallLog.d.ts +4 -0
- package/Models/DatabaseModels/CallLog.js +85 -0
- package/Models/DatabaseModels/DataBiConnection.d.mts +3 -0
- package/Models/DatabaseModels/DataBiConnection.d.ts +3 -0
- package/Models/DatabaseModels/DataBiConnection.js +47 -1
- package/Models/DatabaseModels/DataDashboard.d.mts +10 -0
- package/Models/DatabaseModels/DataDashboard.d.ts +10 -0
- package/Models/DatabaseModels/DataDashboard.js +129 -2
- package/Models/DatabaseModels/Index.js +6 -0
- package/Models/DatabaseModels/NetworkDevice.d.mts +1 -0
- package/Models/DatabaseModels/NetworkDevice.d.ts +1 -0
- package/Models/DatabaseModels/NetworkDevice.js +55 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.d.mts +26 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.d.ts +26 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.js +536 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.mjs +2 -0
- package/Models/DatabaseModels/NetworkSite.d.mts +1 -0
- package/Models/DatabaseModels/NetworkSite.d.ts +1 -0
- package/Models/DatabaseModels/NetworkSite.js +51 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.d.mts +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.d.ts +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.js +41 -0
- package/Models/DatabaseModels/ProjectCallSMSConfig.d.mts +2 -0
- package/Models/DatabaseModels/ProjectCallSMSConfig.d.ts +2 -0
- package/Models/DatabaseModels/ProjectCallSMSConfig.js +80 -1
- package/Models/DatabaseModels/RumApplication.d.mts +2 -0
- package/Models/DatabaseModels/RumApplication.d.ts +2 -0
- package/Models/DatabaseModels/RumApplication.js +108 -0
- package/Models/DatabaseModels/Team.js +10 -2
- package/Models/DatabaseModels/TeamComplianceSetting.js +8 -1
- package/Models/DatabaseModels/TeamCustomRole.js +9 -1
- package/Models/DatabaseModels/TeamMember.js +15 -1
- package/Models/DatabaseModels/TeamOwnerTeam.d.mts +17 -0
- package/Models/DatabaseModels/TeamOwnerTeam.d.ts +17 -0
- package/Models/DatabaseModels/TeamOwnerTeam.js +325 -0
- package/Models/DatabaseModels/TeamOwnerTeam.mjs +2 -0
- package/Models/DatabaseModels/TeamOwnerUser.d.mts +17 -0
- package/Models/DatabaseModels/TeamOwnerUser.d.ts +17 -0
- package/Models/DatabaseModels/TeamOwnerUser.js +331 -0
- package/Models/DatabaseModels/TeamOwnerUser.mjs +2 -0
- package/Models/DatabaseModels/TeamPermission.js +12 -1
- package/Models/DatabaseModels/TelemetryUsageBilling.d.mts +1 -0
- package/Models/DatabaseModels/TelemetryUsageBilling.d.ts +1 -0
- package/Models/DatabaseModels/TelemetryUsageBilling.js +34 -0
- package/Types/AI/AIActionWords.d.mts +1 -0
- package/Types/AI/AIActionWords.d.ts +1 -0
- package/Types/AI/AIActionWords.js +15 -4
- package/Types/AI/AIChatRecordSeen.d.mts +3 -0
- package/Types/AI/AIChatRecordSeen.d.ts +3 -0
- package/Types/AI/AIChatRecordSeen.js +28 -3
- package/Types/AI/AIChatRecordSeen.mjs +1 -0
- package/Types/AnalyticsDatabase/AnalyticsTableName.d.mts +2 -1
- package/Types/AnalyticsDatabase/AnalyticsTableName.d.ts +2 -1
- package/Types/AnalyticsDatabase/AnalyticsTableName.js +7 -0
- package/Types/AuditLog/AuditLogRetention.d.mts +10 -0
- package/Types/AuditLog/AuditLogRetention.d.ts +10 -0
- package/Types/AuditLog/AuditLogRetention.js +91 -0
- package/Types/AuditLog/AuditLogRetention.mjs +8 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.d.mts +37 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.d.ts +37 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.js +224 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.mjs +3 -0
- package/Types/CodeRepository/CodeFileSeen.d.mts +3 -0
- package/Types/CodeRepository/CodeFileSeen.d.ts +3 -0
- package/Types/CodeRepository/CodeFileSeen.js +61 -3
- package/Types/DataObservability/DataDashboardActivity.d.mts +40 -0
- package/Types/DataObservability/DataDashboardActivity.d.ts +40 -0
- package/Types/DataObservability/DataDashboardActivity.js +119 -0
- package/Types/DataObservability/DataDashboardActivity.mjs +12 -0
- package/Types/DataObservability/DataObservabilityApiTypes.d.mts +7 -0
- package/Types/DataObservability/DataObservabilityApiTypes.d.ts +7 -0
- package/Types/DataObservability/DataObservabilityApiTypes.js +2 -0
- package/Types/DataObservability/DataTableLineage.d.mts +87 -0
- package/Types/DataObservability/DataTableLineage.d.ts +87 -0
- package/Types/DataObservability/DataTableLineage.js +111 -0
- package/Types/DataObservability/DataTableLineage.mjs +19 -0
- package/Types/DataSecurity/DataStoreKind.d.mts +1 -0
- package/Types/DataSecurity/DataStoreKind.d.ts +1 -0
- package/Types/DataSecurity/DataStoreKind.js +3 -0
- package/Types/Database/AccessControl/PermissionScopeNarrowing.js +6 -0
- package/Types/DatabaseServer/DatabaseServerMetricCatalog.js +71 -82
- package/Types/Date.d.mts +4 -0
- package/Types/Date.d.ts +4 -0
- package/Types/Date.js +47 -2
- package/Types/Date.mjs +2 -0
- package/Types/DateLanguage.d.mts +9 -0
- package/Types/DateLanguage.d.ts +9 -0
- package/Types/DateLanguage.js +79 -1
- package/Types/DateLanguage.mjs +4 -0
- package/Types/MessageQueue/MessageQueueMetricCatalog.js +61 -61
- package/Types/Monitor/CriteriaFilterTerms.d.mts +4 -0
- package/Types/Monitor/CriteriaFilterTerms.d.ts +4 -0
- package/Types/Monitor/CriteriaFilterTerms.js +166 -0
- package/Types/Monitor/CriteriaFilterTerms.mjs +4 -0
- package/Types/Monitor/EvaluationSentence.d.mts +37 -0
- package/Types/Monitor/EvaluationSentence.d.ts +37 -0
- package/Types/Monitor/EvaluationSentence.js +298 -0
- package/Types/Monitor/EvaluationSentence.mjs +12 -0
- package/Types/Monitor/MonitorCriteria.d.mts +2 -0
- package/Types/Monitor/MonitorCriteria.d.ts +2 -0
- package/Types/Monitor/MonitorCriteria.js +8 -0
- package/Types/Monitor/MonitorCriteriaInstance.d.mts +5 -0
- package/Types/Monitor/MonitorCriteriaInstance.d.ts +5 -0
- package/Types/Monitor/MonitorCriteriaInstance.js +243 -194
- package/Types/Monitor/MonitorEvaluationDetails.d.mts +2 -0
- package/Types/Monitor/MonitorEvaluationDetails.d.ts +2 -0
- package/Types/Monitor/MonitorEvaluationSummary.d.mts +4 -0
- package/Types/Monitor/MonitorEvaluationSummary.d.ts +4 -0
- package/Types/Monitor/MonitorStep.d.mts +2 -0
- package/Types/Monitor/MonitorStep.d.ts +2 -0
- package/Types/Monitor/MonitorSteps.d.mts +2 -0
- package/Types/Monitor/MonitorSteps.d.ts +2 -0
- package/Types/Monitor/MonitorType.d.mts +1 -0
- package/Types/Monitor/MonitorType.d.ts +1 -0
- package/Types/Monitor/MonitorType.js +12 -0
- package/Types/Monitor/TelemetryObservation.d.mts +15 -0
- package/Types/Monitor/TelemetryObservation.d.ts +15 -0
- package/Types/Monitor/TelemetryObservation.js +28 -0
- package/Types/Monitor/TelemetryObservation.mjs +2 -0
- package/Types/NetworkDevice/DeviceNaming.d.mts +87 -0
- package/Types/NetworkDevice/DeviceNaming.d.ts +87 -0
- package/Types/NetworkDevice/DeviceNaming.js +279 -0
- package/Types/NetworkDevice/DeviceNaming.mjs +24 -0
- package/Types/NetworkDevice/DiscoveredDevice.d.mts +1 -0
- package/Types/NetworkDevice/DiscoveredDevice.d.ts +1 -0
- package/Types/NetworkDevice/DiscoveredDevice.js +4 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.d.mts +68 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.d.ts +68 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.js +351 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.mjs +15 -0
- package/Types/Permission.d.mts +5 -0
- package/Types/Permission.d.ts +5 -0
- package/Types/Permission.js +61 -5
- package/Types/Rules/RuleCriteriaFieldRegistry.js +12 -0
- package/Types/Rules/RuleCriteriaSubject.js +1 -0
- package/Types/Rum/ProductAnalyticsEventReads.d.mts +115 -0
- package/Types/Rum/ProductAnalyticsEventReads.d.ts +115 -0
- package/Types/Rum/ProductAnalyticsEventReads.js +166 -0
- package/Types/Rum/ProductAnalyticsEventReads.mjs +27 -0
- package/Types/Rum/ProductAnalyticsEvents.d.mts +121 -0
- package/Types/Rum/ProductAnalyticsEvents.d.ts +121 -0
- package/Types/Rum/ProductAnalyticsEvents.js +477 -0
- package/Types/Rum/ProductAnalyticsEvents.mjs +40 -0
- package/Types/Rum/SessionReplay.d.mts +4 -0
- package/Types/Rum/SessionReplay.d.ts +4 -0
- package/Types/Rum/SessionReplayHealth.js +1 -1
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.d.mts +10 -0
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.d.ts +10 -0
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.js +51 -0
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.mjs +4 -0
- package/Types/Team/BuiltInTeam.d.mts +1 -0
- package/Types/Team/BuiltInTeam.d.ts +1 -0
- package/Types/Team/BuiltInTeam.js +14 -1
- package/Types/Team/BuiltInTeam.mjs +1 -0
- package/Types/Telemetry/TelemetryUsage.d.mts +7 -2
- package/Types/Telemetry/TelemetryUsage.d.ts +7 -2
- package/Types/Telemetry/TelemetryUsage.js +24 -5
- package/Types/Telemetry/TelemetryUsage.mjs +3 -0
- package/Types/UserNotification/UserNotificationStatus.d.mts +2 -1
- package/Types/UserNotification/UserNotificationStatus.d.ts +2 -1
- package/Types/UserNotification/UserNotificationStatus.js +8 -0
- package/Types/Workspace/NotificationRules/EventType.d.mts +2 -1
- package/Types/Workspace/NotificationRules/EventType.d.ts +2 -1
- package/Types/Workspace/NotificationRules/EventType.js +8 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +7 -1
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +7 -1
- package/Types/Workspace/NotificationRules/NotificationRuleInvites.js +5 -1
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.d.mts +4 -0
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.d.ts +4 -0
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.js +2 -0
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.mjs +1 -0
- package/Utils/AI/InvestigationReport.js +93 -21
- package/Utils/AI/InvestigationReportLanguages.d.mts +25 -0
- package/Utils/AI/InvestigationReportLanguages.d.ts +25 -0
- package/Utils/AI/InvestigationReportLanguages.js +603 -0
- package/Utils/AI/InvestigationReportLanguages.mjs +11 -0
- package/Utils/Dashboard/TableThresholds.js +5 -2
- package/Utils/Monitor/MonitorLogSummaryUtil.d.mts +8 -0
- package/Utils/Monitor/MonitorLogSummaryUtil.d.ts +8 -0
- package/Utils/Monitor/MonitorLogSummaryUtil.js +170 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.mts +17 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.ts +17 -0
- package/Utils/Monitor/MonitorRootCauseWording.js +242 -0
- package/Utils/Monitor/MonitorRootCauseWording.mjs +2 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.d.mts +3 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.d.ts +3 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.js +5 -2
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.d.mts +75 -0
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.d.ts +75 -0
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.js +303 -0
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.mjs +8 -0
- package/Utils/NetworkDevice/Naming/NamePattern.d.mts +122 -0
- package/Utils/NetworkDevice/Naming/NamePattern.d.ts +122 -0
- package/Utils/NetworkDevice/Naming/NamePattern.js +649 -0
- package/Utils/NetworkDevice/Naming/NamePattern.mjs +22 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.d.mts +77 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.d.ts +77 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.js +467 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.mjs +14 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.d.mts +26 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.d.ts +26 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.js +327 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.mjs +7 -0
- package/Utils/NetworkDiscovery/DiscoveredNameUpgrade.d.mts +1 -0
- package/Utils/NetworkDiscovery/DiscoveredNameUpgrade.d.ts +1 -0
- package/Utils/NetworkDiscovery/DiscoveredNameUpgrade.js +8 -0
- package/Utils/NetworkDiscovery/PingMonitorBuilder.d.mts +2 -0
- package/Utils/NetworkDiscovery/PingMonitorBuilder.d.ts +2 -0
- package/Utils/NetworkDiscovery/PingMonitorBuilder.js +1 -0
- package/Utils/{Rum → SessionReplay}/SessionReplayHealth.d.mts +7 -6
- package/Utils/{Rum → SessionReplay}/SessionReplayHealth.d.ts +7 -6
- package/Utils/SessionReplay/SessionReplayHealth.js +703 -0
- package/Utils/Slo/SloErrorBudgetPolicy.d.mts +7 -0
- package/Utils/Slo/SloErrorBudgetPolicy.d.ts +7 -0
- package/Utils/Slo/SloErrorBudgetPolicy.js +39 -0
- package/Utils/Slo/SloErrorBudgetPolicy.mjs +1 -0
- package/Utils/Slo/SloFeedMarkdown.d.mts +19 -4
- package/Utils/Slo/SloFeedMarkdown.d.ts +19 -4
- package/Utils/Slo/SloFeedMarkdown.js +64 -17
- package/Utils/Slo/SloFeedMarkdown.mjs +4 -0
- package/Utils/StatusPage/ResourceExplorer.js +9 -8
- package/Utils/TotpSetupKey.d.mts +3 -0
- package/Utils/TotpSetupKey.d.ts +3 -0
- package/Utils/TotpSetupKey.js +72 -0
- package/Utils/TotpSetupKey.mjs +4 -0
- package/Utils/Workspace/WorkspaceChannelName.js +5 -1
- package/package.json +1 -1
- package/Utils/Rum/SessionReplayHealth.js +0 -558
- /package/Utils/{Rum → SessionReplay}/SessionReplayHealth.mjs +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSONObject, JSONValue } from "../../Types/JSON.mjs";
|
|
2
|
+
import SloErrorBudgetPolicyChange from "../../Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.mjs";
|
|
2
3
|
export declare const SLO_POLICY_TIER_MIN_THRESHOLD_PERCENTAGE: number;
|
|
3
4
|
export declare const SLO_POLICY_TIER_MAX_THRESHOLD_PERCENTAGE: number;
|
|
4
5
|
export declare const SLO_POLICY_TIER_WHAT_WE_DO_MAX_LENGTH: number;
|
|
@@ -71,6 +72,12 @@ export declare function getSloDeploymentGateChange(data: {
|
|
|
71
72
|
stored: SloStoredDeploymentGate;
|
|
72
73
|
now: Date;
|
|
73
74
|
}): SloDeploymentGateChange;
|
|
75
|
+
export declare function getSloErrorBudgetPolicyChanges(data: {
|
|
76
|
+
isTierChange: boolean;
|
|
77
|
+
isInTier: boolean;
|
|
78
|
+
isEscalation: boolean;
|
|
79
|
+
deploymentGateTransition: SloDeploymentGateTransition | null;
|
|
80
|
+
}): Array<SloErrorBudgetPolicyChange>;
|
|
74
81
|
export declare const SLO_POLICY_CAUTION_TIER_NAME: string;
|
|
75
82
|
export declare const SLO_POLICY_RELIABILITY_FIRST_TIER_NAME: string;
|
|
76
83
|
export declare const SLO_POLICY_BUDGET_EXHAUSTED_TIER_NAME: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSONObject, JSONValue } from "../../Types/JSON";
|
|
2
|
+
import SloErrorBudgetPolicyChange from "../../Types/ServiceLevelObjective/SloErrorBudgetPolicyChange";
|
|
2
3
|
export declare const SLO_POLICY_TIER_MIN_THRESHOLD_PERCENTAGE: number;
|
|
3
4
|
export declare const SLO_POLICY_TIER_MAX_THRESHOLD_PERCENTAGE: number;
|
|
4
5
|
export declare const SLO_POLICY_TIER_WHAT_WE_DO_MAX_LENGTH: number;
|
|
@@ -71,6 +72,12 @@ export declare function getSloDeploymentGateChange(data: {
|
|
|
71
72
|
stored: SloStoredDeploymentGate;
|
|
72
73
|
now: Date;
|
|
73
74
|
}): SloDeploymentGateChange;
|
|
75
|
+
export declare function getSloErrorBudgetPolicyChanges(data: {
|
|
76
|
+
isTierChange: boolean;
|
|
77
|
+
isInTier: boolean;
|
|
78
|
+
isEscalation: boolean;
|
|
79
|
+
deploymentGateTransition: SloDeploymentGateTransition | null;
|
|
80
|
+
}): Array<SloErrorBudgetPolicyChange>;
|
|
74
81
|
export declare const SLO_POLICY_CAUTION_TIER_NAME: string;
|
|
75
82
|
export declare const SLO_POLICY_RELIABILITY_FIRST_TIER_NAME: string;
|
|
76
83
|
export declare const SLO_POLICY_BUDGET_EXHAUSTED_TIER_NAME: string;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.parseSloRecommendedPolicyTiers = exports.sloRecommendedPolicyTierToJSON = exports.getMissingSloRecommendedPolicyTiers = exports.SLO_RECOMMENDED_POLICY_TIERS = exports.SLO_POLICY_BUDGET_EXHAUSTED_TIER_NAME = exports.SLO_POLICY_RELIABILITY_FIRST_TIER_NAME = exports.SLO_POLICY_CAUTION_TIER_NAME = exports.SloDeploymentGateTransition = exports.readSloDeploymentsFrozenAt = exports.isSloStoredDeploymentGateAllowed = exports.areSloDeploymentsAllowedInTier = exports.formatSloPolicyTierThreshold = exports.isMoreSevereSloPolicyTier = exports.isSameSloPolicyTier = exports.getSloPolicyTierExitPercentage = exports.readSloPolicyTierThreshold = exports.SLO_POLICY_TIER_WHAT_WE_DO_MAX_LENGTH = exports.SLO_POLICY_TIER_MAX_THRESHOLD_PERCENTAGE = exports.SLO_POLICY_TIER_MIN_THRESHOLD_PERCENTAGE = void 0;
|
|
4
7
|
exports.sortSloPolicyTiers = sortSloPolicyTiers;
|
|
@@ -6,6 +9,8 @@ exports.getSloPolicyTierForBudget = getSloPolicyTierForBudget;
|
|
|
6
9
|
exports.computeSloPolicyTier = computeSloPolicyTier;
|
|
7
10
|
exports.computeSloDeploymentGate = computeSloDeploymentGate;
|
|
8
11
|
exports.getSloDeploymentGateChange = getSloDeploymentGateChange;
|
|
12
|
+
exports.getSloErrorBudgetPolicyChanges = getSloErrorBudgetPolicyChanges;
|
|
13
|
+
const SloErrorBudgetPolicyChange_1 = __importDefault(require("../../Types/ServiceLevelObjective/SloErrorBudgetPolicyChange"));
|
|
9
14
|
const SloEvaluation_1 = require("./SloEvaluation");
|
|
10
15
|
/*
|
|
11
16
|
* AN SLO'S ERROR BUDGET POLICY.
|
|
@@ -278,6 +283,40 @@ function getSloDeploymentGateChange(data) {
|
|
|
278
283
|
}
|
|
279
284
|
return { gate, transition, columns };
|
|
280
285
|
}
|
|
286
|
+
/*
|
|
287
|
+
* ---------------------------------------------------------------------------
|
|
288
|
+
* What an evaluation changed
|
|
289
|
+
* ---------------------------------------------------------------------------
|
|
290
|
+
*
|
|
291
|
+
* The changes one evaluation committed, as the Slack, Microsoft Teams and
|
|
292
|
+
* Mattermost rules for SLOs match them (SloErrorBudgetPolicyChange): the
|
|
293
|
+
* tier change first - entered a more severe tier, recovered to a less
|
|
294
|
+
* severe one, or left every tier - then how the deploy gate moved, when it
|
|
295
|
+
* did. A tier change that froze deployments is both. Nothing when neither
|
|
296
|
+
* moved: a renamed tier refreshes its name quietly, and an SLO that holds
|
|
297
|
+
* its tier under the hysteresis changed nothing.
|
|
298
|
+
*/
|
|
299
|
+
function getSloErrorBudgetPolicyChanges(data) {
|
|
300
|
+
const changes = [];
|
|
301
|
+
if (data.isTierChange) {
|
|
302
|
+
if (!data.isInTier) {
|
|
303
|
+
changes.push(SloErrorBudgetPolicyChange_1.default.LeftEveryTier);
|
|
304
|
+
}
|
|
305
|
+
else if (data.isEscalation) {
|
|
306
|
+
changes.push(SloErrorBudgetPolicyChange_1.default.EnteredMoreSevereTier);
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
changes.push(SloErrorBudgetPolicyChange_1.default.RecoveredToLessSevereTier);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
if (data.deploymentGateTransition === SloDeploymentGateTransition.Frozen) {
|
|
313
|
+
changes.push(SloErrorBudgetPolicyChange_1.default.DeploymentsFrozen);
|
|
314
|
+
}
|
|
315
|
+
else if (data.deploymentGateTransition === SloDeploymentGateTransition.Allowed) {
|
|
316
|
+
changes.push(SloErrorBudgetPolicyChange_1.default.DeploymentsAllowed);
|
|
317
|
+
}
|
|
318
|
+
return changes;
|
|
319
|
+
}
|
|
281
320
|
/*
|
|
282
321
|
* ---------------------------------------------------------------------------
|
|
283
322
|
* The recommended policy
|
|
@@ -13,6 +13,7 @@ export const computeSloPolicyTier = commonJsModule.computeSloPolicyTier;
|
|
|
13
13
|
export const formatSloPolicyTierThreshold = commonJsModule.formatSloPolicyTierThreshold;
|
|
14
14
|
export const getMissingSloRecommendedPolicyTiers = commonJsModule.getMissingSloRecommendedPolicyTiers;
|
|
15
15
|
export const getSloDeploymentGateChange = commonJsModule.getSloDeploymentGateChange;
|
|
16
|
+
export const getSloErrorBudgetPolicyChanges = commonJsModule.getSloErrorBudgetPolicyChanges;
|
|
16
17
|
export const getSloPolicyTierExitPercentage = commonJsModule.getSloPolicyTierExitPercentage;
|
|
17
18
|
export const getSloPolicyTierForBudget = commonJsModule.getSloPolicyTierForBudget;
|
|
18
19
|
export const isMoreSevereSloPolicyTier = commonJsModule.isMoreSevereSloPolicyTier;
|
|
@@ -8,6 +8,15 @@ export interface SloFeedMarkdown {
|
|
|
8
8
|
feedInfoInMarkdown: string;
|
|
9
9
|
moreInformationInMarkdown: string;
|
|
10
10
|
}
|
|
11
|
+
export interface SloFeedMarkdownParts {
|
|
12
|
+
feedInfo: MarkdownText;
|
|
13
|
+
details: Array<MarkdownText>;
|
|
14
|
+
whatWeDo?: string | undefined;
|
|
15
|
+
}
|
|
16
|
+
export type ToSloFeedMarkdownFunction = (parts: SloFeedMarkdownParts) => SloFeedMarkdown;
|
|
17
|
+
export declare const toSloFeedMarkdown: ToSloFeedMarkdownFunction;
|
|
18
|
+
export type GetSloFeedChatMarkdownFunction = (parts: SloFeedMarkdownParts) => MarkdownText;
|
|
19
|
+
export declare const getSloFeedChatMarkdown: GetSloFeedChatMarkdownFunction;
|
|
11
20
|
export type FormatSloFeedNumberFunction = (value: number, maximumFractionDigits?: number) => string;
|
|
12
21
|
export declare const formatSloFeedNumber: FormatSloFeedNumberFunction;
|
|
13
22
|
export type FormatSloFeedPercentFunction = (value: number, maximumFractionDigits?: number) => string;
|
|
@@ -179,7 +188,7 @@ export interface SloFeedDeploymentGate {
|
|
|
179
188
|
isAllowed: boolean;
|
|
180
189
|
hasChanged: boolean;
|
|
181
190
|
}
|
|
182
|
-
export
|
|
191
|
+
export interface SloFeedPolicyTierChange {
|
|
183
192
|
sloMarkdownLink: MarkdownText;
|
|
184
193
|
previousTierName: string | undefined | null;
|
|
185
194
|
newTier: SloFeedPolicyTier | null;
|
|
@@ -187,13 +196,19 @@ export type GetSloPolicyTierChangedFeedMarkdownFunction = (data: {
|
|
|
187
196
|
errorBudgetRemainingPercentage: number;
|
|
188
197
|
errorBudgetRemainingSeconds: number;
|
|
189
198
|
deployments?: SloFeedDeploymentGate | undefined;
|
|
190
|
-
}
|
|
199
|
+
}
|
|
200
|
+
export type GetSloPolicyTierChangedFeedMarkdownFunction = (data: SloFeedPolicyTierChange) => SloFeedMarkdown;
|
|
201
|
+
export type GetSloPolicyTierChangedFeedPartsFunction = (data: SloFeedPolicyTierChange) => SloFeedMarkdownParts;
|
|
202
|
+
export declare const getSloPolicyTierChangedFeedParts: GetSloPolicyTierChangedFeedPartsFunction;
|
|
191
203
|
export declare const getSloPolicyTierChangedFeedMarkdown: GetSloPolicyTierChangedFeedMarkdownFunction;
|
|
192
|
-
export
|
|
204
|
+
export interface SloFeedDeploymentGateChange {
|
|
193
205
|
sloMarkdownLink: MarkdownText;
|
|
194
206
|
tierName: string | undefined | null;
|
|
195
207
|
isAllowed: boolean;
|
|
196
208
|
errorBudgetRemainingPercentage: number;
|
|
197
209
|
errorBudgetRemainingSeconds: number;
|
|
198
|
-
}
|
|
210
|
+
}
|
|
211
|
+
export type GetSloDeploymentGateChangedFeedMarkdownFunction = (data: SloFeedDeploymentGateChange) => SloFeedMarkdown;
|
|
212
|
+
export type GetSloDeploymentGateChangedFeedPartsFunction = (data: SloFeedDeploymentGateChange) => SloFeedMarkdownParts;
|
|
213
|
+
export declare const getSloDeploymentGateChangedFeedParts: GetSloDeploymentGateChangedFeedPartsFunction;
|
|
199
214
|
export declare const getSloDeploymentGateChangedFeedMarkdown: GetSloDeploymentGateChangedFeedMarkdownFunction;
|
|
@@ -8,6 +8,15 @@ export interface SloFeedMarkdown {
|
|
|
8
8
|
feedInfoInMarkdown: string;
|
|
9
9
|
moreInformationInMarkdown: string;
|
|
10
10
|
}
|
|
11
|
+
export interface SloFeedMarkdownParts {
|
|
12
|
+
feedInfo: MarkdownText;
|
|
13
|
+
details: Array<MarkdownText>;
|
|
14
|
+
whatWeDo?: string | undefined;
|
|
15
|
+
}
|
|
16
|
+
export type ToSloFeedMarkdownFunction = (parts: SloFeedMarkdownParts) => SloFeedMarkdown;
|
|
17
|
+
export declare const toSloFeedMarkdown: ToSloFeedMarkdownFunction;
|
|
18
|
+
export type GetSloFeedChatMarkdownFunction = (parts: SloFeedMarkdownParts) => MarkdownText;
|
|
19
|
+
export declare const getSloFeedChatMarkdown: GetSloFeedChatMarkdownFunction;
|
|
11
20
|
export type FormatSloFeedNumberFunction = (value: number, maximumFractionDigits?: number) => string;
|
|
12
21
|
export declare const formatSloFeedNumber: FormatSloFeedNumberFunction;
|
|
13
22
|
export type FormatSloFeedPercentFunction = (value: number, maximumFractionDigits?: number) => string;
|
|
@@ -179,7 +188,7 @@ export interface SloFeedDeploymentGate {
|
|
|
179
188
|
isAllowed: boolean;
|
|
180
189
|
hasChanged: boolean;
|
|
181
190
|
}
|
|
182
|
-
export
|
|
191
|
+
export interface SloFeedPolicyTierChange {
|
|
183
192
|
sloMarkdownLink: MarkdownText;
|
|
184
193
|
previousTierName: string | undefined | null;
|
|
185
194
|
newTier: SloFeedPolicyTier | null;
|
|
@@ -187,13 +196,19 @@ export type GetSloPolicyTierChangedFeedMarkdownFunction = (data: {
|
|
|
187
196
|
errorBudgetRemainingPercentage: number;
|
|
188
197
|
errorBudgetRemainingSeconds: number;
|
|
189
198
|
deployments?: SloFeedDeploymentGate | undefined;
|
|
190
|
-
}
|
|
199
|
+
}
|
|
200
|
+
export type GetSloPolicyTierChangedFeedMarkdownFunction = (data: SloFeedPolicyTierChange) => SloFeedMarkdown;
|
|
201
|
+
export type GetSloPolicyTierChangedFeedPartsFunction = (data: SloFeedPolicyTierChange) => SloFeedMarkdownParts;
|
|
202
|
+
export declare const getSloPolicyTierChangedFeedParts: GetSloPolicyTierChangedFeedPartsFunction;
|
|
191
203
|
export declare const getSloPolicyTierChangedFeedMarkdown: GetSloPolicyTierChangedFeedMarkdownFunction;
|
|
192
|
-
export
|
|
204
|
+
export interface SloFeedDeploymentGateChange {
|
|
193
205
|
sloMarkdownLink: MarkdownText;
|
|
194
206
|
tierName: string | undefined | null;
|
|
195
207
|
isAllowed: boolean;
|
|
196
208
|
errorBudgetRemainingPercentage: number;
|
|
197
209
|
errorBudgetRemainingSeconds: number;
|
|
198
|
-
}
|
|
210
|
+
}
|
|
211
|
+
export type GetSloDeploymentGateChangedFeedMarkdownFunction = (data: SloFeedDeploymentGateChange) => SloFeedMarkdown;
|
|
212
|
+
export type GetSloDeploymentGateChangedFeedPartsFunction = (data: SloFeedDeploymentGateChange) => SloFeedMarkdownParts;
|
|
213
|
+
export declare const getSloDeploymentGateChangedFeedParts: GetSloDeploymentGateChangedFeedPartsFunction;
|
|
199
214
|
export declare const getSloDeploymentGateChangedFeedMarkdown: GetSloDeploymentGateChangedFeedMarkdownFunction;
|
|
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.getSloDeploymentGateChangedFeedMarkdown = exports.getSloPolicyTierChangedFeedMarkdown = exports.getBurnRateRuleRemovedFeedMarkdown = exports.getBurnRateRuleChangedFeedMarkdown = exports.getBurnRateRuleAddedFeedMarkdown = exports.SLO_BURN_RATE_RULE_FEED_COLUMNS = exports.getSloStatusChangedFeedMarkdown = exports.getSloStatusEmoji = exports.getSloMonitorsChangedFeedMarkdown = exports.getSloArchivedFeedMarkdown = exports.getSloEnabledFeedMarkdown = exports.getSloUpdatedFeedMarkdown = exports.getSloCreatedFeedMarkdown = exports.describeSloFeedWindow = exports.getSloFeedWatchedColumns = exports.SLO_FEED_MONITORS_COLUMN = exports.SLO_FEED_IS_ARCHIVED_COLUMN = exports.SLO_FEED_IS_ENABLED_COLUMN = exports.SLO_FEED_UPDATE_COLUMNS = exports.getSloFeedColumnChanges = exports.formatSloFeedValue = exports.isSloFeedValueEqual = exports.getSloFeedSelect = exports.getSloFeedColumnsInPayload = exports.SloFeedValueKind = exports.normalizeSloFeedBoolean = exports.formatSloFeedEntityNames = exports.getSloFeedEntityIds = exports.formatSloFeedText = exports.truncateSloFeedText = exports.formatSloFeedDuration = exports.formatSloFeedMinutes = exports.formatSloFeedPercent = exports.formatSloFeedNumber = exports.SLO_FEED_NONE_TEXT = exports.SLO_FEED_NOT_SET_TEXT = void 0;
|
|
39
|
+
exports.getSloDeploymentGateChangedFeedMarkdown = exports.getSloDeploymentGateChangedFeedParts = exports.getSloPolicyTierChangedFeedMarkdown = exports.getSloPolicyTierChangedFeedParts = exports.getBurnRateRuleRemovedFeedMarkdown = exports.getBurnRateRuleChangedFeedMarkdown = exports.getBurnRateRuleAddedFeedMarkdown = exports.SLO_BURN_RATE_RULE_FEED_COLUMNS = exports.getSloStatusChangedFeedMarkdown = exports.getSloStatusEmoji = exports.getSloMonitorsChangedFeedMarkdown = exports.getSloArchivedFeedMarkdown = exports.getSloEnabledFeedMarkdown = exports.getSloUpdatedFeedMarkdown = exports.getSloCreatedFeedMarkdown = exports.describeSloFeedWindow = exports.getSloFeedWatchedColumns = exports.SLO_FEED_MONITORS_COLUMN = exports.SLO_FEED_IS_ARCHIVED_COLUMN = exports.SLO_FEED_IS_ENABLED_COLUMN = exports.SLO_FEED_UPDATE_COLUMNS = exports.getSloFeedColumnChanges = exports.formatSloFeedValue = exports.isSloFeedValueEqual = exports.getSloFeedSelect = exports.getSloFeedColumnsInPayload = exports.SloFeedValueKind = exports.normalizeSloFeedBoolean = exports.formatSloFeedEntityNames = exports.getSloFeedEntityIds = exports.formatSloFeedText = exports.truncateSloFeedText = exports.formatSloFeedDuration = exports.formatSloFeedMinutes = exports.formatSloFeedPercent = exports.formatSloFeedNumber = exports.getSloFeedChatMarkdown = exports.toSloFeedMarkdown = exports.SLO_FEED_NONE_TEXT = exports.SLO_FEED_NOT_SET_TEXT = void 0;
|
|
40
40
|
const SloStatus_1 = __importDefault(require("../../Types/ServiceLevelObjective/SloStatus"));
|
|
41
41
|
const SloWindowType_1 = __importDefault(require("../../Types/ServiceLevelObjective/SloWindowType"));
|
|
42
42
|
const FeedMarkdown_1 = __importStar(require("../Markdown/FeedMarkdown"));
|
|
@@ -75,6 +75,44 @@ const MAX_LISTED_NAMES = 10;
|
|
|
75
75
|
const MAX_SUMMARY_MONITORS = 3;
|
|
76
76
|
// Monitors listed in More Information before collapsing into "and N more".
|
|
77
77
|
const MAX_DETAIL_MONITORS = 50;
|
|
78
|
+
// The line over the agreement.
|
|
79
|
+
const WHAT_WE_DO_HEADING = (0, FeedMarkdown_1.mdText) `**What we do**:`;
|
|
80
|
+
// An item as the feed stores it: the agreement placed as it was written.
|
|
81
|
+
const toSloFeedMarkdown = (parts) => {
|
|
82
|
+
return {
|
|
83
|
+
feedInfoInMarkdown: parts.feedInfo.toString(),
|
|
84
|
+
moreInformationInMarkdown: FeedMarkdown_1.default.join(parts.whatWeDo
|
|
85
|
+
? [
|
|
86
|
+
...parts.details,
|
|
87
|
+
WHAT_WE_DO_HEADING,
|
|
88
|
+
FeedMarkdown_1.default.asMarkdown(parts.whatWeDo),
|
|
89
|
+
]
|
|
90
|
+
: parts.details, "\n\n").toString(),
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
exports.toSloFeedMarkdown = toSloFeedMarkdown;
|
|
94
|
+
/*
|
|
95
|
+
* An item as one chat message: its line, then each of its details, then the
|
|
96
|
+
* agreement, as the feed draws the item with its More Information open.
|
|
97
|
+
* Every value in it is placed as text already, so nothing is escaped twice.
|
|
98
|
+
* The agreement stays the team's Markdown - its emphasis, lists and links
|
|
99
|
+
* read as in the feed - with every chat mention in it broken
|
|
100
|
+
* (FeedMarkdown.withoutChatSequences): Slack reads "<!channel>" or "<@U123>"
|
|
101
|
+
* in Markdown it is handed, so an agreement that quotes one notifies nobody
|
|
102
|
+
* when the tier changes. An image a data: URL carries is its alt text
|
|
103
|
+
* (FeedMarkdown.asChatMarkdown): a chat shows none.
|
|
104
|
+
*/
|
|
105
|
+
const getSloFeedChatMarkdown = (parts) => {
|
|
106
|
+
return FeedMarkdown_1.default.join(parts.whatWeDo
|
|
107
|
+
? [
|
|
108
|
+
parts.feedInfo,
|
|
109
|
+
...parts.details,
|
|
110
|
+
WHAT_WE_DO_HEADING,
|
|
111
|
+
FeedMarkdown_1.default.asChatMarkdown(FeedMarkdown_1.default.withoutChatSequences(parts.whatWeDo)),
|
|
112
|
+
]
|
|
113
|
+
: [parts.feedInfo, ...parts.details], "\n\n");
|
|
114
|
+
};
|
|
115
|
+
exports.getSloFeedChatMarkdown = getSloFeedChatMarkdown;
|
|
78
116
|
/*
|
|
79
117
|
* Rounds for reading, never for deciding. "-0" is folded into "0" because a
|
|
80
118
|
* budget that rounds to zero is not "negative zero percent" to anybody.
|
|
@@ -1020,14 +1058,15 @@ const getDeploymentGateDetail = (deployments) => {
|
|
|
1020
1058
|
};
|
|
1021
1059
|
/*
|
|
1022
1060
|
* ErrorBudgetPolicyTierChanged: the SLO entered a tier, moved between tiers
|
|
1023
|
-
* or left the last one. The new tier's "what we do" goes in as the
|
|
1024
|
-
* the team wrote (
|
|
1025
|
-
* in the feed
|
|
1026
|
-
* allowed them again, the item's
|
|
1027
|
-
* how the gate moved - or that it
|
|
1028
|
-
* both freeze.
|
|
1061
|
+
* or left the last one. The new tier's "what we do" goes in last, as the
|
|
1062
|
+
* Markdown the team wrote (SloFeedMarkdownParts.whatWeDo), so the agreement
|
|
1063
|
+
* is right there in the feed - and in a channel - when the tier changes.
|
|
1064
|
+
* When the change froze deployments, or allowed them again, the item's
|
|
1065
|
+
* first line says so, and its details say how the gate moved - or that it
|
|
1066
|
+
* stayed frozen, between two tiers that both freeze. As its parts here, for
|
|
1067
|
+
* the feed and a chat message of the change alike.
|
|
1029
1068
|
*/
|
|
1030
|
-
const
|
|
1069
|
+
const getSloPolicyTierChangedFeedParts = (data) => {
|
|
1031
1070
|
var _a, _b, _c, _d, _e;
|
|
1032
1071
|
const previousTierName = ((_a = data.previousTierName) === null || _a === void 0 ? void 0 : _a.trim()) || "";
|
|
1033
1072
|
const newTierName = ((_c = (_b = data.newTier) === null || _b === void 0 ? void 0 : _b.name) === null || _c === void 0 ? void 0 : _c.trim()) || "";
|
|
@@ -1061,20 +1100,22 @@ const getSloPolicyTierChangedFeedMarkdown = (data) => {
|
|
|
1061
1100
|
details.push(data.errorBudgetRemainingSeconds < 0
|
|
1062
1101
|
? (0, FeedMarkdown_1.mdText) `**Error budget remaining**: ${(0, exports.formatSloFeedPercent)(data.errorBudgetRemainingPercentage)} (over budget by ${budgetDuration})`
|
|
1063
1102
|
: (0, FeedMarkdown_1.mdText) `**Error budget remaining**: ${(0, exports.formatSloFeedPercent)(data.errorBudgetRemainingPercentage)} (${budgetDuration})`);
|
|
1103
|
+
let whatWeDo;
|
|
1064
1104
|
if (data.newTier) {
|
|
1065
1105
|
const threshold = (0, SloErrorBudgetPolicy_1.formatSloPolicyTierThreshold)(data.newTier.thresholdPercentage);
|
|
1066
1106
|
if (threshold) {
|
|
1067
1107
|
details.push((0, FeedMarkdown_1.mdText) `**Tier applies while**: the error budget left is at or below ${threshold}`);
|
|
1068
1108
|
}
|
|
1069
1109
|
if ((_e = data.newTier.whatWeDo) === null || _e === void 0 ? void 0 : _e.trim()) {
|
|
1070
|
-
|
|
1071
|
-
details.push(FeedMarkdown_1.default.asMarkdown(data.newTier.whatWeDo));
|
|
1110
|
+
whatWeDo = data.newTier.whatWeDo;
|
|
1072
1111
|
}
|
|
1073
1112
|
}
|
|
1074
|
-
return {
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1113
|
+
return Object.assign({ feedInfo: feedInfo, details: details }, (whatWeDo ? { whatWeDo: whatWeDo } : {}));
|
|
1114
|
+
};
|
|
1115
|
+
exports.getSloPolicyTierChangedFeedParts = getSloPolicyTierChangedFeedParts;
|
|
1116
|
+
// The item as the feed stores it.
|
|
1117
|
+
const getSloPolicyTierChangedFeedMarkdown = (data) => {
|
|
1118
|
+
return (0, exports.toSloFeedMarkdown)((0, exports.getSloPolicyTierChangedFeedParts)(data));
|
|
1078
1119
|
};
|
|
1079
1120
|
exports.getSloPolicyTierChangedFeedMarkdown = getSloPolicyTierChangedFeedMarkdown;
|
|
1080
1121
|
/*
|
|
@@ -1083,8 +1124,9 @@ exports.getSloPolicyTierChangedFeedMarkdown = getSloPolicyTierChangedFeedMarkdow
|
|
|
1083
1124
|
* switched Freeze Deployments on or off for the tier it is in. (A tier
|
|
1084
1125
|
* change that moves the gate says so in its own item instead.) No "what we
|
|
1085
1126
|
* do": the agreement did not change, only whether CI/CD holds releases back.
|
|
1127
|
+
* As its parts here, for the feed and a chat message of the flip alike.
|
|
1086
1128
|
*/
|
|
1087
|
-
const
|
|
1129
|
+
const getSloDeploymentGateChangedFeedParts = (data) => {
|
|
1088
1130
|
var _a;
|
|
1089
1131
|
const tierName = ((_a = data.tierName) === null || _a === void 0 ? void 0 : _a.trim()) || "";
|
|
1090
1132
|
let feedInfo;
|
|
@@ -1107,8 +1149,13 @@ const getSloDeploymentGateChangedFeedMarkdown = (data) => {
|
|
|
1107
1149
|
: (0, FeedMarkdown_1.mdText) `**Error budget remaining**: ${(0, exports.formatSloFeedPercent)(data.errorBudgetRemainingPercentage)} (${budgetDuration})`,
|
|
1108
1150
|
];
|
|
1109
1151
|
return {
|
|
1110
|
-
|
|
1111
|
-
|
|
1152
|
+
feedInfo: feedInfo,
|
|
1153
|
+
details: details,
|
|
1112
1154
|
};
|
|
1113
1155
|
};
|
|
1156
|
+
exports.getSloDeploymentGateChangedFeedParts = getSloDeploymentGateChangedFeedParts;
|
|
1157
|
+
// The item as the feed stores it.
|
|
1158
|
+
const getSloDeploymentGateChangedFeedMarkdown = (data) => {
|
|
1159
|
+
return (0, exports.toSloFeedMarkdown)((0, exports.getSloDeploymentGateChangedFeedParts)(data));
|
|
1160
|
+
};
|
|
1114
1161
|
exports.getSloDeploymentGateChangedFeedMarkdown = getSloDeploymentGateChangedFeedMarkdown;
|
|
@@ -21,7 +21,9 @@ export const getBurnRateRuleRemovedFeedMarkdown = commonJsModule.getBurnRateRule
|
|
|
21
21
|
export const getSloArchivedFeedMarkdown = commonJsModule.getSloArchivedFeedMarkdown;
|
|
22
22
|
export const getSloCreatedFeedMarkdown = commonJsModule.getSloCreatedFeedMarkdown;
|
|
23
23
|
export const getSloDeploymentGateChangedFeedMarkdown = commonJsModule.getSloDeploymentGateChangedFeedMarkdown;
|
|
24
|
+
export const getSloDeploymentGateChangedFeedParts = commonJsModule.getSloDeploymentGateChangedFeedParts;
|
|
24
25
|
export const getSloEnabledFeedMarkdown = commonJsModule.getSloEnabledFeedMarkdown;
|
|
26
|
+
export const getSloFeedChatMarkdown = commonJsModule.getSloFeedChatMarkdown;
|
|
25
27
|
export const getSloFeedColumnChanges = commonJsModule.getSloFeedColumnChanges;
|
|
26
28
|
export const getSloFeedColumnsInPayload = commonJsModule.getSloFeedColumnsInPayload;
|
|
27
29
|
export const getSloFeedEntityIds = commonJsModule.getSloFeedEntityIds;
|
|
@@ -29,9 +31,11 @@ export const getSloFeedSelect = commonJsModule.getSloFeedSelect;
|
|
|
29
31
|
export const getSloFeedWatchedColumns = commonJsModule.getSloFeedWatchedColumns;
|
|
30
32
|
export const getSloMonitorsChangedFeedMarkdown = commonJsModule.getSloMonitorsChangedFeedMarkdown;
|
|
31
33
|
export const getSloPolicyTierChangedFeedMarkdown = commonJsModule.getSloPolicyTierChangedFeedMarkdown;
|
|
34
|
+
export const getSloPolicyTierChangedFeedParts = commonJsModule.getSloPolicyTierChangedFeedParts;
|
|
32
35
|
export const getSloStatusChangedFeedMarkdown = commonJsModule.getSloStatusChangedFeedMarkdown;
|
|
33
36
|
export const getSloStatusEmoji = commonJsModule.getSloStatusEmoji;
|
|
34
37
|
export const getSloUpdatedFeedMarkdown = commonJsModule.getSloUpdatedFeedMarkdown;
|
|
35
38
|
export const isSloFeedValueEqual = commonJsModule.isSloFeedValueEqual;
|
|
36
39
|
export const normalizeSloFeedBoolean = commonJsModule.normalizeSloFeedBoolean;
|
|
40
|
+
export const toSloFeedMarkdown = commonJsModule.toSloFeedMarkdown;
|
|
37
41
|
export const truncateSloFeedText = commonJsModule.truncateSloFeedText;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.StatusPageResourceSelectionType = void 0;
|
|
7
7
|
const GroupHierarchyView_1 = __importDefault(require("./GroupHierarchyView"));
|
|
8
8
|
const GroupTree_1 = __importDefault(require("./GroupTree"));
|
|
9
|
+
const DateLanguage_1 = require("../../Types/DateLanguage");
|
|
9
10
|
/*
|
|
10
11
|
* What the right hand pane is showing. "Ungrouped" is a real place on a status
|
|
11
12
|
* page - the resources that sit above every group - so it is a selection like
|
|
@@ -503,13 +504,13 @@ class StatusPageResourceExplorerUtil {
|
|
|
503
504
|
* rather than to wonder afterwards.
|
|
504
505
|
*/
|
|
505
506
|
static getBulkRemoveConfirmTitle(data) {
|
|
506
|
-
return `Remove ${data.count.toLocaleString()} ${data.count === 1 ? "resource" : "resources"}`;
|
|
507
|
+
return `Remove ${data.count.toLocaleString("en-US")} ${data.count === 1 ? "resource" : "resources"}`;
|
|
507
508
|
}
|
|
508
509
|
static getBulkRemoveConfirmMessage(data) {
|
|
509
510
|
if (data.count === 1) {
|
|
510
511
|
return "Are you sure you want to remove 1 resource from this status page? The monitor itself is not deleted.";
|
|
511
512
|
}
|
|
512
|
-
return `Are you sure you want to remove ${data.count.toLocaleString()} resources from this status page? The monitors themselves are not deleted.`;
|
|
513
|
+
return `Are you sure you want to remove ${data.count.toLocaleString("en-US")} resources from this status page? The monitors themselves are not deleted.`;
|
|
513
514
|
}
|
|
514
515
|
/*
|
|
515
516
|
* The `order` to write when a resource is dragged from one position to
|
|
@@ -629,7 +630,7 @@ class StatusPageResourceExplorerUtil {
|
|
|
629
630
|
if (data.count === 1) {
|
|
630
631
|
return "1 resource";
|
|
631
632
|
}
|
|
632
|
-
return `${data.count.toLocaleString()} resources`;
|
|
633
|
+
return `${data.count.toLocaleString("en-US")} resources`;
|
|
633
634
|
}
|
|
634
635
|
/*
|
|
635
636
|
* What a navigator row's count badge says, which is not always the same
|
|
@@ -647,19 +648,19 @@ class StatusPageResourceExplorerUtil {
|
|
|
647
648
|
}
|
|
648
649
|
if (data.row.ownResourceCount === 0 &&
|
|
649
650
|
data.row.subtreeResourceCount > data.row.ownResourceCount) {
|
|
650
|
-
return `+${data.row.subtreeResourceCount.toLocaleString()}`;
|
|
651
|
+
return `+${data.row.subtreeResourceCount.toLocaleString((0, DateLanguage_1.getReaderNumberLocale)())}`;
|
|
651
652
|
}
|
|
652
|
-
return data.row.ownResourceCount.toLocaleString();
|
|
653
|
+
return data.row.ownResourceCount.toLocaleString((0, DateLanguage_1.getReaderNumberLocale)());
|
|
653
654
|
}
|
|
654
655
|
static getNavigatorCountTooltip(data) {
|
|
655
656
|
if (!data.countIndex.isComplete) {
|
|
656
657
|
return undefined;
|
|
657
658
|
}
|
|
658
|
-
const own = `${data.row.ownResourceCount.toLocaleString()} ${data.row.ownResourceCount === 1 ? "resource" : "resources"} in this group`;
|
|
659
|
+
const own = `${data.row.ownResourceCount.toLocaleString("en-US")} ${data.row.ownResourceCount === 1 ? "resource" : "resources"} in this group`;
|
|
659
660
|
if (data.row.subtreeResourceCount === data.row.ownResourceCount) {
|
|
660
661
|
return own;
|
|
661
662
|
}
|
|
662
|
-
return `${own} · ${data.row.subtreeResourceCount.toLocaleString()} including sub groups`;
|
|
663
|
+
return `${own} · ${data.row.subtreeResourceCount.toLocaleString("en-US")} including sub groups`;
|
|
663
664
|
}
|
|
664
665
|
static getSubGroupCountLabel(data) {
|
|
665
666
|
if (data.subGroupCount <= 0) {
|
|
@@ -668,7 +669,7 @@ class StatusPageResourceExplorerUtil {
|
|
|
668
669
|
if (data.subGroupCount === 1) {
|
|
669
670
|
return "1 sub group";
|
|
670
671
|
}
|
|
671
|
-
return `${data.subGroupCount.toLocaleString()} sub groups`;
|
|
672
|
+
return `${data.subGroupCount.toLocaleString("en-US")} sub groups`;
|
|
672
673
|
}
|
|
673
674
|
}
|
|
674
675
|
/*
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* The setup key of an authenticator app's enrolment: the secret its
|
|
4
|
+
* otpauth:// URL carries, for someone who cannot scan the URL's QR code - a
|
|
5
|
+
* camera that will not focus, an authenticator on the phone the page is open
|
|
6
|
+
* on, or a code that could not be drawn at all (issue #6638) - to type or
|
|
7
|
+
* paste into the app instead. The QR code holds the same secret, so showing
|
|
8
|
+
* it to whoever is looking at the code gives them nothing more.
|
|
9
|
+
*
|
|
10
|
+
* The server writes the URL (Common/Server/Utils/TotpAuth.generateUri):
|
|
11
|
+
*
|
|
12
|
+
* otpauth://totp/OneUptime:ada%40example.com?issuer=OneUptime
|
|
13
|
+
* &secret=MTEA5EMEV46EOK5MXD7E3ES7YSRRR6LQ&algorithm=SHA1&digits=6&period=30
|
|
14
|
+
*
|
|
15
|
+
* The mobile app reads the same parameter for its enrolment screen
|
|
16
|
+
* (packages/MobileApp/src/auth/otpUrl.ts).
|
|
17
|
+
*/
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.TOTP_SETUP_KEY_GROUP_LENGTH = void 0;
|
|
20
|
+
exports.getTotpSetupKey = getTotpSetupKey;
|
|
21
|
+
exports.getTotpSetupKeyGroups = getTotpSetupKeyGroups;
|
|
22
|
+
// A secret as base32 writes it (RFC 4648): A-Z and 2-7, padded with "=".
|
|
23
|
+
const BASE32_SECRET = /^[A-Z2-7]+=*$/;
|
|
24
|
+
const PADDING = /[=]+$/;
|
|
25
|
+
// How many characters a group of the key holds, as it is shown.
|
|
26
|
+
exports.TOTP_SETUP_KEY_GROUP_LENGTH = 4;
|
|
27
|
+
/*
|
|
28
|
+
* The setup key in an otpauth:// URL: its `secret`, in capitals and without
|
|
29
|
+
* the padding authenticator apps do not want - or "" when the URL has none
|
|
30
|
+
* that is base32, so a page shows no key rather than one that cannot work.
|
|
31
|
+
*/
|
|
32
|
+
function getTotpSetupKey(otpUrl) {
|
|
33
|
+
if (typeof otpUrl !== "string") {
|
|
34
|
+
return "";
|
|
35
|
+
}
|
|
36
|
+
const url = otpUrl.trim();
|
|
37
|
+
if (!url.toLowerCase().startsWith("otpauth://")) {
|
|
38
|
+
return "";
|
|
39
|
+
}
|
|
40
|
+
const queryStart = url.indexOf("?");
|
|
41
|
+
if (queryStart < 0) {
|
|
42
|
+
return "";
|
|
43
|
+
}
|
|
44
|
+
const fragmentStart = url.indexOf("#", queryStart);
|
|
45
|
+
const query = url.slice(queryStart + 1, fragmentStart < 0 ? url.length : fragmentStart);
|
|
46
|
+
/*
|
|
47
|
+
* The parameter named exactly `secret`: never one that only ends in it,
|
|
48
|
+
* such as a `client_secret`. Its escapes are decoded; a base32 secret has
|
|
49
|
+
* none, so anything they would put in it is caught below.
|
|
50
|
+
*/
|
|
51
|
+
const secret = new URLSearchParams(query).get("secret");
|
|
52
|
+
if (!secret) {
|
|
53
|
+
return "";
|
|
54
|
+
}
|
|
55
|
+
const key = secret.toUpperCase();
|
|
56
|
+
if (!BASE32_SECRET.test(key)) {
|
|
57
|
+
return "";
|
|
58
|
+
}
|
|
59
|
+
return key.replace(PADDING, "");
|
|
60
|
+
}
|
|
61
|
+
/*
|
|
62
|
+
* The key in groups of four, as it is shown: MTEA 5EME V46E OK5M ... Easier to
|
|
63
|
+
* read off a screen and type in than thirty-two letters at once. It is copied
|
|
64
|
+
* whole, without the gaps.
|
|
65
|
+
*/
|
|
66
|
+
function getTotpSetupKeyGroups(key) {
|
|
67
|
+
const groups = [];
|
|
68
|
+
for (let start = 0; start < key.length; start += exports.TOTP_SETUP_KEY_GROUP_LENGTH) {
|
|
69
|
+
groups.push(key.slice(start, start + exports.TOTP_SETUP_KEY_GROUP_LENGTH));
|
|
70
|
+
}
|
|
71
|
+
return groups;
|
|
72
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import commonJsModule from "./TotpSetupKey.js";
|
|
2
|
+
export const TOTP_SETUP_KEY_GROUP_LENGTH = commonJsModule.TOTP_SETUP_KEY_GROUP_LENGTH;
|
|
3
|
+
export const getTotpSetupKey = commonJsModule.getTotpSetupKey;
|
|
4
|
+
export const getTotpSetupKeyGroups = commonJsModule.getTotpSetupKeyGroups;
|
|
@@ -30,9 +30,13 @@ const RECORD_WORDS = {
|
|
|
30
30
|
[EventType_1.default.ScheduledMaintenance]: "maintenance",
|
|
31
31
|
[EventType_1.default.Monitor]: "monitor",
|
|
32
32
|
[EventType_1.default.OnCallDutyPolicy]: "on-call-policy",
|
|
33
|
-
|
|
33
|
+
/*
|
|
34
|
+
* A security case, a hunt and an SLO get no channel of their own; listed
|
|
35
|
+
* so every kind has a word.
|
|
36
|
+
*/
|
|
34
37
|
[EventType_1.default.SecurityCase]: "security-case",
|
|
35
38
|
[EventType_1.default.SecurityHunt]: "security-hunt",
|
|
39
|
+
[EventType_1.default.ServiceLevelObjective]: "slo",
|
|
36
40
|
};
|
|
37
41
|
/*
|
|
38
42
|
* A monitor or on-call policy to show a channel name with, in a project that
|
package/package.json
CHANGED