@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.
Files changed (94) hide show
  1. package/dist/openapi-k8s-toolkit.es.js +29784 -182
  2. package/dist/openapi-k8s-toolkit.es.js.map +1 -1
  3. package/dist/openapi-k8s-toolkit.umd.js +30138 -519
  4. package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
  5. package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTableProvider/EnrichedTableProvider.d.ts +1 -0
  6. package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTableProvider/utils.d.ts +2 -1
  7. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/PrometheusGraph.d.ts +6 -0
  8. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/atoms/WidthHeightDiv/WidthHeightDiv.d.ts +7 -0
  9. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/atoms/WidthHeightDiv/index.d.ts +1 -0
  10. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/atoms/index.d.ts +1 -0
  11. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/index.d.ts +1 -0
  12. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryRangeMatrix/multi/usePromMatrixToLineMulti.d.ts +3 -2
  13. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryRangeMatrix/single/usePromMatrixToLineSingle.d.ts +3 -2
  14. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryScalar/index.d.ts +1 -0
  15. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryScalar/usePromScalar.d.ts +7 -0
  16. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryScalar/usePromScalar.test.d.ts +1 -0
  17. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/queryVector/usePromVector.d.ts +3 -2
  18. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/index.d.ts +1 -0
  19. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/index.d.ts +3 -0
  20. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/{toArea → MatrixToAreaMulti}/MatrixToAreaMulti.d.ts +1 -4
  21. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/MatrixToAreaMulti/index.d.ts +1 -0
  22. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/{toArea → MatrixToAreaSingle}/MatrixToAreaSingle.d.ts +1 -4
  23. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/MatrixToAreaSingle/index.d.ts +1 -0
  24. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/{toAreaStacked → MatrixToAreaStacked}/MatrixToAreaStacked.d.ts +1 -4
  25. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/MatrixToAreaStacked/index.d.ts +1 -0
  26. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/{toLine → MatrixToLineMulti}/MatrixToLineMulti.d.ts +1 -4
  27. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/MatrixToLineMulti/index.d.ts +1 -0
  28. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/{toLine → MatrixToLineSingle}/MatrixToLineSingle.d.ts +1 -4
  29. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/MatrixToLineSingle/index.d.ts +1 -0
  30. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/MatrixToReducedBar/MatrixToReducedBar.d.ts +3 -0
  31. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/MatrixToReducedBar/index.d.ts +1 -0
  32. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/{toTableRows → MatrixToTableRows}/MatrixToTableRows.d.ts +1 -5
  33. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/MatrixToTableRows/index.d.ts +1 -0
  34. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/index.d.ts +7 -0
  35. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/scalar/ScalarToGauge/ScalarToGauge.d.ts +3 -0
  36. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/scalar/ScalarToGauge/index.d.ts +1 -0
  37. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/scalar/ScalarToStat/ScalarToStat.d.ts +3 -0
  38. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/scalar/ScalarToStat/index.d.ts +1 -0
  39. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/scalar/index.d.ts +2 -0
  40. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/VectorToBarGauge/VectorToBarGauge.d.ts +3 -0
  41. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/VectorToBarGauge/index.d.ts +1 -0
  42. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/{toBar → VectorToBarHorizontal}/VectorToBarHorizontal.d.ts +1 -5
  43. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/VectorToBarHorizontal/index.d.ts +1 -0
  44. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/{toBar → VectorToBarVertical}/VectorToBarVertical.d.ts +1 -5
  45. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/VectorToBarVertical/index.d.ts +1 -0
  46. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/VectorToGaugeRadial/VectorToGaugeRadial.d.ts +3 -0
  47. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/VectorToGaugeRadial/index.d.ts +1 -0
  48. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/VectorToPie/VectorToPie.d.ts +3 -0
  49. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/VectorToPie/index.d.ts +1 -0
  50. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/{toTableRows → VectorToTableRows}/VectorToTableRows.d.ts +1 -5
  51. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/VectorToTableRows/index.d.ts +1 -0
  52. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/index.d.ts +6 -0
  53. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/types/chartsProps.d.ts +46 -0
  54. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/types/index.d.ts +2 -0
  55. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/types/responses.d.ts +27 -0
  56. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/index.d.ts +9 -0
  57. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/index.d.ts +2 -3
  58. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toAreaStacked/index.d.ts +1 -1
  59. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toAreaStacked/matrixToAreaStackedAdapter.d.ts +1 -1
  60. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toLine/matrixToLineAdapter.d.ts +1 -1
  61. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toReducedVector/index.d.ts +1 -1
  62. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toReducedVector/matrixToReducedVectorAdapter.d.ts +1 -1
  63. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toTableRows/matrixToTableRowsAdapter.d.ts +1 -1
  64. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/scalarAdapter/index.d.ts +4 -0
  65. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/scalarAdapter/toGauge/index.d.ts +2 -0
  66. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/scalarAdapter/toGauge/scalarToGaugeAdapter.d.ts +15 -0
  67. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/scalarAdapter/toStat/index.d.ts +2 -0
  68. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/scalarAdapter/toStat/scalarToStatAdapter.d.ts +11 -0
  69. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/scalarAdapter/toStat/scalarToStatAdapter.test.d.ts +1 -0
  70. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/helpers/index.d.ts +1 -0
  71. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/helpers/pickSeriesId.test.d.ts +1 -0
  72. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/index.d.ts +0 -1
  73. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toBar/vectorToBarAdapter.d.ts +1 -1
  74. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toBarGauge/vectorToBarGaugeAdapter.d.ts +1 -1
  75. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toGaugeRadial/vectorToGaugeRadialAdapter.d.ts +1 -1
  76. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toPie/vectorToPieAdapter.d.ts +1 -1
  77. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/toTableRows/vectorToTableRowsAdapter.d.ts +1 -1
  78. package/dist/types/components/organisms/DynamicComponents/molecules/index.d.ts +1 -0
  79. package/dist/types/components/organisms/DynamicComponents/types.d.ts +16 -0
  80. package/package.json +1 -1
  81. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/matrix/toReducedBar/MatrixToReducedBar.d.ts +0 -7
  82. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/toBarGauge/VectorToBarGauge.d.ts +0 -8
  83. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/toGaugeRadial/VectorToGaugeRadial.d.ts +0 -9
  84. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/organisms/vector/toPie/VectorToPie.d.ts +0 -7
  85. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/matrixAdapater/types.d.ts +0 -10
  86. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/types.d.ts +0 -10
  87. /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toAreaStacked/matrixToAreaStackedAdapter.test.d.ts +0 -0
  88. /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toLine/index.d.ts +0 -0
  89. /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toLine/matrixToLineAdapter.test.d.ts +0 -0
  90. /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toReducedVector/matrixToReducedVectorAdapter.test.d.ts +0 -0
  91. /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toTableRows/index.d.ts +0 -0
  92. /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{matrixAdapater → matrixAdapter}/toTableRows/matrixToTableRowsAdapter.test.d.ts +0 -0
  93. /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/{vectorAdapter/pickSeriesId.test.d.ts → scalarAdapter/toGauge/scalarToGaugeAdapter.test.d.ts} +0 -0
  94. /package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/vectorAdapter/{helpers.d.ts → helpers/pickSeriesId.d.ts} +0 -0
@@ -45,5 +45,6 @@ export type TEnrichedTableProviderProps = {
45
45
  disablePagination?: boolean;
46
46
  };
47
47
  withoutControls?: boolean;
48
+ pathToKey?: string;
48
49
  };
49
50
  export declare const EnrichedTableProvider: FC<TEnrichedTableProviderProps>;
@@ -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,6 @@
1
+ import { FC } from 'react';
2
+ import { TDynamicComponentsAppTypeMap } from '../../types';
3
+ export declare const PrometheusGraph: FC<{
4
+ data: TDynamicComponentsAppTypeMap['PrometheusGraph'];
5
+ children?: any;
6
+ }>;
@@ -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';
@@ -0,0 +1 @@
1
+ export { WidthHeightDiv } from './WidthHeightDiv';
@@ -1,2 +1,3 @@
1
1
  export { usePromMatrixToLineSingle, usePromMatrixToLineMulti } from './queryRangeMatrix';
2
2
  export { usePromVector } from './queryVector';
3
+ export { usePromScalar } from './queryScalar';
@@ -1,5 +1,6 @@
1
- import { TRechartsSeries } from '../../../utils/matrixAdapater/toLine';
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/matrixAdapater/toLine';
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>;
@@ -1,5 +1,6 @@
1
- import { TPrometheusVectorResponse } from '../../utils/vectorAdapter';
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;
@@ -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';
@@ -1,6 +1,3 @@
1
1
  import { FC } from 'react';
2
- type TMatrixToAreaMultiProps = {
3
- range?: string;
4
- };
2
+ import { TMatrixToAreaMultiProps } from '../../../types';
5
3
  export declare const MatrixToAreaMulti: FC<TMatrixToAreaMultiProps>;
6
- export {};
@@ -1,6 +1,3 @@
1
1
  import { FC } from 'react';
2
- type TMatrixToAreaSingleProps = {
3
- range?: string;
4
- };
2
+ import { TMatrixToAreaSingleProps } from '../../../types';
5
3
  export declare const MatrixToAreaSingle: FC<TMatrixToAreaSingleProps>;
6
- export {};
@@ -0,0 +1 @@
1
+ export { MatrixToAreaSingle } from './MatrixToAreaSingle';
@@ -1,6 +1,3 @@
1
1
  import { FC } from 'react';
2
- type TMatrixToAreaStackedProps = {
3
- range?: string;
4
- };
2
+ import { TMatrixToAreaStackedProps } from '../../../types';
5
3
  export declare const MatrixToAreaStacked: FC<TMatrixToAreaStackedProps>;
6
- export {};
@@ -0,0 +1 @@
1
+ export { MatrixToAreaStacked } from './MatrixToAreaStacked';
@@ -1,6 +1,3 @@
1
1
  import { FC } from 'react';
2
- type TMatrixToLineMultiProps = {
3
- range?: string;
4
- };
2
+ import { TMatrixToLineMultiProps } from '../../../types';
5
3
  export declare const MatrixToLineMulti: FC<TMatrixToLineMultiProps>;
6
- export {};
@@ -1,6 +1,3 @@
1
1
  import { FC } from 'react';
2
- type TMatrixToLineSingleProps = {
3
- range?: string;
4
- };
2
+ import { TMatrixToLineSingleProps } from '../../../types';
5
3
  export declare const MatrixToLineSingle: FC<TMatrixToLineSingleProps>;
6
- export {};
@@ -0,0 +1 @@
1
+ export { MatrixToLineSingle } from './MatrixToLineSingle';
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { TMatrixToReducedBarProps } from '../../../types';
3
+ export declare const MatrixToReducedBar: FC<TMatrixToReducedBarProps>;
@@ -0,0 +1 @@
1
+ export { MatrixToReducedBar } from './MatrixToReducedBar';
@@ -1,7 +1,3 @@
1
1
  import { FC } from 'react';
2
- type TMatrixToTableRowsProps = {
3
- range?: string;
4
- title?: string;
5
- };
2
+ import { TMatrixToTableRowsProps } from '../../../types';
6
3
  export declare const MatrixToTableRows: FC<TMatrixToTableRowsProps>;
7
- export {};
@@ -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,3 @@
1
+ import { FC } from 'react';
2
+ import { TScalarToGaugeProps } from '../../../types';
3
+ export declare const ScalarToGauge: FC<TScalarToGaugeProps>;
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { TScalarToStatProps } from '../../../types';
3
+ export declare const ScalarToStat: FC<TScalarToStatProps>;
@@ -0,0 +1,2 @@
1
+ export { ScalarToGauge } from './ScalarToGauge';
2
+ export { ScalarToStat } from './ScalarToStat';
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { TVectorToBarGaugeProps } from '../../../types';
3
+ export declare const VectorToBarGauge: FC<TVectorToBarGaugeProps>;
@@ -1,7 +1,3 @@
1
1
  import { FC } from 'react';
2
- type TVectorToBarHorizontalProps = {
3
- query?: string;
4
- title?: string;
5
- };
2
+ import { TVectorToBarHorizontalProps } from '../../../types';
6
3
  export declare const VectorToBarHorizontal: FC<TVectorToBarHorizontalProps>;
7
- export {};
@@ -0,0 +1 @@
1
+ export { VectorToBarHorizontal } from './VectorToBarHorizontal';
@@ -1,7 +1,3 @@
1
1
  import { FC } from 'react';
2
- type TVectorToBarVerticalProps = {
3
- query?: string;
4
- title?: string;
5
- };
2
+ import { TVectorToBarVerticalProps } from '../../../types';
6
3
  export declare const VectorToBarVertical: FC<TVectorToBarVerticalProps>;
7
- export {};
@@ -0,0 +1 @@
1
+ export { VectorToBarVertical } from './VectorToBarVertical';
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { TVectorToGaugeRadialProps } from '../../../types';
3
+ export declare const VectorToGaugeRadial: FC<TVectorToGaugeRadialProps>;
@@ -0,0 +1 @@
1
+ export { VectorToGaugeRadial } from './VectorToGaugeRadial';
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { TVectorToPieProps } from '../../../types';
3
+ export declare const VectorToPie: FC<TVectorToPieProps>;
@@ -1,7 +1,3 @@
1
1
  import { FC } from 'react';
2
- type TVectorToTableRowsProps = {
3
- query?: string;
4
- title?: string;
5
- };
2
+ import { TVectorToTableRowsProps } from '../../../types';
6
3
  export declare const VectorToTableRows: FC<TVectorToTableRowsProps>;
7
- export {};
@@ -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 {};
@@ -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
+ };
@@ -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 { seriesToStackedAreaData } from './toAreaStacked';
3
+ export { matrixToStackedAreaData } from './toAreaStacked';
5
4
  export type { TStackedAreaPoint } from './toAreaStacked';
6
- export { seriesToReducedVector } from './toReducedVector';
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 { seriesToStackedAreaData } from './matrixToAreaStackedAdapter';
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 seriesToStackedAreaData: (series: TRechartsSeries[] | undefined) => TStackedAreaPoint[];
14
+ export declare const matrixToStackedAreaData: (series: TRechartsSeries[] | undefined) => TStackedAreaPoint[];
@@ -1,4 +1,4 @@
1
- import { TPrometheusRangeResponse } from '../types';
1
+ import { TPrometheusRangeResponse } from '../../../types';
2
2
  export type TChartPoint = {
3
3
  timestamp: number;
4
4
  value: number;
@@ -1,2 +1,2 @@
1
- export { seriesToReducedVector } from './matrixToReducedVectorAdapter';
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 seriesToReducedVector: (series: TRechartsSeries[] | undefined, mode?: TAggregationMode) => TReducedVectorItem[];
8
+ export declare const matrixToReducedVector: (series: TRechartsSeries[] | undefined, mode?: TAggregationMode) => TReducedVectorItem[];
@@ -1,4 +1,4 @@
1
- import { TPrometheusRangeResponse } from '../types';
1
+ import { TPrometheusRangeResponse } from '../../../types';
2
2
  export type TSeriesStatsRow = {
3
3
  id: string;
4
4
  metric: Record<string, string>;
@@ -0,0 +1,4 @@
1
+ export { scalarToStat } from './toStat';
2
+ export type { TStatItem } from './toStat';
3
+ export { scalarToGauge } from './toGauge';
4
+ export type { TGaugeItem } from './toGauge';
@@ -0,0 +1,2 @@
1
+ export { scalarToGauge } from './scalarToGaugeAdapter';
2
+ export type { TGaugeItem } from './scalarToGaugeAdapter';
@@ -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,2 @@
1
+ export { scalarToStat } from './scalarToStatAdapter';
2
+ export type { TStatItem } from './scalarToStatAdapter';
@@ -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;
@@ -1,4 +1,3 @@
1
- export type { TPrometheusVectorResponse } from './types';
2
1
  export { vectorToBarVertical, vectorToBarHorizontal } from './toBar';
3
2
  export type { TBarItem } from './toBar';
4
3
  export { vectorToBarGauge } from './toBarGauge';
@@ -1,4 +1,4 @@
1
- import { TPrometheusVectorResponse } from '../types';
1
+ import { TPrometheusVectorResponse } from '../../../types';
2
2
  export type TBarItem = {
3
3
  id: string;
4
4
  metric: Record<string, string>;
@@ -1,4 +1,4 @@
1
- import { TPrometheusVectorResponse } from '../types';
1
+ import { TPrometheusVectorResponse } from '../../../types';
2
2
  export type TBarGaugeItem = {
3
3
  id: string;
4
4
  value: number;
@@ -1,4 +1,4 @@
1
- import { TPrometheusVectorResponse } from '../types';
1
+ import { TPrometheusVectorResponse } from '../../../types';
2
2
  export type TRadialGaugeValue = {
3
3
  id: string;
4
4
  value: number;
@@ -1,4 +1,4 @@
1
- import { TPrometheusVectorResponse } from '../types';
1
+ import { TPrometheusVectorResponse } from '../../../types';
2
2
  export type TPieSlice = {
3
3
  id: string;
4
4
  value: number;
@@ -1,4 +1,4 @@
1
- import { TPrometheusVectorResponse } from '../types';
1
+ import { TPrometheusVectorResponse } from '../../../types';
2
2
  export type TTableRow = {
3
3
  id: string;
4
4
  value: number;
@@ -39,3 +39,4 @@ export { OwnerRefs } from './OwnerRefs';
39
39
  export { Toggler } from './Toggler';
40
40
  export { TogglerSegmented } from './TogglerSegmented';
41
41
  export { VMVNC } from './VMVNC';
42
+ export { PrometheusGraph } from './PrometheusGraph';
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prorobotech/openapi-k8s-toolkit",
3
- "version": "1.2.0-alpha.15",
3
+ "version": "1.2.0-alpha.17",
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",
@@ -1,7 +0,0 @@
1
- import { FC } from 'react';
2
- type TMatrixToReducedBarProps = {
3
- range?: string;
4
- mode?: 'last' | 'avg' | 'sum' | 'max' | 'min';
5
- };
6
- export declare const MatrixToReducedBar: FC<TMatrixToReducedBarProps>;
7
- export {};
@@ -1,8 +0,0 @@
1
- import { FC } from 'react';
2
- type TVectorToBarGaugeProps = {
3
- query?: string;
4
- title?: string;
5
- topN?: number;
6
- };
7
- export declare const VectorToBarGauge: FC<TVectorToBarGaugeProps>;
8
- export {};