@kong-ui-public/analytics-chart 10.6.1 → 10.6.2-pr.2535.074b538e0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,9 @@ import type english from '../../locales/en.json';
6
6
  interface ThresholdOptions {
7
7
  threshold: Record<ExploreAggregations, Threshold[]> | undefined;
8
8
  }
9
+ type ThresholdExtra = Threshold & {
10
+ hovered?: boolean;
11
+ };
9
12
  export type ThresholdIntersection = {
10
13
  start: number;
11
14
  end: number;
@@ -20,6 +23,7 @@ export declare class ThresholdPlugin implements Plugin {
20
23
  private _mouseMoveHandler?;
21
24
  constructor(i18n: ReturnType<typeof createI18n<typeof english>>);
22
25
  private _syncThresholds;
26
+ get thresholds(): Record<"active_services" | "request_count" | "request_per_minute" | "response_latency_average" | "response_latency_p99" | "response_latency_p95" | "response_latency_p50" | "upstream_latency_p99" | "upstream_latency_p95" | "upstream_latency_p50" | "upstream_latency_average" | "kong_latency_p99" | "kong_latency_p95" | "kong_latency_p50" | "kong_latency_average" | "response_size_p99" | "response_size_p95" | "response_size_p50" | "response_size_average" | "response_size_sum" | "request_size_p99" | "request_size_p95" | "request_size_p50" | "request_size_average" | "request_size_sum", ThresholdExtra[]> | undefined;
23
27
  beforeUpdate(chart: Chart, _: any, pluginOptions: ThresholdOptions): void;
24
28
  beforeInit(chart: Chart, _: any, pluginOptions: ThresholdOptions): void;
25
29
  afterDatasetsDraw(chart: Chart, _: any): void;
@@ -1 +1 @@
1
- {"version":3,"file":"ThresholdPlugin.d.ts","sourceRoot":"","sources":["../../../../src/components/chart-plugins/ThresholdPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAE9E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;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AAgB,GAAG,IAAI;IA4BvE,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,GAAG,IAAI;IAmE7C,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CAKlC"}
@@ -19814,14 +19814,20 @@ class rC {
19814
19814
  this.i18n = t;
19815
19815
  }
19816
19816
  _syncThresholds(t) {
19817
- var e;
19818
- for (const i of Object.keys(t.threshold || {})) {
19819
- const s = (e = t.threshold) == null ? void 0 : e[i];
19820
- s && (this._thresholds = {
19817
+ var e, i;
19818
+ for (const s of Object.keys(t.threshold || {})) {
19819
+ const r = (e = t.threshold) == null ? void 0 : e[s];
19820
+ r && (this._thresholds = {
19821
19821
  ...this._thresholds,
19822
- [i]: s.map((r) => ({ ...r, hovered: !1 }))
19822
+ [s]: r.map((a) => ({ ...a, hovered: !1 }))
19823
19823
  });
19824
19824
  }
19825
+ if (this._thresholds)
19826
+ for (const s of Object.keys(this._thresholds))
19827
+ (i = t.threshold) != null && i[s] || delete this._thresholds[s];
19828
+ }
19829
+ get thresholds() {
19830
+ return this._thresholds;
19825
19831
  }
19826
19832
  // Gets called when chart options are updated
19827
19833
  beforeUpdate(t, e, i) {