@kong-ui-public/analytics-chart 10.6.1-pr.2532.20b109774.0 → 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,MA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,aAAa,EAAE,gBAAgB,GAAG,IAAI;IA4BvE,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,GAAG,IAAI;IAmE7C,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CAKlC"}
@@ -1 +1 @@
1
- {"version":3,"file":"queryError.d.ts","sourceRoot":"","sources":["../../../src/utils/queryError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAI1C,eAAO,MAAM,gBAAgB,GAAI,OAAO,GAAG,KAAG,UA+B7C,CAAA"}
1
+ {"version":3,"file":"queryError.d.ts","sourceRoot":"","sources":["../../../src/utils/queryError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAI1C,eAAO,MAAM,gBAAgB,GAAI,OAAO,GAAG,KAAG,UAgC7C,CAAA"}
@@ -38,6 +38,9 @@ const Dm = "No data in the current time frame", km = "Once there is traffic, it
38
38
  timeout: {
39
39
  message: "Data request timed out",
40
40
  details: "We're sorry, the request timed out. Please consider using a shorter time period or try again later."
41
+ },
42
+ other: {
43
+ message: "Bad request"
41
44
  }
42
45
  }, zm = {
43
46
  datapointValueDisplay: "{value} {unit}"
@@ -13298,7 +13301,8 @@ const H1 = ({
13298
13301
  } : {
13299
13302
  status: n.status,
13300
13303
  type: "other",
13301
- message: ((a = (r = (s = n.response) == null ? void 0 : s.data) == null ? void 0 : r.invalid_parameters) == null ? void 0 : a.map((o) => o.reason).join(", ")) || (n == null ? void 0 : n.message)
13304
+ message: t.t("query_errors.other.message"),
13305
+ details: ((a = (r = (s = n.response) == null ? void 0 : s.data) == null ? void 0 : r.invalid_parameters) == null ? void 0 : a.map((o) => o.reason).join(", ")) || (n == null ? void 0 : n.message)
13302
13306
  };
13303
13307
  };
13304
13308
  function B1(n) {
@@ -19810,14 +19814,20 @@ class rC {
19810
19814
  this.i18n = t;
19811
19815
  }
19812
19816
  _syncThresholds(t) {
19813
- var e;
19814
- for (const i of Object.keys(t.threshold || {})) {
19815
- const s = (e = t.threshold) == null ? void 0 : e[i];
19816
- 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 = {
19817
19821
  ...this._thresholds,
19818
- [i]: s.map((r) => ({ ...r, hovered: !1 }))
19822
+ [s]: r.map((a) => ({ ...a, hovered: !1 }))
19819
19823
  });
19820
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;
19821
19831
  }
19822
19832
  // Gets called when chart options are updated
19823
19833
  beforeUpdate(t, e, i) {