@gravitee/gamma-lib-observability 3.3.0-beta.8 → 3.3.0-beta.9
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/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3192 -3128
- package/dist/targets/DeleteTargetDialog.d.ts +11 -0
- package/dist/targets/DeleteTargetDialog.d.ts.map +1 -0
- package/dist/targets/TargetGroup.d.ts +3 -3
- package/dist/targets/TargetGroup.d.ts.map +1 -1
- package/dist/targets/TargetHeatmap.d.ts.map +1 -1
- package/dist/targets/index.d.ts +3 -3
- package/dist/targets/index.d.ts.map +1 -1
- package/dist/targets/rule-defaults.d.ts +0 -7
- package/dist/targets/rule-defaults.d.ts.map +1 -1
- package/dist/targets/rule-standing.d.ts +1 -3
- package/dist/targets/rule-standing.d.ts.map +1 -1
- package/dist/targets/rule-views.d.ts +15 -7
- package/dist/targets/rule-views.d.ts.map +1 -1
- package/dist/targets/testing/in-memory-targets-source.d.ts.map +1 -1
- package/dist/targets/use-target-writes.d.ts +5 -2
- package/dist/targets/use-target-writes.d.ts.map +1 -1
- package/dist/testing.js +21 -12
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PerformanceTarget } from './types';
|
|
2
|
+
export interface DeleteTargetDialogProps {
|
|
3
|
+
/** The target about to be deleted; `null` keeps the dialog closed. */
|
|
4
|
+
readonly target: PerformanceTarget | null;
|
|
5
|
+
readonly saving: boolean;
|
|
6
|
+
readonly onDelete: (target: PerformanceTarget) => Promise<unknown>;
|
|
7
|
+
readonly onClose: () => void;
|
|
8
|
+
}
|
|
9
|
+
/** Confirm the deletion of a whole target: its rules and their evaluation history go together. */
|
|
10
|
+
export declare function DeleteTargetDialog({ target, saving, onDelete, onClose }: DeleteTargetDialogProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
//# sourceMappingURL=DeleteTargetDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeleteTargetDialog.d.ts","sourceRoot":"","sources":["../../src/targets/DeleteTargetDialog.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,MAAM,WAAW,uBAAuB;IACtC,sEAAsE;IACtE,QAAQ,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,kGAAkG;AAClG,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,uBAAuB,kDAIhG"}
|
|
@@ -23,9 +23,9 @@ export interface TargetGroupProps {
|
|
|
23
23
|
readonly onStats: (targetId: string, stats: GroupStats) => void;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* One target as a group: the schedule its rules share and the ways to change it, then one row per rule
|
|
27
|
-
*
|
|
28
|
-
* last hour of it is handed up to the panel summary.
|
|
26
|
+
* One target as a group: the schedule its rules share and the ways to change it, then one row per rule in the
|
|
27
|
+
* order the owner declared them. Reads the same history page the rows open on, so the verdicts here and the charts
|
|
28
|
+
* there tell one story; the last hour of it is handed up to the panel summary.
|
|
29
29
|
*/
|
|
30
30
|
export declare function TargetGroup({ target, subject, metrics, metricsHint, readOnly, suggestions, defaults, describeReason, onChanged, onStats, }: TargetGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
//# sourceMappingURL=TargetGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TargetGroup.d.ts","sourceRoot":"","sources":["../../src/targets/TargetGroup.tsx"],"names":[],"mappings":"
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O,EACP,WAAW,EACX,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,cAAc,EACd,SAAS,EACT,OAAO,GACR,EAAE,gBAAgB,2CAoIlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TargetHeatmap.d.ts","sourceRoot":"","sources":["../../src/targets/TargetHeatmap.tsx"],"names":[],"mappings":"AAaA,OAAO,EAA0B,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"TargetHeatmap.d.ts","sourceRoot":"","sources":["../../src/targets/TargetHeatmap.tsx"],"names":[],"mappings":"AAaA,OAAO,EAA0B,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAExE,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAEhB,gBAAgB,EAGjB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,wFAAwF;IACxF,QAAQ,CAAC,WAAW,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAClD,QAAQ,CAAC,OAAO,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC9C;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAgID;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,kBAAkB,kDA+ClG"}
|
package/dist/targets/index.d.ts
CHANGED
|
@@ -12,9 +12,9 @@ export { analyticsApiName, analyticsApiNames, apiTypeLabel } from './api-type-na
|
|
|
12
12
|
export { notEvaluableReason, summarizeHistory, type HistorySummary, type NotEvaluableContext, } from './evaluation-summary';
|
|
13
13
|
export { describeRule, describeRuleSubject, describeThreshold, formatDeviation, formatDurationSeconds, formatMetricValue, formatTimeAgo, measureLabel, operatorSymbol, statusLabel, type RuleMetricInfo, } from './format';
|
|
14
14
|
export { offeredFilterNames, offeredFilterOperators, TARGET_FILTER_OPERATORS } from './rule-filters';
|
|
15
|
-
export { cadenceClause, describeCadence, describeStanding
|
|
16
|
-
export { defaultRank, defaultTargetOf, defaultThresholdOf, isDefaultRule, isRetuned,
|
|
17
|
-
export { HELD_WINDOW_MS, NO_TRAFFIC_REASON, TOO_FEW_CALLS_REASON, buildRuleViews, describeDefaultReason, readingsOf, singleRule, toDefinition, type DescribeRuleReason, type RuleViewOptions, type TargetRuleView, } from './rule-views';
|
|
15
|
+
export { cadenceClause, describeCadence, describeStanding } from './rule-standing';
|
|
16
|
+
export { defaultRank, defaultTargetOf, defaultThresholdOf, isDefaultRule, isRetuned, removedDefaults, ruleDescription, ruleTitle, } from './rule-defaults';
|
|
17
|
+
export { HELD_WINDOW_MS, NO_TRAFFIC_REASON, TOO_FEW_CALLS_REASON, buildRuleViews, describeDefaultReason, readingsOf, resultOf, singleRule, toDefinition, type DescribeRuleReason, type RuleViewOptions, type TargetRuleView, } from './rule-views';
|
|
18
18
|
export { draftToRule, draftToSettings, emptyRuleDraft, isRuleDraftValid, isScheduleDraftValid, offeredFilterSpecs, preservedFilters, resolveRuleDraft, ruleFacets, ruleToDraft, scheduleDraftOf, scopeFor, type DraftToRuleOptions, type RuleDraft, type RuleFacet, type RuleFilterDraft, type ScheduleDraft, type TargetSettings, } from './rule-drafts';
|
|
19
19
|
export { MIN_SECONDS_BETWEEN_EVALUATIONS, latestEvaluatedAt, useEvaluationCooldown } from './use-evaluation-cooldown';
|
|
20
20
|
export { describeWriteFailure, useTargetWrites } from './use-target-writes';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/targets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE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Aa,EAClB,KAAK,cAAc,GACpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,+BAA+B,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACtH,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,YAAY,EACV,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,GACd,MAAM,SAAS,CAAC"}
|
|
@@ -9,13 +9,6 @@ export declare function isDefaultRule(rule: RuleKey, defaults: readonly TargetDe
|
|
|
9
9
|
export declare function ruleTitle(rule: RuleKey, defaults: readonly TargetDefaultRule[], metric?: RuleMetricInfo): string;
|
|
10
10
|
/** What the rule measures, in a few words: the host's for a default that has one, the subject wording for the rest. */
|
|
11
11
|
export declare function ruleDescription(rule: RuleKey, defaults: readonly TargetDefaultRule[], metric?: RuleMetricInfo): string;
|
|
12
|
-
/** A rule with its position in the target it came from, which is what an evaluation's `rules[]` is indexed by. */
|
|
13
|
-
export interface IndexedRule<T extends RuleKey> {
|
|
14
|
-
readonly rule: T;
|
|
15
|
-
readonly index: number;
|
|
16
|
-
}
|
|
17
|
-
/** The defaults first, in the host's order, then the owner's own rules as declared; every entry keeps its target index. */
|
|
18
|
-
export declare function orderRules<T extends RuleKey>(rules: readonly T[], defaults: readonly TargetDefaultRule[]): IndexedRule<T>[];
|
|
19
12
|
/** The threshold the host seeded for this rule, or `undefined` for a rule the owner added. */
|
|
20
13
|
export declare function defaultThresholdOf(rule: RuleKey, defaults: readonly TargetDefaultRule[]): number | undefined;
|
|
21
14
|
/** A default the owner moved off the threshold it shipped with. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-defaults.d.ts","sourceRoot":"","sources":["../../src/targets/rule-defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE7D,KAAK,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAC;AAMtD,yHAAyH;AACzH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,iBAAiB,EAAE,GAAG,MAAM,CAGzF;AAED,0HAA0H;AAC1H,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,iBAAiB,EAAE,GAAG,OAAO,CAE5F;AAED,8GAA8G;AAC9G,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,iBAAiB,EAAE,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,MAAM,CAGhH;AAED,uHAAuH;AACvH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,SAAS,iBAAiB,EAAE,EACtC,MAAM,CAAC,EAAE,cAAc,GACtB,MAAM,CAGR;AAED,
|
|
1
|
+
{"version":3,"file":"rule-defaults.d.ts","sourceRoot":"","sources":["../../src/targets/rule-defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE7D,KAAK,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAC;AAMtD,yHAAyH;AACzH,wBAAgB,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EvaluationStatus | undefined): number;
|
|
3
|
-
export declare function sortByStanding<T>(entries: readonly T[], statusOf: (entry: T) => TargetEvaluationStatus | undefined): T[];
|
|
1
|
+
import { TargetDeviation } from './types';
|
|
4
2
|
/** `12% under`, `18% over`, `at the threshold`: where the observed value stands against the threshold, as a share of it. */
|
|
5
3
|
export declare function describeStanding(deviation: TargetDeviation | undefined): string | undefined;
|
|
6
4
|
/** `evaluated every 5 minutes over the last 15 minutes`, for the middle of a sentence. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-standing.d.ts","sourceRoot":"","sources":["../../src/targets/rule-standing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"rule-standing.d.ts","sourceRoot":"","sources":["../../src/targets/rule-standing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,4HAA4H;AAC5H,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,eAAe,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAK3F;AAUD,0FAA0F;AAC1F,wBAAgB,aAAa,CAAC,eAAe,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAEpF;AAED,qHAAqH;AACrH,wBAAgB,eAAe,CAAC,eAAe,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAGtF"}
|
|
@@ -10,7 +10,7 @@ export type DescribeRuleReason = (rule: TargetRule, result: TargetRuleResult | u
|
|
|
10
10
|
export declare const describeDefaultReason: DescribeRuleReason;
|
|
11
11
|
export interface RuleViewOptions {
|
|
12
12
|
readonly now?: number;
|
|
13
|
-
/** The host's defaults: they
|
|
13
|
+
/** The host's defaults: they carry the host's words and are told apart from the owner's rules. */
|
|
14
14
|
readonly defaults?: readonly TargetDefaultRule[];
|
|
15
15
|
/** A host's own reading of a skipped window, tried before the panel's; it may answer `undefined` to defer. */
|
|
16
16
|
readonly describeReason?: DescribeRuleReason;
|
|
@@ -20,10 +20,10 @@ export interface RuleViewOptions {
|
|
|
20
20
|
* doing. The panel shows rules, not targets: a target is the envelope the management API files them in.
|
|
21
21
|
*/
|
|
22
22
|
export interface TargetRuleView {
|
|
23
|
-
/** Stable across renders: the target's id and the rule's position
|
|
23
|
+
/** Stable across renders and edits: the target's id and the rule's own, or its position while it has none. */
|
|
24
24
|
readonly id: string;
|
|
25
25
|
readonly target: PerformanceTarget;
|
|
26
|
-
/** The rule's position in the target, which is what
|
|
26
|
+
/** The rule's position in the target, which is what a write replaces or removes it by. */
|
|
27
27
|
readonly index: number;
|
|
28
28
|
readonly rule: TargetRule;
|
|
29
29
|
readonly metric: TargetMetricSpec | undefined;
|
|
@@ -51,15 +51,23 @@ export interface TargetRuleView {
|
|
|
51
51
|
readonly passRate: number | null;
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
54
|
+
* The outcome of `rule` in an evaluation: by id when both carry one, so the results of a rule since removed or
|
|
55
|
+
* added beside it are never read as this rule's; by position for evaluations stored before rules had ids, and for
|
|
56
|
+
* a rule that has none yet. `undefined` when the rule was not part of the target at the time.
|
|
57
|
+
*/
|
|
58
|
+
export declare function resultOf(evaluation: TargetEvaluation, rule: TargetRule, index: number): TargetRuleResult | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Reads a target and its history (most recent first, as the API serves it) into one view per rule, in the order
|
|
61
|
+
* the owner declared them: a row that moved with its verdict or its metric would be lost from sight on the edit
|
|
62
|
+
* that changed it.
|
|
56
63
|
*/
|
|
57
64
|
export declare function buildRuleViews(target: PerformanceTarget, metrics: readonly TargetMetricSpec[], evaluations: readonly TargetEvaluation[], options?: RuleViewOptions): TargetRuleView[];
|
|
58
65
|
/** How many readings a trend has to draw: the windows that reached a value. */
|
|
59
66
|
export declare function readingsOf(series: readonly (number | undefined)[]): number;
|
|
60
67
|
/**
|
|
61
|
-
* One rule's slice of a target and its history, shaped as a target of its own so the heatmap draws it alone.
|
|
62
|
-
*
|
|
68
|
+
* One rule's slice of a target and its history, shaped as a target of its own so the heatmap draws it alone. Each
|
|
69
|
+
* evaluation keeps this rule's result only, found the way {@link resultOf} finds it; windows the rule was not part
|
|
70
|
+
* of are left out.
|
|
63
71
|
*/
|
|
64
72
|
export declare function singleRule(target: PerformanceTarget, index: number, evaluations: readonly TargetEvaluation[]): {
|
|
65
73
|
readonly target: PerformanceTarget;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-views.d.ts","sourceRoot":"","sources":["../../src/targets/rule-views.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB,kEAAkE;AAClE,eAAO,MAAM,cAAc,QAAiB,CAAC;AAE7C,2FAA2F;AAC3F,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAC9C,eAAO,MAAM,oBAAoB,kBAAkB,CAAC;AAEpD,8FAA8F;AAC9F,MAAM,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,gBAAgB,GAAG,SAAS,KAAK,MAAM,GAAG,SAAS,CAAC;AAEhH,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,EAAE,kBAGnC,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB
|
|
1
|
+
{"version":3,"file":"rule-views.d.ts","sourceRoot":"","sources":["../../src/targets/rule-views.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EACjB,MA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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"in-memory-targets-source.d.ts","sourceRoot":"","sources":["../../../src/targets/testing/in-memory-targets-source.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAChG,OAAO,KAAK,EAEV,iBAAiB,EAEjB,gBAAgB,EAEhB,iBAAiB,EACjB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"in-memory-targets-source.d.ts","sourceRoot":"","sources":["../../../src/targets/testing/in-memory-targets-source.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAChG,OAAO,KAAK,EAEV,iBAAiB,EAEjB,gBAAgB,EAEhB,iBAAiB,EACjB,gBAAgB,EAGjB,MAAM,UAAU,CAAC;AAiDlB;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAC,CAqCrF,CAAC;AAmDF,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAChD,oDAAoD;IACpD,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAC,CAAC,CAAC;IAC7E,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAC,CAAC,CAAC;IAC7E,4GAA4G;IAC5G,QAAQ,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,iBAAiB,EAAE,CAAC,CAAC,CAAC;IAC/E,6GAA6G;IAC7G,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,EAAE,GAAG,EAAE,IAAI,KAAK,gBAAgB,CAAC;IAC/E,gGAAgG;IAChG,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,uEAAuE;IACvE,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IACxC,0EAA0E;IAC1E,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,wCAAwC;IACxC,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC;IACzB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,qBAAsB,SAAQ,aAAa;IAC1D,8CAA8C;IAC9C,QAAQ,CAAC,OAAO,EAAE,MAAM,iBAAiB,EAAE,CAAC;IAC5C,yDAAyD;IACzD,QAAQ,CAAC,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,gBAAgB,EAAE,CAAC;CAClE;AAaD,oEAAoE;AACpE,wBAAgB,eAAe,CAAC,MAAM,EAAE,iBAAiB,EAAE,GAAG,EAAE,IAAI,GAAG,gBAAgB,CAqBtF;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,GAAE,4BAAiC,GAAG,qBAAqB,CAgI7G"}
|
|
@@ -6,8 +6,9 @@ export declare function describeWriteFailure(error: unknown, fallback: string):
|
|
|
6
6
|
/**
|
|
7
7
|
* The writes the panel makes, over the lib's target mutations: a target is the envelope the management API files
|
|
8
8
|
* rules in, so adding, retuning or deleting a rule is an update of its target, and deleting the last rule deletes
|
|
9
|
-
* the target, since the management API refuses an empty one
|
|
10
|
-
* the refusal; the others leave their failure in
|
|
9
|
+
* the target, since the management API refuses an empty one; a target can also go as a whole, rules and history
|
|
10
|
+
* with it. A write a form waits on rethrows so the form can show the refusal; the others leave their failure in
|
|
11
|
+
* `failure` for the panel to show.
|
|
11
12
|
*/
|
|
12
13
|
export declare function useTargetWrites(reference: string, onChanged?: () => void): {
|
|
13
14
|
/** Replaces one rule with what the owner edited. */
|
|
@@ -18,6 +19,8 @@ export declare function useTargetWrites(reference: string, onChanged?: () => voi
|
|
|
18
19
|
createTarget: (definition: TargetDefinition) => Promise<void>;
|
|
19
20
|
/** Changes the target's schedule; the rules stay. */
|
|
20
21
|
updateSettings: (target: PerformanceTarget, settings: TargetSettings) => Promise<void>;
|
|
22
|
+
/** Removes the target with every rule and evaluation it holds; the confirmation waits on it. */
|
|
23
|
+
deleteTarget: (target: PerformanceTarget) => Promise<void>;
|
|
21
24
|
/** Removes one rule; the last one takes its target with it. Nothing waits on it: a failure lands in `failure`. */
|
|
22
25
|
deleteRule: (view: TargetRuleView) => Promise<void>;
|
|
23
26
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-target-writes.d.ts","sourceRoot":"","sources":["../../src/targets/use-target-writes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI/E,4FAA4F;AAC5F,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG7E;AAED
|
|
1
|
+
{"version":3,"file":"use-target-writes.d.ts","sourceRoot":"","sources":["../../src/targets/use-target-writes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI/E,4FAA4F;AAC5F,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG7E;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,IAAI;IAoBrE,oDAAoD;uBACjC,cAAc,UAAU,UAAU;IAOrD,oDAAoD;sBAClC,iBAAiB,QAAQ,UAAU;IAErD,6FAA6F;+BAClE,gBAAgB;IAC3C,qDAAqD;6BAC5B,iBAAiB,YAAY,cAAc;IAIpE,gGAAgG;2BACzE,iBAAiB;IACxC,kHAAkH;uBACzF,cAAc;IAYvC;;;;OAIG;0BACyB,iBAAiB,KAAG,OAAO,CAAC,MAAM,CAAC;IAU/D,8FAA8F;;;;;EAMjG"}
|
package/dist/testing.js
CHANGED
|
@@ -229,8 +229,15 @@ var T = 0;
|
|
|
229
229
|
function E(e) {
|
|
230
230
|
return T += 1, `${e}-${T}`;
|
|
231
231
|
}
|
|
232
|
-
function D(e
|
|
232
|
+
function D(e) {
|
|
233
|
+
return e.map((e) => e.id === void 0 ? {
|
|
234
|
+
...e,
|
|
235
|
+
id: E("rule")
|
|
236
|
+
} : e);
|
|
237
|
+
}
|
|
238
|
+
function O(e, t) {
|
|
233
239
|
let n = e.rules.map((e) => ({
|
|
240
|
+
id: e.id,
|
|
234
241
|
metric: e.metric,
|
|
235
242
|
measure: e.measure,
|
|
236
243
|
operator: e.operator,
|
|
@@ -250,8 +257,8 @@ function D(e, t) {
|
|
|
250
257
|
evaluatedAt: t.toISOString()
|
|
251
258
|
};
|
|
252
259
|
}
|
|
253
|
-
function
|
|
254
|
-
let t = e.now ?? (() => /* @__PURE__ */ new Date()), n = e.metricSpecs ?? S, r = e.evaluate ??
|
|
260
|
+
function k(e = {}) {
|
|
261
|
+
let t = e.now ?? (() => /* @__PURE__ */ new Date()), n = e.metricSpecs ?? S, r = e.evaluate ?? O, a = e.rateLimitSeconds ?? 30, o = new Map(e.targets?.map((e) => [e.id, e])), c = new Map(Object.entries(e.evaluations ?? {}).map(([e, t]) => [e, [...t]])), l = /* @__PURE__ */ new Map(), u = e.rateLimitedForSeconds === void 0 ? void 0 : t().getTime() + e.rateLimitedForSeconds * 1e3;
|
|
255
262
|
async function d(t) {
|
|
256
263
|
if (e.latencyMs && await new Promise((t) => setTimeout(t, e.latencyMs)), e.failure) throw e.failure;
|
|
257
264
|
return t();
|
|
@@ -276,6 +283,7 @@ function O(e = {}) {
|
|
|
276
283
|
let n = {
|
|
277
284
|
...e,
|
|
278
285
|
id: E("target"),
|
|
286
|
+
rules: D(e.rules),
|
|
279
287
|
createdAt: t().toISOString()
|
|
280
288
|
};
|
|
281
289
|
return o.set(n.id, n), n;
|
|
@@ -286,6 +294,7 @@ function O(e = {}) {
|
|
|
286
294
|
let i = {
|
|
287
295
|
...r,
|
|
288
296
|
...n,
|
|
297
|
+
rules: D(n.rules),
|
|
289
298
|
updatedAt: t().toISOString()
|
|
290
299
|
};
|
|
291
300
|
return o.set(e, i), i;
|
|
@@ -309,7 +318,7 @@ function O(e = {}) {
|
|
|
309
318
|
}),
|
|
310
319
|
fetchLatestByReferences: (e) => d(() => {
|
|
311
320
|
let t = {};
|
|
312
|
-
for (let n of e) t[n] =
|
|
321
|
+
for (let n of e) t[n] = j([...o.values()].filter((e) => e.subject.reference === n).map((e) => c.get(e.id)?.[0]).filter((e) => e !== void 0));
|
|
313
322
|
return t;
|
|
314
323
|
}),
|
|
315
324
|
fetchMetricSpecs: (e) => d(() => {
|
|
@@ -321,26 +330,26 @@ function O(e = {}) {
|
|
|
321
330
|
fetchFilterValues: (t) => d(() => t.apiIds.length === 0 ? [] : [...e.filterValues?.[t.filter] ?? []])
|
|
322
331
|
};
|
|
323
332
|
}
|
|
324
|
-
var
|
|
333
|
+
var A = {
|
|
325
334
|
PASS: 0,
|
|
326
335
|
NOT_EVALUABLE: 1,
|
|
327
336
|
BREACH: 2
|
|
328
337
|
};
|
|
329
|
-
function
|
|
338
|
+
function j(e) {
|
|
330
339
|
let t = null;
|
|
331
|
-
for (let n of e) (t === null ||
|
|
340
|
+
for (let n of e) (t === null || A[n.status] > A[t.status]) && (t = n);
|
|
332
341
|
return t;
|
|
333
342
|
}
|
|
334
343
|
//#endregion
|
|
335
344
|
//#region src/testing/index.tsx
|
|
336
|
-
function
|
|
345
|
+
function M() {
|
|
337
346
|
return new d({ defaultOptions: { queries: {
|
|
338
347
|
retry: !1,
|
|
339
348
|
gcTime: 0
|
|
340
349
|
} } });
|
|
341
350
|
}
|
|
342
|
-
function
|
|
343
|
-
let { dataSources: d = {}, filterProviders: m, capabilities: h = t, queryClient: g =
|
|
351
|
+
function N(i, s = {}) {
|
|
352
|
+
let { dataSources: d = {}, filterProviders: m, capabilities: h = t, queryClient: g = M(), ..._ } = s;
|
|
344
353
|
function v({ children: t }) {
|
|
345
354
|
let i = /* @__PURE__ */ u(n, { children: t });
|
|
346
355
|
return d.persistence && (i = /* @__PURE__ */ u(l, {
|
|
@@ -374,7 +383,7 @@ function M(i, s = {}) {
|
|
|
374
383
|
queryClient: g
|
|
375
384
|
};
|
|
376
385
|
}
|
|
377
|
-
function
|
|
386
|
+
function P(e, t) {
|
|
378
387
|
let n = ["clientWidth", "clientHeight"].map((e) => [e, Object.getOwnPropertyDescriptor(HTMLElement.prototype, e)]);
|
|
379
388
|
return Object.defineProperties(HTMLElement.prototype, {
|
|
380
389
|
clientWidth: {
|
|
@@ -390,4 +399,4 @@ function N(e, t) {
|
|
|
390
399
|
};
|
|
391
400
|
}
|
|
392
401
|
//#endregion
|
|
393
|
-
export { S as SAMPLE_METRIC_SPECS,
|
|
402
|
+
export { S as SAMPLE_METRIC_SPECS, k as createInMemoryTargetsSource, O as quietEvaluation, N as renderWithObservability, P as stubElementSize };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravitee/gamma-lib-observability",
|
|
3
|
-
"version": "3.3.0-beta.
|
|
3
|
+
"version": "3.3.0-beta.9",
|
|
4
4
|
"description": "Shared observability library for Gamma modules — dashboards, logs, tracing UI components and integration with business rules.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "yarn@4.14.1",
|