ydb-embedded-ui 6.29.1 → 6.29.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.d.ts +2 -1
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js +2 -2
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js.map +1 -1
- package/dist/components/FormattedBytes/FormattedBytes.d.ts +3 -2
- package/dist/components/FormattedBytes/FormattedBytes.js.map +1 -1
- package/dist/components/FormattedBytes/utils.d.ts +3 -2
- package/dist/components/FormattedBytes/utils.js.map +1 -1
- package/dist/components/PaginatedTable/PaginatedTable.d.ts +2 -2
- package/dist/components/PaginatedTable/PaginatedTable.js +10 -15
- package/dist/components/PaginatedTable/PaginatedTable.js.map +1 -1
- package/dist/components/PaginatedTable/PaginatedTable.scss +5 -1
- package/dist/components/PaginatedTable/TableChunk.d.ts +3 -3
- package/dist/components/PaginatedTable/TableChunk.js +7 -10
- package/dist/components/PaginatedTable/TableChunk.js.map +1 -1
- package/dist/components/PaginatedTable/constants.d.ts +1 -1
- package/dist/components/PaginatedTable/constants.js +1 -1
- package/dist/components/PaginatedTable/useScrollBasedChunks.d.ts +5 -3
- package/dist/components/PaginatedTable/useScrollBasedChunks.js +43 -23
- package/dist/components/PaginatedTable/useScrollBasedChunks.js.map +1 -1
- package/dist/components/PaginatedTable/utils.d.ts +18 -0
- package/dist/components/PaginatedTable/utils.js +27 -0
- package/dist/components/PaginatedTable/utils.js.map +1 -1
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsCores.js +9 -2
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsCores.js.map +1 -1
- package/dist/containers/Node/Node.js +2 -2
- package/dist/containers/Node/Node.js.map +1 -1
- package/dist/containers/Nodes/NodesWrapper.d.ts +1 -1
- package/dist/containers/Nodes/PaginatedNodes.d.ts +1 -1
- package/dist/containers/PDiskPage/PDiskPage.js +3 -2
- package/dist/containers/PDiskPage/PDiskPage.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorage.d.ts +1 -1
- package/dist/containers/Storage/PaginatedStorageGroups.js +2 -2
- package/dist/containers/Storage/PaginatedStorageGroups.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageNodes.js +2 -2
- package/dist/containers/Storage/PaginatedStorageNodes.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/PaginatedStorageGroupsTable.d.ts +1 -1
- package/dist/containers/Storage/StorageNodes/PaginatedStorageNodesTable.d.ts +1 -1
- package/dist/containers/Storage/StorageWrapper.d.ts +1 -1
- package/dist/containers/StorageGroupPage/StorageGroupPage.js +3 -2
- package/dist/containers/StorageGroupPage/StorageGroupPage.js.map +1 -1
- package/dist/containers/Tablets/TabletsTable.js +3 -3
- package/dist/containers/Tablets/TabletsTable.js.map +1 -1
- package/dist/containers/VDiskPage/VDiskPage.js +3 -2
- package/dist/containers/VDiskPage/VDiskPage.js.map +1 -1
- package/dist/services/settings.d.ts +1 -1
- package/dist/services/settings.js +1 -1
- package/dist/services/settings.js.map +1 -1
- package/dist/utils/bytesParsers/formatBytes.d.ts +2 -13
- package/dist/utils/bytesParsers/formatBytes.js.map +1 -1
- package/dist/utils/bytesParsers/i18n/en.json +4 -0
- package/dist/utils/bytesParsers/i18n/index.d.ts +1 -1
- package/dist/utils/bytesParsers/i18n/index.js +1 -2
- package/dist/utils/bytesParsers/i18n/index.js.map +1 -1
- package/dist/utils/dataFormatters/__test__/formatNumbers.test.d.ts +1 -0
- package/dist/utils/dataFormatters/__test__/formatNumbers.test.js +37 -0
- package/dist/utils/dataFormatters/__test__/formatNumbers.test.js.map +1 -0
- package/dist/utils/dataFormatters/__test__/formatStorageValues.test.js +1 -5
- package/dist/utils/dataFormatters/__test__/formatStorageValues.test.js.map +1 -1
- package/dist/utils/dataFormatters/common.d.ts +13 -0
- package/dist/utils/dataFormatters/common.js +25 -0
- package/dist/utils/dataFormatters/common.js.map +1 -0
- package/dist/utils/dataFormatters/dataFormatters.d.ts +3 -2
- package/dist/utils/dataFormatters/dataFormatters.js +9 -41
- package/dist/utils/dataFormatters/dataFormatters.js.map +1 -1
- package/dist/utils/dataFormatters/formatNumber.d.ts +43 -0
- package/dist/utils/dataFormatters/formatNumber.js +82 -0
- package/dist/utils/dataFormatters/formatNumber.js.map +1 -0
- package/package.json +1 -1
- package/dist/utils/bytesParsers/i18n/ru.json +0 -8
@@ -9,11 +9,12 @@ interface ButtonWithConfirmDialogProps<T, K> {
|
|
9
9
|
retryButtonText?: string;
|
10
10
|
buttonDisabled?: ButtonProps['disabled'];
|
11
11
|
buttonView?: ButtonProps['view'];
|
12
|
+
buttonTitle?: ButtonProps['title'];
|
12
13
|
buttonClassName?: ButtonProps['className'];
|
13
14
|
withPopover?: boolean;
|
14
15
|
popoverContent?: PopoverProps['content'];
|
15
16
|
popoverPlacement?: PopoverProps['placement'];
|
16
17
|
popoverDisabled?: PopoverProps['disabled'];
|
17
18
|
}
|
18
|
-
export declare function ButtonWithConfirmDialog<T, K>({ children, onConfirmAction, onConfirmActionSuccess, dialogHeader, dialogText, retryButtonText, buttonDisabled, buttonView, buttonClassName, withPopover, popoverContent, popoverPlacement, popoverDisabled, }: ButtonWithConfirmDialogProps<T, K>): import("react/jsx-runtime").JSX.Element;
|
19
|
+
export declare function ButtonWithConfirmDialog<T, K>({ children, onConfirmAction, onConfirmActionSuccess, dialogHeader, dialogText, retryButtonText, buttonDisabled, buttonView, buttonTitle, buttonClassName, withPopover, popoverContent, popoverPlacement, popoverDisabled, }: ButtonWithConfirmDialogProps<T, K>): import("react/jsx-runtime").JSX.Element;
|
19
20
|
export {};
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
3
3
|
import { Button, Popover } from '@gravity-ui/uikit';
|
4
4
|
import { CriticalActionDialog } from '../CriticalActionDialog/CriticalActionDialog';
|
5
5
|
import { isErrorWithRetry } from '../CriticalActionDialog/utils';
|
6
|
-
export function ButtonWithConfirmDialog({ children, onConfirmAction, onConfirmActionSuccess, dialogHeader, dialogText, retryButtonText, buttonDisabled = false, buttonView = 'action', buttonClassName, withPopover = false, popoverContent, popoverPlacement = 'right', popoverDisabled = true, }) {
|
6
|
+
export function ButtonWithConfirmDialog({ children, onConfirmAction, onConfirmActionSuccess, dialogHeader, dialogText, retryButtonText, buttonDisabled = false, buttonView = 'action', buttonTitle, buttonClassName, withPopover = false, popoverContent, popoverPlacement = 'right', popoverDisabled = true, }) {
|
7
7
|
const [isConfirmDialogVisible, setIsConfirmDialogVisible] = React.useState(false);
|
8
8
|
const [buttonLoading, setButtonLoading] = React.useState(false);
|
9
9
|
const [withRetry, setWithRetry] = React.useState(false);
|
@@ -25,7 +25,7 @@ export function ButtonWithConfirmDialog({ children, onConfirmAction, onConfirmAc
|
|
25
25
|
setButtonLoading(false);
|
26
26
|
};
|
27
27
|
const renderButton = () => {
|
28
|
-
return (_jsx(Button, { onClick: () => setIsConfirmDialogVisible(true), view: buttonView, disabled: buttonDisabled, loading: !buttonDisabled && buttonLoading, className: buttonClassName, children: children }));
|
28
|
+
return (_jsx(Button, { onClick: () => setIsConfirmDialogVisible(true), view: buttonView, disabled: buttonDisabled, loading: !buttonDisabled && buttonLoading, className: buttonClassName, title: buttonTitle, children: children }));
|
29
29
|
};
|
30
30
|
const renderContent = () => {
|
31
31
|
if (withPopover) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ButtonWithConfirmDialog.js","sourceRoot":"","sources":["../../../src/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,MAAM,EAAE,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAC,oBAAoB,EAAC,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;
|
1
|
+
{"version":3,"file":"ButtonWithConfirmDialog.js","sourceRoot":"","sources":["../../../src/components/ButtonWithConfirmDialog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
2
|
+
import type { FormatValuesArgs } from '../../utils/dataFormatters/common';
|
3
|
+
type FormattedBytesProps = FormatValuesArgs<BytesSizes>;
|
3
4
|
export declare const FormattedBytes: ({ value, withSpeedLabel, ...params }: FormattedBytesProps) => import("react/jsx-runtime").JSX.Element;
|
4
5
|
export {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FormattedBytes.js","sourceRoot":"","sources":["../../../src/components/FormattedBytes/FormattedBytes.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,WAAW,EAAC,MAAM,0BAA0B,CAAC;
|
1
|
+
{"version":3,"file":"FormattedBytes.js","sourceRoot":"","sources":["../../../src/components/FormattedBytes/FormattedBytes.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,WAAW,EAAC,MAAM,0BAA0B,CAAC;AAKrD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAC,KAAK,EAAE,cAAc,EAAE,GAAG,MAAM,EAAsB,EAAE,EAAE;IACtF,MAAM,SAAS,GAAG,WAAW,CAAC,EAAC,KAAK,EAAE,cAAc,EAAE,GAAG,MAAM,EAAC,CAAC,CAAC;IAClE,MAAM,KAAK,GAAG,WAAW,CAAC,EAAC,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,EAAC,CAAC,CAAC;IAE9D,OAAO,eAAM,KAAK,EAAE,KAAK,YAAG,SAAS,GAAQ,CAAC;AAClD,CAAC,CAAC"}
|
@@ -1,2 +1,3 @@
|
|
1
|
-
import type {
|
2
|
-
|
1
|
+
import type { BytesSizes } from '../../utils/bytesParsers';
|
2
|
+
import type { FormatValuesArgs } from '../../utils/dataFormatters/common';
|
3
|
+
export declare const toFormattedSize: (value: number | string | undefined, params?: Omit<FormatValuesArgs<BytesSizes>, "value">) => import("react/jsx-runtime").JSX.Element | null;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/FormattedBytes/utils.tsx"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/FormattedBytes/utils.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEhD,MAAM,CAAC,MAAM,eAAe,GAAG,CAC3B,KAAkC,EAClC,MAAoD,EACtD,EAAE;IACA,IAAI,CAAC,KAAK,EAAE,CAAC;QACT,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,KAAC,cAAc,IAAC,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC,KAAM,MAAM,GAAI,CAAC;AAC9E,CAAC,CAAC"}
|
@@ -10,7 +10,7 @@ export interface PaginatedTableProps<T, F> {
|
|
10
10
|
columns: Column<T>[];
|
11
11
|
getRowClassName?: GetRowClassName<T>;
|
12
12
|
rowHeight?: number;
|
13
|
-
parentRef
|
13
|
+
parentRef: React.RefObject<HTMLElement>;
|
14
14
|
initialSortParams?: SortParams;
|
15
15
|
onColumnsResize?: HandleTableColumnsResize;
|
16
16
|
renderControls?: RenderControls;
|
@@ -18,4 +18,4 @@ export interface PaginatedTableProps<T, F> {
|
|
18
18
|
renderErrorMessage?: RenderErrorMessage;
|
19
19
|
containerClassName?: string;
|
20
20
|
}
|
21
|
-
export declare const PaginatedTable: <T, F>({ limit, initialEntitiesCount, fetchData, filters, tableName, columns, getRowClassName, rowHeight, parentRef, initialSortParams, onColumnsResize, renderControls, renderErrorMessage, renderEmptyDataMessage, containerClassName, }: PaginatedTableProps<T, F>) => import("react/jsx-runtime").JSX.Element;
|
21
|
+
export declare const PaginatedTable: <T, F>({ limit: chunkSize, initialEntitiesCount, fetchData, filters, tableName, columns, getRowClassName, rowHeight, parentRef, initialSortParams, onColumnsResize, renderControls, renderErrorMessage, renderEmptyDataMessage, containerClassName, }: PaginatedTableProps<T, F>) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import React from 'react';
|
3
|
-
import { getArray } from '../../utils';
|
4
3
|
import { TableWithControlsLayout } from '../TableWithControlsLayout/TableWithControlsLayout';
|
5
4
|
import { TableChunk } from './TableChunk';
|
6
5
|
import { TableHead } from './TableHead';
|
@@ -10,20 +9,22 @@ import i18n from './i18n';
|
|
10
9
|
import { b } from './shared';
|
11
10
|
import { useScrollBasedChunks } from './useScrollBasedChunks';
|
12
11
|
import './PaginatedTable.scss';
|
13
|
-
export const PaginatedTable = ({ limit, initialEntitiesCount, fetchData, filters, tableName, columns, getRowClassName, rowHeight = DEFAULT_TABLE_ROW_HEIGHT, parentRef, initialSortParams, onColumnsResize, renderControls, renderErrorMessage, renderEmptyDataMessage, containerClassName, }) => {
|
14
|
-
const initialTotal = initialEntitiesCount ||
|
15
|
-
const initialFound = initialEntitiesCount ||
|
12
|
+
export const PaginatedTable = ({ limit: chunkSize, initialEntitiesCount, fetchData, filters, tableName, columns, getRowClassName, rowHeight = DEFAULT_TABLE_ROW_HEIGHT, parentRef, initialSortParams, onColumnsResize, renderControls, renderErrorMessage, renderEmptyDataMessage, containerClassName, }) => {
|
13
|
+
const initialTotal = initialEntitiesCount || 0;
|
14
|
+
const initialFound = initialEntitiesCount || 1;
|
16
15
|
const [sortParams, setSortParams] = React.useState(initialSortParams);
|
17
16
|
const [totalEntities, setTotalEntities] = React.useState(initialTotal);
|
18
17
|
const [foundEntities, setFoundEntities] = React.useState(initialFound);
|
19
18
|
const [isInitialLoad, setIsInitialLoad] = React.useState(true);
|
20
19
|
const tableRef = React.useRef(null);
|
21
20
|
const activeChunks = useScrollBasedChunks({
|
22
|
-
|
21
|
+
parentRef,
|
22
|
+
tableRef,
|
23
23
|
totalItems: foundEntities,
|
24
|
-
|
25
|
-
chunkSize
|
24
|
+
rowHeight,
|
25
|
+
chunkSize,
|
26
26
|
});
|
27
|
+
const lastChunkSize = React.useMemo(() => foundEntities % chunkSize || chunkSize, [foundEntities, chunkSize]);
|
27
28
|
const handleDataFetched = React.useCallback((total, found) => {
|
28
29
|
setTotalEntities(total);
|
29
30
|
setFoundEntities(found);
|
@@ -31,24 +32,18 @@ export const PaginatedTable = ({ limit, initialEntitiesCount, fetchData, filters
|
|
31
32
|
}, []);
|
32
33
|
// reset table on filters change
|
33
34
|
React.useLayoutEffect(() => {
|
34
|
-
var _a;
|
35
35
|
setTotalEntities(initialTotal);
|
36
36
|
setFoundEntities(initialFound);
|
37
37
|
setIsInitialLoad(true);
|
38
38
|
if (parentRef === null || parentRef === void 0 ? void 0 : parentRef.current) {
|
39
39
|
parentRef.current.scrollTo(0, 0);
|
40
40
|
}
|
41
|
-
|
42
|
-
(_a = tableRef.current) === null || _a === void 0 ? void 0 : _a.scrollTo(0, 0);
|
43
|
-
}
|
44
|
-
}, [filters, initialFound, initialTotal, limit, parentRef]);
|
41
|
+
}, [filters, initialFound, initialTotal, parentRef]);
|
45
42
|
const renderChunks = () => {
|
46
43
|
if (!isInitialLoad && foundEntities === 0) {
|
47
44
|
return (_jsx("tbody", { children: _jsx(EmptyTableRow, { columns: columns, children: renderEmptyDataMessage ? renderEmptyDataMessage() : i18n('empty') }) }));
|
48
45
|
}
|
49
|
-
|
50
|
-
const chunksCount = Math.ceil(totalLength / limit);
|
51
|
-
return getArray(chunksCount).map((value) => (_jsx(TableChunk, { id: value, limit: limit, totalLength: totalLength, rowHeight: rowHeight, columns: columns, fetchData: fetchData, filters: filters, tableName: tableName, sortParams: sortParams, getRowClassName: getRowClassName, renderErrorMessage: renderErrorMessage, onDataFetched: handleDataFetched, isActive: activeChunks.includes(value) }, value)));
|
46
|
+
return activeChunks.map((isActive, index) => (_jsx(TableChunk, { id: index, calculatedCount: index === activeChunks.length - 1 ? lastChunkSize : chunkSize, chunkSize: chunkSize, rowHeight: rowHeight, columns: columns, fetchData: fetchData, filters: filters, tableName: tableName, sortParams: sortParams, getRowClassName: getRowClassName, renderErrorMessage: renderErrorMessage, onDataFetched: handleDataFetched, isActive: isActive }, index)));
|
52
47
|
};
|
53
48
|
const renderTable = () => (_jsxs("table", { className: b('table'), children: [_jsx(TableHead, { columns: columns, onSort: setSortParams, onColumnsResize: onColumnsResize }), renderChunks()] }));
|
54
49
|
const renderContent = () => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PaginatedTable.js","sourceRoot":"","sources":["../../../src/components/PaginatedTable/PaginatedTable.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,
|
1
|
+
{"version":3,"file":"PaginatedTable.js","sourceRoot":"","sources":["../../../src/components/PaginatedTable/PaginatedTable.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,uBAAuB,EAAC,MAAM,oDAAoD,CAAC;AAE3F,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,wBAAwB,EAAC,MAAM,aAAa,CAAC;AACrD,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAC,CAAC,EAAC,MAAM,UAAU,CAAC;AAW3B,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAE5D,OAAO,uBAAuB,CAAC;AAoB/B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAO,EACjC,KAAK,EAAE,SAAS,EAChB,oBAAoB,EACpB,SAAS,EACT,OAAO,EACP,SAAS,EACT,OAAO,EACP,eAAe,EACf,SAAS,GAAG,wBAAwB,EACpC,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,GACM,EAAE,EAAE;IAC5B,MAAM,YAAY,GAAG,oBAAoB,IAAI,CAAC,CAAC;IAC/C,MAAM,YAAY,GAAG,oBAAoB,IAAI,CAAC,CAAC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AE;QACvB,IAAI,cAAc,EAAE,CAAC;YACjB,OAAO,CACH,MAAC,uBAAuB,eACpB,KAAC,uBAAuB,CAAC,QAAQ,cAC5B,cAAc,CAAC,EAAC,MAAM,EAAE,CAAC,aAAa,EAAE,aAAa,EAAE,aAAa,EAAC,CAAC,GACxC,EACnC,KAAC,uBAAuB,CAAC,KAAK,cAAE,WAAW,EAAE,GAAiC,IACxD,CAC7B,CAAC;QACN,CAAC;QAED,OAAO,WAAW,EAAE,CAAC;IACzB,CAAC,CAAC;IAEF,OAAO,CACH,cAAK,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,kBAAkB,CAAC,YACrD,aAAa,EAAE,GACd,CACT,CAAC;AACN,CAAC,CAAC"}
|
@@ -29,6 +29,10 @@
|
|
29
29
|
position: relative;
|
30
30
|
z-index: 1;
|
31
31
|
|
32
|
+
// Performance optimization for row hovering.
|
33
|
+
// it actually works.
|
34
|
+
transform: translateZ(0);
|
35
|
+
|
32
36
|
&:hover {
|
33
37
|
background: var(--paginated-table-hover-color);
|
34
38
|
}
|
@@ -177,6 +181,6 @@
|
|
177
181
|
}
|
178
182
|
|
179
183
|
&__row-skeleton::after {
|
180
|
-
animation
|
184
|
+
animation: none !important;
|
181
185
|
}
|
182
186
|
}
|
@@ -3,9 +3,9 @@ import type { IResponseError } from '../../types/api/error';
|
|
3
3
|
import type { Column, FetchData, GetRowClassName, SortParams } from './types';
|
4
4
|
interface TableChunkProps<T, F> {
|
5
5
|
id: number;
|
6
|
-
|
7
|
-
totalLength: number;
|
6
|
+
chunkSize: number;
|
8
7
|
rowHeight: number;
|
8
|
+
calculatedCount: number;
|
9
9
|
columns: Column<T>[];
|
10
10
|
filters?: F;
|
11
11
|
sortParams?: SortParams;
|
@@ -16,5 +16,5 @@ interface TableChunkProps<T, F> {
|
|
16
16
|
renderErrorMessage?: (error: IResponseError) => React.ReactNode;
|
17
17
|
onDataFetched: (total: number, found: number) => void;
|
18
18
|
}
|
19
|
-
export declare const TableChunk: <T, F>({ id,
|
19
|
+
export declare const TableChunk: <T, F>({ id, chunkSize, calculatedCount, rowHeight, columns, fetchData, tableName, filters, sortParams, getRowClassName, renderErrorMessage, onDataFetched, isActive, }: TableChunkProps<T, F>) => import("react/jsx-runtime").JSX.Element;
|
20
20
|
export {};
|
@@ -5,16 +5,17 @@ import { getArray } from '../../utils';
|
|
5
5
|
import { useAutoRefreshInterval } from '../../utils/hooks';
|
6
6
|
import { ResponseError } from '../Errors/ResponseError';
|
7
7
|
import { EmptyTableRow, LoadingTableRow, TableRow } from './TableRow';
|
8
|
+
import { typedMemo } from './utils';
|
8
9
|
const DEBOUNCE_TIMEOUT = 200;
|
9
10
|
// Memoisation prevents chunks rerenders that could cause perfomance issues on big tables
|
10
|
-
export const TableChunk = ({ id,
|
11
|
+
export const TableChunk = typedMemo(function TableChunk({ id, chunkSize, calculatedCount, rowHeight, columns, fetchData, tableName, filters, sortParams, getRowClassName, renderErrorMessage, onDataFetched, isActive, }) {
|
11
12
|
var _a;
|
12
13
|
const [isTimeoutActive, setIsTimeoutActive] = React.useState(true);
|
13
14
|
const [autoRefreshInterval] = useAutoRefreshInterval();
|
14
15
|
const columnsIds = columns.map((column) => column.name);
|
15
16
|
const queryParams = {
|
16
|
-
offset: id *
|
17
|
-
limit,
|
17
|
+
offset: id * chunkSize,
|
18
|
+
limit: chunkSize,
|
18
19
|
fetchData: fetchData,
|
19
20
|
filters,
|
20
21
|
sortParams,
|
@@ -43,10 +44,7 @@ export const TableChunk = ({ id, limit, totalLength, rowHeight, columns, fetchDa
|
|
43
44
|
onDataFetched(total, found);
|
44
45
|
}
|
45
46
|
}, [currentData, isActive, onDataFetched]);
|
46
|
-
const
|
47
|
-
const remainingLength = totalLength - chunkOffset;
|
48
|
-
const calculatedChunkLength = remainingLength < limit ? remainingLength : limit;
|
49
|
-
const dataLength = ((_a = currentData === null || currentData === void 0 ? void 0 : currentData.data) === null || _a === void 0 ? void 0 : _a.length) || calculatedChunkLength;
|
47
|
+
const dataLength = ((_a = currentData === null || currentData === void 0 ? void 0 : currentData.data) === null || _a === void 0 ? void 0 : _a.length) || calculatedCount;
|
50
48
|
const renderContent = () => {
|
51
49
|
if (!isActive) {
|
52
50
|
return null;
|
@@ -62,13 +60,12 @@ export const TableChunk = ({ id, limit, totalLength, rowHeight, columns, fetchDa
|
|
62
60
|
}
|
63
61
|
return currentData.data.map((rowData, index) => (_jsx(TableRow, { index: index, row: rowData, columns: columns, height: rowHeight, getRowClassName: getRowClassName }, index)));
|
64
62
|
};
|
65
|
-
const chunkHeight = dataLength ? dataLength * rowHeight : limit * rowHeight;
|
66
63
|
return (_jsx("tbody", { id: id.toString(), style: {
|
67
|
-
height: `${
|
64
|
+
height: `${dataLength * rowHeight}px`,
|
68
65
|
// Default display: table-row-group doesn't work in Safari and breaks the table
|
69
66
|
// display: block works in Safari, but disconnects thead and tbody cell grids
|
70
67
|
// Hack to make it work in all cases
|
71
68
|
display: isActive ? 'table-row-group' : 'block',
|
72
69
|
}, children: renderContent() }));
|
73
|
-
};
|
70
|
+
});
|
74
71
|
//# sourceMappingURL=TableChunk.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TableChunk.js","sourceRoot":"","sources":["../../../src/components/PaginatedTable/TableChunk.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,YAAY,EAAC,MAAM,gCAAgC,CAAC;AAE5D,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AACrC,OAAO,EAAC,sBAAsB,EAAC,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAC,aAAa,EAAE,eAAe,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;
|
1
|
+
{"version":3,"file":"TableChunk.js","sourceRoot":"","sources":["../../../src/components/PaginatedTable/TableChunk.tsx"],"names":[],"mappings":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kBAAkB,CAAC,SAAS,CAAC,CAChC,CAAC,CAAC,CAAC,CACA,KAAC,aAAa,IAAC,KAAK,EAAE,SAAS,GAAI,CACtC,GACW,CACnB,CAAC;YACN,CAAC;iBAAM,CAAC;gBACJ,OAAO,QAAQ,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACvC,KAAC,eAAe,IAEZ,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,KAAK,IAHP,KAAK,CAIZ,CACL,CAAC,CAAC;YACP,CAAC;QACL,CAAC;QAED,OAAO,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5C,KAAC,QAAQ,IAEL,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,OAAY,EACjB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,eAAe,IAL3B,KAAK,CAMZ,CACL,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,OAAO,CACH,gBACI,EAAE,EAAE,EAAE,CAAC,QAAQ,EAAE,EACjB,KAAK,EAAE;YACH,MAAM,EAAE,GAAG,UAAU,GAAG,SAAS,IAAI;YACrC,+EAA+E;YAC/E,6EAA6E;YAC7E,oCAAoC;YACpC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,OAAO;SAClD,YAEA,aAAa,EAAE,GACZ,CACX,CAAC;AACN,CAAC,CAAC,CAAC"}
|
@@ -7,5 +7,5 @@ export declare const ASCENDING = 1;
|
|
7
7
|
export declare const DESCENDING = -1;
|
8
8
|
export declare const DEFAULT_SORT_ORDER = -1;
|
9
9
|
export declare const DEFAULT_REQUEST_TIMEOUT = 200;
|
10
|
-
export declare const DEFAULT_TABLE_ROW_HEIGHT =
|
10
|
+
export declare const DEFAULT_TABLE_ROW_HEIGHT = 41;
|
11
11
|
export declare const DEFAULT_INTERSECTION_OBSERVER_MARGIN = "100%";
|
@@ -8,6 +8,6 @@ export const DESCENDING = -1;
|
|
8
8
|
export const DEFAULT_SORT_ORDER = DESCENDING;
|
9
9
|
// Time in ms after which request will be sent
|
10
10
|
export const DEFAULT_REQUEST_TIMEOUT = 200;
|
11
|
-
export const DEFAULT_TABLE_ROW_HEIGHT =
|
11
|
+
export const DEFAULT_TABLE_ROW_HEIGHT = 41;
|
12
12
|
export const DEFAULT_INTERSECTION_OBSERVER_MARGIN = '100%';
|
13
13
|
//# sourceMappingURL=constants.js.map
|
@@ -1,9 +1,11 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
interface UseScrollBasedChunksProps {
|
3
|
-
|
3
|
+
parentRef: React.RefObject<HTMLElement>;
|
4
|
+
tableRef: React.RefObject<HTMLElement>;
|
4
5
|
totalItems: number;
|
5
|
-
|
6
|
+
rowHeight: number;
|
6
7
|
chunkSize: number;
|
8
|
+
overscanCount?: number;
|
7
9
|
}
|
8
|
-
export declare const useScrollBasedChunks: ({
|
10
|
+
export declare const useScrollBasedChunks: ({ parentRef, tableRef, totalItems, rowHeight, chunkSize, overscanCount, }: UseScrollBasedChunksProps) => boolean[];
|
9
11
|
export {};
|
@@ -1,35 +1,55 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { throttle } from 'lodash';
|
3
|
-
import {
|
3
|
+
import { calculateElementOffsetTop } from './utils';
|
4
|
+
const DEFAULT_OVERSCAN_COUNT = 1;
|
4
5
|
const THROTTLE_DELAY = 100;
|
5
|
-
const
|
6
|
-
|
7
|
-
const [
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
export const useScrollBasedChunks = ({ parentRef, tableRef, totalItems, rowHeight, chunkSize, overscanCount = DEFAULT_OVERSCAN_COUNT, }) => {
|
7
|
+
const chunksCount = React.useMemo(() => Math.ceil(totalItems / chunkSize), [chunkSize, totalItems]);
|
8
|
+
const [startChunk, setStartChunk] = React.useState(0);
|
9
|
+
const [endChunk, setEndChunk] = React.useState(Math.min(overscanCount, Math.max(chunksCount - 1, 0)));
|
10
|
+
const calculateVisibleRange = React.useCallback(() => {
|
11
|
+
const container = parentRef === null || parentRef === void 0 ? void 0 : parentRef.current;
|
12
|
+
const table = tableRef.current;
|
13
|
+
if (!container || !table) {
|
14
|
+
return null;
|
15
|
+
}
|
16
|
+
const tableOffset = calculateElementOffsetTop(table, container);
|
17
|
+
const containerScroll = container.scrollTop;
|
18
|
+
const visibleStart = Math.max(containerScroll - tableOffset, 0);
|
19
|
+
const visibleEnd = visibleStart + container.clientHeight;
|
20
|
+
const start = Math.max(Math.floor(visibleStart / rowHeight / chunkSize) - overscanCount, 0);
|
21
|
+
const end = Math.min(Math.floor(visibleEnd / rowHeight / chunkSize) + overscanCount, Math.max(chunksCount - 1, 0));
|
22
|
+
return { start, end };
|
23
|
+
}, [parentRef, tableRef, rowHeight, chunkSize, overscanCount, chunksCount]);
|
24
|
+
const handleScroll = React.useCallback(() => {
|
25
|
+
const newRange = calculateVisibleRange();
|
26
|
+
if (newRange) {
|
27
|
+
setStartChunk(newRange.start);
|
28
|
+
setEndChunk(newRange.end);
|
12
29
|
}
|
13
|
-
|
14
|
-
const visibleStartIndex = Math.floor(scrollTop / itemHeight);
|
15
|
-
const visibleEndIndex = Math.min(Math.ceil((scrollTop + clientHeight) / itemHeight), totalItems - 1);
|
16
|
-
const startChunk = Math.floor(visibleStartIndex / chunkSize);
|
17
|
-
const endChunk = Math.floor(visibleEndIndex / chunkSize);
|
18
|
-
const newActiveChunks = getArray(endChunk - startChunk + 1 + CHUNKS_AHEAD_COUNT).map((index) => startChunk + index);
|
19
|
-
setActiveChunks(newActiveChunks);
|
20
|
-
}, [chunkSize, containerRef, itemHeight, totalItems]);
|
21
|
-
const throttledCalculateActiveChunks = React.useMemo(() => throttle(calculateActiveChunks, THROTTLE_DELAY), [calculateActiveChunks]);
|
30
|
+
}, [calculateVisibleRange]);
|
22
31
|
React.useEffect(() => {
|
23
|
-
const container =
|
32
|
+
const container = parentRef === null || parentRef === void 0 ? void 0 : parentRef.current;
|
24
33
|
if (!container) {
|
25
34
|
return undefined;
|
26
35
|
}
|
27
|
-
|
36
|
+
const throttledHandleScroll = throttle(handleScroll, THROTTLE_DELAY, {
|
37
|
+
leading: true,
|
38
|
+
trailing: true,
|
39
|
+
});
|
40
|
+
container.addEventListener('scroll', throttledHandleScroll);
|
28
41
|
return () => {
|
29
|
-
container.removeEventListener('scroll',
|
30
|
-
|
42
|
+
container.removeEventListener('scroll', throttledHandleScroll);
|
43
|
+
throttledHandleScroll.cancel();
|
31
44
|
};
|
32
|
-
}, [
|
33
|
-
return
|
45
|
+
}, [handleScroll, parentRef]);
|
46
|
+
return React.useMemo(() => {
|
47
|
+
// boolean array that represents active chunks
|
48
|
+
const activeChunks = Array(chunksCount).fill(false);
|
49
|
+
for (let i = startChunk; i <= endChunk; i++) {
|
50
|
+
activeChunks[i] = true;
|
51
|
+
}
|
52
|
+
return activeChunks;
|
53
|
+
}, [chunksCount, startChunk, endChunk]);
|
34
54
|
};
|
35
55
|
//# sourceMappingURL=useScrollBasedChunks.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useScrollBasedChunks.js","sourceRoot":"","sources":["../../../src/components/PaginatedTable/useScrollBasedChunks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,QAAQ,EAAC,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAC,
|
1
|
+
{"version":3,"file":"useScrollBasedChunks.js","sourceRoot":"","sources":["../../../src/components/PaginatedTable/useScrollBasedChunks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,QAAQ,EAAC,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAC,yBAAyB,EAAC,MAAM,SAAS,CAAC;AAWlD,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACjC,MAAM,cAAc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,CAAC;QACnC,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC,CAAC;IAE9B,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACtB,8CAA8C;QAC9C,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpD,KAAK,IAAI,CAAC,GAAG,UAAU,EAAE,CAAC,IAAI,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC;YAC1C,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;QAC3B,CAAC;QACD,OAAO,YAAY,CAAC;IACxB,CAAC,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAC5C,CAAC,CAAC"}
|
@@ -1,2 +1,20 @@
|
|
1
1
|
export declare function rafThrottle<Fn extends (...args: any[]) => any>(fn: Fn): (...args: Parameters<Fn>) => void;
|
2
2
|
export declare function calculateColumnWidth(newWidth: number, minWidth?: number, maxWidth?: number): number;
|
3
|
+
export declare const typedMemo: <T>(Component: T) => T;
|
4
|
+
/**
|
5
|
+
* Calculates the total vertical offset (distance from top) of an element relative to its container
|
6
|
+
* or the document body if no container is specified.
|
7
|
+
*
|
8
|
+
* This function traverses up through the DOM tree, accumulating offsetTop values
|
9
|
+
* from each parent element until it reaches either the specified container or
|
10
|
+
* the top of the document.
|
11
|
+
*
|
12
|
+
* @param element - The HTML element to calculate the offset for
|
13
|
+
* @param container - Optional container element to stop the calculation at
|
14
|
+
* @returns The total vertical offset in pixels
|
15
|
+
*
|
16
|
+
* Example:
|
17
|
+
* const offset = calculateElementOffsetTop(myElement, myContainer);
|
18
|
+
* // Returns the distance in pixels from myElement to the top of myContainer
|
19
|
+
*/
|
20
|
+
export declare function calculateElementOffsetTop(element: HTMLElement, container?: HTMLElement): number;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
// invoke passed function at most once per animation frame
|
2
3
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
3
4
|
export function rafThrottle(fn) {
|
@@ -19,4 +20,30 @@ export function rafThrottle(fn) {
|
|
19
20
|
export function calculateColumnWidth(newWidth, minWidth = 40, maxWidth = Infinity) {
|
20
21
|
return Math.max(minWidth, Math.min(newWidth, maxWidth));
|
21
22
|
}
|
23
|
+
export const typedMemo = React.memo;
|
24
|
+
/**
|
25
|
+
* Calculates the total vertical offset (distance from top) of an element relative to its container
|
26
|
+
* or the document body if no container is specified.
|
27
|
+
*
|
28
|
+
* This function traverses up through the DOM tree, accumulating offsetTop values
|
29
|
+
* from each parent element until it reaches either the specified container or
|
30
|
+
* the top of the document.
|
31
|
+
*
|
32
|
+
* @param element - The HTML element to calculate the offset for
|
33
|
+
* @param container - Optional container element to stop the calculation at
|
34
|
+
* @returns The total vertical offset in pixels
|
35
|
+
*
|
36
|
+
* Example:
|
37
|
+
* const offset = calculateElementOffsetTop(myElement, myContainer);
|
38
|
+
* // Returns the distance in pixels from myElement to the top of myContainer
|
39
|
+
*/
|
40
|
+
export function calculateElementOffsetTop(element, container) {
|
41
|
+
let currentElement = element;
|
42
|
+
let offsetTop = 0;
|
43
|
+
while (currentElement && currentElement !== container) {
|
44
|
+
offsetTop += currentElement.offsetTop;
|
45
|
+
currentElement = currentElement.offsetParent;
|
46
|
+
}
|
47
|
+
return offsetTop;
|
48
|
+
}
|
22
49
|
//# sourceMappingURL=utils.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/PaginatedTable/utils.
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/PaginatedTable/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,0DAA0D;AAC1D,8DAA8D;AAC9D,MAAM,UAAU,WAAW,CAAqC,EAAM;IAClE,IAAI,KAAK,GAAkB,IAAI,CAAC;IAChC,IAAI,UAA0B,CAAC;IAE/B,OAAO,SAAS,SAAS,CAAC,GAAG,IAAoB;QAC7C,2CAA2C;QAC3C,UAAU,GAAG,IAAI,CAAC;QAElB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC5B,OAAO;QACX,CAAC;QAED,KAAK,GAAG,qBAAqB,CAAC,GAAG,EAAE;YAC/B,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC;YAClB,KAAK,GAAG,IAAI,CAAC;QACjB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,oBAAoB,CAAC,QAAgB,EAAE,QAAQ,GAAG,EAAE,EAAE,QAAQ,GAAG,QAAQ;IACrF,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAA2B,KAAK,CAAC,IAAI,CAAC;AAE5D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,yBAAyB,CAAC,OAAoB,EAAE,SAAuB;IACnF,IAAI,cAAc,GAAG,OAAO,CAAC;IAC7B,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,OAAO,cAAc,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;QACpD,SAAS,IAAI,cAAc,CAAC,SAAS,CAAC;QACtC,cAAc,GAAG,cAAc,CAAC,YAA2B,CAAC;IAChE,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,CAAC"}
|
@@ -1,11 +1,18 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import { DoughnutMetrics } from '../../../../components/DoughnutMetrics/DoughnutMetrics';
|
3
|
-
import {
|
3
|
+
import { formatNumber, formatNumericValues } from '../../../../utils/dataFormatters/dataFormatters';
|
4
4
|
import i18n from '../../i18n';
|
5
5
|
import { useDiagramValues } from '../utils';
|
6
6
|
import { ClusterMetricsCardDoughnut } from './ClusterMetricsCard';
|
7
7
|
function formatCoresLegend({ value, capacity }) {
|
8
|
-
|
8
|
+
let formatted = [];
|
9
|
+
if (capacity < 10000) {
|
10
|
+
formatted = [formatNumber(Math.round(value)), formatNumber(Math.round(capacity))];
|
11
|
+
}
|
12
|
+
else {
|
13
|
+
formatted = formatNumericValues(value, capacity, undefined, '', true);
|
14
|
+
}
|
15
|
+
return `${formatted[0]} / ${formatted[1]}\n${i18n('context_cores')}`;
|
9
16
|
}
|
10
17
|
export function ClusterMetricsCores({ value, capacity, ...rest }) {
|
11
18
|
const { status, percents, legend, fill } = useDiagramValues({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ClusterMetricsCores.js","sourceRoot":"","sources":["../../../../../src/containers/Cluster/ClusterDashboard/components/ClusterMetricsCores.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,wDAAwD,CAAC;AACvF,OAAO,EAAC,
|
1
|
+
{"version":3,"file":"ClusterMetricsCores.js","sourceRoot":"","sources":["../../../../../src/containers/Cluster/ClusterDashboard/components/ClusterMetricsCores.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,wDAAwD,CAAC;AACvF,OAAO,EAAC,YAAY,EAAE,mBAAmB,EAAC,MAAM,iDAAiD,CAAC;AAClG,OAAO,IAAI,MAAM,YAAY,CAAC;AAE9B,OAAO,EAAC,gBAAgB,EAAC,MAAM,UAAU,CAAC;AAE1C,OAAO,EAAC,0BAA0B,EAAC,MAAM,sBAAsB,CAAC;AAIhE,SAAS,iBAAiB,CAAC,EAAC,KAAK,EAAE,QAAQ,EAAoC;IAC3E,IAAI,SAAS,GAAG,EAAE,CAAC;IACnB,IAAI,QAAQ,GAAG,KAAM,EAAE,CAAC;QACpB,SAAS,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtF,CAAC;SAAM,CAAC;QACJ,SAAS,GAAG,mBAAmB,CAAC,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IAC1E,CAAC;IACD,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,SAAS,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;AACzE,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,EAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAA2B;IACpF,MAAM,EAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAC,GAAG,gBAAgB,CAAC;QACtD,KAAK;QACL,QAAQ;QACR,eAAe,EAAE,iBAAiB;QAClC,GAAG,IAAI;KACV,CAAC,CAAC;IACH,OAAO,CACH,MAAC,0BAA0B,IAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,aACjF,KAAC,eAAe,CAAC,MAAM,cAAE,MAAM,GAA0B,EACzD,KAAC,eAAe,CAAC,KAAK,cAAE,QAAQ,GAAyB,IAChC,CAChC,CAAC;AACN,CAAC"}
|
@@ -74,7 +74,7 @@ export function Node(props) {
|
|
74
74
|
const renderTabContent = () => {
|
75
75
|
switch (activeTabVerified.id) {
|
76
76
|
case STORAGE: {
|
77
|
-
return (_jsx("div", { className: b('storage'), children: _jsx(StorageWrapper, { nodeId: nodeId, parentRef: container }) }));
|
77
|
+
return (_jsx("div", { className: b('storage'), ref: container, children: _jsx(StorageWrapper, { nodeId: nodeId, parentRef: container }) }));
|
78
78
|
}
|
79
79
|
case TABLETS: {
|
80
80
|
return (_jsx(Tablets, { nodeId: nodeId, database: tenantName, className: b('node-page-wrapper') }));
|
@@ -93,7 +93,7 @@ export function Node(props) {
|
|
93
93
|
return _jsx(Loader, { size: "l" });
|
94
94
|
}
|
95
95
|
if (node) {
|
96
|
-
return (_jsxs("div", { className: b(null, props.className),
|
96
|
+
return (_jsxs("div", { className: b(null, props.className), children: [_jsx(Helmet, { titleTemplate: `%s — ${node.Host} — YDB Monitoring`, defaultTitle: `${node.Host} — YDB Monitoring`, children: _jsx("title", { children: activeTabVerified.title }) }), _jsx(BasicNodeViewer, { node: node, additionalNodesProps: props.additionalNodesProps, className: b('header') }), error ? _jsx(ResponseError, { error: error, className: b('error') }) : null, renderTabs(), _jsx("div", { className: b('content'), children: renderTabContent() })] }));
|
97
97
|
}
|
98
98
|
if (error) {
|
99
99
|
return _jsx(ResponseError, { error: error });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Node.js","sourceRoot":"","sources":["../../../src/containers/Node/Node.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAE,WAAW,EAAE,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAElE,OAAO,EAAC,kBAAkB,EAAC,MAAM,wDAAwD,CAAC;AAC1F,OAAO,EAAC,eAAe,EAAC,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAC,aAAa,EAAC,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAC,cAAc,EAAC,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAC;AAC/C,OAAO,MAAM,EAAE,EAAC,UAAU,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAC5D,OAAO,EACH,qBAAqB,EACrB,qBAAqB,GACxB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAC,oBAAoB,EAAC,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAC,OAAO,EAAC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CAAC,oBAAoB,EAChD,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,GACxB,EACD,KAAK,CAAC,CAAC,CAAC,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,GAAI,CAAC,CAAC,CAAC,IAAI,EACrE,UAAU,EAAE,EACb,cAAK,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,YAAG,gBAAgB,EAAE,GAAO,IACtD,CACT,CAAC;IACN,CAAC;IAED,IAAI,KAAK,EAAE,CAAC;QACR,OAAO,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,GAAI,CAAC;IAC3C,CAAC;IAED,OAAO,cAAK,SAAS,EAAC,OAAO,6BAAmB,CAAC;AACrD,CAAC"}
|
@@ -2,7 +2,7 @@ import type { AdditionalNodesProps } from '../../types/additionalProps';
|
|
2
2
|
interface NodesWrapperProps {
|
3
3
|
path?: string;
|
4
4
|
database?: string;
|
5
|
-
parentRef
|
5
|
+
parentRef: React.RefObject<HTMLElement>;
|
6
6
|
additionalNodesProps?: AdditionalNodesProps;
|
7
7
|
}
|
8
8
|
export declare const NodesWrapper: ({ parentRef, ...props }: NodesWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -4,7 +4,7 @@ import './Nodes.scss';
|
|
4
4
|
interface NodesProps {
|
5
5
|
path?: string;
|
6
6
|
database?: string;
|
7
|
-
parentRef
|
7
|
+
parentRef: React.RefObject<HTMLElement>;
|
8
8
|
additionalNodesProps?: AdditionalNodesProps;
|
9
9
|
}
|
10
10
|
export declare const PaginatedNodes: ({ path, database, parentRef, additionalNodesProps }: NodesProps) => import("react/jsx-runtime").JSX.Element;
|