@prorobotech/openapi-k8s-toolkit 1.2.0-alpha.13 → 1.2.0-alpha.15
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/mockServiceWorker.js +349 -0
- package/dist/openapi-k8s-toolkit.es.js +49 -28
- package/dist/openapi-k8s-toolkit.es.js.map +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +49 -27
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/api/bff/search/getKinds.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/index.d.ts +2 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryRangeMatrix/index.d.ts +2 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryRangeMatrix/multi/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryRangeMatrix/multi/usePromMatrixToLineMulti.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryRangeMatrix/single/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryRangeMatrix/single/usePromMatrixToLineSingle.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryVector/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryVector/usePromVector.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryVector/usePromVector.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/toArea/MatrixToAreaMulti.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/toArea/MatrixToAreaSingle.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/toAreaStacked/MatrixToAreaStacked.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/toLine/MatrixToLineMulti.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/toLine/MatrixToLineSingle.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/toReducedBar/MatrixToReducedBar.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/toTableRows/MatrixToTableRows.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/toBar/VectorToBarHorizontal.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/toBar/VectorToBarVertical.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/toBarGauge/VectorToBarGauge.d.ts +8 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/toGaugeRadial/VectorToGaugeRadial.d.ts +9 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/toPie/VectorToPie.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/toTableRows/VectorToTableRows.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{prometheus.d.ts → buildPrometheusRangeParams/buildPrometheusRangeParams.d.ts} +2 -2
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/buildPrometheusRangeParams/index.d.ts +2 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/formatters/formatBytes.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/formatters/formatTimestamp.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/formatters/index.d.ts +2 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/matrixAdapater/index.d.ts +9 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/matrixAdapater/toAreaStacked/index.d.ts +2 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/matrixAdapater/toAreaStacked/matrixToAreaStackedAdapter.d.ts +14 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/matrixAdapater/toLine/index.d.ts +2 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/matrixAdapater/toLine/matrixToLineAdapter.d.ts +12 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/matrixAdapater/toLine/matrixToLineAdapter.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/matrixAdapater/toReducedVector/index.d.ts +2 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/matrixAdapater/toReducedVector/matrixToReducedVectorAdapter.d.ts +8 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/matrixAdapater/toReducedVector/matrixToReducedVectorAdapter.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/matrixAdapater/toTableRows/index.d.ts +2 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/matrixAdapater/toTableRows/matrixToTableRowsAdapter.d.ts +12 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/matrixAdapater/toTableRows/matrixToTableRowsAdapter.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/matrixAdapater/types.d.ts +10 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/helpers.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/index.d.ts +11 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/pickSeriesId.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/prometheusVectorUtils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toBar/index.d.ts +2 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toBar/vectorToBarAdapter.d.ts +18 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toBarGauge/index.d.ts +2 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toBarGauge/vectorToBarGaugeAdapter.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toGaugeRadial/index.d.ts +2 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toGaugeRadial/vectorToGaugeRadialAdapter.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toPie/index.d.ts +2 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toPie/vectorToPieAdapter.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toTableRows/index.d.ts +2 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toTableRows/vectorToTableRowsAdapter.d.ts +8 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/types.d.ts +10 -0
- package/dist/types/components/organisms/DynamicComponents/types.d.ts +2 -0
- package/dist/types/hooks/useKinds.d.ts +8 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +9 -2
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/MemoryChart.d.ts +0 -6
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/MemoryChartMulti.d.ts +0 -6
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/usePrometheusQueryRange.d.ts +0 -7
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/usePrometheusQueryRangeMulti.d.ts +0 -7
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/prometheusAdapter.d.ts +0 -21
- /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/{usePrometheusQueryRange.test.d.ts → queryRangeMatrix/multi/usePromMatrixToLineMulti.test.d.ts} +0 -0
- /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/{usePrometheusQueryRangeMulti.test.d.ts → queryRangeMatrix/single/usePromMatrixToLineSingle.test.d.ts} +0 -0
- /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{prometheus.test.d.ts → buildPrometheusRangeParams/buildPrometheusRangeParams.test.d.ts} +0 -0
- /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{prometheusAdapter.test.d.ts → matrixAdapater/toAreaStacked/matrixToAreaStackedAdapter.test.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { usePromMatrixToLineMulti } from './usePromMatrixToLineMulti';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TRechartsSeries } from '../../../utils/matrixAdapater/toLine';
|
|
2
|
+
export declare const usePromMatrixToLineMulti: ({ query, range, refetchInterval, enabled, }: {
|
|
3
|
+
query: string;
|
|
4
|
+
range?: string | undefined;
|
|
5
|
+
refetchInterval?: number | false | undefined;
|
|
6
|
+
enabled?: boolean | undefined;
|
|
7
|
+
}) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<TRechartsSeries[], Error>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { usePromMatrixToLineSingle } from './usePromMatrixToLineSingle';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TChartPoint } from '../../../utils/matrixAdapater/toLine';
|
|
2
|
+
export declare const usePromMatrixToLineSingle: ({ query, range, refetchInterval, enabled, }: {
|
|
3
|
+
query: string;
|
|
4
|
+
range?: string | undefined;
|
|
5
|
+
refetchInterval?: number | false | undefined;
|
|
6
|
+
enabled?: boolean | undefined;
|
|
7
|
+
}) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<TChartPoint[], Error>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { usePromVector } from './usePromVector';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TPrometheusVectorResponse } from '../../utils/vectorAdapter';
|
|
2
|
+
export declare const usePromVector: ({ query, refetchInterval, enabled, }: {
|
|
3
|
+
query: string;
|
|
4
|
+
refetchInterval?: number | false | undefined;
|
|
5
|
+
enabled?: boolean | undefined;
|
|
6
|
+
}) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<TPrometheusVectorResponse, Error>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type TPrometheusRangeParams = {
|
|
2
2
|
start: string;
|
|
3
3
|
end: string;
|
|
4
4
|
step: string;
|
|
@@ -7,4 +7,4 @@ export type PrometheusRangeParams = {
|
|
|
7
7
|
* Converts a duration string like "30m", "2h", "7d" into start/end ISO timestamps
|
|
8
8
|
* and a safe step value to ensure < 11k data points for Prometheus query_range.
|
|
9
9
|
*/
|
|
10
|
-
export declare const buildPrometheusRangeParams: (range?: string) =>
|
|
10
|
+
export declare const buildPrometheusRangeParams: (range?: string) => TPrometheusRangeParams;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatBytes: (raw: unknown) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatTimestamp: (raw: unknown) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type { TPrometheusRangeResponse } from './types';
|
|
2
|
+
export { matrixToLineSingle, matrixToLineMulti } from './toLine';
|
|
3
|
+
export type { TChartPoint, TRechartsSeries } from './toLine';
|
|
4
|
+
export { seriesToStackedAreaData } from './toAreaStacked';
|
|
5
|
+
export type { TStackedAreaPoint } from './toAreaStacked';
|
|
6
|
+
export { seriesToReducedVector } from './toReducedVector';
|
|
7
|
+
export type { TReducedVectorItem, TAggregationMode } from './toReducedVector';
|
|
8
|
+
export { matrixToTableMinMaxCurrent } from './toTableRows';
|
|
9
|
+
export type { TSeriesStatsRow } from './toTableRows';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TRechartsSeries } from '../toLine';
|
|
2
|
+
export type TStackedAreaPoint = {
|
|
3
|
+
timestamp: number;
|
|
4
|
+
[seriesId: string]: number;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Builds stacked-area-compatible data from TRechartsSeries[].
|
|
8
|
+
* Shape:
|
|
9
|
+
* [
|
|
10
|
+
* { timestamp: 1000, c1: 1, p2: 3 },
|
|
11
|
+
* { timestamp: 2000, c1: 2 },
|
|
12
|
+
* ]
|
|
13
|
+
*/
|
|
14
|
+
export declare const seriesToStackedAreaData: (series: TRechartsSeries[] | undefined) => TStackedAreaPoint[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TPrometheusRangeResponse } from '../types';
|
|
2
|
+
export type TChartPoint = {
|
|
3
|
+
timestamp: number;
|
|
4
|
+
value: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const matrixToLineSingle: (resp: TPrometheusRangeResponse) => TChartPoint[];
|
|
7
|
+
export type TRechartsSeries = {
|
|
8
|
+
id: string;
|
|
9
|
+
metric: Record<string, string>;
|
|
10
|
+
data?: TChartPoint[];
|
|
11
|
+
};
|
|
12
|
+
export declare const matrixToLineMulti: (resp: TPrometheusRangeResponse) => TRechartsSeries[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TRechartsSeries } from '../toLine';
|
|
2
|
+
export type TReducedVectorItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
metric: Record<string, string>;
|
|
5
|
+
value: number;
|
|
6
|
+
};
|
|
7
|
+
export type TAggregationMode = 'last' | 'avg' | 'sum' | 'max' | 'min';
|
|
8
|
+
export declare const seriesToReducedVector: (series: TRechartsSeries[] | undefined, mode?: TAggregationMode) => TReducedVectorItem[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TPrometheusRangeResponse } from '../types';
|
|
2
|
+
export type TSeriesStatsRow = {
|
|
3
|
+
id: string;
|
|
4
|
+
metric: Record<string, string>;
|
|
5
|
+
min: number | null;
|
|
6
|
+
max: number | null;
|
|
7
|
+
current: number | null;
|
|
8
|
+
minTs?: number | null;
|
|
9
|
+
maxTs?: number | null;
|
|
10
|
+
currentTs?: number | null;
|
|
11
|
+
};
|
|
12
|
+
export declare const matrixToTableMinMaxCurrent: (resp: TPrometheusRangeResponse) => TSeriesStatsRow[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pickSeriesId: (metric: Record<string, string>, idx: number) => string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type { TPrometheusVectorResponse } from './types';
|
|
2
|
+
export { vectorToBarVertical, vectorToBarHorizontal } from './toBar';
|
|
3
|
+
export type { TBarItem } from './toBar';
|
|
4
|
+
export { vectorToBarGauge } from './toBarGauge';
|
|
5
|
+
export type { TBarGaugeItem } from './toBarGauge';
|
|
6
|
+
export { vectorToGaugeRadial } from './toGaugeRadial';
|
|
7
|
+
export type { TRadialGaugeValue } from './toGaugeRadial';
|
|
8
|
+
export { vectorToPie } from './toPie';
|
|
9
|
+
export type { TPieSlice } from './toPie';
|
|
10
|
+
export { vectorToTableRows } from './toTableRows';
|
|
11
|
+
export type { TTableRow } from './toTableRows';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TPrometheusVectorResponse } from '../types';
|
|
2
|
+
export type TBarItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
metric: Record<string, string>;
|
|
5
|
+
timestamp?: number;
|
|
6
|
+
value: number;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Vertical bar: typically X = id (category), Y = value.
|
|
10
|
+
* Return: [{ id, value, metric, timestamp? }, ...]
|
|
11
|
+
*/
|
|
12
|
+
export declare const vectorToBarVertical: (resp: TPrometheusVectorResponse) => TBarItem[];
|
|
13
|
+
/**
|
|
14
|
+
* Horizontal bar: often Y = id (category), X = value.
|
|
15
|
+
* Data shape can be identical; the chart config swaps axes.
|
|
16
|
+
* Return: [{ id, value, metric, timestamp? }, ...]
|
|
17
|
+
*/
|
|
18
|
+
export declare const vectorToBarHorizontal: (resp: TPrometheusVectorResponse) => TBarItem[];
|
|
@@ -157,6 +157,8 @@ export type TDynamicComponentsAppTypeMap = {
|
|
|
157
157
|
VisibilityContainer: {
|
|
158
158
|
id: number | string;
|
|
159
159
|
value: string;
|
|
160
|
+
criteria?: 'equals' | 'notEquals' | 'exists' | 'notExists';
|
|
161
|
+
valueToCompare?: string | string[];
|
|
160
162
|
};
|
|
161
163
|
ArrayOfObjectsToKeyValues: {
|
|
162
164
|
id: number | string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const useKinds: ({ cluster, refetchInterval, isEnabled, }: {
|
|
2
|
+
cluster: string;
|
|
3
|
+
refetchInterval?: number | false | undefined;
|
|
4
|
+
isEnabled?: boolean | undefined;
|
|
5
|
+
}) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<{
|
|
6
|
+
kindIndex: import("..").TKindIndex;
|
|
7
|
+
kindsWithVersion: import("..").TKindWithVersion[];
|
|
8
|
+
}, Error>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export type { TConnStatus, TUseListWatchQuery, TUseListWatchOptions, TUseListWat
|
|
|
28
28
|
export { useK8sVerbs } from './hooks/useK8sVerbs';
|
|
29
29
|
export { useK8sSmartResource, useManyK8sSmartResource, useSmartResourceParams } from './hooks/useK8sSmartResource';
|
|
30
30
|
export { useResourceScope } from './hooks/useResourceScope';
|
|
31
|
+
export { useKinds } from './hooks/useKinds';
|
|
31
32
|
export type { TRequestError } from './localTypes/api';
|
|
32
33
|
export type { TClusterList } from './localTypes/clusterList';
|
|
33
34
|
export type { TItemTypeMap, TRenderableItem, TRendererComponents, TFactoryDataK8s, TFactoryResponse, TFactoryResource, } from './localTypes/dynamicRender';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prorobotech/openapi-k8s-toolkit",
|
|
3
|
-
"version": "1.2.0-alpha.
|
|
3
|
+
"version": "1.2.0-alpha.15",
|
|
4
4
|
"description": "ProRobotech OpenAPI k8s tools",
|
|
5
5
|
"main": "dist/openapi-k8s-toolkit.cjs.js",
|
|
6
6
|
"module": "dist/openapi-k8s-toolkit.es.js",
|
|
@@ -96,6 +96,8 @@
|
|
|
96
96
|
"jest": "29.7.0",
|
|
97
97
|
"jest-environment-jsdom": "29.7.0",
|
|
98
98
|
"jest-styled-components": "^7.2.0",
|
|
99
|
+
"msw": "2.12.4",
|
|
100
|
+
"msw-storybook-addon": "2.0.6",
|
|
99
101
|
"postcss": "8.5.2",
|
|
100
102
|
"postcss-styled-syntax": "0.7.1",
|
|
101
103
|
"prettier": "3.0.2",
|
|
@@ -127,5 +129,10 @@
|
|
|
127
129
|
},
|
|
128
130
|
"keywords": [],
|
|
129
131
|
"author": "",
|
|
130
|
-
"license": "MIT"
|
|
132
|
+
"license": "MIT",
|
|
133
|
+
"msw": {
|
|
134
|
+
"workerDirectory": [
|
|
135
|
+
"public"
|
|
136
|
+
]
|
|
137
|
+
}
|
|
131
138
|
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ChartPoint } from '../utils/prometheusAdapter';
|
|
2
|
-
export declare const usePrometheusQueryRange: ({ query, range, refetchInterval, enabled, }: {
|
|
3
|
-
query: string;
|
|
4
|
-
range?: string | undefined;
|
|
5
|
-
refetchInterval?: number | false | undefined;
|
|
6
|
-
enabled?: boolean | undefined;
|
|
7
|
-
}) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<ChartPoint[], Error>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { RechartsSeries } from '../utils/prometheusAdapter';
|
|
2
|
-
export declare const usePrometheusQueryRangeMulti: ({ query, range, refetchInterval, enabled, }: {
|
|
3
|
-
query: string;
|
|
4
|
-
range?: string | undefined;
|
|
5
|
-
refetchInterval?: number | false | undefined;
|
|
6
|
-
enabled?: boolean | undefined;
|
|
7
|
-
}) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<RechartsSeries[], Error>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export type PrometheusRangeResponse = {
|
|
2
|
-
status: 'success' | 'error';
|
|
3
|
-
data: {
|
|
4
|
-
resultType: 'matrix';
|
|
5
|
-
result: {
|
|
6
|
-
metric: Record<string, string>;
|
|
7
|
-
values: [number, string][];
|
|
8
|
-
}[];
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export type ChartPoint = {
|
|
12
|
-
timestamp: number;
|
|
13
|
-
value: number;
|
|
14
|
-
};
|
|
15
|
-
export declare const prometheusToRechartsSingle: (resp: PrometheusRangeResponse) => ChartPoint[];
|
|
16
|
-
export type RechartsSeries = {
|
|
17
|
-
id: string;
|
|
18
|
-
metric: Record<string, string>;
|
|
19
|
-
data: ChartPoint[];
|
|
20
|
-
};
|
|
21
|
-
export declare const prometheusToRechartsMulti: (resp: PrometheusRangeResponse) => RechartsSeries[];
|
|
File without changes
|
|
File without changes
|
|
File without changes
|