@oneuptime/common 15.0.0 → 16.0.0
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/AIAgent.js +2 -0
- package/Models/DatabaseModels/AIAgentTaskPullRequest.d.mts +2 -0
- package/Models/DatabaseModels/AIAgentTaskPullRequest.d.ts +2 -0
- package/Models/DatabaseModels/AIAgentTaskPullRequest.js +62 -0
- package/Models/DatabaseModels/AIRun.d.mts +2 -0
- package/Models/DatabaseModels/AIRun.d.ts +2 -0
- package/Models/DatabaseModels/AIRun.js +63 -0
- package/Models/DatabaseModels/CustomNotificationChannel.js +17 -9
- package/Models/DatabaseModels/DataProduct.js +3 -2
- package/Models/DatabaseModels/GlobalConfig.js +1 -1
- package/Models/DatabaseModels/IoTDeviceCredential.js +3 -1
- package/Models/DatabaseModels/Monitor.d.mts +4 -0
- package/Models/DatabaseModels/Monitor.d.ts +4 -0
- package/Models/DatabaseModels/Monitor.js +108 -5
- package/Models/DatabaseModels/NetworkDevice.js +43 -17
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +38 -15
- package/Models/DatabaseModels/NetworkSnmpCredentialProfile.js +4 -4
- package/Models/DatabaseModels/OpenStackProjectNotice.js +29 -10
- package/Models/DatabaseModels/Probe.js +2 -0
- package/Models/DatabaseModels/ProjectSCIM.d.mts +2 -1
- package/Models/DatabaseModels/ProjectSCIM.d.ts +2 -1
- package/Models/DatabaseModels/ProjectSCIM.js +21 -9
- package/Models/DatabaseModels/Runbook.js +3 -2
- package/Models/DatabaseModels/Runner.js +2 -0
- package/Models/DatabaseModels/StatusPage.js +3 -2
- package/Models/DatabaseModels/StatusPageSCIM.d.mts +2 -1
- package/Models/DatabaseModels/StatusPageSCIM.d.ts +2 -1
- package/Models/DatabaseModels/StatusPageSCIM.js +17 -8
- package/Models/DatabaseModels/StatusPageSubscriber.js +35 -15
- package/Models/DatabaseModels/TelemetryIngestionKey.d.mts +2 -0
- package/Models/DatabaseModels/TelemetryIngestionKey.d.ts +2 -0
- package/Models/DatabaseModels/TelemetryIngestionKey.js +36 -1
- package/Models/DatabaseModels/UserWebhook.js +25 -17
- package/Models/DatabaseModels/WebhookLog.js +12 -2
- package/Models/DatabaseModels/Workflow.d.mts +3 -0
- package/Models/DatabaseModels/Workflow.d.ts +3 -0
- package/Models/DatabaseModels/Workflow.js +70 -1
- package/Server/Services/DatabaseService.d.mts +21 -1
- package/Server/Services/DatabaseService.d.ts +21 -1
- package/Types/AI/AIActionWords.js +1 -1
- package/Types/AI/CarriedRecords.d.mts +35 -0
- package/Types/AI/CarriedRecords.d.ts +35 -0
- package/Types/AI/CarriedRecords.js +211 -0
- package/Types/AI/CarriedRecords.mjs +3 -0
- package/Types/Accounts/SetPasswordLink.d.mts +6 -0
- package/Types/Accounts/SetPasswordLink.d.ts +6 -0
- package/Types/Accounts/SetPasswordLink.js +47 -0
- package/Types/Accounts/SetPasswordLink.mjs +7 -0
- package/Types/BaseDatabase/DatabaseCommonInteractionPropsUtil.js +1 -1
- package/Types/CodeRepository/ProductionReview.d.mts +5 -0
- package/Types/CodeRepository/ProductionReview.d.ts +5 -0
- package/Types/CodeRepository/ProductionReview.js +108 -0
- package/Types/Database/DatabaseProperty.d.mts +1 -0
- package/Types/Database/DatabaseProperty.d.ts +1 -0
- package/Types/Database/DatabaseProperty.js +27 -0
- package/Types/Database/EncryptedValue.d.mts +2 -0
- package/Types/Database/EncryptedValue.d.ts +2 -0
- package/Types/Database/EncryptedValue.js +27 -0
- package/Types/Database/EncryptedValue.mjs +3 -0
- package/Types/Database/TableColumn.d.mts +3 -0
- package/Types/Database/TableColumn.d.ts +3 -0
- package/Types/Docs/GlossaryTerm.d.mts +1 -0
- package/Types/Docs/GlossaryTerm.d.ts +1 -0
- package/Types/Docs/GlossaryTerm.js +2 -0
- package/Types/Email/EmailSendFailure.d.mts +20 -0
- package/Types/Email/EmailSendFailure.d.ts +20 -0
- package/Types/Email/EmailSendFailure.js +244 -0
- package/Types/Email/EmailSendFailure.mjs +3 -0
- package/Types/Email/EmailTemplateType.d.mts +1 -0
- package/Types/Email/EmailTemplateType.d.ts +1 -0
- package/Types/Email/EmailTemplateType.js +5 -0
- package/Types/Runner/RunnerCodeFixCapability.d.mts +3 -1
- package/Types/Runner/RunnerCodeFixCapability.d.ts +3 -1
- package/Types/Runner/RunnerCodeFixCapability.js +19 -1
- package/Types/Runner/RunnerCodeFixCapability.mjs +1 -0
- package/Types/SSO/SessionsWithoutSso.js +2 -2
- package/Types/ServerSending/ServerSendingStatus.d.mts +23 -2
- package/Types/ServerSending/ServerSendingStatus.d.ts +23 -2
- package/Types/ServerSending/ServerSendingStatus.js +208 -10
- package/Types/ServerSending/ServerSendingStatus.mjs +3 -0
- package/Types/ServerSetup/ServerSetupChecklist.js +5 -0
- package/Types/StatusPage/StatusPageMagicLink.js +1 -1
- package/Types/StatusPage/StatusPageSignInMessages.d.mts +3 -0
- package/Types/StatusPage/StatusPageSignInMessages.d.ts +3 -0
- package/Types/StatusPage/StatusPageSignInMessages.js +16 -0
- package/Types/StatusPage/StatusPageSignInMessages.mjs +4 -0
- package/Types/StatusPage/StatusPageSingleSignOnProtocol.d.mts +12 -0
- package/Types/StatusPage/StatusPageSingleSignOnProtocol.d.ts +12 -0
- package/Types/StatusPage/StatusPageSingleSignOnProtocol.js +63 -0
- package/Types/StatusPage/StatusPageSingleSignOnProtocol.mjs +8 -0
- package/Types/StatusPage/StatusPageSubscriberChannel.d.mts +18 -0
- package/Types/StatusPage/StatusPageSubscriberChannel.d.ts +18 -0
- package/Types/StatusPage/StatusPageSubscriberChannel.js +91 -0
- package/Types/StatusPage/StatusPageSubscriberChannel.mjs +10 -0
- package/Types/Workspace/ConnectCallback.d.mts +2 -1
- package/Types/Workspace/ConnectCallback.d.ts +2 -1
- package/Types/Workspace/ConnectCallback.js +8 -0
- package/Utils/AiRemediation/DeclaredCodeChange.d.mts +4 -1
- package/Utils/AiRemediation/DeclaredCodeChange.d.ts +4 -1
- package/Utils/AiRemediation/DeclaredCodeChange.js +6 -0
- package/Utils/Dashboard/MonitorListWidgetFormat.js +1 -1
- package/Utils/Incident/PostmortemActionItemCodeTask.d.mts +2 -0
- package/Utils/Incident/PostmortemActionItemCodeTask.d.ts +2 -0
- package/Utils/Incident/PostmortemActionItemCodeTask.js +22 -5
- package/Utils/Incident/PostmortemActionItemCodeTask.mjs +1 -0
- package/Utils/LookupTable.d.mts +1 -0
- package/Utils/LookupTable.d.ts +1 -0
- package/Utils/LookupTable.js +19 -0
- package/Utils/LookupTable.mjs +1 -0
- package/Utils/Monitor/MonitorFirstCheckOverdue.js +5 -5
- package/Utils/Monitor/MonitorOverviewFamily.d.mts +2 -10
- package/Utils/Monitor/MonitorOverviewFamily.d.ts +2 -10
- package/Utils/Monitor/MonitorOverviewFamily.js +19 -99
- package/Utils/Monitor/MonitorOverviewPresentationUtil.d.mts +1 -1
- package/Utils/Monitor/MonitorOverviewPresentationUtil.d.ts +1 -1
- package/Utils/Monitor/MonitorOverviewPresentationUtil.js +6 -6
- package/Utils/Monitor/MonitorRowStatus.js +2 -2
- package/Utils/Monitor/MonitorTypeFamily.d.mts +14 -0
- package/Utils/Monitor/MonitorTypeFamily.d.ts +14 -0
- package/Utils/Monitor/MonitorTypeFamily.js +105 -0
- package/Utils/Monitor/MonitorTypeFamily.mjs +3 -0
- package/Utils/Monitor/StoredCheckEvidence.d.mts +10 -0
- package/Utils/Monitor/StoredCheckEvidence.d.ts +10 -0
- package/Utils/Monitor/StoredCheckEvidence.js +53 -0
- package/Utils/Monitor/StoredCheckEvidence.mjs +5 -0
- package/Utils/NetworkDiscovery/SnmpScanConfigUtil.js +11 -4
- package/Utils/Project/ProjectBilling.d.mts +1 -0
- package/Utils/Project/ProjectBilling.d.ts +1 -0
- package/Utils/Project/ProjectBilling.js +9 -1
- package/Utils/Project/ProjectBilling.mjs +1 -0
- package/Utils/StatusPage/HistoryWindow.d.mts +3 -0
- package/Utils/StatusPage/HistoryWindow.d.ts +3 -0
- package/Utils/StatusPage/HistoryWindow.js +24 -0
- package/Utils/StatusPage/HistoryWindow.mjs +4 -0
- package/Utils/Suggestions/CodeFixSuggestion.d.mts +2 -1
- package/Utils/Suggestions/CodeFixSuggestion.d.ts +2 -1
- package/Utils/Suggestions/CodeFixSuggestion.js +9 -0
- package/Utils/Suggestions/InvestigationCodeFixSuggestion.d.mts +1 -0
- package/Utils/Suggestions/InvestigationCodeFixSuggestion.d.ts +1 -0
- package/Utils/Suggestions/InvestigationCodeFixSuggestion.js +24 -3
- package/Utils/Suggestions/InvestigationCodeFixSuggestion.mjs +1 -0
- package/Utils/Suggestions/ProfileFixSuggestion.d.mts +1 -0
- package/Utils/Suggestions/ProfileFixSuggestion.d.ts +1 -0
- package/Utils/Suggestions/ProfileFixSuggestion.js +16 -4
- package/Utils/Suggestions/TelemetryAiFixSuggestion.d.mts +2 -0
- package/Utils/Suggestions/TelemetryAiFixSuggestion.d.ts +2 -0
- package/Utils/Suggestions/TelemetryAiFixSuggestion.js +17 -5
- package/Utils/Suggestions/TelemetryAiFixSuggestion.mjs +1 -0
- package/Utils/Suggestions/TracePerformanceFixSuggestion.js +16 -7
- package/Utils/WebhookAddressMask.d.mts +9 -0
- package/Utils/WebhookAddressMask.d.ts +9 -0
- package/Utils/WebhookAddressMask.js +66 -0
- package/Utils/WebhookAddressMask.mjs +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,105 @@
|
|
|
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
|
+
exports.MonitorOverviewFamily = void 0;
|
|
7
|
+
const BadDataException_1 = __importDefault(require("../../Types/Exception/BadDataException"));
|
|
8
|
+
const MonitorType_1 = __importDefault(require("../../Types/Monitor/MonitorType"));
|
|
9
|
+
/*
|
|
10
|
+
* The monitor overview groups the 35 monitor types into eight families that
|
|
11
|
+
* behave alike on the page: where the "last checked" time comes from, which
|
|
12
|
+
* facts the hero shows, which cards appear. Everything type-specific on the
|
|
13
|
+
* overview goes through this one switch, so a new MonitorType fails to
|
|
14
|
+
* compile here until somebody decides how its overview should look.
|
|
15
|
+
*
|
|
16
|
+
* The family is a module of its own, apart from the overview's layout
|
|
17
|
+
* (MonitorOverviewFamily), because of what the layout reads: every monitor
|
|
18
|
+
* type's metrics and the database metric catalog (Utils/Monitor/
|
|
19
|
+
* MonitorMetricType), some 45 KB before gzip. The rule for a first check
|
|
20
|
+
* that is overdue (MonitorFirstCheckOverdue) needs the family alone, and a
|
|
21
|
+
* public dashboard's Monitor List widget draws its rows by that rule, so a
|
|
22
|
+
* public dashboard loads the family before it draws but not the catalogs
|
|
23
|
+
* (packages/Common/Scripts/first-load-budgets.js).
|
|
24
|
+
*/
|
|
25
|
+
var MonitorOverviewFamily;
|
|
26
|
+
(function (MonitorOverviewFamily) {
|
|
27
|
+
// Run by probes on a schedule.
|
|
28
|
+
MonitorOverviewFamily["ProbeCheck"] = "ProbeCheck";
|
|
29
|
+
// Pushed to us: heartbeat requests and inbound email.
|
|
30
|
+
MonitorOverviewFamily["Heartbeat"] = "Heartbeat";
|
|
31
|
+
// Pushed by the server agent.
|
|
32
|
+
MonitorOverviewFamily["Agent"] = "Agent";
|
|
33
|
+
// Criteria evaluated by a worker over telemetry.
|
|
34
|
+
MonitorOverviewFamily["TelemetrySignal"] = "TelemetrySignal";
|
|
35
|
+
// Criteria evaluated by a worker over infrastructure metrics.
|
|
36
|
+
MonitorOverviewFamily["Infrastructure"] = "Infrastructure";
|
|
37
|
+
// Evaluated on every device poll and matching trap.
|
|
38
|
+
MonitorOverviewFamily["NetworkDevice"] = "NetworkDevice";
|
|
39
|
+
// Evaluated every minute from the connection status of the probes it watches.
|
|
40
|
+
MonitorOverviewFamily["ProbeStatus"] = "ProbeStatus";
|
|
41
|
+
// No checks at all; people set the status.
|
|
42
|
+
MonitorOverviewFamily["Manual"] = "Manual";
|
|
43
|
+
})(MonitorOverviewFamily || (exports.MonitorOverviewFamily = MonitorOverviewFamily = {}));
|
|
44
|
+
class MonitorTypeFamily {
|
|
45
|
+
static getFamily(monitorType) {
|
|
46
|
+
switch (monitorType) {
|
|
47
|
+
case MonitorType_1.default.API:
|
|
48
|
+
case MonitorType_1.default.Website:
|
|
49
|
+
case MonitorType_1.default.IP:
|
|
50
|
+
case MonitorType_1.default.Ping:
|
|
51
|
+
case MonitorType_1.default.Port:
|
|
52
|
+
case MonitorType_1.default.SSLCertificate:
|
|
53
|
+
case MonitorType_1.default.SyntheticMonitor:
|
|
54
|
+
case MonitorType_1.default.CustomJavaScriptCode:
|
|
55
|
+
case MonitorType_1.default.DNS:
|
|
56
|
+
case MonitorType_1.default.DNSSEC:
|
|
57
|
+
case MonitorType_1.default.NTP:
|
|
58
|
+
case MonitorType_1.default.Domain:
|
|
59
|
+
case MonitorType_1.default.SQLQuery:
|
|
60
|
+
case MonitorType_1.default.Database:
|
|
61
|
+
case MonitorType_1.default.ExternalStatusPage:
|
|
62
|
+
return MonitorOverviewFamily.ProbeCheck;
|
|
63
|
+
case MonitorType_1.default.IncomingRequest:
|
|
64
|
+
case MonitorType_1.default.IncomingEmail:
|
|
65
|
+
return MonitorOverviewFamily.Heartbeat;
|
|
66
|
+
case MonitorType_1.default.Server:
|
|
67
|
+
return MonitorOverviewFamily.Agent;
|
|
68
|
+
case MonitorType_1.default.Logs:
|
|
69
|
+
case MonitorType_1.default.Metrics:
|
|
70
|
+
case MonitorType_1.default.Traces:
|
|
71
|
+
case MonitorType_1.default.Exceptions:
|
|
72
|
+
case MonitorType_1.default.Profiles:
|
|
73
|
+
case MonitorType_1.default.SecurityEvents:
|
|
74
|
+
case MonitorType_1.default.Llm:
|
|
75
|
+
return MonitorOverviewFamily.TelemetrySignal;
|
|
76
|
+
case MonitorType_1.default.Kubernetes:
|
|
77
|
+
case MonitorType_1.default.Docker:
|
|
78
|
+
case MonitorType_1.default.Host:
|
|
79
|
+
case MonitorType_1.default.Podman:
|
|
80
|
+
case MonitorType_1.default.DockerSwarm:
|
|
81
|
+
case MonitorType_1.default.Proxmox:
|
|
82
|
+
case MonitorType_1.default.OpenStack:
|
|
83
|
+
case MonitorType_1.default.VMware:
|
|
84
|
+
case MonitorType_1.default.Ceph:
|
|
85
|
+
case MonitorType_1.default.StorageArray:
|
|
86
|
+
case MonitorType_1.default.IoTDevice:
|
|
87
|
+
return MonitorOverviewFamily.Infrastructure;
|
|
88
|
+
case MonitorType_1.default.NetworkDevice:
|
|
89
|
+
return MonitorOverviewFamily.NetworkDevice;
|
|
90
|
+
case MonitorType_1.default.ProbeStatus:
|
|
91
|
+
return MonitorOverviewFamily.ProbeStatus;
|
|
92
|
+
case MonitorType_1.default.Manual:
|
|
93
|
+
return MonitorOverviewFamily.Manual;
|
|
94
|
+
default: {
|
|
95
|
+
/*
|
|
96
|
+
* Compile-time guard: a MonitorType added without a case above makes
|
|
97
|
+
* this assignment a type error.
|
|
98
|
+
*/
|
|
99
|
+
const unhandled = monitorType;
|
|
100
|
+
throw new BadDataException_1.default(`Monitor type ${String(unhandled)} has no overview family.`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.default = MonitorTypeFamily;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const STORED_CHECK_MAX_SIZE_IN_BYTES: number;
|
|
2
|
+
export declare const EVIDENCE_TRUNCATED_FIELD: string;
|
|
3
|
+
export declare const EVIDENCE_SCOPE_FIELD: string;
|
|
4
|
+
export interface StoredCheckEvidenceScope {
|
|
5
|
+
seriesFingerprint: string;
|
|
6
|
+
seriesInEvaluation: number;
|
|
7
|
+
}
|
|
8
|
+
export default class StoredCheckEvidence {
|
|
9
|
+
static isTrimmed(log: unknown): boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const STORED_CHECK_MAX_SIZE_IN_BYTES: number;
|
|
2
|
+
export declare const EVIDENCE_TRUNCATED_FIELD: string;
|
|
3
|
+
export declare const EVIDENCE_SCOPE_FIELD: string;
|
|
4
|
+
export interface StoredCheckEvidenceScope {
|
|
5
|
+
seriesFingerprint: string;
|
|
6
|
+
seriesInEvaluation: number;
|
|
7
|
+
}
|
|
8
|
+
export default class StoredCheckEvidence {
|
|
9
|
+
static isTrimmed(log: unknown): boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* WHAT AN INCIDENT, AN ALERT AND A STATE CHANGE KEEP OF A CHECK, AND HOW
|
|
4
|
+
* BIG IT MAY GET (OneUptime issue #9189).
|
|
5
|
+
*
|
|
6
|
+
* The raw check an incident or an alert keeps (createdStateLog), and the
|
|
7
|
+
* check kept on its state timeline (stateChangeLog) and on the monitor's
|
|
8
|
+
* status timeline (statusChangeLog), are read as JSON text: View Logs.
|
|
9
|
+
*
|
|
10
|
+
* - An incident or an alert opened for one series of a grouped monitor
|
|
11
|
+
* keeps that series only: its seriesBreakdown entry, and its points in
|
|
12
|
+
* metricResult. The other series of the evaluation are not evidence for
|
|
13
|
+
* it. The copy says which series it kept, and how many the evaluation
|
|
14
|
+
* looked at (EVIDENCE_SCOPE_FIELD).
|
|
15
|
+
* - Whatever is left is cut to STORED_CHECK_MAX_SIZE_IN_BYTES of JSON at
|
|
16
|
+
* most, and a copy that was cut says so (EVIDENCE_TRUNCATED_FIELD).
|
|
17
|
+
*
|
|
18
|
+
* Before, every alert of a grouped fleet monitor kept the whole evaluation -
|
|
19
|
+
* every series of every query, 95 MB of JSON at 16,000 series - three times:
|
|
20
|
+
* on the alert, its Identified row and its Resolved row.
|
|
21
|
+
*/
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.EVIDENCE_SCOPE_FIELD = exports.EVIDENCE_TRUNCATED_FIELD = exports.STORED_CHECK_MAX_SIZE_IN_BYTES = void 0;
|
|
24
|
+
// The most a stored check's JSON may take, in bytes.
|
|
25
|
+
exports.STORED_CHECK_MAX_SIZE_IN_BYTES = 256 * 1024;
|
|
26
|
+
// Set (true) on a stored check that was cut to fit.
|
|
27
|
+
exports.EVIDENCE_TRUNCATED_FIELD = "isEvidenceTruncated";
|
|
28
|
+
/*
|
|
29
|
+
* Set on a stored check kept for one series:
|
|
30
|
+
* { seriesFingerprint, seriesInEvaluation }.
|
|
31
|
+
*/
|
|
32
|
+
exports.EVIDENCE_SCOPE_FIELD = "evidenceScope";
|
|
33
|
+
class StoredCheckEvidence {
|
|
34
|
+
// Was this stored check cut to fit? A log read back as JSON or as text.
|
|
35
|
+
static isTrimmed(log) {
|
|
36
|
+
if (log === null || log === undefined) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
if (typeof log === "string") {
|
|
40
|
+
try {
|
|
41
|
+
return StoredCheckEvidence.isTrimmed(JSON.parse(log));
|
|
42
|
+
}
|
|
43
|
+
catch (_a) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (typeof log !== "object" || Array.isArray(log)) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
return log[exports.EVIDENCE_TRUNCATED_FIELD] === true;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.default = StoredCheckEvidence;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import commonJsModule from "./StoredCheckEvidence.js";
|
|
2
|
+
export default commonJsModule.default;
|
|
3
|
+
export const EVIDENCE_SCOPE_FIELD = commonJsModule.EVIDENCE_SCOPE_FIELD;
|
|
4
|
+
export const EVIDENCE_TRUNCATED_FIELD = commonJsModule.EVIDENCE_TRUNCATED_FIELD;
|
|
5
|
+
export const STORED_CHECK_MAX_SIZE_IN_BYTES = commonJsModule.STORED_CHECK_MAX_SIZE_IN_BYTES;
|
|
@@ -118,6 +118,12 @@ exports.MAX_SNMP_CONFIG_NAME_LENGTH = ColumnLength_1.default.ShortText;
|
|
|
118
118
|
*
|
|
119
119
|
* Bounding here makes it one rule, checked on every card, in the words of the
|
|
120
120
|
* field the operator is actually looking at.
|
|
121
|
+
*
|
|
122
|
+
* The flattened credential columns are text now, since they are kept
|
|
123
|
+
* encrypted at rest (#9014) and a ciphertext is longer than its value, so
|
|
124
|
+
* nothing in Postgres holds a credential to these widths any more. They are
|
|
125
|
+
* kept as the rule a credential set is held to: a community string of 100
|
|
126
|
+
* characters, a passphrase of 500, as before.
|
|
121
127
|
*/
|
|
122
128
|
exports.MAX_SNMP_CONFIG_SHORT_TEXT_LENGTH = ColumnLength_1.default.ShortText;
|
|
123
129
|
exports.MAX_SNMP_CONFIG_KEY_LENGTH = ColumnLength_1.default.LongText;
|
|
@@ -543,10 +549,11 @@ class SnmpScanConfigUtil {
|
|
|
543
549
|
* have been given under the old single-config UI, and because the list is
|
|
544
550
|
* ordered by the operator's own preference.
|
|
545
551
|
*
|
|
546
|
-
* Every key is always present, with null for "unset":
|
|
547
|
-
* what the probe-claim endpoint compares its
|
|
548
|
-
* `expectedData` against
|
|
549
|
-
*
|
|
552
|
+
* Every key is always present, with null for "unset": the values that are
|
|
553
|
+
* not credentials are also what the probe-claim endpoint compares its
|
|
554
|
+
* optimistic-concurrency `expectedData` against (the credentials, kept
|
|
555
|
+
* encrypted, are held by the row's version), and a key omitted for being
|
|
556
|
+
* empty would read as "unchanged" instead of "cleared".
|
|
550
557
|
*/
|
|
551
558
|
static getMirroredLegacyColumns(configs) {
|
|
552
559
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
@@ -11,5 +11,6 @@ export declare const PROJECT_INVOICE_PAY_PERMISSIONS: ReadonlyArray<Permission>;
|
|
|
11
11
|
export declare const PROJECT_CUSTOMER_BALANCE_READ_PERMISSIONS: ReadonlyArray<Permission>;
|
|
12
12
|
export declare const PROJECT_USAGE_READ_PERMISSIONS: ReadonlyArray<Permission>;
|
|
13
13
|
export declare const PROJECT_TELEMETRY_USAGE_READ_PERMISSIONS: ReadonlyArray<Permission>;
|
|
14
|
+
export declare const PROJECT_CHANGE_PLAN_PERMISSIONS: ReadonlyArray<Permission>;
|
|
14
15
|
export declare const PAYMENT_METHOD_ADD_PERMISSIONS: ReadonlyArray<Permission>;
|
|
15
16
|
export declare const PAYMENT_METHOD_SET_DEFAULT_PERMISSIONS: ReadonlyArray<Permission>;
|
|
@@ -11,5 +11,6 @@ export declare const PROJECT_INVOICE_PAY_PERMISSIONS: ReadonlyArray<Permission>;
|
|
|
11
11
|
export declare const PROJECT_CUSTOMER_BALANCE_READ_PERMISSIONS: ReadonlyArray<Permission>;
|
|
12
12
|
export declare const PROJECT_USAGE_READ_PERMISSIONS: ReadonlyArray<Permission>;
|
|
13
13
|
export declare const PROJECT_TELEMETRY_USAGE_READ_PERMISSIONS: ReadonlyArray<Permission>;
|
|
14
|
+
export declare const PROJECT_CHANGE_PLAN_PERMISSIONS: ReadonlyArray<Permission>;
|
|
14
15
|
export declare const PAYMENT_METHOD_ADD_PERMISSIONS: ReadonlyArray<Permission>;
|
|
15
16
|
export declare const PAYMENT_METHOD_SET_DEFAULT_PERMISSIONS: ReadonlyArray<Permission>;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.PAYMENT_METHOD_SET_DEFAULT_PERMISSIONS = exports.PAYMENT_METHOD_ADD_PERMISSIONS = exports.PROJECT_TELEMETRY_USAGE_READ_PERMISSIONS = exports.PROJECT_USAGE_READ_PERMISSIONS = exports.PROJECT_CUSTOMER_BALANCE_READ_PERMISSIONS = exports.PROJECT_INVOICE_PAY_PERMISSIONS = exports.PROJECT_INVOICE_DOWNLOAD_PERMISSIONS = exports.PROJECT_INVOICE_READ_PERMISSIONS = exports.PROJECT_BILLING_READ_COLUMNS = exports.PROJECT_BILLING_CONTACT_UPDATE_PERMISSIONS = exports.PROJECT_BILLING_CONTACT_COLUMNS = exports.PROJECT_BILLING_CONTACT_ROLES = exports.PROJECT_BILLING_READ_ROLES = void 0;
|
|
6
|
+
exports.PAYMENT_METHOD_SET_DEFAULT_PERMISSIONS = exports.PAYMENT_METHOD_ADD_PERMISSIONS = exports.PROJECT_CHANGE_PLAN_PERMISSIONS = exports.PROJECT_TELEMETRY_USAGE_READ_PERMISSIONS = exports.PROJECT_USAGE_READ_PERMISSIONS = exports.PROJECT_CUSTOMER_BALANCE_READ_PERMISSIONS = exports.PROJECT_INVOICE_PAY_PERMISSIONS = exports.PROJECT_INVOICE_DOWNLOAD_PERMISSIONS = exports.PROJECT_INVOICE_READ_PERMISSIONS = exports.PROJECT_BILLING_READ_COLUMNS = exports.PROJECT_BILLING_CONTACT_UPDATE_PERMISSIONS = exports.PROJECT_BILLING_CONTACT_COLUMNS = exports.PROJECT_BILLING_CONTACT_ROLES = exports.PROJECT_BILLING_READ_ROLES = void 0;
|
|
7
7
|
const Permission_1 = __importDefault(require("../../Types/Permission"));
|
|
8
8
|
/*
|
|
9
9
|
* WHAT THE THREE BILLING ROLES DO - and who does the rest.
|
|
@@ -178,6 +178,14 @@ exports.PROJECT_TELEMETRY_USAGE_READ_PERMISSIONS = [
|
|
|
178
178
|
Permission_1.default.TelemetryMember,
|
|
179
179
|
Permission_1.default.TelemetryViewer,
|
|
180
180
|
];
|
|
181
|
+
/*
|
|
182
|
+
* Who changes the project's plan (PUT /project/:id/change-plan): Change
|
|
183
|
+
* Plan, and Cancel Plan's Switch to Free Plan, on the Billing page.
|
|
184
|
+
*/
|
|
185
|
+
exports.PROJECT_CHANGE_PLAN_PERMISSIONS = [
|
|
186
|
+
Permission_1.default.ProjectOwner,
|
|
187
|
+
Permission_1.default.ManageProjectBilling,
|
|
188
|
+
];
|
|
181
189
|
/*
|
|
182
190
|
* Who adds a payment method (POST /billing-payment-methods/setup, and the
|
|
183
191
|
* table's create permissions).
|
|
@@ -6,6 +6,7 @@ export const PROJECT_BILLING_CONTACT_ROLES = commonJsModule.PROJECT_BILLING_CONT
|
|
|
6
6
|
export const PROJECT_BILLING_CONTACT_UPDATE_PERMISSIONS = commonJsModule.PROJECT_BILLING_CONTACT_UPDATE_PERMISSIONS;
|
|
7
7
|
export const PROJECT_BILLING_READ_COLUMNS = commonJsModule.PROJECT_BILLING_READ_COLUMNS;
|
|
8
8
|
export const PROJECT_BILLING_READ_ROLES = commonJsModule.PROJECT_BILLING_READ_ROLES;
|
|
9
|
+
export const PROJECT_CHANGE_PLAN_PERMISSIONS = commonJsModule.PROJECT_CHANGE_PLAN_PERMISSIONS;
|
|
9
10
|
export const PROJECT_CUSTOMER_BALANCE_READ_PERMISSIONS = commonJsModule.PROJECT_CUSTOMER_BALANCE_READ_PERMISSIONS;
|
|
10
11
|
export const PROJECT_INVOICE_DOWNLOAD_PERMISSIONS = commonJsModule.PROJECT_INVOICE_DOWNLOAD_PERMISSIONS;
|
|
11
12
|
export const PROJECT_INVOICE_PAY_PERMISSIONS = commonJsModule.PROJECT_INVOICE_PAY_PERMISSIONS;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStatusPageHistoryInDays = exports.HISTORY_IN_DAYS_RESPONSE_KEY = exports.DEFAULT_STATUS_PAGE_HISTORY_IN_DAYS = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* How many days of history a status page's lists show: its incidents,
|
|
6
|
+
* episodes, announcements and maintenance events.
|
|
7
|
+
*
|
|
8
|
+
* The server reads only that window (StatusPageAPI) and the page says so
|
|
9
|
+
* ("No incidents in the last 14 days"), from the same number. A page that
|
|
10
|
+
* said only "No incidents" read as "this service has never had one" (#9122).
|
|
11
|
+
* Unset, the window is 14 days, as it always was.
|
|
12
|
+
*/
|
|
13
|
+
exports.DEFAULT_STATUS_PAGE_HISTORY_IN_DAYS = 14;
|
|
14
|
+
// The key a status page list's response names its window by.
|
|
15
|
+
exports.HISTORY_IN_DAYS_RESPONSE_KEY = "historyInDays";
|
|
16
|
+
const getStatusPageHistoryInDays = (configured) => {
|
|
17
|
+
if (typeof configured !== "number" ||
|
|
18
|
+
!Number.isFinite(configured) ||
|
|
19
|
+
configured < 1) {
|
|
20
|
+
return exports.DEFAULT_STATUS_PAGE_HISTORY_IN_DAYS;
|
|
21
|
+
}
|
|
22
|
+
return Math.floor(configured);
|
|
23
|
+
};
|
|
24
|
+
exports.getStatusPageHistoryInDays = getStatusPageHistoryInDays;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import commonJsModule from "./HistoryWindow.js";
|
|
2
|
+
export const DEFAULT_STATUS_PAGE_HISTORY_IN_DAYS = commonJsModule.DEFAULT_STATUS_PAGE_HISTORY_IN_DAYS;
|
|
3
|
+
export const HISTORY_IN_DAYS_RESPONSE_KEY = commonJsModule.HISTORY_IN_DAYS_RESPONSE_KEY;
|
|
4
|
+
export const getStatusPageHistoryInDays = commonJsModule.getStatusPageHistoryInDays;
|
|
@@ -14,7 +14,8 @@ export declare function getCodeFixOffer(input: CodeFixSuggestionInput): Suggesti
|
|
|
14
14
|
export declare enum FinishedFixOutcome {
|
|
15
15
|
Fixed = "Fixed",
|
|
16
16
|
NothingToChange = "NothingToChange",
|
|
17
|
-
WaitingForYou = "WaitingForYou"
|
|
17
|
+
WaitingForYou = "WaitingForYou",
|
|
18
|
+
Hidden = "Hidden"
|
|
18
19
|
}
|
|
19
20
|
export declare function parseFinishedFixOutcome(value: unknown): FinishedFixOutcome | null;
|
|
20
21
|
export declare const FINISHED_FIX_STATUSES: ReadonlyArray<AIRunStatus>;
|
|
@@ -14,7 +14,8 @@ export declare function getCodeFixOffer(input: CodeFixSuggestionInput): Suggesti
|
|
|
14
14
|
export declare enum FinishedFixOutcome {
|
|
15
15
|
Fixed = "Fixed",
|
|
16
16
|
NothingToChange = "NothingToChange",
|
|
17
|
-
WaitingForYou = "WaitingForYou"
|
|
17
|
+
WaitingForYou = "WaitingForYou",
|
|
18
|
+
Hidden = "Hidden"
|
|
18
19
|
}
|
|
19
20
|
export declare function parseFinishedFixOutcome(value: unknown): FinishedFixOutcome | null;
|
|
20
21
|
export declare const FINISHED_FIX_STATUSES: ReadonlyArray<AIRunStatus>;
|
|
@@ -32,12 +32,21 @@ function getCodeFixOffer(input) {
|
|
|
32
32
|
* task says it in, in Code: its pull request is open for review, the AI
|
|
33
33
|
* read the code and found nothing to change, or it stopped with a question
|
|
34
34
|
* for the person.
|
|
35
|
+
*
|
|
36
|
+
* Or Hidden: a fix was asked for, in a task the reader may not read - a
|
|
37
|
+
* reply carried a private incident or alert into it that they do not see -
|
|
38
|
+
* which its own page answers as not found (CodeTaskThread
|
|
39
|
+
* .findTasksHiddenFrom). Said as a Done offer whether it works still or is
|
|
40
|
+
* done, with no task to link to, so nothing of how it stands reaches them:
|
|
41
|
+
* the page says the fix is there and why it shows nothing of it, and
|
|
42
|
+
* offers no second one.
|
|
35
43
|
*/
|
|
36
44
|
var FinishedFixOutcome;
|
|
37
45
|
(function (FinishedFixOutcome) {
|
|
38
46
|
FinishedFixOutcome["Fixed"] = "Fixed";
|
|
39
47
|
FinishedFixOutcome["NothingToChange"] = "NothingToChange";
|
|
40
48
|
FinishedFixOutcome["WaitingForYou"] = "WaitingForYou";
|
|
49
|
+
FinishedFixOutcome["Hidden"] = "Hidden";
|
|
41
50
|
})(FinishedFixOutcome || (exports.FinishedFixOutcome = FinishedFixOutcome = {}));
|
|
42
51
|
const ALL_FINISHED_FIX_OUTCOMES = Object.values(FinishedFixOutcome);
|
|
43
52
|
// Reads an outcome off the wire; anything this build does not know is null.
|
|
@@ -24,6 +24,7 @@ export interface InvestigationCodeFixSuggestion {
|
|
|
24
24
|
automaticBlocker: AutomaticCodeFixBlocker | null;
|
|
25
25
|
}
|
|
26
26
|
export declare const NO_INVESTIGATION_CODE_FIX_SUGGESTION: InvestigationCodeFixSuggestion;
|
|
27
|
+
export declare const HIDDEN_INVESTIGATION_CODE_FIX_SUGGESTION: InvestigationCodeFixSuggestion;
|
|
27
28
|
export interface InvestigationCodeFixRun {
|
|
28
29
|
aiRunId: string;
|
|
29
30
|
isAutomatic: boolean;
|
|
@@ -24,6 +24,7 @@ export interface InvestigationCodeFixSuggestion {
|
|
|
24
24
|
automaticBlocker: AutomaticCodeFixBlocker | null;
|
|
25
25
|
}
|
|
26
26
|
export declare const NO_INVESTIGATION_CODE_FIX_SUGGESTION: InvestigationCodeFixSuggestion;
|
|
27
|
+
export declare const HIDDEN_INVESTIGATION_CODE_FIX_SUGGESTION: InvestigationCodeFixSuggestion;
|
|
27
28
|
export interface InvestigationCodeFixRun {
|
|
28
29
|
aiRunId: string;
|
|
29
30
|
isAutomatic: boolean;
|
|
@@ -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.NO_INVESTIGATION_CODE_FIX_SUGGESTION = exports.AUTOMATIC_CODE_FIX_BLOCKER_BY_RULE_BLOCKER = exports.AutomaticCodeFixBlocker = void 0;
|
|
39
|
+
exports.HIDDEN_INVESTIGATION_CODE_FIX_SUGGESTION = exports.NO_INVESTIGATION_CODE_FIX_SUGGESTION = exports.AUTOMATIC_CODE_FIX_BLOCKER_BY_RULE_BLOCKER = exports.AutomaticCodeFixBlocker = void 0;
|
|
40
40
|
exports.parseAutomaticCodeFixBlocker = parseAutomaticCodeFixBlocker;
|
|
41
41
|
exports.getInvestigationCodeFixSuggestion = getInvestigationCodeFixSuggestion;
|
|
42
42
|
exports.investigationCodeFixSuggestionToJSON = investigationCodeFixSuggestionToJSON;
|
|
@@ -72,7 +72,8 @@ const SuggestionOffer_1 = __importStar(require("./SuggestionOffer"));
|
|
|
72
72
|
* in Code), and whether OneUptime AI or a person asked for it;
|
|
73
73
|
* - Done: it did its work - its pull request is open for review, it read
|
|
74
74
|
* the code and found nothing to change, or it waits for an answer in
|
|
75
|
-
* Code
|
|
75
|
+
* Code - or it is there, in a task the reader may not read
|
|
76
|
+
* (FinishedFixOutcome.Hidden), and nothing more is said of it;
|
|
76
77
|
* - SetUp: no repository is connected, or Code's own gate stands in the
|
|
77
78
|
* way (the plan, AI credits or an LLM provider, the day's limit, a
|
|
78
79
|
* Runner online) - the one step to take;
|
|
@@ -129,6 +130,20 @@ exports.NO_INVESTIGATION_CODE_FIX_SUGGESTION = {
|
|
|
129
130
|
isAutomatic: false,
|
|
130
131
|
automaticBlocker: null,
|
|
131
132
|
};
|
|
133
|
+
/*
|
|
134
|
+
* The fix pull request is there, in a task the reader may not read: a reply
|
|
135
|
+
* carried a private incident or alert into it that they do not see
|
|
136
|
+
* (FinishedFixOutcome.Hidden). Nothing of it: not whether it works still or
|
|
137
|
+
* is done, not who asked for it, and no task to link to.
|
|
138
|
+
*/
|
|
139
|
+
exports.HIDDEN_INVESTIGATION_CODE_FIX_SUGGESTION = {
|
|
140
|
+
offer: SuggestionOffer_1.default.Done,
|
|
141
|
+
fixOutcome: CodeFixSuggestion_1.FinishedFixOutcome.Hidden,
|
|
142
|
+
blocker: null,
|
|
143
|
+
aiRunId: null,
|
|
144
|
+
isAutomatic: false,
|
|
145
|
+
automaticBlocker: null,
|
|
146
|
+
};
|
|
132
147
|
function getInvestigationCodeFixSuggestion(input) {
|
|
133
148
|
var _a;
|
|
134
149
|
// A reply to the finished fix is under way: work in progress.
|
|
@@ -186,7 +201,9 @@ function investigationCodeFixSuggestionToJSON(suggestion) {
|
|
|
186
201
|
/*
|
|
187
202
|
* Reads the suggestion off the wire. Anything this build cannot draw - an
|
|
188
203
|
* offer it does not know, an InProgress or Done without its task - reads as
|
|
189
|
-
* None, so an unknown answer never draws an action or a dead link.
|
|
204
|
+
* None, so an unknown answer never draws an action or a dead link. A fix
|
|
205
|
+
* hidden from the reader reads as hidden, with no task whatever the wire
|
|
206
|
+
* says.
|
|
190
207
|
*/
|
|
191
208
|
function parseInvestigationCodeFixSuggestion(value) {
|
|
192
209
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
@@ -201,6 +218,10 @@ function parseInvestigationCodeFixSuggestion(value) {
|
|
|
201
218
|
if (offer === SuggestionOffer_1.default.None) {
|
|
202
219
|
return exports.NO_INVESTIGATION_CODE_FIX_SUGGESTION;
|
|
203
220
|
}
|
|
221
|
+
if (offer === SuggestionOffer_1.default.Done &&
|
|
222
|
+
(0, CodeFixSuggestion_1.parseFinishedFixOutcome)(record["fixOutcome"]) === CodeFixSuggestion_1.FinishedFixOutcome.Hidden) {
|
|
223
|
+
return exports.HIDDEN_INVESTIGATION_CODE_FIX_SUGGESTION;
|
|
224
|
+
}
|
|
204
225
|
if ((offer === SuggestionOffer_1.default.InProgress || offer === SuggestionOffer_1.default.Done) &&
|
|
205
226
|
!aiRunId) {
|
|
206
227
|
return exports.NO_INVESTIGATION_CODE_FIX_SUGGESTION;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import commonJsModule from "./InvestigationCodeFixSuggestion.js";
|
|
2
2
|
export const AUTOMATIC_CODE_FIX_BLOCKER_BY_RULE_BLOCKER = commonJsModule.AUTOMATIC_CODE_FIX_BLOCKER_BY_RULE_BLOCKER;
|
|
3
3
|
export const AutomaticCodeFixBlocker = commonJsModule.AutomaticCodeFixBlocker;
|
|
4
|
+
export const HIDDEN_INVESTIGATION_CODE_FIX_SUGGESTION = commonJsModule.HIDDEN_INVESTIGATION_CODE_FIX_SUGGESTION;
|
|
4
5
|
export const NO_INVESTIGATION_CODE_FIX_SUGGESTION = commonJsModule.NO_INVESTIGATION_CODE_FIX_SUGGESTION;
|
|
5
6
|
export const getInvestigationCodeFixSuggestion = commonJsModule.getInvestigationCodeFixSuggestion;
|
|
6
7
|
export const investigationCodeFixSuggestionToJSON = commonJsModule.investigationCodeFixSuggestionToJSON;
|
|
@@ -49,6 +49,7 @@ export interface ProfileFixSuggestion extends ProfileFixOffer {
|
|
|
49
49
|
repository: ProfileFixRepository | null;
|
|
50
50
|
repositories: Array<ProfileFixRepository>;
|
|
51
51
|
taskId: string | null;
|
|
52
|
+
isHidden?: boolean | undefined;
|
|
52
53
|
}
|
|
53
54
|
export declare const NO_PROFILE_FIX_SUGGESTION: ProfileFixSuggestion;
|
|
54
55
|
export declare function parseProfileHotspotEvidence(value: unknown): ProfileHotspotEvidence | null;
|
|
@@ -49,6 +49,7 @@ export interface ProfileFixSuggestion extends ProfileFixOffer {
|
|
|
49
49
|
repository: ProfileFixRepository | null;
|
|
50
50
|
repositories: Array<ProfileFixRepository>;
|
|
51
51
|
taskId: string | null;
|
|
52
|
+
isHidden?: boolean | undefined;
|
|
52
53
|
}
|
|
53
54
|
export declare const NO_PROFILE_FIX_SUGGESTION: ProfileFixSuggestion;
|
|
54
55
|
export declare function parseProfileHotspotEvidence(value: unknown): ProfileHotspotEvidence | null;
|
|
@@ -240,9 +240,10 @@ function parseBlocker(value) {
|
|
|
240
240
|
/*
|
|
241
241
|
* Reads the suggestion route's answer. Whatever does not hold together - a
|
|
242
242
|
* fix offered for a function the rule would not offer, nowhere to ask it, a
|
|
243
|
-
* set-up step that does not say what it is, work in progress with no task
|
|
244
|
-
*
|
|
245
|
-
* does not fully
|
|
243
|
+
* set-up step that does not say what it is, work in progress with no task
|
|
244
|
+
* (but one hidden from the person, which has none) - reads as no
|
|
245
|
+
* suggestion, so the panel never draws an action the answer does not fully
|
|
246
|
+
* back.
|
|
246
247
|
*/
|
|
247
248
|
function parseProfileFixSuggestion(value) {
|
|
248
249
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
@@ -274,6 +275,16 @@ function parseProfileFixSuggestion(value) {
|
|
|
274
275
|
? record["taskId"]
|
|
275
276
|
: null;
|
|
276
277
|
if (offer === SuggestionOffer_1.default.InProgress) {
|
|
278
|
+
// A task hidden from the person links to nothing, whatever the wire says.
|
|
279
|
+
if (record["isHidden"] === true) {
|
|
280
|
+
return {
|
|
281
|
+
...exports.NO_PROFILE_FIX_SUGGESTION,
|
|
282
|
+
offer,
|
|
283
|
+
reason,
|
|
284
|
+
evidence,
|
|
285
|
+
isHidden: true,
|
|
286
|
+
};
|
|
287
|
+
}
|
|
277
288
|
if (!taskId) {
|
|
278
289
|
return exports.NO_PROFILE_FIX_SUGGESTION;
|
|
279
290
|
}
|
|
@@ -333,6 +344,7 @@ function profileFixSuggestionToJSON(suggestion) {
|
|
|
333
344
|
repositories: suggestion.repositories.map((repository) => {
|
|
334
345
|
return { id: repository.id, name: repository.name };
|
|
335
346
|
}),
|
|
336
|
-
taskId: suggestion.taskId,
|
|
347
|
+
taskId: suggestion.isHidden ? null : suggestion.taskId,
|
|
348
|
+
...(suggestion.isHidden ? { isHidden: true } : {}),
|
|
337
349
|
};
|
|
338
350
|
}
|
|
@@ -12,9 +12,11 @@ export interface TelemetryAiFixSuggestion {
|
|
|
12
12
|
repository: TelemetryAiFixRepository | null;
|
|
13
13
|
repositories: Array<TelemetryAiFixRepository>;
|
|
14
14
|
taskId: string | null;
|
|
15
|
+
isHidden?: boolean | undefined;
|
|
15
16
|
recipe?: string | undefined;
|
|
16
17
|
}
|
|
17
18
|
export declare const NO_TELEMETRY_AI_FIX_SUGGESTION: TelemetryAiFixSuggestion;
|
|
19
|
+
export declare const HIDDEN_TELEMETRY_AI_FIX_SUGGESTION: TelemetryAiFixSuggestion;
|
|
18
20
|
export declare const TELEMETRY_AI_FIX_CONNECT_REPOSITORY_MESSAGE: string;
|
|
19
21
|
export interface TelemetryAiFixOfferInput {
|
|
20
22
|
isAiEnabled: boolean;
|
|
@@ -12,9 +12,11 @@ export interface TelemetryAiFixSuggestion {
|
|
|
12
12
|
repository: TelemetryAiFixRepository | null;
|
|
13
13
|
repositories: Array<TelemetryAiFixRepository>;
|
|
14
14
|
taskId: string | null;
|
|
15
|
+
isHidden?: boolean | undefined;
|
|
15
16
|
recipe?: string | undefined;
|
|
16
17
|
}
|
|
17
18
|
export declare const NO_TELEMETRY_AI_FIX_SUGGESTION: TelemetryAiFixSuggestion;
|
|
19
|
+
export declare const HIDDEN_TELEMETRY_AI_FIX_SUGGESTION: TelemetryAiFixSuggestion;
|
|
18
20
|
export declare const TELEMETRY_AI_FIX_CONNECT_REPOSITORY_MESSAGE: string;
|
|
19
21
|
export interface TelemetryAiFixOfferInput {
|
|
20
22
|
isAiEnabled: boolean;
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.TELEMETRY_AI_FIX_CONNECT_REPOSITORY_MESSAGE = exports.NO_TELEMETRY_AI_FIX_SUGGESTION = void 0;
|
|
36
|
+
exports.TELEMETRY_AI_FIX_CONNECT_REPOSITORY_MESSAGE = exports.HIDDEN_TELEMETRY_AI_FIX_SUGGESTION = exports.NO_TELEMETRY_AI_FIX_SUGGESTION = void 0;
|
|
37
37
|
exports.getTelemetryAiFixOffer = getTelemetryAiFixOffer;
|
|
38
38
|
exports.parseTelemetryAiFixSuggestion = parseTelemetryAiFixSuggestion;
|
|
39
39
|
exports.telemetryAiFixSuggestionToJSON = telemetryAiFixSuggestionToJSON;
|
|
@@ -49,6 +49,12 @@ exports.NO_TELEMETRY_AI_FIX_SUGGESTION = {
|
|
|
49
49
|
repositories: [],
|
|
50
50
|
taskId: null,
|
|
51
51
|
};
|
|
52
|
+
// A fix on its way in a task hidden from the person: there, and nothing of it.
|
|
53
|
+
exports.HIDDEN_TELEMETRY_AI_FIX_SUGGESTION = {
|
|
54
|
+
...exports.NO_TELEMETRY_AI_FIX_SUGGESTION,
|
|
55
|
+
offer: SuggestionOffer_1.default.InProgress,
|
|
56
|
+
isHidden: true,
|
|
57
|
+
};
|
|
52
58
|
exports.TELEMETRY_AI_FIX_CONNECT_REPOSITORY_MESSAGE = "Connect the repository that holds this code in Code, so OneUptime AI can open a pull request in it.";
|
|
53
59
|
function getTelemetryAiFixOffer(input) {
|
|
54
60
|
const offer = (0, CodeFixSuggestion_1.getCodeFixOffer)({
|
|
@@ -94,9 +100,10 @@ function parseRepository(value) {
|
|
|
94
100
|
}
|
|
95
101
|
/*
|
|
96
102
|
* Reads the suggestion route's answer. Whatever does not hold together - an
|
|
97
|
-
* in-progress offer with no task
|
|
98
|
-
*
|
|
99
|
-
* an action the answer does
|
|
103
|
+
* in-progress offer with no task (but one hidden from the person, which has
|
|
104
|
+
* none), a set-up step with no blocker, an action with nowhere to ask it -
|
|
105
|
+
* reads as no suggestion, so the page never draws an action the answer does
|
|
106
|
+
* not fully back.
|
|
100
107
|
*/
|
|
101
108
|
function parseTelemetryAiFixSuggestion(value) {
|
|
102
109
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
@@ -109,6 +116,10 @@ function parseTelemetryAiFixSuggestion(value) {
|
|
|
109
116
|
}
|
|
110
117
|
const taskId = readText(record["taskId"]);
|
|
111
118
|
if (offer === SuggestionOffer_1.default.InProgress) {
|
|
119
|
+
// A task hidden from the person links to nothing, whatever the wire says.
|
|
120
|
+
if (record["isHidden"] === true) {
|
|
121
|
+
return exports.HIDDEN_TELEMETRY_AI_FIX_SUGGESTION;
|
|
122
|
+
}
|
|
112
123
|
return taskId
|
|
113
124
|
? { ...exports.NO_TELEMETRY_AI_FIX_SUGGESTION, offer, taskId }
|
|
114
125
|
: exports.NO_TELEMETRY_AI_FIX_SUGGESTION;
|
|
@@ -161,7 +172,8 @@ function telemetryAiFixSuggestionToJSON(suggestion) {
|
|
|
161
172
|
repositories: suggestion.repositories.map((repository) => {
|
|
162
173
|
return { id: repository.id, name: repository.name };
|
|
163
174
|
}),
|
|
164
|
-
taskId: suggestion.taskId,
|
|
175
|
+
taskId: suggestion.isHidden ? null : suggestion.taskId,
|
|
176
|
+
...(suggestion.isHidden ? { isHidden: true } : {}),
|
|
165
177
|
...(suggestion.recipe ? { recipe: suggestion.recipe } : {}),
|
|
166
178
|
};
|
|
167
179
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import commonJsModule from "./TelemetryAiFixSuggestion.js";
|
|
2
|
+
export const HIDDEN_TELEMETRY_AI_FIX_SUGGESTION = commonJsModule.HIDDEN_TELEMETRY_AI_FIX_SUGGESTION;
|
|
2
3
|
export const NO_TELEMETRY_AI_FIX_SUGGESTION = commonJsModule.NO_TELEMETRY_AI_FIX_SUGGESTION;
|
|
3
4
|
export const TELEMETRY_AI_FIX_CONNECT_REPOSITORY_MESSAGE = commonJsModule.TELEMETRY_AI_FIX_CONNECT_REPOSITORY_MESSAGE;
|
|
4
5
|
export const getTelemetryAiFixOffer = commonJsModule.getTelemetryAiFixOffer;
|