@odigos/ui-kit 0.0.285 → 0.0.286-dev.520
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/CHANGELOG.md +7 -0
- package/docs/api-context.md +1 -1
- package/lib/chunks/{helpers-C5bkjRbO.js → helpers-B0SJ6hqm.js} +2 -2
- package/lib/chunks/index-9H2LDuOq.js +311 -0
- package/lib/chunks/source-instrument-form-context-BF70uJ_R.js +5 -0
- package/lib/chunks/ui-components-DqG0z5U0.js +1878 -0
- package/lib/components/_cards/data-card/index.d.ts +6 -1
- package/lib/components/_cards/text-card/index.d.ts +3 -0
- package/lib/components/drawer/header/index.d.ts +2 -0
- package/lib/components/hover-actions/index.d.ts +1 -1
- package/lib/components/index.d.ts +2 -0
- package/lib/components/info-row/index.d.ts +11 -0
- package/lib/components/input/index.d.ts +2 -0
- package/lib/components/table/index.d.ts +10 -0
- package/lib/components/table/styled.d.ts +11 -0
- package/lib/components/table/table-rows/index.d.ts +6 -1
- package/lib/components/table/types.d.ts +11 -2
- package/lib/components/trace-view/index.d.ts +4 -0
- package/lib/components/trace-view/styled.d.ts +43 -0
- package/lib/components/trace-view/types.d.ts +46 -0
- package/lib/components.js +1 -1
- package/lib/constants.js +1 -1
- package/lib/containers/_drawers/edit-source-drawer/overview/runtime-card.d.ts +5 -2
- package/lib/containers/_drawers/edit-source-drawer/pods/containers-card/process-card.d.ts +1 -7
- package/lib/containers/index.d.ts +1 -0
- package/lib/containers/insights/consts.d.ts +6 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/animated-edge.d.ts +10 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/blast-radius-node.d.ts +6 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/helpers.d.ts +28 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/index.d.ts +7 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-blast-radius/types.d.ts +19 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-trace-compare/helpers.d.ts +15 -0
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-trace-compare/index.d.ts +7 -0
- package/lib/containers/insights/findings/drawer/anomaly/index.d.ts +15 -0
- package/lib/containers/insights/findings/drawer/anomaly/why-this-fired/index.d.ts +6 -0
- package/lib/containers/insights/findings/drawer/helpers.d.ts +11 -0
- package/lib/containers/insights/findings/drawer/index.d.ts +6 -0
- package/lib/containers/insights/findings/drawer/violation/index.d.ts +6 -0
- package/lib/containers/insights/findings/drawer/violation/violation-trace-view/index.d.ts +8 -0
- package/lib/containers/insights/findings/helpers.d.ts +47 -0
- package/lib/containers/insights/findings/index.d.ts +2 -0
- package/lib/containers/insights/index.d.ts +6 -0
- package/lib/containers/insights/insights-context.d.ts +44 -0
- package/lib/containers/insights/overview/contained-table-and-heading/index.d.ts +18 -0
- package/lib/containers/insights/overview/index.d.ts +6 -0
- package/lib/containers/insights/settings-and-configurations/constants.d.ts +16 -0
- package/lib/containers/insights/settings-and-configurations/content-panel/index.d.ts +11 -0
- package/lib/containers/insights/settings-and-configurations/index.d.ts +2 -0
- package/lib/containers/insights/settings-and-configurations/menu-config.d.ts +24 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/constants.d.ts +40 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/create-override-panel.d.ts +14 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/index.d.ts +2 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/mappers.d.ts +12 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/mock.d.ts +4 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/policies-menu.d.ts +10 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/policy-editor.d.ts +8 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/policy-list-item.d.ts +8 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/risk-levels.d.ts +15 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/risk-model-drawer/constants.d.ts +16 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/risk-model-drawer/default-catalog.d.ts +3 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/risk-model-drawer/helpers.d.ts +30 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/risk-model-drawer/index.d.ts +10 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/signal-weights-panel.d.ts +13 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/signal-weights.d.ts +17 -0
- package/lib/containers/insights/settings-and-configurations/panels/detection/types.d.ts +29 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/constants.d.ts +35 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/create-panel.d.ts +17 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/edit-panel.d.ts +10 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/facet-section.d.ts +13 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/guardrail-list-item.d.ts +8 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/guardrails-menu.d.ts +9 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/index.d.ts +2 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/mappers.d.ts +18 -0
- package/lib/containers/insights/settings-and-configurations/panels/guardrails/types.d.ts +10 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/constants.d.ts +82 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/create-override-panel.d.ts +21 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/index.d.ts +2 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/mappers.d.ts +38 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/policies-menu.d.ts +10 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/policy-editor.d.ts +9 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/policy-list-item.d.ts +8 -0
- package/lib/containers/insights/settings-and-configurations/panels/learning/types.d.ts +31 -0
- package/lib/containers/insights/settings-and-configurations/panels/storage/constants.d.ts +52 -0
- package/lib/containers/insights/settings-and-configurations/panels/storage/formatters.d.ts +5 -0
- package/lib/containers/insights/settings-and-configurations/panels/storage/index.d.ts +2 -0
- package/lib/containers/insights/settings-and-configurations/panels/storage/layout.d.ts +18 -0
- package/lib/containers/insights/settings-and-configurations/panels/storage/mappers.d.ts +27 -0
- package/lib/containers/insights/settings-and-configurations/panels/system/constants.d.ts +31 -0
- package/lib/containers/insights/settings-and-configurations/panels/system/index.d.ts +2 -0
- package/lib/containers/insights/settings-and-configurations/settings-menu/category-header.d.ts +8 -0
- package/lib/containers/insights/settings-and-configurations/settings-menu/index.d.ts +7 -0
- package/lib/containers/insights/transactions/drawer/baselines/helpers.d.ts +16 -0
- package/lib/containers/insights/transactions/drawer/baselines/index.d.ts +5 -0
- package/lib/containers/insights/transactions/drawer/index.d.ts +2 -0
- package/lib/containers/insights/transactions/drawer/observations/helpers.d.ts +11 -0
- package/lib/containers/insights/transactions/drawer/observations/index.d.ts +5 -0
- package/lib/containers/insights/transactions/helpers.d.ts +35 -0
- package/lib/containers/insights/transactions/index.d.ts +2 -0
- package/lib/containers.js +1381 -261
- package/lib/contexts/odigos-api/capabilities.d.ts +2 -0
- package/lib/contexts/odigos-api/hooks/use-insights-api.d.ts +153 -0
- package/lib/contexts/odigos-api/index.d.ts +2 -1
- package/lib/contexts/odigos-api/internal/notify.d.ts +4 -3
- package/lib/contexts/odigos-api/types.d.ts +201 -1
- package/lib/contexts/odigos-api/use-odigos-api.d.ts +2 -0
- package/lib/contexts.js +1 -1
- package/lib/functions/index.d.ts +1 -0
- package/lib/functions/parse-raw-otlp/index.d.ts +43 -0
- package/lib/functions.js +1 -1
- package/lib/hooks/useCopy.d.ts +2 -3
- package/lib/hooks/useTimeAgo.d.ts +4 -0
- package/lib/hooks.js +1 -1
- package/lib/icons/common/index.d.ts +3 -0
- package/lib/icons/common/insights-findings-icon/index.d.ts +2 -0
- package/lib/icons/common/insights-transactions-icon/index.d.ts +2 -0
- package/lib/icons/common/threat-detection-icon/index.d.ts +2 -0
- package/lib/icons/overview/index.d.ts +1 -0
- package/lib/icons/overview/insights-icon/index.d.ts +2 -0
- package/lib/icons.js +1 -1
- package/lib/snippets/code-modal/index.d.ts +9 -0
- package/lib/snippets/index.d.ts +1 -0
- package/lib/snippets/trace-modal/index.d.ts +8 -0
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme/palettes/index.d.ts +7 -1
- package/lib/theme.js +1 -1
- package/lib/types/common/index.d.ts +2 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/insights/index.d.ts +598 -0
- package/lib/types/workload/index.d.ts +14 -0
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/index-DBZ1mLhG.js +0 -298
- package/lib/chunks/source-instrument-form-context-CnRKQq6W.js +0 -5
- package/lib/chunks/ui-components-Ci-Vq1Dl.js +0 -1620
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { InsightsDeviationClass, InsightsLearningConditionType, InsightsLearningMode } from '../../../../../types';
|
|
2
|
+
import { DurationUnit } from './types';
|
|
3
|
+
export declare const TITLE_LEARNING_POLICIES = "Learning Policies";
|
|
4
|
+
export declare const DESC_LEARNING_POLICIES = "Configure when a class stops learning and how baselines are finalized.\nUse service overrides to adjust learning for specific services or transactions.";
|
|
5
|
+
export declare const TITLE_DEFAULT_POLICY = "Default policy";
|
|
6
|
+
export declare const TITLE_OVERRIDES = "Overrides";
|
|
7
|
+
export declare const TITLE_NO_OVERRIDES = "No overrides yet";
|
|
8
|
+
export declare const DESC_NO_OVERRIDES = "Add overrides to adjust learning for specific services.";
|
|
9
|
+
export declare const BTN_ADD_OVERRIDE_POLICY = "Add override policy";
|
|
10
|
+
export declare const BTN_ADD_OVERRIDE = "Add override";
|
|
11
|
+
export declare const BTN_ADD_SELECTION = "Add selection";
|
|
12
|
+
export declare const BTN_ADD_CONDITION = "Add condition";
|
|
13
|
+
export declare const BTN_DELETE_OVERRIDE = "Delete override";
|
|
14
|
+
export declare const BTN_SAVE_CHANGES = "Save Changes";
|
|
15
|
+
export declare const TITLE_CHOOSE_OVERRIDE_SCOPE = "Choose override scope";
|
|
16
|
+
export declare const DESC_CHOOSE_OVERRIDE_SCOPE = "Select where this policy should override the global learning settings.\nYou can apply it to a specific service or transaction.";
|
|
17
|
+
export declare const LABEL_GLOBAL = "Global";
|
|
18
|
+
export declare const LABEL_SELECT_A_POLICY = "Select a policy";
|
|
19
|
+
export declare const LABEL_COMBINE = "Combine";
|
|
20
|
+
export declare const LABEL_CURRENTLY = "Currently:";
|
|
21
|
+
export declare const LABEL_PROMOTES_WHEN = "Promotes when";
|
|
22
|
+
export declare const LABEL_MIN_MATCHES = "Min matches";
|
|
23
|
+
export declare const LABEL_FALLBACK_NOTE = "A policy with no conditions falls back to the count-only default.";
|
|
24
|
+
export declare const LABEL_CHOOSE_OVERRIDE_TYPE = "Choose Override type";
|
|
25
|
+
export declare const LABEL_SELECT_DEVIATION_CLASS = "Select Deviation class";
|
|
26
|
+
export declare const LABEL_SELECT_SERVICE = "Select Service";
|
|
27
|
+
export declare const LABEL_SELECT_TRANSACTION = "Select Transaction";
|
|
28
|
+
export declare const LABEL_OVERRIDE_TYPE_SERVICE = "Service";
|
|
29
|
+
export declare const LABEL_OVERRIDE_TYPE_TRANSACTION = "Transaction";
|
|
30
|
+
export declare const PLACEHOLDER_SELECT_DEVIATION_CLASS = "Select deviation class\u2026";
|
|
31
|
+
export declare const PLACEHOLDER_SELECT_SERVICE = "Select service\u2026";
|
|
32
|
+
export declare const PLACEHOLDER_SELECT_TRANSACTION = "Select transaction\u2026";
|
|
33
|
+
export declare const LABEL_MODE_ANY = "Any";
|
|
34
|
+
export declare const LABEL_MODE_ALL = "All";
|
|
35
|
+
export declare const LABEL_MODE_K_OF = "K of";
|
|
36
|
+
export declare const LABEL_MODE_ANY_OR = "Any (OR)";
|
|
37
|
+
export declare const LABEL_MODE_ALL_AND = "All (AND)";
|
|
38
|
+
export declare const LABEL_MODE_K_OF_N = "K of N";
|
|
39
|
+
export declare const LABEL_CONDITION_STABLE_OBSERVATIONS = "Stable for N observations";
|
|
40
|
+
export declare const LABEL_CONDITION_STABLE_DURATION = "Stable for a duration";
|
|
41
|
+
export declare const LABEL_CONDITION_MIN_OBSERVATIONS = "Min observations";
|
|
42
|
+
export declare const LABEL_CONDITION_MIN_DURATION = "Min duration";
|
|
43
|
+
export declare const LABEL_UNIT_MINUTES = "Minutes";
|
|
44
|
+
export declare const LABEL_UNIT_HOURS = "Hours";
|
|
45
|
+
export declare const LABEL_UNIT_DAYS = "Days";
|
|
46
|
+
export declare const CLASS_LABELS: Record<InsightsDeviationClass, string>;
|
|
47
|
+
export declare const MODE_BADGE_LABELS: Record<InsightsLearningMode, string>;
|
|
48
|
+
export declare const MODE_OPTIONS: readonly [{
|
|
49
|
+
readonly id: InsightsLearningMode.Any;
|
|
50
|
+
readonly label: "Any (OR)";
|
|
51
|
+
}, {
|
|
52
|
+
readonly id: InsightsLearningMode.All;
|
|
53
|
+
readonly label: "All (AND)";
|
|
54
|
+
}, {
|
|
55
|
+
readonly id: InsightsLearningMode.KOf;
|
|
56
|
+
readonly label: "K of N";
|
|
57
|
+
}];
|
|
58
|
+
export declare const CONDITION_TYPE_OPTIONS: readonly [{
|
|
59
|
+
readonly id: InsightsLearningConditionType.StableObservations;
|
|
60
|
+
readonly label: "Stable for N observations";
|
|
61
|
+
}, {
|
|
62
|
+
readonly id: InsightsLearningConditionType.StableDuration;
|
|
63
|
+
readonly label: "Stable for a duration";
|
|
64
|
+
}, {
|
|
65
|
+
readonly id: InsightsLearningConditionType.MinObservations;
|
|
66
|
+
readonly label: "Min observations";
|
|
67
|
+
}, {
|
|
68
|
+
readonly id: InsightsLearningConditionType.MinDuration;
|
|
69
|
+
readonly label: "Min duration";
|
|
70
|
+
}];
|
|
71
|
+
export declare const DURATION_UNIT_OPTIONS: readonly [{
|
|
72
|
+
readonly id: DurationUnit.Minutes;
|
|
73
|
+
readonly label: "Minutes";
|
|
74
|
+
}, {
|
|
75
|
+
readonly id: DurationUnit.Hours;
|
|
76
|
+
readonly label: "Hours";
|
|
77
|
+
}, {
|
|
78
|
+
readonly id: DurationUnit.Days;
|
|
79
|
+
readonly label: "Days";
|
|
80
|
+
}];
|
|
81
|
+
export declare const isDurationConditionType: (type: InsightsLearningConditionType) => type is InsightsLearningConditionType.MinDuration | InsightsLearningConditionType.StableDuration;
|
|
82
|
+
export declare const isObservationsConditionType: (type: InsightsLearningConditionType) => type is InsightsLearningConditionType.MinObservations | InsightsLearningConditionType.StableObservations;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import type { InsightsServiceStat, InsightsTransactionStat } from '../../../../../types';
|
|
3
|
+
import { InsightsDeviationClass, InsightsPolicyScope } from './types';
|
|
4
|
+
export interface CreateOverridePanelProps {
|
|
5
|
+
services: InsightsServiceStat[];
|
|
6
|
+
transactions: InsightsTransactionStat[];
|
|
7
|
+
/** Existing overrides used to avoid duplicate (class, scopeKey) pairs. */
|
|
8
|
+
existingOverrides: {
|
|
9
|
+
class: InsightsDeviationClass;
|
|
10
|
+
scopeKey: string;
|
|
11
|
+
}[];
|
|
12
|
+
/** Prefill from the policy that opened create-override. */
|
|
13
|
+
initialClass?: InsightsDeviationClass;
|
|
14
|
+
onSubmit: (payload: {
|
|
15
|
+
class: InsightsDeviationClass;
|
|
16
|
+
scope: InsightsPolicyScope.Service | InsightsPolicyScope.Transaction;
|
|
17
|
+
scopeKey: string;
|
|
18
|
+
name: string;
|
|
19
|
+
}) => void | Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
export declare const CreateOverridePanel: FC<CreateOverridePanelProps>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { InsightsLearningConditionType, InsightsLearningMode, type InsightsLearningCondition, type InsightsLearningConditionInput, type InsightsLearningPolicy, type InsightsLearningPolicyInput, type InsightsPolicyScope, type InsightsTransactionStat } from '../../../../../types';
|
|
2
|
+
import { DurationUnit, InsightsDeviationClass, InsightsPolicyScope as PolicyScope, isGlobalPolicy, type LearningConditionDraft, type LearningPolicyListItem } from './types';
|
|
3
|
+
export declare const nextConditionKey: () => string;
|
|
4
|
+
export declare const buildPolicyId: (scope: InsightsPolicyScope | string, scopeKey: string, deviationClass: InsightsDeviationClass) => string;
|
|
5
|
+
export declare const minutesFromUnit: (value: number, unit: DurationUnit) => number;
|
|
6
|
+
export declare const unitFromMinutes: (minutes: number) => {
|
|
7
|
+
value: number;
|
|
8
|
+
unit: DurationUnit;
|
|
9
|
+
};
|
|
10
|
+
export declare const formatDurationShort: (minutes: number) => string;
|
|
11
|
+
export declare const formatDurationLong: (minutes: number) => string;
|
|
12
|
+
export declare const buildPolicySummary: (mode: InsightsLearningMode, conditions: LearningConditionDraft[], minMatches: number | null) => string;
|
|
13
|
+
export declare const buildPromotesWhenSummary: (mode: InsightsLearningMode, conditions: LearningConditionDraft[], minMatches: number | null) => string;
|
|
14
|
+
export type PromotesWhenParts = {
|
|
15
|
+
parts: string[];
|
|
16
|
+
joiner: string | null;
|
|
17
|
+
};
|
|
18
|
+
export declare const buildPromotesWhenParts: (mode: InsightsLearningMode, conditions: LearningConditionDraft[], minMatches: number | null) => PromotesWhenParts;
|
|
19
|
+
export declare const getModeJoinLabel: (mode: InsightsLearningMode) => "Any" | "All" | "K of";
|
|
20
|
+
export declare const apiConditionToDraft: (condition: InsightsLearningCondition) => LearningConditionDraft;
|
|
21
|
+
export declare const draftConditionToApi: (condition: LearningConditionDraft) => InsightsLearningConditionInput;
|
|
22
|
+
export declare const createDefaultCondition: (type?: InsightsLearningConditionType) => LearningConditionDraft;
|
|
23
|
+
export declare const insightsLearningPolicyToListItem: (policy: InsightsLearningPolicy) => LearningPolicyListItem;
|
|
24
|
+
export declare const formatTransactionScopeLabel: (tx: InsightsTransactionStat) => string;
|
|
25
|
+
/** Prefer human-readable transaction labels when stats are available. */
|
|
26
|
+
export declare const withResolvedOverrideNames: (policies: LearningPolicyListItem[], transactions: InsightsTransactionStat[]) => LearningPolicyListItem[];
|
|
27
|
+
export declare const listItemToInsightsLearningPolicyInput: (policy: LearningPolicyListItem) => InsightsLearningPolicyInput;
|
|
28
|
+
export declare const buildOverridePolicy: ({ scope, scopeKey, source, displayName, }: {
|
|
29
|
+
scope: PolicyScope.Service | PolicyScope.Transaction;
|
|
30
|
+
scopeKey: string;
|
|
31
|
+
source: LearningPolicyListItem;
|
|
32
|
+
displayName?: string;
|
|
33
|
+
}) => LearningPolicyListItem;
|
|
34
|
+
/** Fallback template when no global policy exists yet for the chosen class. */
|
|
35
|
+
export declare const createClassPolicyTemplate: (deviationClass: InsightsDeviationClass) => LearningPolicyListItem;
|
|
36
|
+
/** Reset numeric defaults when switching between observation and duration condition kinds. */
|
|
37
|
+
export declare const nextConditionForTypeChange: (condition: LearningConditionDraft, type: InsightsLearningConditionType) => LearningConditionDraft;
|
|
38
|
+
export { isGlobalPolicy };
|
package/lib/containers/insights/settings-and-configurations/panels/learning/policies-menu.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import type { LearningPolicyListItem } from './types';
|
|
3
|
+
export interface PoliciesMenuProps {
|
|
4
|
+
defaultPolicies: LearningPolicyListItem[];
|
|
5
|
+
overridePolicies: LearningPolicyListItem[];
|
|
6
|
+
selectedId: string | null;
|
|
7
|
+
onSelect: (id: string) => void;
|
|
8
|
+
onAddOverride: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const PoliciesMenu: FC<PoliciesMenuProps>;
|
package/lib/containers/insights/settings-and-configurations/panels/learning/policy-editor.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import { type LearningPolicyListItem } from './types';
|
|
3
|
+
export interface PolicyEditorProps {
|
|
4
|
+
policy: LearningPolicyListItem;
|
|
5
|
+
onAddOverride: () => void;
|
|
6
|
+
onSave: (policy: LearningPolicyListItem) => void | Promise<void>;
|
|
7
|
+
onDelete?: () => void | Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export declare const PolicyEditor: FC<PolicyEditorProps>;
|
package/lib/containers/insights/settings-and-configurations/panels/learning/policy-list-item.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import { type LearningPolicyListItem } from './types';
|
|
3
|
+
export interface PolicyListItemProps {
|
|
4
|
+
policy: LearningPolicyListItem;
|
|
5
|
+
isSelected: boolean;
|
|
6
|
+
onSelect: (id: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const PolicyListItem: FC<PolicyListItemProps>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { InsightsDeviationClass, InsightsLearningConditionType, InsightsLearningMode, InsightsPolicyScope } from '../../../../../types';
|
|
2
|
+
export { InsightsDeviationClass, InsightsLearningConditionType, InsightsLearningMode, InsightsPolicyScope };
|
|
3
|
+
export interface LearningConditionDraft {
|
|
4
|
+
/** Local React key — not sent to the API. */
|
|
5
|
+
key: string;
|
|
6
|
+
type: InsightsLearningConditionType;
|
|
7
|
+
/** Numeric value for the active condition field. */
|
|
8
|
+
value: number;
|
|
9
|
+
/** Display unit for duration conditions (stored as minutes on the wire). */
|
|
10
|
+
durationUnit: DurationUnit;
|
|
11
|
+
}
|
|
12
|
+
export declare enum DurationUnit {
|
|
13
|
+
Minutes = "minutes",
|
|
14
|
+
Hours = "hours",
|
|
15
|
+
Days = "days"
|
|
16
|
+
}
|
|
17
|
+
export interface LearningPolicyListItem {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
class: InsightsDeviationClass;
|
|
21
|
+
mode: InsightsLearningMode;
|
|
22
|
+
conditions: LearningConditionDraft[];
|
|
23
|
+
minMatches: number | null;
|
|
24
|
+
scope: InsightsPolicyScope;
|
|
25
|
+
scopeKey: string;
|
|
26
|
+
/** Short subtitle shown under the policy name in the side menu. */
|
|
27
|
+
summary: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const isGlobalPolicy: (policy: LearningPolicyListItem) => boolean;
|
|
30
|
+
/** Seeded / designed default classes (6) — matches backend seed + Figma row count. */
|
|
31
|
+
export declare const DEFAULT_LEARNING_CLASSES: InsightsDeviationClass[];
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export declare const TITLE_CONNECTION = "Connection";
|
|
2
|
+
export declare const TITLE_DISK = "Disk";
|
|
3
|
+
export declare const TITLE_FILESYSTEM = "Filesystem (ClickHouse volume)";
|
|
4
|
+
export declare const DESC_FILESYSTEM = "On shared volumes this includes unrelated host data \u2014 use Insights data above for stored size.";
|
|
5
|
+
export declare const TITLE_MEMORY = "Memory";
|
|
6
|
+
export declare const TITLE_RUNNING_QUERIES = "Running queries";
|
|
7
|
+
export declare const TITLE_RECENT_QUERIES = "Recent queries";
|
|
8
|
+
export declare const DESC_RECENT_QUERIES = "Last 5 min \u00B7 max 5";
|
|
9
|
+
export declare const TITLE_TABLES = "Database Tables";
|
|
10
|
+
export declare const TITLE_WRITE_PRESSURE = "Write pressure";
|
|
11
|
+
export declare const TITLE_WRITEBACK = "Insights <> DB";
|
|
12
|
+
export declare const LABEL_REACHABLE = "Reachable";
|
|
13
|
+
export declare const LABEL_PING_LATENCY = "Ping latency";
|
|
14
|
+
export declare const LABEL_CLICKHOUSE_VERSION = "ClickHouse version";
|
|
15
|
+
export declare const LABEL_DATABASE = "Database";
|
|
16
|
+
export declare const LABEL_INSIGHTS_DATA = "Insights data";
|
|
17
|
+
export declare const LABEL_PROCESS_RSS = "Process RSS";
|
|
18
|
+
export declare const LABEL_POD_CGROUP = "Pod (cgroup)";
|
|
19
|
+
export declare const LABEL_UPTIME = "Uptime";
|
|
20
|
+
export declare const LABEL_ACTIVE_NOW = "Active now";
|
|
21
|
+
export declare const LABEL_LONGEST_RUNNING = "Longest running";
|
|
22
|
+
export declare const LABEL_PEAK_MEMORY_ACTIVE = "Peak memory (active)";
|
|
23
|
+
export declare const LABEL_UNFINISHED_MUTATIONS = "Unfinished mutations";
|
|
24
|
+
export declare const LABEL_ACTIVE_PARTS = "Active parts";
|
|
25
|
+
export declare const LABEL_FLUSH_INTERVAL = "Flush interval";
|
|
26
|
+
export declare const LABEL_LAST_FLUSH = "Last flush";
|
|
27
|
+
export declare const LABEL_LAST_FLUSH_AT = "Last flush at";
|
|
28
|
+
export declare const LABEL_LAST_FLUSH_ERROR = "Last flush error";
|
|
29
|
+
export declare const LABEL_OK = "OK";
|
|
30
|
+
export declare const LABEL_NO = "No";
|
|
31
|
+
export declare const LABEL_ERROR = "Error";
|
|
32
|
+
export declare const LABEL_EM_DASH = "\u2014";
|
|
33
|
+
export declare const LABEL_HEAVIEST = "Heaviest";
|
|
34
|
+
export declare const LABEL_LATEST = "Latest";
|
|
35
|
+
export declare const LABEL_NO_ACTIVE_QUERIES = "No active queries (idle is normal).";
|
|
36
|
+
export declare const LABEL_NO_RECENT_QUERIES = "No finished queries in the last 5 minutes.";
|
|
37
|
+
export declare const LABEL_NO_TABLE_STATS = "No table stats.";
|
|
38
|
+
export declare const LABEL_NO_DISK_METRICS = "Filesystem usage is not available.";
|
|
39
|
+
export declare const LABEL_STORAGE_UNAVAILABLE = "Storage health is not available.";
|
|
40
|
+
export declare const LABEL_USED = "Used";
|
|
41
|
+
export declare const LABEL_AVAILABLE = "Available";
|
|
42
|
+
export declare const LABEL_TOTAL = "Total";
|
|
43
|
+
export declare const COL_WHEN = "When";
|
|
44
|
+
export declare const COL_DURATION = "Duration";
|
|
45
|
+
export declare const COL_MEMORY = "Memory";
|
|
46
|
+
export declare const COL_USER = "User";
|
|
47
|
+
export declare const COL_QUERY = "Query";
|
|
48
|
+
export declare const COL_ELAPSED = "Elapsed";
|
|
49
|
+
export declare const COL_TABLE = "Table";
|
|
50
|
+
export declare const COL_ROWS = "Rows (approx)";
|
|
51
|
+
export declare const COL_ON_DISK = "On disk";
|
|
52
|
+
export declare const COL_ACTIVE_PARTS = "Active parts";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const formatStorageBytes: (bytes?: number | null) => string;
|
|
2
|
+
export declare const formatSeconds: (seconds?: number | null) => string;
|
|
3
|
+
export declare const formatCount: (value?: number | null) => string;
|
|
4
|
+
export declare const formatMs: (ms?: number | null) => string;
|
|
5
|
+
export declare const formatPercent: (value?: number | null) => string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { type FC, type ReactNode } from 'react';
|
|
2
|
+
interface SectionProps {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
extra?: ReactNode;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const Section: FC<SectionProps>;
|
|
9
|
+
export declare const StatsRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
10
|
+
interface StatTileProps {
|
|
11
|
+
label: string;
|
|
12
|
+
value: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const StatTile: FC<StatTileProps>;
|
|
15
|
+
export declare const EmptyNote: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
16
|
+
export declare const TableFrame: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
17
|
+
export declare const VizFrame: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { TableColumn, TableRow } from '../../../../../components';
|
|
2
|
+
import type { InsightsStorageQuery, InsightsStorageTable } from '../../../../../types';
|
|
3
|
+
export declare enum RecentQueryColumn {
|
|
4
|
+
When = "when",
|
|
5
|
+
Duration = "duration",
|
|
6
|
+
Memory = "memory",
|
|
7
|
+
User = "user",
|
|
8
|
+
Query = "query"
|
|
9
|
+
}
|
|
10
|
+
export declare enum RunningQueryColumn {
|
|
11
|
+
Elapsed = "elapsed",
|
|
12
|
+
User = "user",
|
|
13
|
+
Memory = "memory",
|
|
14
|
+
Query = "query"
|
|
15
|
+
}
|
|
16
|
+
export declare enum TableStatsColumn {
|
|
17
|
+
Table = "table",
|
|
18
|
+
Rows = "rows",
|
|
19
|
+
OnDisk = "onDisk",
|
|
20
|
+
ActiveParts = "activeParts"
|
|
21
|
+
}
|
|
22
|
+
export declare const RECENT_QUERY_COLUMNS: TableColumn[];
|
|
23
|
+
export declare const RUNNING_QUERY_COLUMNS: TableColumn[];
|
|
24
|
+
export declare const TABLE_STATS_COLUMNS: TableColumn[];
|
|
25
|
+
export declare const getRecentQueryRows: (queries: InsightsStorageQuery[], formatWhen: (value?: string | null) => string) => TableRow[];
|
|
26
|
+
export declare const getRunningQueryRows: (queries: InsightsStorageQuery[]) => TableRow[];
|
|
27
|
+
export declare const getTableStatsRows: (tables: InsightsStorageTable[]) => TableRow[];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const TITLE_LEARNING_EXAMPLES = "Learning examples";
|
|
2
|
+
export declare const TITLE_RETENTION = "Retention";
|
|
3
|
+
export declare const TITLE_MEMORY_LIMITS = "Memory limits";
|
|
4
|
+
export declare const TITLE_DATABASE_WRITEBACK = "Database writeback";
|
|
5
|
+
export declare const LABEL_MAX_EXAMPLE_TRACES = "Maximum example traces";
|
|
6
|
+
export declare const HELPER_MAX_EXAMPLE_TRACES = "Maximum number of example traces collected per transaction.";
|
|
7
|
+
export declare const UNIT_TRACES = "traces";
|
|
8
|
+
export declare const LABEL_MIN_SAMPLING_INTERVAL = "Minimum sampling interval";
|
|
9
|
+
export declare const HELPER_MIN_SAMPLING_INTERVAL = "Minimum time between collected examples.";
|
|
10
|
+
export declare const UNIT_SECONDS = "seconds";
|
|
11
|
+
export declare const LABEL_SAMPLE_TRACE_RETENTION = "Sample trace retention";
|
|
12
|
+
export declare const HELPER_SAMPLE_TRACE_RETENTION = "Stored sample traces are deleted after this period.";
|
|
13
|
+
export declare const UNIT_DAYS = "days";
|
|
14
|
+
export declare const HINT_SAMPLE_TRACE_RETENTION = "Default: 30 \u00B7 Maximum: 90";
|
|
15
|
+
export declare const LABEL_MAX_TRANSACTIONS_IN_MEMORY = "Maximum transactions in memory";
|
|
16
|
+
export declare const HELPER_MAX_TRANSACTIONS_IN_MEMORY = "Least-recently used baselines are unloaded when this limit is reached and loaded again if traffic returns.";
|
|
17
|
+
export declare const UNIT_TRANSACTIONS = "transactions";
|
|
18
|
+
export declare const LABEL_MAX_MEMBERS_PER_BASELINE = "Maximum members per baseline";
|
|
19
|
+
export declare const HELPER_MAX_MEMBERS_PER_BASELINE = "Limits the size of an individual baseline set, such as unique call edges or paths.";
|
|
20
|
+
export declare const UNIT_MEMBERS = "members";
|
|
21
|
+
export declare const LABEL_FLUSH_INTERVAL = "Flush interval";
|
|
22
|
+
export declare const HELPER_FLUSH_INTERVAL = "How often pending learning data and occurrence counts are written to ClickHouse. Changes apply without a restart.";
|
|
23
|
+
export declare const HINT_FLUSH_INTERVAL = "Default: 5 \u00B7 Maximum: 300";
|
|
24
|
+
export declare const NOTE_EVIDENCE_SAMPLES = "Anomaly and guardrail evidence each keep a single write-once sample; occurrences are counted separately.";
|
|
25
|
+
export declare const NOTE_FINDINGS_LOOKBACK = "Findings lookback is chosen per page, not here.";
|
|
26
|
+
export declare const BTN_SAVE_SETTINGS = "Save settings";
|
|
27
|
+
export declare const BTN_DISCARD_CHANGES = "Discard changes";
|
|
28
|
+
export declare const LABEL_SYSTEM_UNAVAILABLE = "System settings are not available.";
|
|
29
|
+
export declare const MIN_SETTING = 1;
|
|
30
|
+
export declare const MAX_OBSERVATION_RETENTION_DAYS = 90;
|
|
31
|
+
export declare const MAX_FLUSH_INTERVAL_SECONDS = 300;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import { type SettingsMenuItemId } from '../menu-config';
|
|
3
|
+
export interface SettingsMenuProps {
|
|
4
|
+
selected: SettingsMenuItemId;
|
|
5
|
+
onSelect: (id: SettingsMenuItemId) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const SettingsMenu: FC<SettingsMenuProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type DefaultTheme } from 'styled-components';
|
|
2
|
+
import { type InsightsBaselineClass } from '../../../../../types/insights';
|
|
3
|
+
import { type TableColumn, type TableRow } from '../../../../../components';
|
|
4
|
+
export declare enum BaselinesColumnKeys {
|
|
5
|
+
TransactionId = "transactionId",
|
|
6
|
+
Class = "class",
|
|
7
|
+
Status = "status",
|
|
8
|
+
Learning = "learning",
|
|
9
|
+
Data = "data",
|
|
10
|
+
ObservationCount = "observationCount",
|
|
11
|
+
ObservationCountAtLastChange = "observationCountAtLastChange",
|
|
12
|
+
LearningStartedAt = "learningStartedAt",
|
|
13
|
+
LastChangedAt = "lastChangedAt"
|
|
14
|
+
}
|
|
15
|
+
export declare const getTableColumnsForBaselines: () => TableColumn[];
|
|
16
|
+
export declare const getTableRowsForBaselines: (theme: DefaultTheme, baselines?: InsightsBaselineClass[]) => TableRow[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { InsightsObservationSummary } from '../../../../../types/insights';
|
|
2
|
+
import { type TableColumn, type TableRow } from '../../../../../components';
|
|
3
|
+
export declare enum ObservationsColumnKeys {
|
|
4
|
+
TraceId = "traceId",
|
|
5
|
+
TransactionId = "transactionId",
|
|
6
|
+
ObservedAt = "observedAt",
|
|
7
|
+
DurationMs = "durationMs",
|
|
8
|
+
SampleReason = "sampleReason"
|
|
9
|
+
}
|
|
10
|
+
export declare const getTableColumnsForObservations: () => TableColumn[];
|
|
11
|
+
export declare const getTableRowsForObservations: (observations?: InsightsObservationSummary[]) => TableRow[];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type FormatDurationAgo } from '../../../hooks';
|
|
2
|
+
import { type DefaultTheme } from 'styled-components';
|
|
3
|
+
import { type InsightsTransactionStat } from '../../../types';
|
|
4
|
+
import { type OpenInsightsDrawer } from '../insights-context';
|
|
5
|
+
import { type TableColumn, type TableRow, type HoverAction } from '../../../components';
|
|
6
|
+
export declare enum TransactionsColumnKeys {
|
|
7
|
+
TransactionId = "transactionId",
|
|
8
|
+
LastSeen = "lastSeen",
|
|
9
|
+
Namespace = "namespace",
|
|
10
|
+
Service = "service",
|
|
11
|
+
Kind = "kind",
|
|
12
|
+
Operation = "operation",
|
|
13
|
+
Baseline = "baseline",
|
|
14
|
+
Promoted = "promoted",
|
|
15
|
+
Volume = "volume",
|
|
16
|
+
TransactionCount = "transactionCount"
|
|
17
|
+
}
|
|
18
|
+
export type TransactionsServiceGroup = {
|
|
19
|
+
namespace: string;
|
|
20
|
+
service: string;
|
|
21
|
+
volume: number;
|
|
22
|
+
transactions: InsightsTransactionStat[];
|
|
23
|
+
};
|
|
24
|
+
export declare const getTransactionsRowActions: (row: TableRow, openDrawer: OpenInsightsDrawer) => HoverAction[];
|
|
25
|
+
export declare const TRANSACTIONS_TABLE_COLUMNS: TableColumn[];
|
|
26
|
+
export declare const TRANSACTIONS_GROUP_BY_SERVICE_COLUMNS: TableColumn[];
|
|
27
|
+
export declare const getCountsForTransactions: (transactions?: InsightsTransactionStat[]) => {
|
|
28
|
+
total: number;
|
|
29
|
+
services: number;
|
|
30
|
+
volume: number;
|
|
31
|
+
promoted: number;
|
|
32
|
+
learning: number;
|
|
33
|
+
};
|
|
34
|
+
export declare const getTableRowsForTransactions: (theme: DefaultTheme, formatDurationAgo: FormatDurationAgo, transactions?: InsightsTransactionStat[], limit?: number) => TableRow[];
|
|
35
|
+
export declare const getTableRowsForTransactionsGroupedByService: (theme: DefaultTheme, formatDurationAgo: FormatDurationAgo, openDrawer: OpenInsightsDrawer, groups: TransactionsServiceGroup[]) => TableRow[];
|