ydb-embedded-ui 8.26.1 → 9.0.0
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/DiskStateProgressBar/DiskStateProgressBar.js +1 -1
- package/dist/components/Drawer/Drawer.d.ts +1 -1
- package/dist/components/Drawer/Drawer.js +11 -4
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/Drawer/Drawer.scss +6 -1
- package/dist/components/EntityStatusNew/i18n/en.json +1 -1
- package/dist/components/MemoryViewer/MemoryViewer.js +1 -1
- package/dist/components/PaginatedTable/useScrollBasedChunks.js +18 -16
- package/dist/components/PaginatedTable/useScrollBasedChunks.js.map +1 -1
- package/dist/components/ProgressViewer/ProgressViewer.js +1 -1
- package/dist/components/TableWithControlsLayout/TableWithControlsLayout.scss +1 -1
- package/dist/containers/AppWithClusters/AppWithClusters.d.ts +1 -5
- package/dist/containers/AppWithClusters/AppWithClusters.js +4 -5
- package/dist/containers/AppWithClusters/AppWithClusters.js.map +1 -1
- package/dist/containers/AppWithClusters/ExtendedCluster/ExtendedCluster.d.ts +2 -1
- package/dist/containers/AppWithClusters/ExtendedCluster/ExtendedCluster.js.map +1 -1
- package/dist/containers/AppWithClusters/ExtendedTenant/ExtendedTenant.d.ts +2 -1
- package/dist/containers/AppWithClusters/ExtendedTenant/ExtendedTenant.js.map +1 -1
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.js +1 -1
- package/dist/containers/Cluster/ClusterOverview/ClusterOverview.js +1 -1
- package/dist/containers/Cluster/ClusterOverview/ClusterOverview.js.map +1 -1
- package/dist/containers/Cluster/ClusterOverview/ClusterOverview.scss +5 -0
- package/dist/containers/Cluster/ClusterOverview/components/ClusterMetricsCard.d.ts +5 -2
- package/dist/containers/Cluster/ClusterOverview/components/ClusterMetricsCard.js +6 -6
- package/dist/containers/Cluster/ClusterOverview/components/ClusterMetricsCard.js.map +1 -1
- package/dist/containers/Node/Node.js +1 -1
- package/dist/containers/Node/Node.js.map +1 -1
- package/dist/containers/Operations/constants.js +1 -0
- package/dist/containers/Operations/constants.js.map +1 -1
- package/dist/containers/Operations/i18n/en.json +1 -0
- package/dist/containers/Operations/i18n/index.d.ts +1 -1
- package/dist/containers/Operations/useOperationsQueryParams.js +1 -1
- package/dist/containers/Operations/useOperationsQueryParams.js.map +1 -1
- package/dist/containers/Tablets/Tablets.d.ts +6 -1
- package/dist/containers/Tablets/Tablets.js +4 -3
- package/dist/containers/Tablets/Tablets.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/NotFoundContainer.d.ts +5 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/NotFoundContainer.js +10 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/NotFoundContainer.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/QueryDetails.d.ts +9 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/QueryDetails.js +13 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/QueryDetails.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/QueryDetails.scss +43 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/QueryDetailsDrawerContent.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/QueryDetailsDrawerContent.js +35 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/QueryDetailsDrawerContent.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.d.ts +1 -2
- package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.js +28 -7
- package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +5 -25
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.scss +29 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.d.ts +1 -2
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.js +37 -8
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/hooks/useSetSelectedTopQueryRowFromParams.d.ts +8 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/hooks/useSetSelectedTopQueryRowFromParams.js +33 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/hooks/useSetSelectedTopQueryRowFromParams.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/i18n/en.json +7 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/utils/generateShareableUrl.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/utils/generateShareableUrl.js +20 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/utils/generateShareableUrl.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/utils/getTopQueryRowQueryParams.d.ts +8 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/utils/getTopQueryRowQueryParams.js +16 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/utils/getTopQueryRowQueryParams.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/utils.d.ts +3 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/utils.js +69 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/utils.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopicData/__test__/getData.test.js +113 -39
- package/dist/containers/Tenant/Diagnostics/TopicData/__test__/getData.test.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopicData/getData.js +28 -12
- package/dist/containers/Tenant/Diagnostics/TopicData/getData.js.map +1 -1
- package/dist/containers/Tenants/Tenants.js +1 -1
- package/dist/containers/Tenants/Tenants.js.map +1 -1
- package/dist/services/api/viewer.d.ts +2 -5
- package/dist/services/api/viewer.js +2 -1
- package/dist/services/api/viewer.js.map +1 -1
- package/dist/types/api/operations.d.ts +1 -1
- package/dist/types/store/tablets.d.ts +1 -0
- package/dist/uiFactory/types.d.ts +5 -0
- package/dist/uiFactory/uiFactory.js +5 -1
- package/dist/uiFactory/uiFactory.js.map +1 -1
- package/dist/utils/disks/__test__/prepareDisks.test.js +2 -2
- package/dist/utils/disks/prepareDisks.js +2 -2
- package/dist/utils/logs.d.ts +1 -3
- package/dist/utils/logs.js +1 -23
- package/dist/utils/logs.js.map +1 -1
- package/dist/utils/monitoring.d.ts +0 -5
- package/package.json +1 -1
- package/dist/utils/__test__/logs.test.d.ts +0 -1
- package/dist/utils/__test__/logs.test.js +0 -36
- package/dist/utils/__test__/logs.test.js.map +0 -1
@@ -76,7 +76,7 @@ export function prepareVDiskSizeFields({ AvailableSize, AllocatedSize, }) {
|
|
76
76
|
const available = Number(AvailableSize);
|
77
77
|
const allocated = Number(AllocatedSize);
|
78
78
|
const total = allocated + available;
|
79
|
-
const allocatedPercent = Math.
|
79
|
+
const allocatedPercent = Math.floor((allocated * 100) / total);
|
80
80
|
return {
|
81
81
|
AvailableSize: available,
|
82
82
|
AllocatedSize: allocated,
|
@@ -88,7 +88,7 @@ export function preparePDiskSizeFields({ AvailableSize, TotalSize, }) {
|
|
88
88
|
const available = Number(AvailableSize);
|
89
89
|
const total = Number(TotalSize);
|
90
90
|
const allocated = total - available;
|
91
|
-
const allocatedPercent = Math.
|
91
|
+
const allocatedPercent = Math.floor((allocated * 100) / total);
|
92
92
|
return {
|
93
93
|
AvailableSize: available,
|
94
94
|
TotalSize: total,
|
package/dist/utils/logs.d.ts
CHANGED
@@ -1,7 +1,5 @@
|
|
1
|
-
interface GetLogsLinkProps {
|
1
|
+
export interface GetLogsLinkProps {
|
2
2
|
dbName: string;
|
3
3
|
logging: string;
|
4
4
|
}
|
5
5
|
export type GetLogsLink = (props: GetLogsLinkProps) => string;
|
6
|
-
export declare function getLogsLink({ dbName, logging }: GetLogsLinkProps): string;
|
7
|
-
export {};
|
package/dist/utils/logs.js
CHANGED
@@ -1,24 +1,2 @@
|
|
1
|
-
export
|
2
|
-
try {
|
3
|
-
const data = JSON.parse(logging);
|
4
|
-
if (typeof data === 'object' && 'url' in data) {
|
5
|
-
const logUrl = data.url;
|
6
|
-
if (!logUrl) {
|
7
|
-
return '';
|
8
|
-
}
|
9
|
-
const url = new URL(logUrl);
|
10
|
-
const queryParam = url.searchParams.get('query');
|
11
|
-
if (queryParam) {
|
12
|
-
const decodedQuery = decodeURIComponent(queryParam);
|
13
|
-
const queryBetweenBraces = decodedQuery.slice(1, -1);
|
14
|
-
const witComma = queryBetweenBraces.length > 0;
|
15
|
-
const updatedQuery = `{${queryBetweenBraces}${witComma ? ', ' : ''}database = "${dbName}"}`;
|
16
|
-
url.searchParams.set('query', updatedQuery);
|
17
|
-
}
|
18
|
-
return url.toString();
|
19
|
-
}
|
20
|
-
}
|
21
|
-
catch (_a) { }
|
22
|
-
return '';
|
23
|
-
}
|
1
|
+
export {};
|
24
2
|
//# sourceMappingURL=logs.js.map
|
package/dist/utils/logs.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../../src/utils/logs.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../../src/utils/logs.ts"],"names":[],"mappings":""}
|
@@ -19,9 +19,4 @@ export declare function getMonitoringLink({ monitoring, dbName, dbType, clusterN
|
|
19
19
|
export type GetMonitoringClusterLink = typeof getMonitoringClusterLink;
|
20
20
|
export declare function getMonitoringClusterLink(monitoring: string, clusterName?: string): string;
|
21
21
|
export declare function parseMonitoringData(monitoring: string): ParsedMonitoringData | undefined;
|
22
|
-
interface GetLogsLinkProps {
|
23
|
-
dbName: string;
|
24
|
-
logging: string;
|
25
|
-
}
|
26
|
-
export type GetLogsLink = (props: GetLogsLinkProps) => string;
|
27
22
|
export {};
|
package/package.json
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,36 +0,0 @@
|
|
1
|
-
import { getLogsLink } from '../logs';
|
2
|
-
describe('getLogsLink', () => {
|
3
|
-
test('should insert dbName into logs URL query', () => {
|
4
|
-
const loggingData = {
|
5
|
-
url: 'https://logging.url/projects/kikimr/logs?from=now-1h&to=now&query=%7Bproject+%3D+%22kikimr%22%2C+service+%3D+%22ydb%22%2C+cluster+%3D+%22ydb-ru-prestable%22%7D',
|
6
|
-
};
|
7
|
-
const result = getLogsLink({
|
8
|
-
logging: JSON.stringify(loggingData),
|
9
|
-
dbName: 'testdb',
|
10
|
-
});
|
11
|
-
// The URL should contain the dbName in the query parameter
|
12
|
-
expect(result).toBe('https://logging.url/projects/kikimr/logs?from=now-1h&to=now&query=%7Bproject+%3D+%22kikimr%22%2C+service+%3D+%22ydb%22%2C+cluster+%3D+%22ydb-ru-prestable%22%2C+database+%3D+%22testdb%22%7D');
|
13
|
-
});
|
14
|
-
test('should handle empty query parameters', () => {
|
15
|
-
const loggingData = {
|
16
|
-
url: 'https://logging.url/projects/kikimr/logs?from=now-1h&to=now&query=%7B%7D',
|
17
|
-
};
|
18
|
-
const result = getLogsLink({
|
19
|
-
logging: JSON.stringify(loggingData),
|
20
|
-
dbName: 'testdb',
|
21
|
-
});
|
22
|
-
// Should add dbName to empty query
|
23
|
-
expect(result).toBe('https://logging.url/projects/kikimr/logs?from=now-1h&to=now&query=%7Bdatabase+%3D+%22testdb%22%7D');
|
24
|
-
});
|
25
|
-
test('should return empty string for invalid data', () => {
|
26
|
-
expect(getLogsLink({
|
27
|
-
logging: 'invalid json',
|
28
|
-
dbName: 'testdb',
|
29
|
-
})).toBe('');
|
30
|
-
expect(getLogsLink({
|
31
|
-
logging: JSON.stringify({}),
|
32
|
-
dbName: 'testdb',
|
33
|
-
})).toBe('');
|
34
|
-
});
|
35
|
-
});
|
36
|
-
//# sourceMappingURL=logs.test.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"logs.test.js","sourceRoot":"","sources":["../../../src/utils/__test__/logs.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAEpC,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IACzB,IAAI,CAAC,0CAA0C,EAAE,GAAG,EAAE;QAClD,MAAM,WAAW,GAAG;YAChB,GAAG,EAAE,iKAAiK;SACzK,CAAC;QAEF,MAAM,MAAM,GAAG,WAAW,CAAC;YACvB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YACpC,MAAM,EAAE,QAAQ;SACnB,CAAC,CAAC;QAEH,2DAA2D;QAC3D,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CACf,8LAA8L,CACjM,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,sCAAsC,EAAE,GAAG,EAAE;QAC9C,MAAM,WAAW,GAAG;YAChB,GAAG,EAAE,0EAA0E;SAClF,CAAC;QAEF,MAAM,MAAM,GAAG,WAAW,CAAC;YACvB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YACpC,MAAM,EAAE,QAAQ;SACnB,CAAC,CAAC;QAEH,mCAAmC;QACnC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CACf,mGAAmG,CACtG,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,6CAA6C,EAAE,GAAG,EAAE;QACrD,MAAM,CACF,WAAW,CAAC;YACR,OAAO,EAAE,cAAc;YACvB,MAAM,EAAE,QAAQ;SACnB,CAAC,CACL,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAEX,MAAM,CACF,WAAW,CAAC;YACR,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;YAC3B,MAAM,EAAE,QAAQ;SACnB,CAAC,CACL,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|