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.
Files changed (93) hide show
  1. package/dist/components/DiskStateProgressBar/DiskStateProgressBar.js +1 -1
  2. package/dist/components/Drawer/Drawer.d.ts +1 -1
  3. package/dist/components/Drawer/Drawer.js +11 -4
  4. package/dist/components/Drawer/Drawer.js.map +1 -1
  5. package/dist/components/Drawer/Drawer.scss +6 -1
  6. package/dist/components/EntityStatusNew/i18n/en.json +1 -1
  7. package/dist/components/MemoryViewer/MemoryViewer.js +1 -1
  8. package/dist/components/PaginatedTable/useScrollBasedChunks.js +18 -16
  9. package/dist/components/PaginatedTable/useScrollBasedChunks.js.map +1 -1
  10. package/dist/components/ProgressViewer/ProgressViewer.js +1 -1
  11. package/dist/components/TableWithControlsLayout/TableWithControlsLayout.scss +1 -1
  12. package/dist/containers/AppWithClusters/AppWithClusters.d.ts +1 -5
  13. package/dist/containers/AppWithClusters/AppWithClusters.js +4 -5
  14. package/dist/containers/AppWithClusters/AppWithClusters.js.map +1 -1
  15. package/dist/containers/AppWithClusters/ExtendedCluster/ExtendedCluster.d.ts +2 -1
  16. package/dist/containers/AppWithClusters/ExtendedCluster/ExtendedCluster.js.map +1 -1
  17. package/dist/containers/AppWithClusters/ExtendedTenant/ExtendedTenant.d.ts +2 -1
  18. package/dist/containers/AppWithClusters/ExtendedTenant/ExtendedTenant.js.map +1 -1
  19. package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.js +1 -1
  20. package/dist/containers/Cluster/ClusterOverview/ClusterOverview.js +1 -1
  21. package/dist/containers/Cluster/ClusterOverview/ClusterOverview.js.map +1 -1
  22. package/dist/containers/Cluster/ClusterOverview/ClusterOverview.scss +5 -0
  23. package/dist/containers/Cluster/ClusterOverview/components/ClusterMetricsCard.d.ts +5 -2
  24. package/dist/containers/Cluster/ClusterOverview/components/ClusterMetricsCard.js +6 -6
  25. package/dist/containers/Cluster/ClusterOverview/components/ClusterMetricsCard.js.map +1 -1
  26. package/dist/containers/Node/Node.js +1 -1
  27. package/dist/containers/Node/Node.js.map +1 -1
  28. package/dist/containers/Operations/constants.js +1 -0
  29. package/dist/containers/Operations/constants.js.map +1 -1
  30. package/dist/containers/Operations/i18n/en.json +1 -0
  31. package/dist/containers/Operations/i18n/index.d.ts +1 -1
  32. package/dist/containers/Operations/useOperationsQueryParams.js +1 -1
  33. package/dist/containers/Operations/useOperationsQueryParams.js.map +1 -1
  34. package/dist/containers/Tablets/Tablets.d.ts +6 -1
  35. package/dist/containers/Tablets/Tablets.js +4 -3
  36. package/dist/containers/Tablets/Tablets.js.map +1 -1
  37. package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/NotFoundContainer.d.ts +5 -0
  38. package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/NotFoundContainer.js +10 -0
  39. package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/NotFoundContainer.js.map +1 -0
  40. package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/QueryDetails.d.ts +9 -0
  41. package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/QueryDetails.js +13 -0
  42. package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/QueryDetails.js.map +1 -0
  43. package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/QueryDetails.scss +43 -0
  44. package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/QueryDetailsDrawerContent.d.ts +7 -0
  45. package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/QueryDetailsDrawerContent.js +35 -0
  46. package/dist/containers/Tenant/Diagnostics/TopQueries/QueryDetails/QueryDetailsDrawerContent.js.map +1 -0
  47. package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.d.ts +1 -2
  48. package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.js +28 -7
  49. package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.js.map +1 -1
  50. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +5 -25
  51. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js.map +1 -1
  52. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.scss +29 -0
  53. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.d.ts +1 -2
  54. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.js +37 -8
  55. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.js.map +1 -1
  56. package/dist/containers/Tenant/Diagnostics/TopQueries/hooks/useSetSelectedTopQueryRowFromParams.d.ts +8 -0
  57. package/dist/containers/Tenant/Diagnostics/TopQueries/hooks/useSetSelectedTopQueryRowFromParams.js +33 -0
  58. package/dist/containers/Tenant/Diagnostics/TopQueries/hooks/useSetSelectedTopQueryRowFromParams.js.map +1 -0
  59. package/dist/containers/Tenant/Diagnostics/TopQueries/i18n/en.json +7 -1
  60. package/dist/containers/Tenant/Diagnostics/TopQueries/i18n/index.d.ts +1 -1
  61. package/dist/containers/Tenant/Diagnostics/TopQueries/utils/generateShareableUrl.d.ts +7 -0
  62. package/dist/containers/Tenant/Diagnostics/TopQueries/utils/generateShareableUrl.js +20 -0
  63. package/dist/containers/Tenant/Diagnostics/TopQueries/utils/generateShareableUrl.js.map +1 -0
  64. package/dist/containers/Tenant/Diagnostics/TopQueries/utils/getTopQueryRowQueryParams.d.ts +8 -0
  65. package/dist/containers/Tenant/Diagnostics/TopQueries/utils/getTopQueryRowQueryParams.js +16 -0
  66. package/dist/containers/Tenant/Diagnostics/TopQueries/utils/getTopQueryRowQueryParams.js.map +1 -0
  67. package/dist/containers/Tenant/Diagnostics/TopQueries/utils.d.ts +3 -0
  68. package/dist/containers/Tenant/Diagnostics/TopQueries/utils.js +69 -0
  69. package/dist/containers/Tenant/Diagnostics/TopQueries/utils.js.map +1 -1
  70. package/dist/containers/Tenant/Diagnostics/TopicData/__test__/getData.test.js +113 -39
  71. package/dist/containers/Tenant/Diagnostics/TopicData/__test__/getData.test.js.map +1 -1
  72. package/dist/containers/Tenant/Diagnostics/TopicData/getData.js +28 -12
  73. package/dist/containers/Tenant/Diagnostics/TopicData/getData.js.map +1 -1
  74. package/dist/containers/Tenants/Tenants.js +1 -1
  75. package/dist/containers/Tenants/Tenants.js.map +1 -1
  76. package/dist/services/api/viewer.d.ts +2 -5
  77. package/dist/services/api/viewer.js +2 -1
  78. package/dist/services/api/viewer.js.map +1 -1
  79. package/dist/types/api/operations.d.ts +1 -1
  80. package/dist/types/store/tablets.d.ts +1 -0
  81. package/dist/uiFactory/types.d.ts +5 -0
  82. package/dist/uiFactory/uiFactory.js +5 -1
  83. package/dist/uiFactory/uiFactory.js.map +1 -1
  84. package/dist/utils/disks/__test__/prepareDisks.test.js +2 -2
  85. package/dist/utils/disks/prepareDisks.js +2 -2
  86. package/dist/utils/logs.d.ts +1 -3
  87. package/dist/utils/logs.js +1 -23
  88. package/dist/utils/logs.js.map +1 -1
  89. package/dist/utils/monitoring.d.ts +0 -5
  90. package/package.json +1 -1
  91. package/dist/utils/__test__/logs.test.d.ts +0 -1
  92. package/dist/utils/__test__/logs.test.js +0 -36
  93. 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.round((allocated * 100) / total);
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.round((allocated * 100) / total);
91
+ const allocatedPercent = Math.floor((allocated * 100) / total);
92
92
  return {
93
93
  AvailableSize: available,
94
94
  TotalSize: total,
@@ -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 {};
@@ -1,24 +1,2 @@
1
- export function getLogsLink({ dbName, logging }) {
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
@@ -1 +1 @@
1
- {"version":3,"file":"logs.js","sourceRoot":"","sources":["../../src/utils/logs.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,WAAW,CAAC,EAAC,MAAM,EAAE,OAAO,EAAmB;IAC3D,IAAI,CAAC;QACD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAEjC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAC5C,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC;YACxB,IAAI,CAAC,MAAM,EAAE,CAAC;gBACV,OAAO,EAAE,CAAC;YACd,CAAC;YAED,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;YAE5B,MAAM,UAAU,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YACjD,IAAI,UAAU,EAAE,CAAC;gBACb,MAAM,YAAY,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;gBAEpD,MAAM,kBAAkB,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;gBACrD,MAAM,QAAQ,GAAG,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAC;gBAC/C,MAAM,YAAY,GAAG,IAAI,kBAAkB,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,eAAe,MAAM,IAAI,CAAC;gBAE5F,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;YAChD,CAAC;YAED,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;QAC1B,CAAC;IACL,CAAC;IAAC,WAAM,CAAC,CAAA,CAAC;IAEV,OAAO,EAAE,CAAC;AACd,CAAC"}
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,6 +1,6 @@
1
1
  {
2
2
  "name": "ydb-embedded-ui",
3
- "version": "8.26.1",
3
+ "version": "9.0.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -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"}