ydb-embedded-ui 8.23.0 → 8.24.1
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/components/ShardsTable/ShardsTable.d.ts +3 -1
- package/dist/components/ShardsTable/ShardsTable.js +16 -10
- package/dist/components/ShardsTable/ShardsTable.js.map +1 -1
- package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js +1 -1
- package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js.map +1 -1
- package/package.json +1 -1
@@ -1,9 +1,11 @@
|
|
1
1
|
import type { KeyValueRow } from '../../types/api/query';
|
2
2
|
import type { ResizeableDataTableProps } from '../ResizeableDataTable/ResizeableDataTable';
|
3
3
|
import type { TopShardsColumnId } from './constants';
|
4
|
+
import type { ShardsColumn } from './types';
|
4
5
|
export interface ShardsTableProps extends Omit<ResizeableDataTableProps<KeyValueRow>, 'columnsWidthLSKey' | 'columns'> {
|
5
6
|
columnsIds: TopShardsColumnId[];
|
6
7
|
database: string;
|
8
|
+
overrideColumns?: ShardsColumn[];
|
7
9
|
schemaPath?: string;
|
8
10
|
}
|
9
|
-
export declare function ShardsTable({ columnsIds, schemaPath, database, ...props }: ShardsTableProps): import("react/jsx-runtime").JSX.Element;
|
11
|
+
export declare function ShardsTable({ columnsIds, schemaPath, database, overrideColumns, ...props }: ShardsTableProps): import("react/jsx-runtime").JSX.Element;
|
@@ -3,16 +3,22 @@ import React from 'react';
|
|
3
3
|
import { ResizeableDataTable } from '../ResizeableDataTable/ResizeableDataTable';
|
4
4
|
import { shardsColumnIdToGetColumn } from './columns';
|
5
5
|
import { TOP_SHARDS_COLUMNS_WIDTH_LS_KEY, isSortableTopShardsColumn } from './constants';
|
6
|
-
export function ShardsTable({ columnsIds, schemaPath, database, ...props }) {
|
7
|
-
const columns = React.useMemo(() =>
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
6
|
+
export function ShardsTable({ columnsIds, schemaPath, database, overrideColumns = [], ...props }) {
|
7
|
+
const columns = React.useMemo(() => {
|
8
|
+
return columnsIds
|
9
|
+
.filter((id) => id in shardsColumnIdToGetColumn)
|
10
|
+
.map((id) => {
|
11
|
+
const overridedColumn = overrideColumns.find((column) => column.name === id);
|
12
|
+
if (overridedColumn) {
|
13
|
+
return overridedColumn;
|
14
|
+
}
|
15
|
+
const column = shardsColumnIdToGetColumn[id]({ database, schemaPath });
|
16
|
+
return {
|
17
|
+
...column,
|
18
|
+
sortable: isSortableTopShardsColumn(column.name),
|
19
|
+
};
|
20
|
+
});
|
21
|
+
}, [columnsIds, database, overrideColumns, schemaPath]);
|
16
22
|
return (_jsx(ResizeableDataTable, { ...props, columnsWidthLSKey: TOP_SHARDS_COLUMNS_WIDTH_LS_KEY, columns: columns }));
|
17
23
|
}
|
18
24
|
//# sourceMappingURL=ShardsTable.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ShardsTable.js","sourceRoot":"","sources":["../../../src/components/ShardsTable/ShardsTable.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,4CAA4C,CAAC;AAE/E,OAAO,EAAC,yBAAyB,EAAC,MAAM,WAAW,CAAC;AAEpD,OAAO,EAAC,+BAA+B,EAAE,yBAAyB,EAAC,MAAM,aAAa,CAAC;
|
1
|
+
{"version":3,"file":"ShardsTable.js","sourceRoot":"","sources":["../../../src/components/ShardsTable/ShardsTable.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAC,mBAAmB,EAAC,MAAM,4CAA4C,CAAC;AAE/E,OAAO,EAAC,yBAAyB,EAAC,MAAM,WAAW,CAAC;AAEpD,OAAO,EAAC,+BAA+B,EAAE,yBAAyB,EAAC,MAAM,aAAa,CAAC;AAWvF,MAAM,UAAU,WAAW,CAAC,EACxB,UAAU,EACV,UAAU,EACV,QAAQ,EACR,eAAe,GAAG,EAAE,EACpB,GAAG,KAAK,EACO;IACf,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QAC/B,OAAO,UAAU;aACZ,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,yBAAyB,CAAC;aAC/C,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;YACR,MAAM,eAAe,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;YAC7E,IAAI,eAAe,EAAE,CAAC;gBAClB,OAAO,eAAe,CAAC;YAC3B,CAAC;YAED,MAAM,MAAM,GAAG,yBAAyB,CAAC,EAAE,CAAC,CAAC,EAAC,QAAQ,EAAE,UAAU,EAAC,CAAC,CAAC;YAErE,OAAO;gBACH,GAAG,MAAM;gBACT,QAAQ,EAAE,yBAAyB,CAAC,MAAM,CAAC,IAAI,CAAC;aACnD,CAAC;QACN,CAAC,CAAC,CAAC;IACX,CAAC,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC;IAExD,OAAO,CACH,KAAC,mBAAmB,OACZ,KAAK,EACT,iBAAiB,EAAE,+BAA+B,EAClD,OAAO,EAAE,OAAO,GAClB,CACL,CAAC;AACN,CAAC"}
|
@@ -2,7 +2,7 @@ import { QUERY_TECHNICAL_MARK, TENANT_OVERVIEW_TABLES_LIMIT } from '../../../../
|
|
2
2
|
import { isQueryErrorResponse, parseQueryAPIResponse } from '../../../../utils/query';
|
3
3
|
import { api } from '../../api';
|
4
4
|
function createShardQuery(path, database) {
|
5
|
-
const pathSelect = `CAST(SUBSTRING(CAST(Path AS String), ${database.length}) AS Utf8) AS
|
5
|
+
const pathSelect = `CAST(SUBSTRING(CAST(Path AS String), ${database.length}) AS Utf8) AS RelativePath`;
|
6
6
|
return `${QUERY_TECHNICAL_MARK}
|
7
7
|
SELECT
|
8
8
|
${pathSelect},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tenantOverviewTopShards.js","sourceRoot":"","sources":["../../../../../src/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAE,4BAA4B,EAAC,MAAM,6BAA6B,CAAC;AAC/F,OAAO,EAAC,oBAAoB,EAAE,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAC,GAAG,EAAC,MAAM,WAAW,CAAC;AAE9B,SAAS,gBAAgB,CAAC,IAAY,EAAE,QAAgB;IACpD,MAAM,UAAU,GAAG,wCAAwC,QAAQ,CAAC,MAAM,
|
1
|
+
{"version":3,"file":"tenantOverviewTopShards.js","sourceRoot":"","sources":["../../../../../src/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAE,4BAA4B,EAAC,MAAM,6BAA6B,CAAC;AAC/F,OAAO,EAAC,oBAAoB,EAAE,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAC,GAAG,EAAC,MAAM,WAAW,CAAC;AAE9B,SAAS,gBAAgB,CAAC,IAAY,EAAE,QAAgB;IACpD,MAAM,UAAU,GAAG,wCAAwC,QAAQ,CAAC,MAAM,4BAA4B,CAAC;IACvG,OAAO,GAAG,oBAAoB;;MAE5B,UAAU;;;;;YAKJ,IAAI;oBACI,IAAI;;QAEhB,4BAA4B,EAAE,CAAC;AACvC,CAAC;AAED,MAAM,WAAW,GAAG,cAAc,CAAC;AAEnC,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAC,eAAe,CAAC;IAC5C,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACrB,YAAY,EAAE,OAAO,CAAC,KAAK,CAAC;YACxB,OAAO,EAAE,KAAK,EAAE,EAAC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