ydb-embedded-ui 4.19.3 → 4.20.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +27 -0
- package/dist/components/CellWithPopover/CellWithPopover.scss +13 -0
- package/dist/components/CellWithPopover/CellWithPopover.tsx +26 -0
- package/dist/components/LinkToSchemaObject/LinkToSchemaObject.tsx +20 -0
- package/dist/components/NodeHostWrapper/NodeHostWrapper.scss +0 -2
- package/dist/components/NodeHostWrapper/NodeHostWrapper.tsx +28 -29
- package/dist/components/QueryExecutionStatus/QueryExecutionStatus.tsx +3 -2
- package/dist/components/TruncatedQuery/TruncatedQuery.scss +8 -0
- package/dist/components/TruncatedQuery/TruncatedQuery.tsx +15 -1
- package/dist/components/UsageLabel/UsageLabel.scss +6 -0
- package/dist/components/UsageLabel/UsageLabel.tsx +22 -0
- package/dist/containers/AsideNavigation/AsideNavigation.tsx +13 -8
- package/dist/containers/AsideNavigation/i18n/en.json +13 -0
- package/dist/containers/AsideNavigation/i18n/index.ts +11 -0
- package/dist/containers/AsideNavigation/i18n/ru.json +13 -0
- package/dist/containers/Node/NodeStructure/Pdisk.tsx +74 -68
- package/dist/containers/Node/NodeStructure/Vdisk.tsx +9 -33
- package/dist/containers/Nodes/Nodes.tsx +10 -2
- package/dist/containers/Nodes/getNodesColumns.tsx +207 -123
- package/dist/containers/Storage/Storage.tsx +9 -2
- package/dist/containers/Storage/StorageGroups/StorageGroups.scss +0 -11
- package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.tsx +11 -11
- package/dist/containers/Storage/utils/index.ts +1 -22
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.tsx +2 -3
- package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.scss +0 -1
- package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.tsx +4 -2
- package/dist/containers/Tenant/Diagnostics/Diagnostics.tsx +1 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckDetails.tsx +8 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.tsx +11 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTree.tsx +0 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.tsx +3 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TenantCpu.tsx +21 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.tsx +53 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.tsx +53 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.tsx +83 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.tsx +53 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TenantMemory.tsx +9 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.tsx +55 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.scss +44 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.tsx +35 -19
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverviewTableLayout.tsx +53 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TenantStorage.tsx +4 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.tsx +9 -36
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.tsx +22 -41
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/en.json +3 -3
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/ru.json +3 -3
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.scss +0 -2
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.tsx +19 -61
- package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.tsx +102 -0
- package/dist/containers/Tenant/Diagnostics/TopShards/Filters/Filters.tsx +2 -2
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.tsx +18 -97
- package/dist/containers/Tenant/Diagnostics/TopShards/getTopShardsColumns.tsx +138 -0
- package/dist/containers/Tenant/Info/ExternalTable/ExternalTable.tsx +2 -4
- package/dist/containers/Tenant/Query/ExecuteResult/{ExecuteResult.js → ExecuteResult.tsx} +51 -31
- package/dist/containers/Tenant/Query/Issues/Issues.tsx +4 -6
- package/dist/containers/Tenant/Query/QueryDuration/QueryDuration.tsx +1 -1
- package/dist/containers/Tenant/utils/paneVisibilityToggleHelpers.tsx +1 -1
- package/dist/routes.ts +26 -1
- package/dist/store/reducers/{executeTopQueries.ts → executeTopQueries/executeTopQueries.ts} +23 -75
- package/dist/{types/store/executeTopQueries.ts → store/reducers/executeTopQueries/types.ts} +3 -7
- package/dist/store/reducers/executeTopQueries/utils.ts +36 -0
- package/dist/store/reducers/index.ts +12 -2
- package/dist/store/reducers/nodes/types.ts +1 -0
- package/dist/store/reducers/nodes/utils.ts +16 -6
- package/dist/store/reducers/{shardsWorkload.ts → shardsWorkload/shardsWorkload.ts} +5 -11
- package/dist/{types/store/shardsWorkload.ts → store/reducers/shardsWorkload/types.ts} +3 -7
- package/dist/store/reducers/tenantOverview/topNodesByCpu/topNodesByCpu.ts +87 -0
- package/dist/store/reducers/tenantOverview/topNodesByCpu/types.ts +29 -0
- package/dist/store/reducers/tenantOverview/topNodesByLoad/topNodesByLoad.ts +87 -0
- package/dist/store/reducers/tenantOverview/topNodesByLoad/types.ts +29 -0
- package/dist/store/reducers/tenantOverview/topNodesByMemory/topNodesByMemory.ts +87 -0
- package/dist/store/reducers/tenantOverview/topNodesByMemory/types.ts +29 -0
- package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.ts +93 -0
- package/dist/store/reducers/tenantOverview/topQueries/types.ts +14 -0
- package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.ts +103 -0
- package/dist/store/reducers/tenantOverview/topShards/types.ts +14 -0
- package/dist/store/reducers/tenantOverview/topShards/utils.ts +3 -0
- package/dist/styles/mixins.scss +4 -0
- package/dist/types/additionalProps.ts +3 -1
- package/dist/types/api/compute.ts +1 -1
- package/dist/types/react-json-inspector.d.ts +21 -0
- package/dist/utils/diagnostics.ts +23 -0
- package/dist/utils/generateEvaluator.ts +21 -0
- package/dist/utils/generateHash.ts +11 -0
- package/package.json +3 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TenantStorage.scss +0 -41
@@ -26,6 +26,8 @@ export interface AdditionalTenantsProps {
|
|
26
26
|
|
27
27
|
export type NodeAddress = Pick<TSystemStateInfo, 'Host' | 'Endpoints' | 'NodeId'>;
|
28
28
|
|
29
|
+
export type GetNodeRefFunc = (node?: NodeAddress) => string | null;
|
30
|
+
|
29
31
|
export interface AdditionalNodesProps extends Record<string, unknown> {
|
30
|
-
getNodeRef?:
|
32
|
+
getNodeRef?: GetNodeRefFunc;
|
31
33
|
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
declare module 'react-json-inspector' {
|
2
|
+
// This typing is sufficient for current use cases, but some types are incompelete
|
3
|
+
class JSONTree extends React.Component<{
|
4
|
+
data?: object;
|
5
|
+
search?: boolean;
|
6
|
+
searchOptions?: {
|
7
|
+
debounceTime?: number;
|
8
|
+
};
|
9
|
+
onClick?: ({path: string, key: string, value: object}) => void;
|
10
|
+
validateQuery?: (query: string) => boolean;
|
11
|
+
isExpanded?: (keypath: string) => boolean;
|
12
|
+
filterOptions?: {
|
13
|
+
cacheResults?: bool;
|
14
|
+
ignoreCase?: bool;
|
15
|
+
};
|
16
|
+
query?: string;
|
17
|
+
verboseShowOriginal?: boolean;
|
18
|
+
className?: string;
|
19
|
+
}> {}
|
20
|
+
export default JSONTree;
|
21
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import {ValueOf} from '../types/common';
|
2
|
+
|
3
|
+
const TOP_SHARDS_SORT_VALUES = {
|
4
|
+
CPUCores: 'CPUCores',
|
5
|
+
DataSize: 'DataSize',
|
6
|
+
} as const;
|
7
|
+
|
8
|
+
const TOP_QUERIES_SORT_VALUES = {
|
9
|
+
CPUTimeUs: 'CPUTimeUs',
|
10
|
+
EndTime: 'EndTime',
|
11
|
+
ReadRows: 'ReadRows',
|
12
|
+
ReadBytes: 'ReadBytes',
|
13
|
+
UserSID: 'UserSID',
|
14
|
+
} as const;
|
15
|
+
|
16
|
+
type TopShardsSortValue = ValueOf<typeof TOP_SHARDS_SORT_VALUES>;
|
17
|
+
type TopQueriesSortValue = ValueOf<typeof TOP_QUERIES_SORT_VALUES>;
|
18
|
+
|
19
|
+
export const isSortableTopShardsProperty = (value: string): value is TopShardsSortValue =>
|
20
|
+
Object.values(TOP_SHARDS_SORT_VALUES).includes(value as TopShardsSortValue);
|
21
|
+
|
22
|
+
export const isSortableTopQueriesProperty = (value: string): value is TopQueriesSortValue =>
|
23
|
+
Object.values(TOP_QUERIES_SORT_VALUES).includes(value as TopQueriesSortValue);
|
@@ -0,0 +1,21 @@
|
|
1
|
+
export const generateEvaluator =
|
2
|
+
<OkLevel extends string, WarnLevel extends string, CritLevel extends string>(
|
3
|
+
warn: number,
|
4
|
+
crit: number,
|
5
|
+
levels: [OkLevel, WarnLevel, CritLevel],
|
6
|
+
) =>
|
7
|
+
(value: number) => {
|
8
|
+
if (0 <= value && value < warn) {
|
9
|
+
return levels[0];
|
10
|
+
}
|
11
|
+
|
12
|
+
if (warn <= value && value < crit) {
|
13
|
+
return levels[1];
|
14
|
+
}
|
15
|
+
|
16
|
+
if (crit <= value) {
|
17
|
+
return levels[2];
|
18
|
+
}
|
19
|
+
|
20
|
+
return undefined;
|
21
|
+
};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import crc32 from 'crc-32';
|
2
|
+
|
3
|
+
export const generateHash = (value: string) => {
|
4
|
+
// 1. crc32.str(value) - generate crc32 hash
|
5
|
+
// 2. (>>>) - use unsigned right shift operator (>>>) to avoid negative values
|
6
|
+
// 3. toString(16) - convert hash to hex format
|
7
|
+
// 4. toUpperCase() - convert hash to uppercase
|
8
|
+
// 5. padStart(8, '0') - fill hash with leading zeros if hash length < 8
|
9
|
+
// eslint-disable-next-line no-bitwise
|
10
|
+
return (crc32.str(value) >>> 0).toString(16).toUpperCase().padStart(8, '0');
|
11
|
+
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ydb-embedded-ui",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.20.1",
|
4
4
|
"files": [
|
5
5
|
"dist"
|
6
6
|
],
|
@@ -15,9 +15,11 @@
|
|
15
15
|
"@gravity-ui/navigation": "^0.4.0",
|
16
16
|
"@gravity-ui/paranoid": "^1.4.0",
|
17
17
|
"@gravity-ui/react-data-table": "^1.0.3",
|
18
|
+
"@types/react": "^17.0.58",
|
18
19
|
"axios": "0.19.2",
|
19
20
|
"bem-cn-lite": "4.0.0",
|
20
21
|
"copy-to-clipboard": "^3.3.3",
|
22
|
+
"crc-32": "^1.2.2",
|
21
23
|
"history": "4.10.1",
|
22
24
|
"js-cookie": "2.2.1",
|
23
25
|
"lodash": "4.17.11",
|
@@ -117,7 +119,6 @@
|
|
117
119
|
"@types/lodash": "^4.14.178",
|
118
120
|
"@types/numeral": "^2.0.2",
|
119
121
|
"@types/qs": "^6.9.7",
|
120
|
-
"@types/react": "^17.0.44",
|
121
122
|
"@types/react-dom": "^17.0.11",
|
122
123
|
"@types/react-router": "^5.1.17",
|
123
124
|
"@types/react-router-dom": "^5.3.2",
|
@@ -1,41 +0,0 @@
|
|
1
|
-
@import '../../../../../styles/mixins.scss';
|
2
|
-
|
3
|
-
.tenant-overview-storage {
|
4
|
-
&__info {
|
5
|
-
margin-bottom: 36px;
|
6
|
-
}
|
7
|
-
|
8
|
-
&__title {
|
9
|
-
margin-bottom: 10px;
|
10
|
-
|
11
|
-
font-size: var(--yc-text-body-2-font-size);
|
12
|
-
font-weight: 700;
|
13
|
-
line-height: var(--yc-text-body-2-line-height);
|
14
|
-
}
|
15
|
-
|
16
|
-
&__table {
|
17
|
-
width: var(--diagnostics-section-table-width);
|
18
|
-
@include table-styles;
|
19
|
-
|
20
|
-
&:not(:last-child) {
|
21
|
-
margin-bottom: var(--diagnostics-section-margin);
|
22
|
-
}
|
23
|
-
|
24
|
-
th {
|
25
|
-
height: 40px;
|
26
|
-
|
27
|
-
vertical-align: middle;
|
28
|
-
}
|
29
|
-
}
|
30
|
-
|
31
|
-
&__cell-with-popover-wrapper {
|
32
|
-
display: flex;
|
33
|
-
}
|
34
|
-
|
35
|
-
&__cell-with-popover {
|
36
|
-
overflow: hidden;
|
37
|
-
|
38
|
-
white-space: nowrap;
|
39
|
-
text-overflow: ellipsis;
|
40
|
-
}
|
41
|
-
}
|