@kong-ui-public/analytics-metric-provider 5.1.2 → 5.1.3
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/README.md +0 -8
- package/dist/types/components/{MetricsProviderInternal.vue.d.ts → MetricsProvider.vue.d.ts} +4 -1
- package/dist/types/components/MetricsProvider.vue.d.ts.map +1 -0
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/vitals-metric-provider.es.js +170 -170
- package/dist/vitals-metric-provider.umd.js +1 -1
- package/package.json +6 -6
- package/dist/types/components/MetricsProviderInternal.vue.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -23,14 +23,6 @@ Query data for metric cards and render default "golden signal" metrics cards usi
|
|
|
23
23
|
|
|
24
24
|
## Usage
|
|
25
25
|
|
|
26
|
-
First, create a wrapper around `<MetricsProviderInternal />` in the host app. This wrapper is in charge of feeding environment-specific properties to the metrics provider, most notably:
|
|
27
|
-
|
|
28
|
-
- `dataFetcher`, a function that calls the correct API to retrieve data for the provided query.
|
|
29
|
-
- `hasTrendAccess`, a boolean ref that describes whether the current user is expected to be able to run trend queries.
|
|
30
|
-
- `refreshInterval`, a number in milliseconds describing how often the cards should refresh. (This value is eventually fed to the `refreshInterval` property of `useSWRV`.)
|
|
31
|
-
|
|
32
|
-
For consistency, name your wrapper `<MetricsProvider>`. Then, use it as follows:
|
|
33
|
-
|
|
34
26
|
### Global
|
|
35
27
|
|
|
36
28
|
To query across all data for an organization, no properties are needed. The provider's determination of whether the user has trend access is available as a slot property for translation purposes.
|
|
@@ -21,6 +21,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
21
21
|
filterValue: undefined;
|
|
22
22
|
additionalFilter: undefined;
|
|
23
23
|
queryReady: boolean;
|
|
24
|
+
refreshInterval: number;
|
|
24
25
|
longCardTitles: boolean;
|
|
25
26
|
containerTitle: undefined;
|
|
26
27
|
description: undefined;
|
|
@@ -46,11 +47,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
46
47
|
filterValue: undefined;
|
|
47
48
|
additionalFilter: undefined;
|
|
48
49
|
queryReady: boolean;
|
|
50
|
+
refreshInterval: number;
|
|
49
51
|
longCardTitles: boolean;
|
|
50
52
|
containerTitle: undefined;
|
|
51
53
|
description: undefined;
|
|
52
54
|
abortController: undefined;
|
|
53
55
|
}>>>, {
|
|
56
|
+
refreshInterval: number;
|
|
54
57
|
description: string;
|
|
55
58
|
dimension: "api_product" | "api_product_version" | "application" | "consumer" | "control_plane" | "control_plane_group" | "data_plane_node" | "gateway_service" | "route" | "status_code" | "status_code_grouped" | "time";
|
|
56
59
|
additionalFilter: ExploreFilter[];
|
|
@@ -91,4 +94,4 @@ type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
91
94
|
$slots: S;
|
|
92
95
|
};
|
|
93
96
|
};
|
|
94
|
-
//# sourceMappingURL=
|
|
97
|
+
//# sourceMappingURL=MetricsProvider.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetricsProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/components/MetricsProvider.vue.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,aAAa,EAGlB,KAAK,SAAS,EACf,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAe,aAAa,EAAE,MAAM,qCAAqC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwNhF,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AACxD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -2,5 +2,6 @@ export declare const MAX_ANALYTICS_REQUEST_RETRIES = 2;
|
|
|
2
2
|
export declare const ALL_STATUS_CODE_GROUPS: string[];
|
|
3
3
|
export declare const STATUS_CODES_FAILED: string[];
|
|
4
4
|
export declare const STATUS_CODES_SUCCESS: string[];
|
|
5
|
+
export declare const DEFAULT_REFRESH_INTERVAL: number;
|
|
5
6
|
export declare const INJECT_QUERY_PROVIDER = "analytics-query-provider";
|
|
6
7
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,IAAI,CAAA;AAC9C,eAAO,MAAM,sBAAsB,UAAsC,CAAA;AACzE,eAAO,MAAM,mBAAmB,UAAiB,CAAA;AACjD,eAAO,MAAM,oBAAoB,UAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,IAAI,CAAA;AAC9C,eAAO,MAAM,sBAAsB,UAAsC,CAAA;AACzE,eAAO,MAAM,mBAAmB,UAAiB,CAAA;AACjD,eAAO,MAAM,oBAAoB,UAAwB,CAAA;AACzD,eAAO,MAAM,wBAAwB,QAAY,CAAA;AACjD,eAAO,MAAM,qBAAqB,6BAA6B,CAAA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import MetricsProvider from './components/MetricsProvider.vue';
|
|
2
2
|
import MetricsConsumer from './components/MetricsConsumer.vue';
|
|
3
3
|
import { mockExploreResponseFromCypress, mockExploreResponse } from './mockExploreResponse';
|
|
4
|
-
export {
|
|
4
|
+
export { MetricsProvider, MetricsConsumer, mockExploreResponseFromCypress, mockExploreResponse, };
|
|
5
5
|
export * from './types';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,kCAAkC,CAAA;AAC9D,OAAO,eAAe,MAAM,kCAAkC,CAAA;AAC9D,OAAO,EAAE,8BAA8B,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAE3F,OAAO,EACL,eAAe,EACf,eAAe,EACf,8BAA8B,EAC9B,mBAAmB,GACpB,CAAA;AAED,cAAc,SAAS,CAAA"}
|