@prorobotech/openapi-k8s-toolkit 1.2.0-alpha.15 → 1.2.0-alpha.17
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/openapi-k8s-toolkit.es.js +29784 -182
- package/dist/openapi-k8s-toolkit.es.js.map +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +30138 -519
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTableProvider/EnrichedTableProvider.d.ts +1 -0
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTableProvider/utils.d.ts +2 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/PrometheusGraph.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/atoms/WidthHeightDiv/WidthHeightDiv.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/atoms/WidthHeightDiv/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/atoms/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryRangeMatrix/multi/usePromMatrixToLineMulti.d.ts +3 -2
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryRangeMatrix/single/usePromMatrixToLineSingle.d.ts +3 -2
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryScalar/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryScalar/usePromScalar.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryScalar/usePromScalar.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryVector/usePromVector.d.ts +3 -2
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/index.d.ts +3 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/{toArea → MatrixToAreaMulti}/MatrixToAreaMulti.d.ts +1 -4
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/MatrixToAreaMulti/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/{toArea → MatrixToAreaSingle}/MatrixToAreaSingle.d.ts +1 -4
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/MatrixToAreaSingle/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/{toAreaStacked → MatrixToAreaStacked}/MatrixToAreaStacked.d.ts +1 -4
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/MatrixToAreaStacked/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/{toLine → MatrixToLineMulti}/MatrixToLineMulti.d.ts +1 -4
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/MatrixToLineMulti/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/{toLine → MatrixToLineSingle}/MatrixToLineSingle.d.ts +1 -4
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/MatrixToLineSingle/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/MatrixToReducedBar/MatrixToReducedBar.d.ts +3 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/MatrixToReducedBar/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/{toTableRows → MatrixToTableRows}/MatrixToTableRows.d.ts +1 -5
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/MatrixToTableRows/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/index.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/scalar/ScalarToGauge/ScalarToGauge.d.ts +3 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/scalar/ScalarToGauge/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/scalar/ScalarToStat/ScalarToStat.d.ts +3 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/scalar/ScalarToStat/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/scalar/index.d.ts +2 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/VectorToBarGauge/VectorToBarGauge.d.ts +3 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/VectorToBarGauge/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/{toBar → VectorToBarHorizontal}/VectorToBarHorizontal.d.ts +1 -5
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/VectorToBarHorizontal/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/{toBar → VectorToBarVertical}/VectorToBarVertical.d.ts +1 -5
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/VectorToBarVertical/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/VectorToGaugeRadial/VectorToGaugeRadial.d.ts +3 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/VectorToGaugeRadial/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/VectorToPie/VectorToPie.d.ts +3 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/VectorToPie/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/{toTableRows → VectorToTableRows}/VectorToTableRows.d.ts +1 -5
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/VectorToTableRows/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/index.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/types/chartsProps.d.ts +46 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/types/index.d.ts +2 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/types/responses.d.ts +27 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/index.d.ts +9 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/index.d.ts +2 -3
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toAreaStacked/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toAreaStacked/matrixToAreaStackedAdapter.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toLine/matrixToLineAdapter.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toReducedVector/index.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toReducedVector/matrixToReducedVectorAdapter.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toTableRows/matrixToTableRowsAdapter.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/scalarAdapter/index.d.ts +4 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/scalarAdapter/toGauge/index.d.ts +2 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/scalarAdapter/toGauge/scalarToGaugeAdapter.d.ts +15 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/scalarAdapter/toStat/index.d.ts +2 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/scalarAdapter/toStat/scalarToStatAdapter.d.ts +11 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/scalarAdapter/toStat/scalarToStatAdapter.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/helpers/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/helpers/pickSeriesId.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/index.d.ts +0 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toBar/vectorToBarAdapter.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toBarGauge/vectorToBarGaugeAdapter.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toGaugeRadial/vectorToGaugeRadialAdapter.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toPie/vectorToPieAdapter.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toTableRows/vectorToTableRowsAdapter.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/types.d.ts +16 -0
- package/package.json +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/toReducedBar/MatrixToReducedBar.d.ts +0 -7
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/toBarGauge/VectorToBarGauge.d.ts +0 -8
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/toGaugeRadial/VectorToGaugeRadial.d.ts +0 -9
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/toPie/VectorToPie.d.ts +0 -7
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/matrixAdapater/types.d.ts +0 -10
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/types.d.ts +0 -10
- /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toAreaStacked/matrixToAreaStackedAdapter.test.d.ts +0 -0
- /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toLine/index.d.ts +0 -0
- /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toLine/matrixToLineAdapter.test.d.ts +0 -0
- /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toReducedVector/matrixToReducedVectorAdapter.test.d.ts +0 -0
- /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toTableRows/index.d.ts +0 -0
- /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toTableRows/matrixToTableRowsAdapter.test.d.ts +0 -0
- /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{vectorAdapter/pickSeriesId.test.d.ts → scalarAdapter/toGauge/scalarToGaugeAdapter.test.d.ts} +0 -0
- /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/{helpers.d.ts → helpers/pickSeriesId.d.ts} +0 -0
package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTableProvider/utils.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { TableProps } from 'antd';
|
|
2
2
|
import { TJSON } from '../../../../../localTypes/JSON';
|
|
3
3
|
import { TAdditionalPrinterColumns } from '../../../../../localTypes/richTable';
|
|
4
|
-
export declare const prepare: ({ dataItems, resourceSchema, dataForControls, additionalPrinterColumns, }: {
|
|
4
|
+
export declare const prepare: ({ dataItems, pathToKey, resourceSchema, dataForControls, additionalPrinterColumns, }: {
|
|
5
5
|
dataItems: TJSON[];
|
|
6
|
+
pathToKey?: string | undefined;
|
|
6
7
|
resourceSchema?: TJSON | undefined;
|
|
7
8
|
dataForControls?: {
|
|
8
9
|
cluster: string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
type TWidthHeightDivProps = {
|
|
3
|
+
$width?: CSSProperties['width'];
|
|
4
|
+
$height?: CSSProperties['height'];
|
|
5
|
+
};
|
|
6
|
+
export declare const WidthHeightDiv: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, TWidthHeightDivProps>>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WidthHeightDiv } from './WidthHeightDiv';
|
package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/atoms/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WidthHeightDiv } from './WidthHeightDiv';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { TRechartsSeries } from '../../../utils/
|
|
2
|
-
export declare const usePromMatrixToLineMulti: ({ query, range, refetchInterval, enabled, }: {
|
|
1
|
+
import { TRechartsSeries } from '../../../utils/matrixAdapter/toLine';
|
|
2
|
+
export declare const usePromMatrixToLineMulti: ({ baseUrl, query, range, refetchInterval, enabled, }: {
|
|
3
|
+
baseUrl?: string | undefined;
|
|
3
4
|
query: string;
|
|
4
5
|
range?: string | undefined;
|
|
5
6
|
refetchInterval?: number | false | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { TChartPoint } from '../../../utils/
|
|
2
|
-
export declare const usePromMatrixToLineSingle: ({ query, range, refetchInterval, enabled, }: {
|
|
1
|
+
import { TChartPoint } from '../../../utils/matrixAdapter/toLine';
|
|
2
|
+
export declare const usePromMatrixToLineSingle: ({ baseUrl, query, range, refetchInterval, enabled, }: {
|
|
3
|
+
baseUrl?: string | undefined;
|
|
3
4
|
query: string;
|
|
4
5
|
range?: string | undefined;
|
|
5
6
|
refetchInterval?: number | false | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { usePromScalar } from './usePromScalar';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TPrometheusScalarResponse } from '../../types';
|
|
2
|
+
export declare const usePromScalar: ({ baseUrl, query, refetchInterval, enabled, }: {
|
|
3
|
+
baseUrl?: string | undefined;
|
|
4
|
+
query: string;
|
|
5
|
+
refetchInterval?: number | false | undefined;
|
|
6
|
+
enabled?: boolean | undefined;
|
|
7
|
+
}) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<TPrometheusScalarResponse, Error>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { TPrometheusVectorResponse } from '../../
|
|
2
|
-
export declare const usePromVector: ({ query, refetchInterval, enabled, }: {
|
|
1
|
+
import { TPrometheusVectorResponse } from '../../types';
|
|
2
|
+
export declare const usePromVector: ({ baseUrl, query, refetchInterval, enabled, }: {
|
|
3
|
+
baseUrl?: string | undefined;
|
|
3
4
|
query: string;
|
|
4
5
|
refetchInterval?: number | false | undefined;
|
|
5
6
|
enabled?: boolean | undefined;
|
package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PrometheusGraph } from './PrometheusGraph';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { MatrixToAreaMulti, MatrixToAreaSingle, MatrixToAreaStacked, MatrixToLineMulti, MatrixToLineSingle, MatrixToReducedBar, MatrixToTableRows, } from './matrix';
|
|
2
|
+
export { VectorToBarGauge, VectorToBarHorizontal, VectorToBarVertical, VectorToGaugeRadial, VectorToPie, VectorToTableRows, } from './vector';
|
|
3
|
+
export { ScalarToGauge, ScalarToStat } from './scalar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MatrixToAreaMulti } from './MatrixToAreaMulti';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MatrixToAreaSingle } from './MatrixToAreaSingle';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MatrixToAreaStacked } from './MatrixToAreaStacked';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MatrixToLineMulti } from './MatrixToLineMulti';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MatrixToLineSingle } from './MatrixToLineSingle';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MatrixToReducedBar } from './MatrixToReducedBar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MatrixToTableRows } from './MatrixToTableRows';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { MatrixToAreaMulti } from './MatrixToAreaMulti';
|
|
2
|
+
export { MatrixToAreaSingle } from './MatrixToAreaSingle';
|
|
3
|
+
export { MatrixToAreaStacked } from './MatrixToAreaStacked';
|
|
4
|
+
export { MatrixToLineMulti } from './MatrixToLineMulti';
|
|
5
|
+
export { MatrixToLineSingle } from './MatrixToLineSingle';
|
|
6
|
+
export { MatrixToReducedBar } from './MatrixToReducedBar';
|
|
7
|
+
export { MatrixToTableRows } from './MatrixToTableRows';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ScalarToGauge } from './ScalarToGauge';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ScalarToStat } from './ScalarToStat';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VectorToBarGauge } from './VectorToBarGauge';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VectorToBarHorizontal } from './VectorToBarHorizontal';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VectorToBarVertical } from './VectorToBarVertical';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VectorToGaugeRadial } from './VectorToGaugeRadial';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VectorToPie } from './VectorToPie';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VectorToTableRows } from './VectorToTableRows';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { VectorToBarGauge } from './VectorToBarGauge';
|
|
2
|
+
export { VectorToBarHorizontal } from './VectorToBarHorizontal';
|
|
3
|
+
export { VectorToBarVertical } from './VectorToBarVertical';
|
|
4
|
+
export { VectorToGaugeRadial } from './VectorToGaugeRadial';
|
|
5
|
+
export { VectorToPie } from './VectorToPie';
|
|
6
|
+
export { VectorToTableRows } from './VectorToTableRows';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
type TBaseContainerSizeProps = {
|
|
3
|
+
width?: CSSProperties['width'];
|
|
4
|
+
height?: CSSProperties['height'];
|
|
5
|
+
};
|
|
6
|
+
type TBasePromQueryProps = {
|
|
7
|
+
baseUrl?: string;
|
|
8
|
+
query?: string;
|
|
9
|
+
refetchInterval?: number | false;
|
|
10
|
+
};
|
|
11
|
+
type TBaseRangeProps = {
|
|
12
|
+
range?: string;
|
|
13
|
+
};
|
|
14
|
+
type TBaseTitleProps = {
|
|
15
|
+
title?: string;
|
|
16
|
+
};
|
|
17
|
+
type TBaseMinMaxProps = {
|
|
18
|
+
min?: number;
|
|
19
|
+
max?: number;
|
|
20
|
+
};
|
|
21
|
+
type TBaseModeProps = {
|
|
22
|
+
mode?: 'last' | 'avg' | 'sum' | 'max' | 'min';
|
|
23
|
+
};
|
|
24
|
+
type TBaseTopNProps = {
|
|
25
|
+
topN?: number;
|
|
26
|
+
};
|
|
27
|
+
type TBaseFormatterProps = {
|
|
28
|
+
/** optional formatter for value */
|
|
29
|
+
formatValue?: (v: number) => string | number;
|
|
30
|
+
};
|
|
31
|
+
export type TMatrixToLineSingleProps = TBaseContainerSizeProps & TBasePromQueryProps & TBaseRangeProps;
|
|
32
|
+
export type TMatrixToLineMultiProps = TBaseContainerSizeProps & TBasePromQueryProps & TBaseRangeProps;
|
|
33
|
+
export type TMatrixToAreaSingleProps = TBaseContainerSizeProps & TBasePromQueryProps & TBaseRangeProps;
|
|
34
|
+
export type TMatrixToAreaMultiProps = TBaseContainerSizeProps & TBasePromQueryProps & TBaseRangeProps;
|
|
35
|
+
export type TMatrixToAreaStackedProps = TBaseContainerSizeProps & TBasePromQueryProps & TBaseRangeProps;
|
|
36
|
+
export type TMatrixToReducedBarProps = TBaseContainerSizeProps & TBasePromQueryProps & TBaseRangeProps & TBaseModeProps;
|
|
37
|
+
export type TMatrixToTableRowsProps = TBasePromQueryProps & TBaseRangeProps & TBaseTitleProps;
|
|
38
|
+
export type TVectorToBarVerticalProps = TBaseContainerSizeProps & TBasePromQueryProps;
|
|
39
|
+
export type TVectorToBarHorizontalProps = TBaseContainerSizeProps & TBasePromQueryProps;
|
|
40
|
+
export type TVectorToPieProps = TBaseContainerSizeProps & TBasePromQueryProps;
|
|
41
|
+
export type TVectorToTableRowsProps = TBasePromQueryProps & TBaseTitleProps;
|
|
42
|
+
export type TVectorToBarGaugeProps = TBaseContainerSizeProps & TBasePromQueryProps & TBaseTitleProps & TBaseTopNProps;
|
|
43
|
+
export type TVectorToGaugeRadialProps = TBaseContainerSizeProps & TBasePromQueryProps & TBaseTitleProps & TBaseMinMaxProps;
|
|
44
|
+
export type TScalarToStatProps = TBasePromQueryProps & TBaseTitleProps & TBaseFormatterProps;
|
|
45
|
+
export type TScalarToGaugeProps = TBasePromQueryProps & TBaseTitleProps & TBaseMinMaxProps & TBaseFormatterProps;
|
|
46
|
+
export {};
|
package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/types/index.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type { TPrometheusRangeResponse, TPrometheusVectorResponse, TPrometheusScalarResponse } from './responses';
|
|
2
|
+
export type { TMatrixToAreaMultiProps, TMatrixToAreaSingleProps, TMatrixToAreaStackedProps, TMatrixToLineMultiProps, TMatrixToLineSingleProps, TMatrixToReducedBarProps, TMatrixToTableRowsProps, TVectorToBarGaugeProps, TVectorToBarHorizontalProps, TVectorToBarVerticalProps, TVectorToGaugeRadialProps, TVectorToPieProps, TVectorToTableRowsProps, TScalarToGaugeProps, TScalarToStatProps, } from './chartsProps';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type TPrometheusRangeResponse = {
|
|
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 TPrometheusVectorResponse = {
|
|
12
|
+
status: 'success' | 'error';
|
|
13
|
+
data: {
|
|
14
|
+
resultType: 'vector';
|
|
15
|
+
result: {
|
|
16
|
+
metric: Record<string, string>;
|
|
17
|
+
value: [number, string];
|
|
18
|
+
}[];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export type TPrometheusScalarResponse = {
|
|
22
|
+
status: 'success' | 'error';
|
|
23
|
+
data: {
|
|
24
|
+
resultType: 'scalar';
|
|
25
|
+
result: [number, string];
|
|
26
|
+
};
|
|
27
|
+
};
|
package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { buildPrometheusRangeParams } from './buildPrometheusRangeParams';
|
|
2
|
+
export type { TPrometheusRangeParams } from './buildPrometheusRangeParams';
|
|
3
|
+
export { formatBytes, formatTimestamp } from './formatters';
|
|
4
|
+
export { matrixToLineSingle, matrixToLineMulti, matrixToStackedAreaData, matrixToReducedVector, matrixToTableMinMaxCurrent, } from './matrixAdapter';
|
|
5
|
+
export type { TChartPoint, TRechartsSeries, TStackedAreaPoint, TReducedVectorItem, TAggregationMode, TSeriesStatsRow, } from './matrixAdapter';
|
|
6
|
+
export { vectorToBarVertical, vectorToBarHorizontal, vectorToBarGauge, vectorToGaugeRadial, vectorToPie, vectorToTableRows, } from './vectorAdapter';
|
|
7
|
+
export type { TBarItem, TBarGaugeItem, TRadialGaugeValue, TPieSlice, TTableRow } from './vectorAdapter';
|
|
8
|
+
export { scalarToStat, scalarToGauge } from './scalarAdapter';
|
|
9
|
+
export type { TStatItem, TGaugeItem } from './scalarAdapter';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
export type { TPrometheusRangeResponse } from './types';
|
|
2
1
|
export { matrixToLineSingle, matrixToLineMulti } from './toLine';
|
|
3
2
|
export type { TChartPoint, TRechartsSeries } from './toLine';
|
|
4
|
-
export {
|
|
3
|
+
export { matrixToStackedAreaData } from './toAreaStacked';
|
|
5
4
|
export type { TStackedAreaPoint } from './toAreaStacked';
|
|
6
|
-
export {
|
|
5
|
+
export { matrixToReducedVector } from './toReducedVector';
|
|
7
6
|
export type { TReducedVectorItem, TAggregationMode } from './toReducedVector';
|
|
8
7
|
export { matrixToTableMinMaxCurrent } from './toTableRows';
|
|
9
8
|
export type { TSeriesStatsRow } from './toTableRows';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { matrixToStackedAreaData } from './matrixToAreaStackedAdapter';
|
|
2
2
|
export type { TStackedAreaPoint } from './matrixToAreaStackedAdapter';
|
|
@@ -11,4 +11,4 @@ export type TStackedAreaPoint = {
|
|
|
11
11
|
* { timestamp: 2000, c1: 2 },
|
|
12
12
|
* ]
|
|
13
13
|
*/
|
|
14
|
-
export declare const
|
|
14
|
+
export declare const matrixToStackedAreaData: (series: TRechartsSeries[] | undefined) => TStackedAreaPoint[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { matrixToReducedVector } from './matrixToReducedVectorAdapter';
|
|
2
2
|
export type { TReducedVectorItem, TAggregationMode } from './matrixToReducedVectorAdapter';
|
|
@@ -5,4 +5,4 @@ export type TReducedVectorItem = {
|
|
|
5
5
|
value: number;
|
|
6
6
|
};
|
|
7
7
|
export type TAggregationMode = 'last' | 'avg' | 'sum' | 'max' | 'min';
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const matrixToReducedVector: (series: TRechartsSeries[] | undefined, mode?: TAggregationMode) => TReducedVectorItem[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TPrometheusScalarResponse } from '../../../types';
|
|
2
|
+
export type TGaugeItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
value: number;
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* scalar -> gauge (single number, optionally with min/max)
|
|
10
|
+
*/
|
|
11
|
+
export declare const scalarToGauge: (resp: TPrometheusScalarResponse, opts?: {
|
|
12
|
+
id?: string;
|
|
13
|
+
min?: number;
|
|
14
|
+
max?: number;
|
|
15
|
+
}) => TGaugeItem | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TPrometheusScalarResponse } from '../../../types';
|
|
2
|
+
export type TStatItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
value: number;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* scalar -> stat (single number)
|
|
8
|
+
*/
|
|
9
|
+
export declare const scalarToStat: (resp: TPrometheusScalarResponse, opts?: {
|
|
10
|
+
id?: string;
|
|
11
|
+
}) => TStatItem | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { pickSeriesId } from './pickSeriesId';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -119,6 +119,7 @@ export type TDynamicComponentsAppTypeMap = {
|
|
|
119
119
|
pathToLabels: string | string[];
|
|
120
120
|
};
|
|
121
121
|
fieldSelector?: Record<string, string>;
|
|
122
|
+
pathToKey?: string;
|
|
122
123
|
} & Omit<TEnrichedTableProviderProps, 'tableMappingsReplaceValues' | 'withoutControls' | 'cluster' | 'theme' | 'tableProps' | 'dataItems' | 'dataForControlsInternal'>;
|
|
123
124
|
PodTerminal: {
|
|
124
125
|
id: number | string;
|
|
@@ -432,4 +433,19 @@ export type TDynamicComponentsAppTypeMap = {
|
|
|
432
433
|
forcedFullWsPath?: string;
|
|
433
434
|
substractHeight?: number;
|
|
434
435
|
};
|
|
436
|
+
PrometheusGraph: {
|
|
437
|
+
id: number | string;
|
|
438
|
+
type: 'MatrixToAreaMulti' | 'MatrixToAreaSingle' | 'MatrixToAreaStacked' | 'MatrixToLineMulti' | 'MatrixToLineSingle' | 'MatrixToReducedBar' | 'MatrixToTableRows' | 'VectorToBarGauge' | 'VectorToBarHorizontal' | 'VectorToBarVertical' | 'VectorToGaugeRadial' | 'VectorToPie' | 'VectorToTableRows' | 'ScalarToGauge' | 'ScalarToStat';
|
|
439
|
+
width?: CSSProperties['width'];
|
|
440
|
+
height?: CSSProperties['height'];
|
|
441
|
+
baseUrl?: string;
|
|
442
|
+
query?: string;
|
|
443
|
+
refetchInterval?: number | false;
|
|
444
|
+
range?: string;
|
|
445
|
+
title?: string;
|
|
446
|
+
min?: number;
|
|
447
|
+
max?: number;
|
|
448
|
+
mode?: 'last' | 'avg' | 'sum' | 'max' | 'min';
|
|
449
|
+
topN?: number;
|
|
450
|
+
};
|
|
435
451
|
};
|
package/package.json
CHANGED