@oneuptime/common 12.0.12 → 12.0.13
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/DatabaseBaseModel/DatabaseBaseModel.ts +32 -5
- package/Models/DatabaseModels/NetworkDevice.ts +64 -0
- package/Models/DatabaseModels/StatusPage.ts +59 -0
- package/Models/DatabaseModels/StatusPageOidc.ts +2 -0
- package/Models/DatabaseModels/WorkspaceProjectAuthToken.ts +19 -2
- package/Server/API/AIChatAPI.ts +55 -56
- package/Server/API/CommonAPI.ts +89 -0
- package/Server/API/MicrosoftTeamsAPI.ts +20 -9
- package/Server/API/SlackAPI.ts +13 -10
- package/Server/API/StatusPageAPI.ts +2197 -2128
- package/Server/API/TelemetryAPI.ts +72 -3
- package/Server/Infrastructure/Postgres/SchemaMigrations/1787500000000-AddEnableSearchEngineIndexingToStatusPage.ts +30 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1787600000000-AddNetworkDeviceReachabilityColumns.ts +47 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +4 -0
- package/Server/Middleware/UserAuthorization.ts +11 -2
- package/Server/Services/ApiKeyPermissionService.ts +116 -2
- package/Server/Services/DatabaseService.ts +17 -6
- package/Server/Services/LogAggregationService.ts +34 -0
- package/Server/Services/LogService.ts +21 -0
- package/Server/Services/NetworkSiteService.ts +12 -0
- package/Server/Services/SpanService.ts +21 -0
- package/Server/Services/TraceAggregationService.ts +15 -0
- package/Server/Services/WorkspaceNotificationRuleService.ts +172 -220
- package/Server/Types/AnalyticsDatabase/ModelPermission.ts +9 -0
- package/Server/Types/Database/Permissions/AccessControlPermission.ts +47 -16
- package/Server/Utils/APIKey/AccessPermission.ts +16 -40
- package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +144 -0
- package/Server/Utils/LogRedaction.ts +576 -0
- package/Server/Utils/Logger.ts +123 -46
- package/Server/Utils/Monitor/Criteria/SSLMonitorCriteria.ts +94 -23
- package/Server/Utils/Monitor/MonitorResource.ts +29 -9
- package/Server/Utils/Monitor/NetworkInventoryUtil.ts +28 -7
- package/Server/Utils/SessionReplay/SessionReplayGateCacheStore.ts +56 -10
- package/Server/Utils/StartServer.ts +30 -9
- package/Server/Utils/StatusPageSearchEngineIndexing.ts +33 -0
- package/Server/Utils/Telemetry/ResourceEntityFilter.ts +441 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +488 -46
- package/Tests/App/Dashboard/MonitorTypePicker.test.tsx +300 -0
- package/Tests/App/StatusPage/StatusPageIndexPageRobotsMeta.test.ts +130 -0
- package/Tests/Models/DatabaseModels/DatabaseBaseModelToJSONObjectCache.test.ts +180 -0
- package/Tests/Models/StatusPageEnableSearchEngineIndexing.test.ts +157 -0
- package/Tests/Server/API/AIChatCancelAndFeedback.test.ts +23 -1
- package/Tests/Server/API/AIChatRouteAuthorization.test.ts +785 -0
- package/Tests/Server/API/BaseAPIApiKeyAuth.test.ts +21 -8
- package/Tests/Server/API/CommonAPIAuthGuard.test.ts +290 -0
- package/Tests/Server/API/MicrosoftTeamsManifest.test.ts +7 -1
- package/Tests/Server/API/StatusPageOverviewCache.test.ts +474 -0
- package/Tests/Server/API/StatusPageSeoSearchEngineIndexing.test.ts +189 -0
- package/Tests/Server/Infrastructure/InMemoryTTLCache.test.ts +158 -0
- package/Tests/Server/Infrastructure/Postgres/DeviceRoleAndDeclaredLinkParentMigration.test.ts +9 -60
- package/Tests/Server/Middleware/ProjectAuthorizationApiKeyMiddleware.test.ts +24 -15
- package/Tests/Server/Middleware/UserAuthorization.test.ts +79 -0
- package/Tests/Server/Services/AddNetworkDeviceReachabilityColumnsMigration.test.ts +332 -0
- package/Tests/Server/Services/ApiKeyPermissionService.test.ts +347 -0
- package/Tests/Server/Services/DatabaseServiceUpdateDebugLogging.test.ts +282 -0
- package/Tests/Server/Services/NetworkSiteService.test.ts +56 -2
- package/Tests/Server/Services/TelemetryResourceFacetFilters.test.ts +267 -0
- package/Tests/Server/Services/WorkspaceNotificationRuleTestRuleChannels.test.ts +702 -0
- package/Tests/Server/Types/Database/Permissions/AccessControlPermission.test.ts +165 -0
- package/Tests/Server/Utils/APIKey/AccessPermission.test.ts +48 -36
- package/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.ts +213 -0
- package/Tests/Server/Utils/LogRedaction.test.ts +415 -0
- package/Tests/Server/Utils/LoggerCredentialLeak.test.ts +245 -0
- package/Tests/Server/Utils/Monitor/Criteria/SSLMonitorCriteria.test.ts +374 -4
- package/Tests/Server/Utils/Monitor/MonitorResourceIngestedStepSelection.test.ts +455 -0
- package/Tests/Server/Utils/Monitor/NetworkDeviceReachabilityRoundTrip.test.ts +369 -0
- package/Tests/Server/Utils/Monitor/NetworkInventoryUtil.test.ts +86 -8
- package/Tests/Server/Utils/PrivacyFilterUtil.test.ts +64 -0
- package/Tests/Server/Utils/SessionReplay/SessionReplayGateCacheStore.test.ts +207 -0
- package/Tests/Server/Utils/StartServerBodyVerify.test.ts +335 -0
- package/Tests/Server/Utils/StatusPageSearchEngineIndexing.test.ts +60 -0
- package/Tests/Server/Utils/Telemetry/ResourceEntityFilter.test.ts +435 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsChannelSend.test.ts +607 -62
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsInstalledTeamIdSpace.test.ts +778 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsTeamInstalls.test.ts +44 -10
- package/Tests/Types/API/HostnameFromAuthority.test.ts +164 -0
- package/Tests/Types/Database/AccessControl/ColumnAccessControlCache.test.ts +344 -0
- package/Tests/Types/Database/DatabasePropertyFindOperator.test.ts +518 -0
- package/Tests/Types/Database/TableColumnMetadataCache.test.ts +286 -0
- package/Tests/Types/Monitor/MonitorStep.test.ts +100 -0
- package/Tests/Types/Monitor/MonitorTypeKeywords.test.ts +360 -0
- package/Tests/Types/StatusPage/SearchEngineIndexing.test.ts +86 -0
- package/Tests/Types/Telemetry/ResourceEntityFacet.test.ts +254 -0
- package/Tests/UI/Components/CardSelect.test.tsx +1021 -0
- package/Tests/UI/Components/MasterPage.test.tsx +36 -1
- package/Tests/Utils/Monitor/MonitorMetricType.test.ts +66 -1
- package/Tests/Utils/Monitor/NetworkTopologyUtil.test.ts +115 -6
- package/Tests/Utils/NetworkDevice/DeviceReachabilityUtil.test.ts +610 -0
- package/Tests/Utils/NetworkSite/SiteStatusRollupUtil.test.ts +114 -45
- package/Types/API/Hostname.ts +79 -0
- package/Types/Database/AccessControl/ColumnAccessControl.ts +33 -11
- package/Types/Database/AccessControl/ColumnBillingAccessControl.ts +33 -11
- package/Types/Database/DatabaseProperty.ts +38 -0
- package/Types/Database/TableColumn.ts +34 -7
- package/Types/Events/Recurring.ts +16 -1
- package/Types/Monitor/MonitorStep.ts +13 -1
- package/Types/Monitor/MonitorType.ts +345 -40
- package/Types/Monitor/SSLMonitor/SslMonitorResponse.ts +43 -0
- package/Types/StatusPage/SearchEngineIndexing.ts +61 -0
- package/Types/Telemetry/ResourceEntityFacet.ts +211 -0
- package/UI/Components/CardSelect/CardSelect.tsx +714 -105
- package/UI/Components/EmptyState/EmptyState.tsx +8 -1
- package/UI/Components/Footer/Footer.tsx +32 -6
- package/UI/Components/Forms/Fields/FormField.tsx +3 -0
- package/UI/Components/Forms/Types/Field.ts +8 -0
- package/UI/Components/Loader/PageLoader.tsx +29 -8
- package/UI/Components/LogsViewer/components/LogsAnalyticsView.tsx +26 -4
- package/UI/Components/Markdown.tsx/LazyMarkdownViewer.tsx +17 -1
- package/UI/Components/MasterPage/MasterPage.tsx +24 -11
- package/Utils/Monitor/MonitorMetricType.ts +16 -1
- package/Utils/Monitor/NetworkTopologyUtil.ts +60 -8
- package/Utils/NetworkDevice/DeviceReachabilityUtil.ts +262 -0
- package/Utils/NetworkSite/SiteStatusRollupUtil.ts +41 -24
- package/Utils/Telemetry/CrossSignalScope.ts +75 -4
- package/build/dist/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js +20 -4
- package/build/dist/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDevice.js +66 -0
- package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPage.js +60 -0
- package/build/dist/Models/DatabaseModels/StatusPage.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageOidc.js +2 -0
- package/build/dist/Models/DatabaseModels/StatusPageOidc.js.map +1 -1
- package/build/dist/Models/DatabaseModels/WorkspaceProjectAuthToken.js.map +1 -1
- package/build/dist/Server/API/AIChatAPI.js +48 -35
- package/build/dist/Server/API/AIChatAPI.js.map +1 -1
- package/build/dist/Server/API/CommonAPI.js +59 -0
- package/build/dist/Server/API/CommonAPI.js.map +1 -1
- package/build/dist/Server/API/MicrosoftTeamsAPI.js +20 -6
- package/build/dist/Server/API/MicrosoftTeamsAPI.js.map +1 -1
- package/build/dist/Server/API/SlackAPI.js +13 -10
- package/build/dist/Server/API/SlackAPI.js.map +1 -1
- package/build/dist/Server/API/StatusPageAPI.js +745 -673
- package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +34 -3
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787500000000-AddEnableSearchEngineIndexingToStatusPage.js +23 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787500000000-AddEnableSearchEngineIndexingToStatusPage.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787600000000-AddNetworkDeviceReachabilityColumns.js +34 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787600000000-AddNetworkDeviceReachabilityColumns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +4 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Middleware/UserAuthorization.js +6 -2
- package/build/dist/Server/Middleware/UserAuthorization.js.map +1 -1
- package/build/dist/Server/Services/ApiKeyPermissionService.js +90 -1
- package/build/dist/Server/Services/ApiKeyPermissionService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +15 -6
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/LogAggregationService.js +2 -0
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/LogService.js +16 -0
- package/build/dist/Server/Services/LogService.js.map +1 -1
- package/build/dist/Server/Services/NetworkSiteService.js +12 -0
- package/build/dist/Server/Services/NetworkSiteService.js.map +1 -1
- package/build/dist/Server/Services/SpanService.js +16 -0
- package/build/dist/Server/Services/SpanService.js.map +1 -1
- package/build/dist/Server/Services/TraceAggregationService.js +2 -0
- package/build/dist/Server/Services/TraceAggregationService.js.map +1 -1
- package/build/dist/Server/Services/WorkspaceNotificationRuleService.js +137 -164
- package/build/dist/Server/Services/WorkspaceNotificationRuleService.js.map +1 -1
- package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js +9 -0
- package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js.map +1 -1
- package/build/dist/Server/Types/Database/Permissions/AccessControlPermission.js +21 -13
- package/build/dist/Server/Types/Database/Permissions/AccessControlPermission.js.map +1 -1
- package/build/dist/Server/Utils/APIKey/AccessPermission.js +9 -32
- package/build/dist/Server/Utils/APIKey/AccessPermission.js.map +1 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +87 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
- package/build/dist/Server/Utils/LogRedaction.js +449 -0
- package/build/dist/Server/Utils/LogRedaction.js.map +1 -0
- package/build/dist/Server/Utils/Logger.js +98 -45
- package/build/dist/Server/Utils/Logger.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SSLMonitorCriteria.js +65 -13
- package/build/dist/Server/Utils/Monitor/Criteria/SSLMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorResource.js +20 -3
- package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js +27 -7
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js.map +1 -1
- package/build/dist/Server/Utils/SessionReplay/SessionReplayGateCacheStore.js +29 -10
- package/build/dist/Server/Utils/SessionReplay/SessionReplayGateCacheStore.js.map +1 -1
- package/build/dist/Server/Utils/StartServer.js +10 -7
- package/build/dist/Server/Utils/StartServer.js.map +1 -1
- package/build/dist/Server/Utils/StatusPageSearchEngineIndexing.js +24 -0
- package/build/dist/Server/Utils/StatusPageSearchEngineIndexing.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/ResourceEntityFilter.js +311 -0
- package/build/dist/Server/Utils/Telemetry/ResourceEntityFilter.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +366 -37
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
- package/build/dist/Types/API/Hostname.js +63 -0
- package/build/dist/Types/API/Hostname.js.map +1 -1
- package/build/dist/Types/Database/AccessControl/ColumnAccessControl.js +20 -6
- package/build/dist/Types/Database/AccessControl/ColumnAccessControl.js.map +1 -1
- package/build/dist/Types/Database/AccessControl/ColumnBillingAccessControl.js +20 -6
- package/build/dist/Types/Database/AccessControl/ColumnBillingAccessControl.js.map +1 -1
- package/build/dist/Types/Database/DatabaseProperty.js +38 -0
- package/build/dist/Types/Database/DatabaseProperty.js.map +1 -1
- package/build/dist/Types/Database/TableColumn.js +24 -6
- package/build/dist/Types/Database/TableColumn.js.map +1 -1
- package/build/dist/Types/Events/Recurring.js +13 -1
- package/build/dist/Types/Events/Recurring.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +9 -1
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorType.js +330 -31
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/Types/StatusPage/SearchEngineIndexing.js +55 -0
- package/build/dist/Types/StatusPage/SearchEngineIndexing.js.map +1 -0
- package/build/dist/Types/Telemetry/ResourceEntityFacet.js +156 -0
- package/build/dist/Types/Telemetry/ResourceEntityFacet.js.map +1 -0
- package/build/dist/UI/Components/CardSelect/CardSelect.js +360 -40
- package/build/dist/UI/Components/CardSelect/CardSelect.js.map +1 -1
- package/build/dist/UI/Components/EmptyState/EmptyState.js +1 -1
- package/build/dist/UI/Components/EmptyState/EmptyState.js.map +1 -1
- package/build/dist/UI/Components/Footer/Footer.js +7 -4
- package/build/dist/UI/Components/Footer/Footer.js.map +1 -1
- package/build/dist/UI/Components/Forms/Fields/FormField.js +1 -1
- package/build/dist/UI/Components/Forms/Fields/FormField.js.map +1 -1
- package/build/dist/UI/Components/Loader/PageLoader.js +15 -5
- package/build/dist/UI/Components/Loader/PageLoader.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsAnalyticsView.js +16 -3
- package/build/dist/UI/Components/LogsViewer/components/LogsAnalyticsView.js.map +1 -1
- package/build/dist/UI/Components/Markdown.tsx/LazyMarkdownViewer.js +13 -1
- package/build/dist/UI/Components/Markdown.tsx/LazyMarkdownViewer.js.map +1 -1
- package/build/dist/UI/Components/MasterPage/MasterPage.js +10 -2
- package/build/dist/UI/Components/MasterPage/MasterPage.js.map +1 -1
- package/build/dist/Utils/Monitor/MonitorMetricType.js +13 -1
- package/build/dist/Utils/Monitor/MonitorMetricType.js.map +1 -1
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js +34 -7
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDevice/DeviceReachabilityUtil.js +177 -0
- package/build/dist/Utils/NetworkDevice/DeviceReachabilityUtil.js.map +1 -0
- package/build/dist/Utils/NetworkSite/SiteStatusRollupUtil.js +23 -27
- package/build/dist/Utils/NetworkSite/SiteStatusRollupUtil.js.map +1 -1
- package/build/dist/Utils/Telemetry/CrossSignalScope.js +44 -4
- package/build/dist/Utils/Telemetry/CrossSignalScope.js.map +1 -1
- package/package.json +1 -1
|
@@ -11,6 +11,13 @@ export interface ComponentProps {
|
|
|
11
11
|
id: string;
|
|
12
12
|
iconClassName?: string;
|
|
13
13
|
showSolidBackground?: boolean | undefined;
|
|
14
|
+
/*
|
|
15
|
+
* Vertical padding. The default is 13rem top and bottom, which suits a
|
|
16
|
+
* full-page dashboard empty state but swamps a short page. Override it
|
|
17
|
+
* rather than changing the default — several call sites cancel the 13rem
|
|
18
|
+
* with negative margins and would overlap their neighbours if it shrank.
|
|
19
|
+
*/
|
|
20
|
+
paddingClassName?: string | undefined;
|
|
14
21
|
}
|
|
15
22
|
|
|
16
23
|
const EmptyState: FunctionComponent<ComponentProps> = (
|
|
@@ -21,7 +28,7 @@ const EmptyState: FunctionComponent<ComponentProps> = (
|
|
|
21
28
|
<React.Fragment>
|
|
22
29
|
<div
|
|
23
30
|
id={props.id}
|
|
24
|
-
className={`flex pt-52 pb-52 ${
|
|
31
|
+
className={`flex ${props.paddingClassName || "pt-52 pb-52"} ${
|
|
25
32
|
props.showSolidBackground ? "bg-white rounded shadow" : ""
|
|
26
33
|
}`}
|
|
27
34
|
>
|
|
@@ -16,6 +16,18 @@ export interface ComponentProps {
|
|
|
16
16
|
links: Array<FooterLink>;
|
|
17
17
|
style?: React.CSSProperties | undefined;
|
|
18
18
|
className?: string | undefined;
|
|
19
|
+
/*
|
|
20
|
+
* Classes for the inner row. The default adds its own horizontal padding,
|
|
21
|
+
* which double-indents the footer inside a layout that is already padded —
|
|
22
|
+
* the status page, for one. Override it to align the footer with the content
|
|
23
|
+
* above it.
|
|
24
|
+
*/
|
|
25
|
+
innerClassName?: string | undefined;
|
|
26
|
+
/*
|
|
27
|
+
* Classes for the copyright block. The default hides it between md and lg,
|
|
28
|
+
* which is not something every layout wants.
|
|
29
|
+
*/
|
|
30
|
+
copyrightClassName?: string | undefined;
|
|
19
31
|
}
|
|
20
32
|
|
|
21
33
|
const Footer: FunctionComponent<ComponentProps> = (
|
|
@@ -29,7 +41,12 @@ const Footer: FunctionComponent<ComponentProps> = (
|
|
|
29
41
|
}
|
|
30
42
|
style={props.style}
|
|
31
43
|
>
|
|
32
|
-
<div
|
|
44
|
+
<div
|
|
45
|
+
className={
|
|
46
|
+
props.innerClassName ||
|
|
47
|
+
"mx-auto w-full py-6 px-6 md:flex md:items-center md:justify-between lg:px-8"
|
|
48
|
+
}
|
|
49
|
+
>
|
|
33
50
|
{/* Mobile: Stack links vertically, Desktop: Horizontal layout */}
|
|
34
51
|
<div className="flex flex-col space-y-3 md:flex-row md:justify-center md:items-center md:space-y-0 md:space-x-8 md:order-2">
|
|
35
52
|
{props.links &&
|
|
@@ -63,14 +80,23 @@ const Footer: FunctionComponent<ComponentProps> = (
|
|
|
63
80
|
);
|
|
64
81
|
})}
|
|
65
82
|
</div>
|
|
66
|
-
{/*
|
|
67
|
-
|
|
68
|
-
|
|
83
|
+
{/*
|
|
84
|
+
* Guard the wrapper, not just the <p>: with no copyright configured
|
|
85
|
+
* the empty div still contributed its mt-5, leaving a dead gap under
|
|
86
|
+
* the links.
|
|
87
|
+
*/}
|
|
88
|
+
{props.copyright && (
|
|
89
|
+
<div
|
|
90
|
+
className={
|
|
91
|
+
props.copyrightClassName ||
|
|
92
|
+
"mt-5 md:order-1 md:mt-0 block md:hidden lg:block"
|
|
93
|
+
}
|
|
94
|
+
>
|
|
69
95
|
<p className="text-center text-sm text-gray-500">
|
|
70
96
|
© {props.copyright}
|
|
71
97
|
</p>
|
|
72
|
-
|
|
73
|
-
|
|
98
|
+
</div>
|
|
99
|
+
)}
|
|
74
100
|
</div>
|
|
75
101
|
</footer>
|
|
76
102
|
</React.Fragment>
|
|
@@ -521,6 +521,9 @@ const FormField: <T extends GenericObject>(
|
|
|
521
521
|
tabIndex={0}
|
|
522
522
|
dataTestId={props.field.dataTestId}
|
|
523
523
|
singleColumn={props.field.cardSelectSingleColumn}
|
|
524
|
+
searchable={props.field.cardSelectSearchable}
|
|
525
|
+
searchPlaceholder={props.field.cardSelectSearchPlaceholder}
|
|
526
|
+
collapsibleGroups={props.field.cardSelectCollapsibleGroups}
|
|
524
527
|
onChange={(value: string) => {
|
|
525
528
|
onChange(value);
|
|
526
529
|
props.setFieldValue(props.fieldName, value);
|
|
@@ -58,6 +58,14 @@ export default interface Field<TEntity> {
|
|
|
58
58
|
| Array<CardSelectOption | CardSelectOptionGroup>
|
|
59
59
|
| undefined;
|
|
60
60
|
cardSelectSingleColumn?: boolean | undefined;
|
|
61
|
+
/*
|
|
62
|
+
* Give the card picker a search box and collapse its groups behind their
|
|
63
|
+
* headers. Both are opt in: a picker with a handful of cards reads fine as
|
|
64
|
+
* a plain grid, and turning them on there would only add chrome.
|
|
65
|
+
*/
|
|
66
|
+
cardSelectSearchable?: boolean | undefined;
|
|
67
|
+
cardSelectSearchPlaceholder?: string | undefined;
|
|
68
|
+
cardSelectCollapsibleGroups?: boolean | undefined;
|
|
61
69
|
fetchDropdownOptions?:
|
|
62
70
|
| ((
|
|
63
71
|
item: FormValues<TEntity>,
|
|
@@ -1,22 +1,43 @@
|
|
|
1
1
|
import Loader, { LoaderType } from "./Loader";
|
|
2
|
-
import {
|
|
2
|
+
import { Gray500 } from "../../../Types/BrandColors";
|
|
3
3
|
import React, { FunctionComponent, ReactElement } from "react";
|
|
4
4
|
|
|
5
5
|
export interface ComponentProps {
|
|
6
6
|
isVisible: boolean;
|
|
7
|
+
/*
|
|
8
|
+
* Lets a full-page caller reserve height (e.g. "min-h-[60vh]") without
|
|
9
|
+
* changing the footprint of the many inline, in-card call sites that rely on
|
|
10
|
+
* the default spacing.
|
|
11
|
+
*/
|
|
12
|
+
className?: string | undefined;
|
|
7
13
|
}
|
|
8
14
|
|
|
9
15
|
const PageLoader: FunctionComponent<ComponentProps> = (
|
|
10
16
|
props: ComponentProps,
|
|
11
17
|
): ReactElement => {
|
|
12
|
-
if (props.isVisible) {
|
|
13
|
-
return
|
|
14
|
-
<div className="m-auto w-full text-center w-max mt-52 align-middle flex items-center">
|
|
15
|
-
<Loader loaderType={LoaderType.Bar} color={VeryLightGray} size={200} />
|
|
16
|
-
</div>
|
|
17
|
-
);
|
|
18
|
+
if (!props.isVisible) {
|
|
19
|
+
return <></>;
|
|
18
20
|
}
|
|
19
|
-
|
|
21
|
+
|
|
22
|
+
/*
|
|
23
|
+
* The bar used to be VeryLightGray (#c2c2c2) on white — about 1.7:1, which
|
|
24
|
+
* reads as a blank page rather than a loading one. Gray500 is visible without
|
|
25
|
+
* being loud.
|
|
26
|
+
*
|
|
27
|
+
* "w-full" and "w-max" were both set here, so which one applied came down to
|
|
28
|
+
* the order Tailwind happened to emit them in. The loader is centred by the
|
|
29
|
+
* flex row inside <Loader>, so full width is the one that was wanted.
|
|
30
|
+
*/
|
|
31
|
+
return (
|
|
32
|
+
<div
|
|
33
|
+
className={
|
|
34
|
+
props.className ||
|
|
35
|
+
"m-auto mt-52 flex w-full items-center justify-center"
|
|
36
|
+
}
|
|
37
|
+
>
|
|
38
|
+
<Loader loaderType={LoaderType.Bar} color={Gray500} size={200} />
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
20
41
|
};
|
|
21
42
|
|
|
22
43
|
export default PageLoader;
|
|
@@ -26,6 +26,11 @@ import URL from "../../../../Types/API/URL";
|
|
|
26
26
|
import HTTPResponse from "../../../../Types/API/HTTPResponse";
|
|
27
27
|
import HTTPErrorResponse from "../../../../Types/API/HTTPErrorResponse";
|
|
28
28
|
import { JSONObject } from "../../../../Types/JSON";
|
|
29
|
+
import {
|
|
30
|
+
ResourceEntityFacetSelections,
|
|
31
|
+
collectResourceEntityFacetSelections,
|
|
32
|
+
collectServiceFacetSelections,
|
|
33
|
+
} from "../../../../Types/Telemetry/ResourceEntityFacet";
|
|
29
34
|
import { APP_API_URL } from "../../../Config";
|
|
30
35
|
import ModelAPI from "../../../Utils/ModelAPI/ModelAPI";
|
|
31
36
|
import ComponentLoader from "../../ComponentLoader/ComponentLoader";
|
|
@@ -381,12 +386,29 @@ const LogsAnalyticsView: FunctionComponent<LogsAnalyticsViewProps> = (
|
|
|
381
386
|
Array.from(severityValues);
|
|
382
387
|
}
|
|
383
388
|
|
|
384
|
-
const serviceFilterValues:
|
|
385
|
-
props.appliedFacetFilters.
|
|
389
|
+
const serviceFilterValues: Array<string> =
|
|
390
|
+
collectServiceFacetSelections(props.appliedFacetFilters.entries());
|
|
386
391
|
|
|
387
|
-
if (serviceFilterValues
|
|
392
|
+
if (serviceFilterValues.length > 0) {
|
|
388
393
|
(requestData as Record<string, unknown>)["serviceIds"] =
|
|
389
|
-
|
|
394
|
+
serviceFilterValues;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/*
|
|
398
|
+
* Host / docker / podman / Kubernetes chips ride their own field —
|
|
399
|
+
* their ids are not `primaryEntityId` values for telemetry that
|
|
400
|
+
* carries a service.name, so the server resolves them to the
|
|
401
|
+
* resource's entity key. Without this the analytics tab silently
|
|
402
|
+
* ignored a cluster the sidebar was filtering by.
|
|
403
|
+
*/
|
|
404
|
+
const resourceFilters: ResourceEntityFacetSelections =
|
|
405
|
+
collectResourceEntityFacetSelections(
|
|
406
|
+
props.appliedFacetFilters.entries(),
|
|
407
|
+
);
|
|
408
|
+
|
|
409
|
+
if (Object.keys(resourceFilters).length > 0) {
|
|
410
|
+
(requestData as Record<string, unknown>)["resourceFilters"] =
|
|
411
|
+
resourceFilters;
|
|
390
412
|
}
|
|
391
413
|
|
|
392
414
|
const traceFilterValues: Set<string> | undefined =
|
|
@@ -15,7 +15,23 @@ const LazyMarkdownViewer: FunctionComponent<ComponentProps> = (
|
|
|
15
15
|
props: ComponentProps,
|
|
16
16
|
): JSX.Element => {
|
|
17
17
|
return (
|
|
18
|
-
<Suspense
|
|
18
|
+
<Suspense
|
|
19
|
+
fallback={
|
|
20
|
+
/*
|
|
21
|
+
* A bare "Loading..." string here painted raw English text in the
|
|
22
|
+
* middle of the page, then swapped it for content of a different
|
|
23
|
+
* height. Reserve roughly the space two lines of prose take instead.
|
|
24
|
+
*
|
|
25
|
+
* Spans rather than divs: callers such as EventItem render this inside
|
|
26
|
+
* a <p>, where block elements are invalid nesting.
|
|
27
|
+
*/
|
|
28
|
+
<span role="status" aria-live="polite" className="block space-y-2">
|
|
29
|
+
<span className="block h-4 w-3/4 animate-pulse rounded bg-gray-100" />
|
|
30
|
+
<span className="block h-4 w-1/2 animate-pulse rounded bg-gray-100" />
|
|
31
|
+
<span className="sr-only">Loading content</span>
|
|
32
|
+
</span>
|
|
33
|
+
}
|
|
34
|
+
>
|
|
19
35
|
<MarkdownViewer {...props} />
|
|
20
36
|
</Suspense>
|
|
21
37
|
);
|
|
@@ -30,6 +30,16 @@ const MasterPage: FunctionComponent<ComponentProps> = (
|
|
|
30
30
|
const topSectionRef: React.RefObject<HTMLDivElement> =
|
|
31
31
|
React.useRef<HTMLDivElement>(null);
|
|
32
32
|
|
|
33
|
+
/*
|
|
34
|
+
* The status page supplies neither header nor navbar — it renders its own
|
|
35
|
+
* inside children. Rendering TopSection anyway left an empty white bar with a
|
|
36
|
+
* drop shadow above the content, so only render it when it has something in
|
|
37
|
+
* it.
|
|
38
|
+
*/
|
|
39
|
+
const hasTopSection: boolean = Boolean(
|
|
40
|
+
(!props.hideHeader && props.header) || props.navBar,
|
|
41
|
+
);
|
|
42
|
+
|
|
33
43
|
/*
|
|
34
44
|
* Publish the sticky top section's height as --app-header-height so anything
|
|
35
45
|
* that sticks underneath it (the side menu, for example) can offset itself by
|
|
@@ -89,6 +99,7 @@ const MasterPage: FunctionComponent<ComponentProps> = (
|
|
|
89
99
|
props.isLoading,
|
|
90
100
|
props.error,
|
|
91
101
|
props.disableMainContentWrapper,
|
|
102
|
+
hasTopSection,
|
|
92
103
|
isOnline,
|
|
93
104
|
]);
|
|
94
105
|
|
|
@@ -125,17 +136,19 @@ const MasterPage: FunctionComponent<ComponentProps> = (
|
|
|
125
136
|
Skip to main content
|
|
126
137
|
</a>
|
|
127
138
|
)}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
+
{hasTopSection && (
|
|
140
|
+
<div
|
|
141
|
+
ref={topSectionRef}
|
|
142
|
+
className={props.makeTopSectionUnstick ? "" : "sticky top-0 z-10"}
|
|
143
|
+
>
|
|
144
|
+
<TopSection
|
|
145
|
+
hideHeader={props.hideHeader}
|
|
146
|
+
className={props.topSectionClassName}
|
|
147
|
+
header={props.header}
|
|
148
|
+
navbar={props.navBar}
|
|
149
|
+
/>
|
|
150
|
+
</div>
|
|
151
|
+
)}
|
|
139
152
|
|
|
140
153
|
{props.disableMainContentWrapper ? (
|
|
141
154
|
props.children
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import AggregationType from "../../Types/BaseDatabase/AggregationType";
|
|
2
2
|
import { CheckOn } from "../../Types/Monitor/CriteriaFilter";
|
|
3
3
|
import MonitorMetricType from "../../Types/Monitor/MonitorMetricType";
|
|
4
|
-
import MonitorType
|
|
4
|
+
import MonitorType, {
|
|
5
|
+
MonitorTypeHelper,
|
|
6
|
+
} from "../../Types/Monitor/MonitorType";
|
|
5
7
|
|
|
6
8
|
/*
|
|
7
9
|
* Groups of metrics rendered as separate cards on the monitor metrics page.
|
|
@@ -238,11 +240,24 @@ class MonitorMetricTypeUtil {
|
|
|
238
240
|
monitorType === MonitorType.DNSSEC ||
|
|
239
241
|
monitorType === MonitorType.Domain ||
|
|
240
242
|
monitorType === MonitorType.SQLQuery ||
|
|
243
|
+
monitorType === MonitorType.SSLCertificate ||
|
|
241
244
|
monitorType === MonitorType.ExternalStatusPage
|
|
242
245
|
) {
|
|
243
246
|
return [MonitorMetricType.IsOnline, MonitorMetricType.ResponseTime];
|
|
244
247
|
}
|
|
245
248
|
|
|
249
|
+
/*
|
|
250
|
+
* Any other type the probe actually checks still writes IsOnline and
|
|
251
|
+
* ResponseTime rows, so default to showing them rather than to an empty
|
|
252
|
+
* list. Falling through to [] hides the Monitor Metrics tab entirely -
|
|
253
|
+
* SSL Certificate monitors were missing from the list above and so had
|
|
254
|
+
* no metrics tab at all, which left an operator with no way to see that
|
|
255
|
+
* their monitor was running.
|
|
256
|
+
*/
|
|
257
|
+
if (MonitorTypeHelper.isProbableMonitor(monitorType)) {
|
|
258
|
+
return [MonitorMetricType.IsOnline, MonitorMetricType.ResponseTime];
|
|
259
|
+
}
|
|
260
|
+
|
|
246
261
|
return [];
|
|
247
262
|
}
|
|
248
263
|
|
|
@@ -13,13 +13,27 @@ import {
|
|
|
13
13
|
classifyEndpointRole,
|
|
14
14
|
resolveDeviceRole,
|
|
15
15
|
} from "./NetworkDeviceRoleUtil";
|
|
16
|
+
import DeviceReachabilityUtil, {
|
|
17
|
+
NetworkDeviceReachability,
|
|
18
|
+
} from "../NetworkDevice/DeviceReachabilityUtil";
|
|
16
19
|
|
|
17
20
|
export interface TopologyDeviceInput {
|
|
18
21
|
id: string;
|
|
19
22
|
name: string;
|
|
20
23
|
hostname?: string | undefined;
|
|
21
24
|
sysName?: string | undefined;
|
|
25
|
+
/*
|
|
26
|
+
* Reachability inputs, all three of them. `isReachable` is the outcome of
|
|
27
|
+
* the last poll and is what actually decides up/down; `lastPolledAt` and
|
|
28
|
+
* `pollingIntervalInMinutes` only size the "we have stopped polling
|
|
29
|
+
* entirely" backstop. Passing lastSeenAt alone still works (that is the
|
|
30
|
+
* legacy path for rows written before the columns existed) but re-creates
|
|
31
|
+
* the bug where a fleet the probe cannot keep up with draws all-red.
|
|
32
|
+
*/
|
|
33
|
+
isReachable?: boolean | undefined;
|
|
34
|
+
lastPolledAt?: Date | undefined;
|
|
22
35
|
lastSeenAt?: Date | undefined;
|
|
36
|
+
pollingIntervalInMinutes?: number | undefined;
|
|
23
37
|
interfacesUp?: number | undefined;
|
|
24
38
|
interfacesDown?: number | undefined;
|
|
25
39
|
vendor?: string | undefined;
|
|
@@ -232,12 +246,17 @@ interface ResolvedClaim {
|
|
|
232
246
|
*/
|
|
233
247
|
const IPV4_PATTERN: RegExp = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;
|
|
234
248
|
|
|
235
|
-
// A device not seen within this window is treated as not currently up.
|
|
236
|
-
const FRESH_WINDOW_MS: number = 15 * 60 * 1000;
|
|
237
|
-
|
|
238
249
|
// Endpoint nodes rendered per graph; the slice is deterministic (by MAC).
|
|
239
250
|
const ENDPOINT_RENDER_CAP: number = 2000;
|
|
240
251
|
|
|
252
|
+
/*
|
|
253
|
+
* How long an ARP/FDB-learned endpoint keeps its "up" colour after the last
|
|
254
|
+
* walk that saw it. Taken from the shared device rule at its default
|
|
255
|
+
* interval so the map's two node kinds age out on comparable timescales.
|
|
256
|
+
*/
|
|
257
|
+
const ENDPOINT_FRESH_WINDOW_MS: number =
|
|
258
|
+
DeviceReachabilityUtil.getStaleWindowInMinutes(undefined) * 60 * 1000;
|
|
259
|
+
|
|
241
260
|
export default class NetworkTopologyUtil {
|
|
242
261
|
/*
|
|
243
262
|
* Builds the topology graph from every device in a project. Nodes are the
|
|
@@ -1305,10 +1324,17 @@ export default class NetworkTopologyUtil {
|
|
|
1305
1324
|
if (device.monitorStatus) {
|
|
1306
1325
|
return device.monitorStatus;
|
|
1307
1326
|
}
|
|
1308
|
-
return NetworkTopologyUtil.
|
|
1327
|
+
return NetworkTopologyUtil.statusFromPoll(device, now);
|
|
1309
1328
|
}
|
|
1310
1329
|
|
|
1311
|
-
|
|
1330
|
+
/*
|
|
1331
|
+
* Endpoints (ARP/FDB-learned hosts) have no poll of their own: they are
|
|
1332
|
+
* re-learned from whichever device's tables they appear in, so freshness
|
|
1333
|
+
* really is all there is to go on. The window is the shared default
|
|
1334
|
+
* staleness window rather than the old fixed 15 minutes, so a host on a
|
|
1335
|
+
* switch its probe polls slowly does not blink out of the map between
|
|
1336
|
+
* walks.
|
|
1337
|
+
*/
|
|
1312
1338
|
private static statusFromLastSeen(
|
|
1313
1339
|
lastSeenAt: Date | undefined,
|
|
1314
1340
|
now: Date,
|
|
@@ -1316,10 +1342,36 @@ export default class NetworkTopologyUtil {
|
|
|
1316
1342
|
if (!lastSeenAt) {
|
|
1317
1343
|
return "unknown";
|
|
1318
1344
|
}
|
|
1345
|
+
|
|
1319
1346
|
const ageMs: number = now.getTime() - new Date(lastSeenAt).getTime();
|
|
1320
|
-
|
|
1321
|
-
|
|
1347
|
+
|
|
1348
|
+
return ageMs > ENDPOINT_FRESH_WINDOW_MS ? "down" : "up";
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
/*
|
|
1352
|
+
* The shared reachability rule (DeviceReachabilityUtil), mapped onto the
|
|
1353
|
+
* graph's three node states. "Pending" — never polled — is the graph's
|
|
1354
|
+
* "unknown", which is what keeps a device nothing walks from being drawn
|
|
1355
|
+
* as a failure.
|
|
1356
|
+
*/
|
|
1357
|
+
private static statusFromPoll(
|
|
1358
|
+
device: TopologyDeviceInput,
|
|
1359
|
+
now: Date,
|
|
1360
|
+
): NetworkTopologyNodeStatus {
|
|
1361
|
+
const status: NetworkDeviceReachability = DeviceReachabilityUtil.getStatus(
|
|
1362
|
+
{
|
|
1363
|
+
isReachable: device.isReachable,
|
|
1364
|
+
lastPolledAt: device.lastPolledAt,
|
|
1365
|
+
lastSeenAt: device.lastSeenAt,
|
|
1366
|
+
pollingIntervalInMinutes: device.pollingIntervalInMinutes,
|
|
1367
|
+
},
|
|
1368
|
+
now,
|
|
1369
|
+
);
|
|
1370
|
+
|
|
1371
|
+
if (status === NetworkDeviceReachability.Pending) {
|
|
1372
|
+
return "unknown";
|
|
1322
1373
|
}
|
|
1323
|
-
|
|
1374
|
+
|
|
1375
|
+
return status === NetworkDeviceReachability.Up ? "up" : "down";
|
|
1324
1376
|
}
|
|
1325
1377
|
}
|