@oneuptime/common 14.0.94 → 14.0.96
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/ExceptionInstance.d.mts +2 -0
- package/Models/AnalyticsModels/ExceptionInstance.d.ts +2 -0
- package/Models/AnalyticsModels/ExceptionInstance.js +7 -0
- package/Models/AnalyticsModels/Log.d.mts +2 -0
- package/Models/AnalyticsModels/Log.d.ts +2 -0
- package/Models/AnalyticsModels/Log.js +7 -0
- package/Models/AnalyticsModels/SecurityEvent.d.mts +8 -0
- package/Models/AnalyticsModels/SecurityEvent.d.ts +8 -0
- package/Models/AnalyticsModels/SecurityEvent.js +55 -0
- package/Models/AnalyticsModels/Span.d.mts +4 -0
- package/Models/AnalyticsModels/Span.d.ts +4 -0
- package/Models/AnalyticsModels/Span.js +63 -0
- package/Models/DatabaseModels/CustomNotificationChannel.d.mts +16 -0
- package/Models/DatabaseModels/CustomNotificationChannel.d.ts +16 -0
- package/Models/DatabaseModels/CustomNotificationChannel.js +337 -0
- package/Models/DatabaseModels/CustomNotificationChannel.mjs +2 -0
- package/Models/DatabaseModels/DashboardPlaylist.d.mts +16 -0
- package/Models/DatabaseModels/DashboardPlaylist.d.ts +16 -0
- package/Models/DatabaseModels/DashboardPlaylist.js +314 -0
- package/Models/DatabaseModels/DashboardPlaylist.mjs +2 -0
- package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js +14 -37
- package/Models/DatabaseModels/DatabaseBaseModel/OnCallRuleBaseModel.d.mts +1 -0
- package/Models/DatabaseModels/DatabaseBaseModel/OnCallRuleBaseModel.d.ts +1 -0
- package/Models/DatabaseModels/DatabaseBaseModel/OnCallRuleBaseModel.js +27 -3
- package/Models/DatabaseModels/DetectionRuleException.d.mts +25 -0
- package/Models/DatabaseModels/DetectionRuleException.d.ts +25 -0
- package/Models/DatabaseModels/DetectionRuleException.js +412 -0
- package/Models/DatabaseModels/DetectionRuleException.mjs +2 -0
- package/Models/DatabaseModels/GlobalConfig.d.mts +5 -0
- package/Models/DatabaseModels/GlobalConfig.d.ts +5 -0
- package/Models/DatabaseModels/GlobalConfig.js +107 -0
- package/Models/DatabaseModels/Index.js +8 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.mts +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.ts +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +40 -0
- package/Models/DatabaseModels/SecurityTelemetrySource.d.mts +21 -0
- package/Models/DatabaseModels/SecurityTelemetrySource.d.ts +21 -0
- package/Models/DatabaseModels/SecurityTelemetrySource.js +357 -0
- package/Models/DatabaseModels/SecurityTelemetrySource.mjs +2 -0
- package/Models/DatabaseModels/TeamComplianceSetting.js +2 -2
- package/Models/DatabaseModels/TeamPermission.js +5 -7
- package/Models/DatabaseModels/UserNotificationRule.d.mts +3 -0
- package/Models/DatabaseModels/UserNotificationRule.d.ts +3 -0
- package/Models/DatabaseModels/UserNotificationRule.js +67 -0
- package/Models/DatabaseModels/UserNotificationSetting.d.mts +1 -0
- package/Models/DatabaseModels/UserNotificationSetting.d.ts +1 -0
- package/Models/DatabaseModels/UserNotificationSetting.js +26 -0
- package/Models/DatabaseModels/UserOnCallLogTimeline.d.mts +3 -0
- package/Models/DatabaseModels/UserOnCallLogTimeline.d.ts +3 -0
- package/Models/DatabaseModels/UserOnCallLogTimeline.js +53 -0
- package/Types/AI/AIChatPermissionMode.js +11 -5
- package/Types/AI/ResourceCardFacts.d.mts +11 -0
- package/Types/AI/ResourceCardFacts.d.ts +11 -0
- package/Types/AI/ResourceCardFacts.js +80 -0
- package/Types/AI/ResourceCardFacts.mjs +4 -0
- package/Types/AnalyticsDatabase/TableColumn.d.mts +4 -0
- package/Types/AnalyticsDatabase/TableColumn.d.ts +4 -0
- package/Types/AnalyticsDatabase/TableColumn.js +7 -0
- package/Types/AuditLog/Export/AuditLogExportDestinationCatalog.d.mts +2 -0
- package/Types/AuditLog/Export/AuditLogExportDestinationCatalog.d.ts +2 -0
- package/Types/AuditLog/Export/AuditLogExportDestinationCatalog.js +4 -0
- package/Types/Backup/BackupDestinationCatalog.d.mts +2 -0
- package/Types/Backup/BackupDestinationCatalog.d.ts +2 -0
- package/Types/Backup/BackupDestinationCatalog.js +8 -0
- package/Types/CallAndSMS/CallAndSmsGatewayPayload.d.mts +25 -0
- package/Types/CallAndSMS/CallAndSmsGatewayPayload.d.ts +25 -0
- package/Types/CallAndSMS/CallAndSmsGatewayPayload.js +86 -0
- package/Types/CallAndSMS/CallAndSmsGatewayPayload.mjs +6 -0
- package/Types/CallAndSMS/CallAndSmsProvider.d.mts +23 -0
- package/Types/CallAndSMS/CallAndSmsProvider.d.ts +23 -0
- package/Types/CallAndSMS/CallAndSmsProvider.js +107 -0
- package/Types/CallAndSMS/CallAndSmsProvider.mjs +7 -0
- package/Types/CloudConnection/CloudConnectionCatalog.d.mts +2 -0
- package/Types/CloudConnection/CloudConnectionCatalog.d.ts +2 -0
- package/Types/CloudConnection/CloudConnectionCatalog.js +4 -0
- package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.d.mts +95 -0
- package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.d.ts +95 -0
- package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.js +236 -0
- package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.mjs +16 -0
- package/Types/Dashboard/DashboardPlaylist.d.mts +21 -0
- package/Types/Dashboard/DashboardPlaylist.d.ts +21 -0
- package/Types/Dashboard/DashboardPlaylist.js +197 -0
- package/Types/Dashboard/DashboardPlaylist.mjs +19 -0
- package/Types/Database/TableColumn.d.mts +8 -0
- package/Types/Database/TableColumn.d.ts +8 -0
- package/Types/Database/TableColumn.js +69 -23
- package/Types/Database/TableColumn.mjs +1 -0
- package/Types/HeldPermissions.d.mts +2 -0
- package/Types/HeldPermissions.d.ts +2 -0
- package/Types/HeldPermissions.js +32 -8
- package/Types/Icon/IconProp.d.mts +3 -0
- package/Types/Icon/IconProp.d.ts +3 -0
- package/Types/Icon/IconProp.js +4 -0
- package/Types/JSONFunctions.js +16 -1
- package/Types/LlmObservability/LlmConnectionCatalog.d.mts +2 -0
- package/Types/LlmObservability/LlmConnectionCatalog.d.ts +2 -0
- package/Types/LlmObservability/LlmConnectionCatalog.js +8 -0
- package/Types/Monitor/MonitorType.js +5 -4
- package/Types/Monitor/TelemetryAlertRule.d.mts +111 -0
- package/Types/Monitor/TelemetryAlertRule.d.ts +111 -0
- package/Types/Monitor/TelemetryAlertRule.js +886 -0
- package/Types/Monitor/TelemetryAlertRule.mjs +5 -0
- package/Types/Monitor/TelemetryRulePreview.d.mts +57 -0
- package/Types/Monitor/TelemetryRulePreview.d.ts +57 -0
- package/Types/Monitor/TelemetryRulePreview.js +190 -0
- package/Types/Monitor/TelemetryRulePreview.mjs +6 -0
- package/Types/OnCallDutyPolicy/EveryNewEventRules.d.mts +23 -0
- package/Types/OnCallDutyPolicy/EveryNewEventRules.d.ts +23 -0
- package/Types/OnCallDutyPolicy/EveryNewEventRules.js +105 -0
- package/Types/OnCallDutyPolicy/EveryNewEventRules.mjs +9 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.d.mts +3 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.d.ts +3 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.js +23 -8
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.mjs +2 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.d.mts +47 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.d.ts +47 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.js +122 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyAiHold.mjs +12 -0
- package/Types/OnCallDutyPolicy/OnCallRuleWhenToPage.d.mts +2 -1
- package/Types/OnCallDutyPolicy/OnCallRuleWhenToPage.d.ts +2 -1
- package/Types/OnCallDutyPolicy/OnCallRuleWhenToPage.js +10 -1
- package/Types/Permission.d.mts +10 -0
- package/Types/Permission.d.ts +10 -0
- package/Types/Permission.js +83 -19
- package/Types/ProviderLogo/ProviderLogo.d.mts +87 -0
- package/Types/ProviderLogo/ProviderLogo.d.ts +87 -0
- package/Types/ProviderLogo/ProviderLogo.js +215 -0
- package/Types/ProviderLogo/ProviderLogo.mjs +6 -0
- package/Types/PushNotification/PushNotificationsTurnedOff.d.mts +3 -0
- package/Types/PushNotification/PushNotificationsTurnedOff.d.ts +3 -0
- package/Types/PushNotification/PushNotificationsTurnedOff.js +32 -0
- package/Types/PushNotification/PushNotificationsTurnedOff.mjs +4 -0
- package/Types/RollingTime/RollingTimeUtil.js +20 -10
- package/Types/Runbook/RunbookTriggerType.d.mts +2 -1
- package/Types/Runbook/RunbookTriggerType.d.ts +2 -1
- package/Types/Runbook/RunbookTriggerType.js +5 -1
- package/Types/SecurityCase/SecurityCaseContext.d.mts +188 -0
- package/Types/SecurityCase/SecurityCaseContext.d.ts +188 -0
- package/Types/SecurityCase/SecurityCaseContext.js +165 -0
- package/Types/SecurityCase/SecurityCaseContext.mjs +30 -0
- package/Types/SecurityCase/SecurityEntityRisk.d.mts +11 -0
- package/Types/SecurityCase/SecurityEntityRisk.d.ts +11 -0
- package/Types/SecurityCase/SecurityEntityRisk.js +9 -1
- package/Types/SecurityCase/SecurityEntityRisk.mjs +1 -0
- package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.d.mts +2 -0
- package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.d.ts +2 -0
- package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +9 -0
- package/Types/SecurityEvent/Destinations/SecurityEventDestinationCatalog.d.mts +2 -0
- package/Types/SecurityEvent/Destinations/SecurityEventDestinationCatalog.d.ts +2 -0
- package/Types/SecurityEvent/Destinations/SecurityEventDestinationCatalog.js +5 -0
- package/Types/SecurityEvent/DetectionRetrohunt.d.mts +38 -0
- package/Types/SecurityEvent/DetectionRetrohunt.d.ts +38 -0
- package/Types/SecurityEvent/DetectionRetrohunt.js +147 -0
- package/Types/SecurityEvent/DetectionRetrohunt.mjs +10 -0
- package/Types/SecurityEvent/DetectionRuleDataKind.d.mts +5 -1
- package/Types/SecurityEvent/DetectionRuleDataKind.d.ts +5 -1
- package/Types/SecurityEvent/DetectionRuleDataKind.js +42 -0
- package/Types/SecurityEvent/DetectionRuleException.d.mts +65 -0
- package/Types/SecurityEvent/DetectionRuleException.d.ts +65 -0
- package/Types/SecurityEvent/DetectionRuleException.js +441 -0
- package/Types/SecurityEvent/DetectionRuleException.mjs +24 -0
- package/Types/SecurityEvent/DetectionRuleLibrary.js +330 -0
- package/Types/SecurityEvent/NormalizedSecurityEvent.d.mts +5 -0
- package/Types/SecurityEvent/NormalizedSecurityEvent.d.ts +5 -0
- package/Types/SecurityEvent/SecurityAttackCampaign.d.mts +31 -0
- package/Types/SecurityEvent/SecurityAttackCampaign.d.ts +31 -0
- package/Types/SecurityEvent/SecurityAttackCampaign.js +81 -0
- package/Types/SecurityEvent/SecurityAttackCampaign.mjs +8 -0
- package/Types/SecurityEvent/SecurityEventRequestOutcome.d.mts +28 -0
- package/Types/SecurityEvent/SecurityEventRequestOutcome.d.ts +28 -0
- package/Types/SecurityEvent/SecurityEventRequestOutcome.js +78 -0
- package/Types/SecurityEvent/SecurityEventRequestOutcome.mjs +6 -0
- package/Types/SecurityEvent/SecurityTelemetrySource.d.mts +39 -0
- package/Types/SecurityEvent/SecurityTelemetrySource.d.ts +39 -0
- package/Types/SecurityEvent/SecurityTelemetrySource.js +127 -0
- package/Types/SecurityEvent/SecurityTelemetrySource.mjs +12 -0
- package/Types/SecurityEvent/TurnOnRecommended.d.mts +2 -0
- package/Types/SecurityEvent/TurnOnRecommended.d.ts +2 -0
- package/Types/SecurityEvent/TurnOnRecommended.js +7 -0
- package/Types/SecurityPlaybook/SecurityPlaybookAction.d.mts +7 -1
- package/Types/SecurityPlaybook/SecurityPlaybookAction.d.ts +7 -1
- package/Types/SecurityPlaybook/SecurityPlaybookAction.js +46 -0
- package/Types/SecurityPlaybook/SecurityPlaybookAction.mjs +1 -0
- package/Types/SecurityPlaybook/SecurityPlaybookStep.d.mts +10 -0
- package/Types/SecurityPlaybook/SecurityPlaybookStep.d.ts +10 -0
- package/Types/SecurityPlaybook/SecurityPlaybookStep.js +37 -1
- package/Types/SecurityPlaybook/SecurityPlaybookStep.mjs +1 -0
- package/Types/SecurityPlaybook/SecurityPlaybookTemplates.js +17 -0
- package/Types/Team/ComplianceNotificationChannel.d.mts +2 -1
- package/Types/Team/ComplianceNotificationChannel.d.ts +2 -1
- package/Types/Team/ComplianceNotificationChannel.js +10 -1
- package/Types/Team/ComplianceRule.d.mts +8 -3
- package/Types/Team/ComplianceRule.d.ts +8 -3
- package/Types/Team/ComplianceRule.js +34 -22
- package/Types/Team/TeamComplianceStatus.d.mts +1 -0
- package/Types/Team/TeamComplianceStatus.d.ts +1 -0
- package/Types/Telemetry/OpenTelemetryGuides.d.mts +52 -0
- package/Types/Telemetry/OpenTelemetryGuides.d.ts +52 -0
- package/Types/Telemetry/OpenTelemetryGuides.js +419 -0
- package/Types/Telemetry/OpenTelemetryGuides.mjs +17 -0
- package/Types/Telemetry/TelemetrySavedViewState.d.mts +1 -0
- package/Types/Telemetry/TelemetrySavedViewState.d.ts +1 -0
- package/Types/Telemetry/TraceHealth.d.mts +24 -0
- package/Types/Telemetry/TraceHealth.d.ts +24 -0
- package/Types/Telemetry/TraceHealth.js +97 -0
- package/Types/Telemetry/TraceHealth.mjs +4 -0
- package/Types/Telemetry/TraceSpanType.d.mts +90 -0
- package/Types/Telemetry/TraceSpanType.d.ts +90 -0
- package/Types/Telemetry/TraceSpanType.js +238 -0
- package/Types/Telemetry/TraceSpanType.mjs +19 -0
- package/Types/Theme/ThemePreference.d.mts +26 -0
- package/Types/Theme/ThemePreference.d.ts +26 -0
- package/Types/Theme/ThemePreference.js +104 -0
- package/Types/Theme/ThemePreference.mjs +12 -0
- package/Types/Workflow/Component.d.mts +3 -0
- package/Types/Workflow/Component.d.ts +3 -0
- package/Types/Workflow/Components/Discord.js +2 -0
- package/Types/Workflow/Components/Mattermost.js +2 -0
- package/Types/Workflow/Components/MicrosoftTeams.js +2 -0
- package/Types/Workflow/Components/Slack.js +2 -0
- package/Types/Workflow/Components/Telegram.js +2 -0
- package/Types/Workflow/Components.js +6 -0
- package/Types/Workflow/Templates.js +5 -3
- package/Utils/ColorContrast.d.mts +0 -3
- package/Utils/ColorContrast.d.ts +0 -3
- package/Utils/ColorContrast.js +3 -41
- package/Utils/ColorContrast.mjs +0 -2
- package/Utils/NameInitials.d.mts +5 -0
- package/Utils/NameInitials.d.ts +5 -0
- package/Utils/NameInitials.js +92 -0
- package/Utils/NameInitials.mjs +6 -0
- package/Utils/OldestKeyCursor.d.mts +7 -0
- package/Utils/OldestKeyCursor.d.ts +7 -0
- package/Utils/OldestKeyCursor.js +68 -0
- package/Utils/OldestKeyCursor.mjs +2 -0
- package/Utils/Schema/OpenApiMetadataRegistry.d.mts +4 -0
- package/Utils/Schema/OpenApiMetadataRegistry.d.ts +4 -0
- package/Utils/Schema/OpenApiMetadataRegistry.js +20 -0
- package/Utils/Schema/OpenApiMetadataRegistry.mjs +2 -0
- package/Utils/Schema/Zod.js +6 -0
- package/Utils/SecurityCase/SecurityCaseImpactFacts.d.mts +41 -0
- package/Utils/SecurityCase/SecurityCaseImpactFacts.d.ts +41 -0
- package/Utils/SecurityCase/SecurityCaseImpactFacts.js +215 -0
- package/Utils/SecurityCase/SecurityCaseImpactFacts.mjs +6 -0
- package/Utils/SecurityCase/SecurityCaseStoryItems.d.mts +46 -0
- package/Utils/SecurityCase/SecurityCaseStoryItems.d.ts +46 -0
- package/Utils/SecurityCase/SecurityCaseStoryItems.js +327 -0
- package/Utils/SecurityCase/SecurityCaseStoryItems.mjs +17 -0
- package/Utils/SecurityEvent/LogParsers/SecurityLogLine.d.mts +5 -0
- package/Utils/SecurityEvent/LogParsers/SecurityLogLine.d.ts +5 -0
- package/Utils/SecurityEvent/LogParsers/SecurityLogLine.js +22 -2
- package/Utils/SecurityEvent/LogParsers/SecurityLogLine.mjs +2 -0
- package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.d.mts +20 -0
- package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.d.ts +20 -0
- package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.js +347 -31
- package/Utils/SecurityEvent/LogParsers/WebAttackLogParser.mjs +11 -0
- package/Utils/SecurityEvent/RequestFollowUp.d.mts +4 -0
- package/Utils/SecurityEvent/RequestFollowUp.d.ts +4 -0
- package/Utils/SecurityEvent/RequestFollowUp.js +127 -0
- package/Utils/SecurityEvent/RequestFollowUp.mjs +3 -0
- package/Utils/SecurityEvent/RequestOutcome.d.mts +80 -0
- package/Utils/SecurityEvent/RequestOutcome.d.ts +80 -0
- package/Utils/SecurityEvent/RequestOutcome.js +371 -0
- package/Utils/SecurityEvent/RequestOutcome.mjs +18 -0
- package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.d.mts +76 -0
- package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.d.ts +76 -0
- package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.js +348 -0
- package/Utils/SecurityEvent/TelemetryScan/AuditLogSignals.mjs +15 -0
- package/Utils/SecurityEvent/TelemetryScan/FlowSignals.d.mts +61 -0
- package/Utils/SecurityEvent/TelemetryScan/FlowSignals.d.ts +61 -0
- package/Utils/SecurityEvent/TelemetryScan/FlowSignals.js +260 -0
- package/Utils/SecurityEvent/TelemetryScan/FlowSignals.mjs +17 -0
- package/Utils/SecurityEvent/TelemetryScan/RumSignals.d.mts +30 -0
- package/Utils/SecurityEvent/TelemetryScan/RumSignals.d.ts +30 -0
- package/Utils/SecurityEvent/TelemetryScan/RumSignals.js +134 -0
- package/Utils/SecurityEvent/TelemetryScan/RumSignals.mjs +8 -0
- package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.d.mts +40 -0
- package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.d.ts +40 -0
- package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.js +190 -0
- package/Utils/SecurityEvent/TelemetryScan/TelemetrySecurityEvent.mjs +6 -0
- package/Utils/SecurityEvent/TelemetryScan/TraceSignals.d.mts +57 -0
- package/Utils/SecurityEvent/TelemetryScan/TraceSignals.d.ts +57 -0
- package/Utils/SecurityEvent/TelemetryScan/TraceSignals.js +491 -0
- package/Utils/SecurityEvent/TelemetryScan/TraceSignals.mjs +27 -0
- package/Utils/Telemetry/EntrySpan.d.mts +8 -0
- package/Utils/Telemetry/EntrySpan.d.ts +8 -0
- package/Utils/Telemetry/EntrySpan.js +53 -0
- package/Utils/Telemetry/EntrySpan.mjs +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type Dictionary from "../Dictionary.mjs";
|
|
2
|
+
export declare enum TraceSpanType {
|
|
3
|
+
Entry = "entry",
|
|
4
|
+
Root = "root",
|
|
5
|
+
All = "all"
|
|
6
|
+
}
|
|
7
|
+
export declare const DEFAULT_TRACE_SPAN_TYPE: TraceSpanType;
|
|
8
|
+
export declare const TRACE_SPAN_TYPE_URL_PARAM: string;
|
|
9
|
+
export declare const LEGACY_ROOT_ONLY_URL_PARAM: string;
|
|
10
|
+
export interface TraceSpanTypeOption {
|
|
11
|
+
value: TraceSpanType;
|
|
12
|
+
label: string;
|
|
13
|
+
description: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const TRACE_SPAN_TYPE_OPTIONS: ReadonlyArray<TraceSpanTypeOption>;
|
|
16
|
+
export declare const TRACE_SPAN_TYPE_HELP: string;
|
|
17
|
+
export declare function parseTraceSpanType(value: unknown): TraceSpanType | null;
|
|
18
|
+
export declare function getTraceSpanTypeLabel(spanType: TraceSpanType): string;
|
|
19
|
+
export type ReadUrlParamFunction = (name: string) => string | null | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* The span type a URL names, or null when it names none - so a page that
|
|
22
|
+
* only carries the choice (the Insights tab) can tell "said nothing" from
|
|
23
|
+
* "said the default".
|
|
24
|
+
*
|
|
25
|
+
* `spanType` wins. A link from before it carries `rootOnly=true`, which
|
|
26
|
+
* still opens Root spans. `rootOnly=false` was never written - it would have
|
|
27
|
+
* meant the old default, every span - and says nothing here, like an
|
|
28
|
+
* unknown value.
|
|
29
|
+
*/
|
|
30
|
+
export declare function readNamedTraceSpanTypeFromUrl(read: ReadUrlParamFunction): TraceSpanType | null;
|
|
31
|
+
export declare function readTraceSpanTypeFromUrl(read: ReadUrlParamFunction, defaultSpanType?: TraceSpanType): TraceSpanType;
|
|
32
|
+
/**
|
|
33
|
+
* The params that write a span type into the explorer's URL, nulls meaning
|
|
34
|
+
* "remove". The default is left out, so a plain link stays plain, and the
|
|
35
|
+
* old `rootOnly` is always removed: a link the explorer rewrites carries
|
|
36
|
+
* `spanType` only.
|
|
37
|
+
*/
|
|
38
|
+
export declare function buildTraceSpanTypeUrlParams(spanType: TraceSpanType, defaultSpanType?: TraceSpanType): Dictionary<string | null>;
|
|
39
|
+
export interface TraceSpanTypeSavedViewFields {
|
|
40
|
+
spanType?: unknown;
|
|
41
|
+
rootOnly?: unknown;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The span type a saved view opens with. A view keeps showing what it showed
|
|
45
|
+
* when it was saved:
|
|
46
|
+
*
|
|
47
|
+
* - `spanType`, written since the choice had three answers;
|
|
48
|
+
* - else `rootOnly`, which every view saved before held: true was Root
|
|
49
|
+
* spans, and false was every span - the list had no other way to be -
|
|
50
|
+
* so it is All spans, not the new default. A view of database calls or
|
|
51
|
+
* client spans would otherwise come back empty;
|
|
52
|
+
* - else (a view from before either, or the empty state "clear the saved
|
|
53
|
+
* view" applies) the explorer's default.
|
|
54
|
+
*/
|
|
55
|
+
export declare function readTraceSpanTypeFromSavedView(state: TraceSpanTypeSavedViewFields | null | undefined, defaultSpanType?: TraceSpanType): TraceSpanType;
|
|
56
|
+
export declare function toTraceSpanTypeSavedViewFields(spanType: TraceSpanType): {
|
|
57
|
+
spanType: TraceSpanType;
|
|
58
|
+
rootOnly: boolean;
|
|
59
|
+
};
|
|
60
|
+
export declare function getTraceSpanTypeQuery(spanType: TraceSpanType): {
|
|
61
|
+
isEntrySpan?: boolean;
|
|
62
|
+
isRootSpan?: boolean;
|
|
63
|
+
};
|
|
64
|
+
export declare function getTraceSpanTypeRequestFlags(spanType: TraceSpanType): {
|
|
65
|
+
rootOnly: boolean;
|
|
66
|
+
entryOnly: boolean;
|
|
67
|
+
};
|
|
68
|
+
export interface TraceSpanTypeFacetBucket {
|
|
69
|
+
value: string;
|
|
70
|
+
count: number;
|
|
71
|
+
}
|
|
72
|
+
export interface TraceSpanTypeFacetAnswer {
|
|
73
|
+
isRootSpan?: Array<TraceSpanTypeFacetBucket> | undefined;
|
|
74
|
+
isEntrySpan?: Array<TraceSpanTypeFacetBucket> | undefined;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The Span Type facet's three rows from the facets endpoint's two exact
|
|
78
|
+
* counts, both taken over the same spans with the span type itself ignored:
|
|
79
|
+
* Entry spans the isEntrySpan "true" bucket, Root spans the isRootSpan "true"
|
|
80
|
+
* bucket, and All spans every span (the root and non-root buckets added up,
|
|
81
|
+
* or the entry and non-entry ones when only those came back). Always the
|
|
82
|
+
* three rows, in the order the explorer offers them; a count that did not
|
|
83
|
+
* come back is 0 (the endpoint names it in timedOutFacets).
|
|
84
|
+
*/
|
|
85
|
+
export declare function buildTraceSpanTypeFacetValues(answer: TraceSpanTypeFacetAnswer): Array<{
|
|
86
|
+
value: TraceSpanType;
|
|
87
|
+
count: number;
|
|
88
|
+
}>;
|
|
89
|
+
export declare function getTraceSpanTypeItemLabel(spanType: TraceSpanType): string;
|
|
90
|
+
export declare function getTraceSpanTypeChartTitle(spanType: TraceSpanType): string;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type Dictionary from "../Dictionary";
|
|
2
|
+
export declare enum TraceSpanType {
|
|
3
|
+
Entry = "entry",
|
|
4
|
+
Root = "root",
|
|
5
|
+
All = "all"
|
|
6
|
+
}
|
|
7
|
+
export declare const DEFAULT_TRACE_SPAN_TYPE: TraceSpanType;
|
|
8
|
+
export declare const TRACE_SPAN_TYPE_URL_PARAM: string;
|
|
9
|
+
export declare const LEGACY_ROOT_ONLY_URL_PARAM: string;
|
|
10
|
+
export interface TraceSpanTypeOption {
|
|
11
|
+
value: TraceSpanType;
|
|
12
|
+
label: string;
|
|
13
|
+
description: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const TRACE_SPAN_TYPE_OPTIONS: ReadonlyArray<TraceSpanTypeOption>;
|
|
16
|
+
export declare const TRACE_SPAN_TYPE_HELP: string;
|
|
17
|
+
export declare function parseTraceSpanType(value: unknown): TraceSpanType | null;
|
|
18
|
+
export declare function getTraceSpanTypeLabel(spanType: TraceSpanType): string;
|
|
19
|
+
export type ReadUrlParamFunction = (name: string) => string | null | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* The span type a URL names, or null when it names none - so a page that
|
|
22
|
+
* only carries the choice (the Insights tab) can tell "said nothing" from
|
|
23
|
+
* "said the default".
|
|
24
|
+
*
|
|
25
|
+
* `spanType` wins. A link from before it carries `rootOnly=true`, which
|
|
26
|
+
* still opens Root spans. `rootOnly=false` was never written - it would have
|
|
27
|
+
* meant the old default, every span - and says nothing here, like an
|
|
28
|
+
* unknown value.
|
|
29
|
+
*/
|
|
30
|
+
export declare function readNamedTraceSpanTypeFromUrl(read: ReadUrlParamFunction): TraceSpanType | null;
|
|
31
|
+
export declare function readTraceSpanTypeFromUrl(read: ReadUrlParamFunction, defaultSpanType?: TraceSpanType): TraceSpanType;
|
|
32
|
+
/**
|
|
33
|
+
* The params that write a span type into the explorer's URL, nulls meaning
|
|
34
|
+
* "remove". The default is left out, so a plain link stays plain, and the
|
|
35
|
+
* old `rootOnly` is always removed: a link the explorer rewrites carries
|
|
36
|
+
* `spanType` only.
|
|
37
|
+
*/
|
|
38
|
+
export declare function buildTraceSpanTypeUrlParams(spanType: TraceSpanType, defaultSpanType?: TraceSpanType): Dictionary<string | null>;
|
|
39
|
+
export interface TraceSpanTypeSavedViewFields {
|
|
40
|
+
spanType?: unknown;
|
|
41
|
+
rootOnly?: unknown;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The span type a saved view opens with. A view keeps showing what it showed
|
|
45
|
+
* when it was saved:
|
|
46
|
+
*
|
|
47
|
+
* - `spanType`, written since the choice had three answers;
|
|
48
|
+
* - else `rootOnly`, which every view saved before held: true was Root
|
|
49
|
+
* spans, and false was every span - the list had no other way to be -
|
|
50
|
+
* so it is All spans, not the new default. A view of database calls or
|
|
51
|
+
* client spans would otherwise come back empty;
|
|
52
|
+
* - else (a view from before either, or the empty state "clear the saved
|
|
53
|
+
* view" applies) the explorer's default.
|
|
54
|
+
*/
|
|
55
|
+
export declare function readTraceSpanTypeFromSavedView(state: TraceSpanTypeSavedViewFields | null | undefined, defaultSpanType?: TraceSpanType): TraceSpanType;
|
|
56
|
+
export declare function toTraceSpanTypeSavedViewFields(spanType: TraceSpanType): {
|
|
57
|
+
spanType: TraceSpanType;
|
|
58
|
+
rootOnly: boolean;
|
|
59
|
+
};
|
|
60
|
+
export declare function getTraceSpanTypeQuery(spanType: TraceSpanType): {
|
|
61
|
+
isEntrySpan?: boolean;
|
|
62
|
+
isRootSpan?: boolean;
|
|
63
|
+
};
|
|
64
|
+
export declare function getTraceSpanTypeRequestFlags(spanType: TraceSpanType): {
|
|
65
|
+
rootOnly: boolean;
|
|
66
|
+
entryOnly: boolean;
|
|
67
|
+
};
|
|
68
|
+
export interface TraceSpanTypeFacetBucket {
|
|
69
|
+
value: string;
|
|
70
|
+
count: number;
|
|
71
|
+
}
|
|
72
|
+
export interface TraceSpanTypeFacetAnswer {
|
|
73
|
+
isRootSpan?: Array<TraceSpanTypeFacetBucket> | undefined;
|
|
74
|
+
isEntrySpan?: Array<TraceSpanTypeFacetBucket> | undefined;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The Span Type facet's three rows from the facets endpoint's two exact
|
|
78
|
+
* counts, both taken over the same spans with the span type itself ignored:
|
|
79
|
+
* Entry spans the isEntrySpan "true" bucket, Root spans the isRootSpan "true"
|
|
80
|
+
* bucket, and All spans every span (the root and non-root buckets added up,
|
|
81
|
+
* or the entry and non-entry ones when only those came back). Always the
|
|
82
|
+
* three rows, in the order the explorer offers them; a count that did not
|
|
83
|
+
* come back is 0 (the endpoint names it in timedOutFacets).
|
|
84
|
+
*/
|
|
85
|
+
export declare function buildTraceSpanTypeFacetValues(answer: TraceSpanTypeFacetAnswer): Array<{
|
|
86
|
+
value: TraceSpanType;
|
|
87
|
+
count: number;
|
|
88
|
+
}>;
|
|
89
|
+
export declare function getTraceSpanTypeItemLabel(spanType: TraceSpanType): string;
|
|
90
|
+
export declare function getTraceSpanTypeChartTitle(spanType: TraceSpanType): string;
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TRACE_SPAN_TYPE_HELP = exports.TRACE_SPAN_TYPE_OPTIONS = exports.LEGACY_ROOT_ONLY_URL_PARAM = exports.TRACE_SPAN_TYPE_URL_PARAM = exports.DEFAULT_TRACE_SPAN_TYPE = exports.TraceSpanType = void 0;
|
|
4
|
+
exports.parseTraceSpanType = parseTraceSpanType;
|
|
5
|
+
exports.getTraceSpanTypeLabel = getTraceSpanTypeLabel;
|
|
6
|
+
exports.readNamedTraceSpanTypeFromUrl = readNamedTraceSpanTypeFromUrl;
|
|
7
|
+
exports.readTraceSpanTypeFromUrl = readTraceSpanTypeFromUrl;
|
|
8
|
+
exports.buildTraceSpanTypeUrlParams = buildTraceSpanTypeUrlParams;
|
|
9
|
+
exports.readTraceSpanTypeFromSavedView = readTraceSpanTypeFromSavedView;
|
|
10
|
+
exports.toTraceSpanTypeSavedViewFields = toTraceSpanTypeSavedViewFields;
|
|
11
|
+
exports.getTraceSpanTypeQuery = getTraceSpanTypeQuery;
|
|
12
|
+
exports.getTraceSpanTypeRequestFlags = getTraceSpanTypeRequestFlags;
|
|
13
|
+
exports.buildTraceSpanTypeFacetValues = buildTraceSpanTypeFacetValues;
|
|
14
|
+
exports.getTraceSpanTypeItemLabel = getTraceSpanTypeItemLabel;
|
|
15
|
+
exports.getTraceSpanTypeChartTitle = getTraceSpanTypeChartTitle;
|
|
16
|
+
/*
|
|
17
|
+
* Which spans the traces explorer lists - its "Span Type" choice.
|
|
18
|
+
*
|
|
19
|
+
* Entry spans (the default): where a request or message enters a service -
|
|
20
|
+
* a root span, or a SERVER or CONSUMER span whatever its parent
|
|
21
|
+
* (Utils/Telemetry/EntrySpan; stored as Span.isEntrySpan).
|
|
22
|
+
* Root spans: where a trace starts (Span.isRootSpan).
|
|
23
|
+
* All spans: every operation, database calls and internal steps included.
|
|
24
|
+
*
|
|
25
|
+
* Entry spans are the default because both others mislead: a service behind a
|
|
26
|
+
* gateway or a queue never owns a trace root, so a root-only list hides every
|
|
27
|
+
* request it served, and a list of every span is mostly database calls,
|
|
28
|
+
* eBPF's "in queue" / "processing" steps and Redis commands - rows that open
|
|
29
|
+
* a one-span trace.
|
|
30
|
+
*
|
|
31
|
+
* Pure, so the URL, saved-view and request mappings are unit-tested on their
|
|
32
|
+
* own (App/Tests and Common/Tests).
|
|
33
|
+
*/
|
|
34
|
+
var TraceSpanType;
|
|
35
|
+
(function (TraceSpanType) {
|
|
36
|
+
TraceSpanType["Entry"] = "entry";
|
|
37
|
+
TraceSpanType["Root"] = "root";
|
|
38
|
+
TraceSpanType["All"] = "all";
|
|
39
|
+
})(TraceSpanType || (exports.TraceSpanType = TraceSpanType = {}));
|
|
40
|
+
exports.DEFAULT_TRACE_SPAN_TYPE = TraceSpanType.Entry;
|
|
41
|
+
/*
|
|
42
|
+
* The explorer's URL param. `rootOnly=true` is what a link said before it,
|
|
43
|
+
* and still opens Root spans.
|
|
44
|
+
*/
|
|
45
|
+
exports.TRACE_SPAN_TYPE_URL_PARAM = "spanType";
|
|
46
|
+
exports.LEGACY_ROOT_ONLY_URL_PARAM = "rootOnly";
|
|
47
|
+
// In the order the explorer offers them.
|
|
48
|
+
exports.TRACE_SPAN_TYPE_OPTIONS = [
|
|
49
|
+
{
|
|
50
|
+
value: TraceSpanType.Entry,
|
|
51
|
+
label: "Entry spans",
|
|
52
|
+
description: "where a request or message enters a service",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
value: TraceSpanType.Root,
|
|
56
|
+
label: "Root spans",
|
|
57
|
+
description: "where a trace starts",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
value: TraceSpanType.All,
|
|
61
|
+
label: "All spans",
|
|
62
|
+
description: "every operation, including database calls and internal steps",
|
|
63
|
+
},
|
|
64
|
+
];
|
|
65
|
+
// The one line of help the Span Type choice carries.
|
|
66
|
+
exports.TRACE_SPAN_TYPE_HELP = exports.TRACE_SPAN_TYPE_OPTIONS.map((option) => {
|
|
67
|
+
return `${option.label}: ${option.description}.`;
|
|
68
|
+
}).join(" ");
|
|
69
|
+
function parseTraceSpanType(value) {
|
|
70
|
+
if (typeof value !== "string") {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
const normalized = value.trim().toLowerCase();
|
|
74
|
+
for (const option of exports.TRACE_SPAN_TYPE_OPTIONS) {
|
|
75
|
+
if (option.value === normalized) {
|
|
76
|
+
return option.value;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
function getTraceSpanTypeLabel(spanType) {
|
|
82
|
+
for (const option of exports.TRACE_SPAN_TYPE_OPTIONS) {
|
|
83
|
+
if (option.value === spanType) {
|
|
84
|
+
return option.label;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return spanType;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The span type a URL names, or null when it names none - so a page that
|
|
91
|
+
* only carries the choice (the Insights tab) can tell "said nothing" from
|
|
92
|
+
* "said the default".
|
|
93
|
+
*
|
|
94
|
+
* `spanType` wins. A link from before it carries `rootOnly=true`, which
|
|
95
|
+
* still opens Root spans. `rootOnly=false` was never written - it would have
|
|
96
|
+
* meant the old default, every span - and says nothing here, like an
|
|
97
|
+
* unknown value.
|
|
98
|
+
*/
|
|
99
|
+
function readNamedTraceSpanTypeFromUrl(read) {
|
|
100
|
+
const named = parseTraceSpanType(read(exports.TRACE_SPAN_TYPE_URL_PARAM));
|
|
101
|
+
if (named) {
|
|
102
|
+
return named;
|
|
103
|
+
}
|
|
104
|
+
const rootOnly = read(exports.LEGACY_ROOT_ONLY_URL_PARAM);
|
|
105
|
+
if (typeof rootOnly === "string" &&
|
|
106
|
+
rootOnly.trim().toLowerCase() === "true") {
|
|
107
|
+
return TraceSpanType.Root;
|
|
108
|
+
}
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
// What the explorer opens on: what the URL names, else its default.
|
|
112
|
+
function readTraceSpanTypeFromUrl(read, defaultSpanType = exports.DEFAULT_TRACE_SPAN_TYPE) {
|
|
113
|
+
var _a;
|
|
114
|
+
return (_a = readNamedTraceSpanTypeFromUrl(read)) !== null && _a !== void 0 ? _a : defaultSpanType;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The params that write a span type into the explorer's URL, nulls meaning
|
|
118
|
+
* "remove". The default is left out, so a plain link stays plain, and the
|
|
119
|
+
* old `rootOnly` is always removed: a link the explorer rewrites carries
|
|
120
|
+
* `spanType` only.
|
|
121
|
+
*/
|
|
122
|
+
function buildTraceSpanTypeUrlParams(spanType, defaultSpanType = exports.DEFAULT_TRACE_SPAN_TYPE) {
|
|
123
|
+
return {
|
|
124
|
+
[exports.TRACE_SPAN_TYPE_URL_PARAM]: spanType === defaultSpanType ? null : spanType,
|
|
125
|
+
[exports.LEGACY_ROOT_ONLY_URL_PARAM]: null,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* The span type a saved view opens with. A view keeps showing what it showed
|
|
130
|
+
* when it was saved:
|
|
131
|
+
*
|
|
132
|
+
* - `spanType`, written since the choice had three answers;
|
|
133
|
+
* - else `rootOnly`, which every view saved before held: true was Root
|
|
134
|
+
* spans, and false was every span - the list had no other way to be -
|
|
135
|
+
* so it is All spans, not the new default. A view of database calls or
|
|
136
|
+
* client spans would otherwise come back empty;
|
|
137
|
+
* - else (a view from before either, or the empty state "clear the saved
|
|
138
|
+
* view" applies) the explorer's default.
|
|
139
|
+
*/
|
|
140
|
+
function readTraceSpanTypeFromSavedView(state, defaultSpanType = exports.DEFAULT_TRACE_SPAN_TYPE) {
|
|
141
|
+
const named = parseTraceSpanType(state === null || state === void 0 ? void 0 : state.spanType);
|
|
142
|
+
if (named) {
|
|
143
|
+
return named;
|
|
144
|
+
}
|
|
145
|
+
if ((state === null || state === void 0 ? void 0 : state.rootOnly) === true) {
|
|
146
|
+
return TraceSpanType.Root;
|
|
147
|
+
}
|
|
148
|
+
if ((state === null || state === void 0 ? void 0 : state.rootOnly) === false) {
|
|
149
|
+
return TraceSpanType.All;
|
|
150
|
+
}
|
|
151
|
+
return defaultSpanType;
|
|
152
|
+
}
|
|
153
|
+
/*
|
|
154
|
+
* What a saved view stores. `rootOnly` is kept beside `spanType` for any
|
|
155
|
+
* reader that only knows it (an older Dashboard during an upgrade): true
|
|
156
|
+
* exactly when the view is of root spans.
|
|
157
|
+
*/
|
|
158
|
+
function toTraceSpanTypeSavedViewFields(spanType) {
|
|
159
|
+
return {
|
|
160
|
+
spanType: spanType,
|
|
161
|
+
rootOnly: spanType === TraceSpanType.Root,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
/*
|
|
165
|
+
* The span list's query predicate: isEntrySpan or isRootSpan, nothing for
|
|
166
|
+
* every span.
|
|
167
|
+
*/
|
|
168
|
+
function getTraceSpanTypeQuery(spanType) {
|
|
169
|
+
if (spanType === TraceSpanType.Entry) {
|
|
170
|
+
return { isEntrySpan: true };
|
|
171
|
+
}
|
|
172
|
+
if (spanType === TraceSpanType.Root) {
|
|
173
|
+
return { isRootSpan: true };
|
|
174
|
+
}
|
|
175
|
+
return {};
|
|
176
|
+
}
|
|
177
|
+
/*
|
|
178
|
+
* The same choice for the histogram, facet and analytics endpoints
|
|
179
|
+
* (TraceFilters), written out in full so a payload always says which.
|
|
180
|
+
*/
|
|
181
|
+
function getTraceSpanTypeRequestFlags(spanType) {
|
|
182
|
+
return {
|
|
183
|
+
rootOnly: spanType === TraceSpanType.Root,
|
|
184
|
+
entryOnly: spanType === TraceSpanType.Entry,
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
const isTrueBucket = (bucket) => {
|
|
188
|
+
return bucket.value === "true" || bucket.value === "1";
|
|
189
|
+
};
|
|
190
|
+
const sumOf = (buckets, keep) => {
|
|
191
|
+
let total = 0;
|
|
192
|
+
for (const bucket of buckets || []) {
|
|
193
|
+
if (keep(bucket)) {
|
|
194
|
+
total += Number(bucket.count) || 0;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return total;
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* The Span Type facet's three rows from the facets endpoint's two exact
|
|
201
|
+
* counts, both taken over the same spans with the span type itself ignored:
|
|
202
|
+
* Entry spans the isEntrySpan "true" bucket, Root spans the isRootSpan "true"
|
|
203
|
+
* bucket, and All spans every span (the root and non-root buckets added up,
|
|
204
|
+
* or the entry and non-entry ones when only those came back). Always the
|
|
205
|
+
* three rows, in the order the explorer offers them; a count that did not
|
|
206
|
+
* come back is 0 (the endpoint names it in timedOutFacets).
|
|
207
|
+
*/
|
|
208
|
+
function buildTraceSpanTypeFacetValues(answer) {
|
|
209
|
+
const allFromRoots = sumOf(answer.isRootSpan, () => {
|
|
210
|
+
return true;
|
|
211
|
+
});
|
|
212
|
+
const allFromEntries = sumOf(answer.isEntrySpan, () => {
|
|
213
|
+
return true;
|
|
214
|
+
});
|
|
215
|
+
const counts = {
|
|
216
|
+
[TraceSpanType.Entry]: sumOf(answer.isEntrySpan, isTrueBucket),
|
|
217
|
+
[TraceSpanType.Root]: sumOf(answer.isRootSpan, isTrueBucket),
|
|
218
|
+
[TraceSpanType.All]: (answer.isRootSpan || []).length > 0 ? allFromRoots : allFromEntries,
|
|
219
|
+
};
|
|
220
|
+
return exports.TRACE_SPAN_TYPE_OPTIONS.map((option) => {
|
|
221
|
+
return { value: option.value, count: counts[option.value] };
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
/*
|
|
225
|
+
* What the list's rows are called: a root span stands for its trace, so
|
|
226
|
+
* root spans read as traces; entry spans and every span are spans. (Not
|
|
227
|
+
* "entry spans": the total and the chart are sentences every Dashboard
|
|
228
|
+
* language words, and the Span Type facet already says which spans.)
|
|
229
|
+
*/
|
|
230
|
+
function getTraceSpanTypeItemLabel(spanType) {
|
|
231
|
+
return spanType === TraceSpanType.Root ? "traces" : "spans";
|
|
232
|
+
}
|
|
233
|
+
// The count chart's title, named like the rows it counts.
|
|
234
|
+
function getTraceSpanTypeChartTitle(spanType) {
|
|
235
|
+
return spanType === TraceSpanType.Root
|
|
236
|
+
? "Traces over time"
|
|
237
|
+
: "Spans over time";
|
|
238
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import commonJsModule from "./TraceSpanType.js";
|
|
2
|
+
export const DEFAULT_TRACE_SPAN_TYPE = commonJsModule.DEFAULT_TRACE_SPAN_TYPE;
|
|
3
|
+
export const LEGACY_ROOT_ONLY_URL_PARAM = commonJsModule.LEGACY_ROOT_ONLY_URL_PARAM;
|
|
4
|
+
export const TRACE_SPAN_TYPE_HELP = commonJsModule.TRACE_SPAN_TYPE_HELP;
|
|
5
|
+
export const TRACE_SPAN_TYPE_OPTIONS = commonJsModule.TRACE_SPAN_TYPE_OPTIONS;
|
|
6
|
+
export const TRACE_SPAN_TYPE_URL_PARAM = commonJsModule.TRACE_SPAN_TYPE_URL_PARAM;
|
|
7
|
+
export const TraceSpanType = commonJsModule.TraceSpanType;
|
|
8
|
+
export const buildTraceSpanTypeFacetValues = commonJsModule.buildTraceSpanTypeFacetValues;
|
|
9
|
+
export const buildTraceSpanTypeUrlParams = commonJsModule.buildTraceSpanTypeUrlParams;
|
|
10
|
+
export const getTraceSpanTypeChartTitle = commonJsModule.getTraceSpanTypeChartTitle;
|
|
11
|
+
export const getTraceSpanTypeItemLabel = commonJsModule.getTraceSpanTypeItemLabel;
|
|
12
|
+
export const getTraceSpanTypeLabel = commonJsModule.getTraceSpanTypeLabel;
|
|
13
|
+
export const getTraceSpanTypeQuery = commonJsModule.getTraceSpanTypeQuery;
|
|
14
|
+
export const getTraceSpanTypeRequestFlags = commonJsModule.getTraceSpanTypeRequestFlags;
|
|
15
|
+
export const parseTraceSpanType = commonJsModule.parseTraceSpanType;
|
|
16
|
+
export const readNamedTraceSpanTypeFromUrl = commonJsModule.readNamedTraceSpanTypeFromUrl;
|
|
17
|
+
export const readTraceSpanTypeFromSavedView = commonJsModule.readTraceSpanTypeFromSavedView;
|
|
18
|
+
export const readTraceSpanTypeFromUrl = commonJsModule.readTraceSpanTypeFromUrl;
|
|
19
|
+
export const toTraceSpanTypeSavedViewFields = commonJsModule.toTraceSpanTypeSavedViewFields;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare enum Theme {
|
|
2
|
+
Light = "light",
|
|
3
|
+
Dark = "dark"
|
|
4
|
+
}
|
|
5
|
+
export declare enum ThemePreference {
|
|
6
|
+
Light = "light",
|
|
7
|
+
Dark = "dark",
|
|
8
|
+
System = "system"
|
|
9
|
+
}
|
|
10
|
+
export declare const THEME_PREFERENCES: ReadonlyArray<ThemePreference>;
|
|
11
|
+
export declare const DEFAULT_THEME_PREFERENCE: ThemePreference;
|
|
12
|
+
export declare const THEME_STORAGE_KEY: string;
|
|
13
|
+
export declare const DARK_COLOR_SCHEME_MEDIA_QUERY: string;
|
|
14
|
+
export declare const THEME_COLORS: Readonly<Record<Theme, string>>;
|
|
15
|
+
export declare function isThemePreference(value: unknown): value is ThemePreference;
|
|
16
|
+
/**
|
|
17
|
+
* The pick a kept value stands for. Anything else - nothing at all, a value
|
|
18
|
+
* an older or newer version wrote, a value typed into the browser's tools -
|
|
19
|
+
* is no pick, so the page follows the device.
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseThemePreference(value: unknown): ThemePreference;
|
|
22
|
+
export declare function getThemeForPreference(data: {
|
|
23
|
+
preference: ThemePreference;
|
|
24
|
+
prefersDark: boolean;
|
|
25
|
+
}): Theme;
|
|
26
|
+
export declare function doesThemePreferenceFollowDevice(preference: ThemePreference): boolean;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare enum Theme {
|
|
2
|
+
Light = "light",
|
|
3
|
+
Dark = "dark"
|
|
4
|
+
}
|
|
5
|
+
export declare enum ThemePreference {
|
|
6
|
+
Light = "light",
|
|
7
|
+
Dark = "dark",
|
|
8
|
+
System = "system"
|
|
9
|
+
}
|
|
10
|
+
export declare const THEME_PREFERENCES: ReadonlyArray<ThemePreference>;
|
|
11
|
+
export declare const DEFAULT_THEME_PREFERENCE: ThemePreference;
|
|
12
|
+
export declare const THEME_STORAGE_KEY: string;
|
|
13
|
+
export declare const DARK_COLOR_SCHEME_MEDIA_QUERY: string;
|
|
14
|
+
export declare const THEME_COLORS: Readonly<Record<Theme, string>>;
|
|
15
|
+
export declare function isThemePreference(value: unknown): value is ThemePreference;
|
|
16
|
+
/**
|
|
17
|
+
* The pick a kept value stands for. Anything else - nothing at all, a value
|
|
18
|
+
* an older or newer version wrote, a value typed into the browser's tools -
|
|
19
|
+
* is no pick, so the page follows the device.
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseThemePreference(value: unknown): ThemePreference;
|
|
22
|
+
export declare function getThemeForPreference(data: {
|
|
23
|
+
preference: ThemePreference;
|
|
24
|
+
prefersDark: boolean;
|
|
25
|
+
}): Theme;
|
|
26
|
+
export declare function doesThemePreferenceFollowDevice(preference: ThemePreference): boolean;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* The theme of the pages that are a person's own, on one browser: the
|
|
4
|
+
* Dashboard, the Admin Dashboard, the sign-in pages (Accounts) and the pages
|
|
5
|
+
* the server draws on the way in - a sign-in message, an on-call
|
|
6
|
+
* acknowledgement.
|
|
7
|
+
*
|
|
8
|
+
* - The person picks Light, Dark or System in the Dashboard's user menu, or
|
|
9
|
+
* the Admin Dashboard's. System is light or dark as their device is set
|
|
10
|
+
* (the prefers-color-scheme media feature), and follows a change while a
|
|
11
|
+
* page is open.
|
|
12
|
+
* - The pick is kept in the browser under THEME_STORAGE_KEY. Every page on
|
|
13
|
+
* this address reads the same key, so a pick made in the Dashboard is the
|
|
14
|
+
* sign-in page's too.
|
|
15
|
+
* - A browser where nobody has picked - a first visit, a new device, storage
|
|
16
|
+
* cleared or blocked - is System: the page follows the device. Light and
|
|
17
|
+
* Dark picks saved before System existed are kept as they are.
|
|
18
|
+
* - The first script in each page's <head> (Common/Server/Views/Partials/
|
|
19
|
+
* Theme.ejs, and the Dashboard's offline page) works the theme out with
|
|
20
|
+
* these same rules before the first paint, so a page never opens in the
|
|
21
|
+
* wrong one. Common/UI/Utils/Theme.ts keeps it there while the page is
|
|
22
|
+
* open.
|
|
23
|
+
*
|
|
24
|
+
* Status pages and public dashboards are not a person's own: each is drawn in
|
|
25
|
+
* the theme its owner set (Types/Theme/PublicPageTheme.ts).
|
|
26
|
+
*
|
|
27
|
+
* React-free: the head script's tests, the docs' tests and every frontend
|
|
28
|
+
* read it.
|
|
29
|
+
*/
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.THEME_COLORS = exports.DARK_COLOR_SCHEME_MEDIA_QUERY = exports.THEME_STORAGE_KEY = exports.DEFAULT_THEME_PREFERENCE = exports.THEME_PREFERENCES = exports.ThemePreference = exports.Theme = void 0;
|
|
32
|
+
exports.isThemePreference = isThemePreference;
|
|
33
|
+
exports.parseThemePreference = parseThemePreference;
|
|
34
|
+
exports.getThemeForPreference = getThemeForPreference;
|
|
35
|
+
exports.doesThemePreferenceFollowDevice = doesThemePreferenceFollowDevice;
|
|
36
|
+
// How a page is drawn: the two schemes, as the dark class and data-theme say.
|
|
37
|
+
var Theme;
|
|
38
|
+
(function (Theme) {
|
|
39
|
+
Theme["Light"] = "light";
|
|
40
|
+
Theme["Dark"] = "dark";
|
|
41
|
+
})(Theme || (exports.Theme = Theme = {}));
|
|
42
|
+
// What the person picked, as their browser keeps it.
|
|
43
|
+
var ThemePreference;
|
|
44
|
+
(function (ThemePreference) {
|
|
45
|
+
ThemePreference["Light"] = "light";
|
|
46
|
+
ThemePreference["Dark"] = "dark";
|
|
47
|
+
// Light or dark, as the person's device is set.
|
|
48
|
+
ThemePreference["System"] = "system";
|
|
49
|
+
})(ThemePreference || (exports.ThemePreference = ThemePreference = {}));
|
|
50
|
+
// The choices, in the order the user menu offers them.
|
|
51
|
+
exports.THEME_PREFERENCES = [
|
|
52
|
+
ThemePreference.Light,
|
|
53
|
+
ThemePreference.Dark,
|
|
54
|
+
ThemePreference.System,
|
|
55
|
+
];
|
|
56
|
+
/*
|
|
57
|
+
* What a browser where nobody has picked is drawn in: as the device is set,
|
|
58
|
+
* the way the mobile app, a new status page and a new public dashboard start.
|
|
59
|
+
*/
|
|
60
|
+
exports.DEFAULT_THEME_PREFERENCE = ThemePreference.System;
|
|
61
|
+
/*
|
|
62
|
+
* Where the browser keeps the pick. Named for the Dashboard, where the pick
|
|
63
|
+
* was first made; every browser that has one keeps it under this name, so
|
|
64
|
+
* it stays.
|
|
65
|
+
*/
|
|
66
|
+
exports.THEME_STORAGE_KEY = "oneuptime-dashboard-theme";
|
|
67
|
+
// The media query that says the device is set to dark.
|
|
68
|
+
exports.DARK_COLOR_SCHEME_MEDIA_QUERY = "(prefers-color-scheme: dark)";
|
|
69
|
+
/*
|
|
70
|
+
* The colour the browser draws its own chrome in around the page (the
|
|
71
|
+
* theme-color meta tag): the page's own background in each theme, the same
|
|
72
|
+
* as a status page's (Types/Theme/PublicPageTheme.ts).
|
|
73
|
+
*/
|
|
74
|
+
exports.THEME_COLORS = {
|
|
75
|
+
[Theme.Light]: "#f9fafb",
|
|
76
|
+
[Theme.Dark]: "#0f172a",
|
|
77
|
+
};
|
|
78
|
+
// Whether a value is one of the three picks, exactly as the browser keeps it.
|
|
79
|
+
function isThemePreference(value) {
|
|
80
|
+
return (typeof value === "string" &&
|
|
81
|
+
exports.THEME_PREFERENCES.includes(value));
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The pick a kept value stands for. Anything else - nothing at all, a value
|
|
85
|
+
* an older or newer version wrote, a value typed into the browser's tools -
|
|
86
|
+
* is no pick, so the page follows the device.
|
|
87
|
+
*/
|
|
88
|
+
function parseThemePreference(value) {
|
|
89
|
+
return isThemePreference(value) ? value : exports.DEFAULT_THEME_PREFERENCE;
|
|
90
|
+
}
|
|
91
|
+
// The theme a pick draws the page in, on a device that is set one way.
|
|
92
|
+
function getThemeForPreference(data) {
|
|
93
|
+
if (data.preference === ThemePreference.Dark) {
|
|
94
|
+
return Theme.Dark;
|
|
95
|
+
}
|
|
96
|
+
if (data.preference === ThemePreference.System) {
|
|
97
|
+
return data.prefersDark ? Theme.Dark : Theme.Light;
|
|
98
|
+
}
|
|
99
|
+
return Theme.Light;
|
|
100
|
+
}
|
|
101
|
+
// Whether a page drawn for this pick changes when the device does.
|
|
102
|
+
function doesThemePreferenceFollowDevice(preference) {
|
|
103
|
+
return preference === ThemePreference.System;
|
|
104
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import commonJsModule from "./ThemePreference.js";
|
|
2
|
+
export const DARK_COLOR_SCHEME_MEDIA_QUERY = commonJsModule.DARK_COLOR_SCHEME_MEDIA_QUERY;
|
|
3
|
+
export const DEFAULT_THEME_PREFERENCE = commonJsModule.DEFAULT_THEME_PREFERENCE;
|
|
4
|
+
export const THEME_COLORS = commonJsModule.THEME_COLORS;
|
|
5
|
+
export const THEME_PREFERENCES = commonJsModule.THEME_PREFERENCES;
|
|
6
|
+
export const THEME_STORAGE_KEY = commonJsModule.THEME_STORAGE_KEY;
|
|
7
|
+
export const Theme = commonJsModule.Theme;
|
|
8
|
+
export const ThemePreference = commonJsModule.ThemePreference;
|
|
9
|
+
export const doesThemePreferenceFollowDevice = commonJsModule.doesThemePreferenceFollowDevice;
|
|
10
|
+
export const getThemeForPreference = commonJsModule.getThemeForPreference;
|
|
11
|
+
export const isThemePreference = commonJsModule.isThemePreference;
|
|
12
|
+
export const parseThemePreference = commonJsModule.parseThemePreference;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import IconProp from "../Icon/IconProp.mjs";
|
|
2
2
|
import { JSONObject } from "../JSON.mjs";
|
|
3
|
+
import ProviderLogo from "../ProviderLogo/ProviderLogo.mjs";
|
|
3
4
|
export declare enum ComponentInputType {
|
|
4
5
|
Text = "Text",
|
|
5
6
|
Password = "Password",
|
|
@@ -150,6 +151,7 @@ export default interface ComponentMetadata {
|
|
|
150
151
|
category: string;
|
|
151
152
|
description: string;
|
|
152
153
|
iconProp: IconProp;
|
|
154
|
+
logo?: ProviderLogo | undefined;
|
|
153
155
|
componentType: ComponentType;
|
|
154
156
|
arguments: Array<Argument>;
|
|
155
157
|
returnValues: Array<ReturnValue>;
|
|
@@ -162,5 +164,6 @@ export interface ComponentCategory {
|
|
|
162
164
|
name: string;
|
|
163
165
|
description: string;
|
|
164
166
|
icon: IconProp;
|
|
167
|
+
logo?: ProviderLogo | undefined;
|
|
165
168
|
tableName?: string | undefined;
|
|
166
169
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import IconProp from "../Icon/IconProp";
|
|
2
2
|
import { JSONObject } from "../JSON";
|
|
3
|
+
import ProviderLogo from "../ProviderLogo/ProviderLogo";
|
|
3
4
|
export declare enum ComponentInputType {
|
|
4
5
|
Text = "Text",
|
|
5
6
|
Password = "Password",
|
|
@@ -150,6 +151,7 @@ export default interface ComponentMetadata {
|
|
|
150
151
|
category: string;
|
|
151
152
|
description: string;
|
|
152
153
|
iconProp: IconProp;
|
|
154
|
+
logo?: ProviderLogo | undefined;
|
|
153
155
|
componentType: ComponentType;
|
|
154
156
|
arguments: Array<Argument>;
|
|
155
157
|
returnValues: Array<ReturnValue>;
|
|
@@ -162,5 +164,6 @@ export interface ComponentCategory {
|
|
|
162
164
|
name: string;
|
|
163
165
|
description: string;
|
|
164
166
|
icon: IconProp;
|
|
167
|
+
logo?: ProviderLogo | undefined;
|
|
165
168
|
tableName?: string | undefined;
|
|
166
169
|
}
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const IconProp_1 = __importDefault(require("../../Icon/IconProp"));
|
|
7
|
+
const ProviderLogo_1 = __importDefault(require("../../ProviderLogo/ProviderLogo"));
|
|
7
8
|
const ComponentID_1 = __importDefault(require("../ComponentID"));
|
|
8
9
|
const Component_1 = require("./../Component");
|
|
9
10
|
const components = [
|
|
@@ -11,6 +12,7 @@ const components = [
|
|
|
11
12
|
id: ComponentID_1.default.DiscordSendMessageToChannel,
|
|
12
13
|
title: "Send Message to Discord",
|
|
13
14
|
category: "Discord",
|
|
15
|
+
logo: ProviderLogo_1.default.Discord,
|
|
14
16
|
description: "Send message to Discord channel",
|
|
15
17
|
iconProp: IconProp_1.default.SendMessage,
|
|
16
18
|
componentType: Component_1.ComponentType.Component,
|