ydb-embedded-ui 5.0.0 → 5.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/BasicNodeViewer/BasicNodeViewer.d.ts +2 -2
- package/dist/components/BasicNodeViewer/BasicNodeViewer.js +1 -1
- package/dist/components/ComponentsProvider/ComponentsProvider.d.ts +4 -0
- package/dist/components/ComponentsProvider/componentsRegistry.d.ts +3 -0
- package/dist/components/ComponentsProvider/componentsRegistry.js +3 -1
- package/dist/components/EntityStatus/EntityStatus.scss +1 -1
- package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +11 -1
- package/dist/components/ErrorBoundary/ErrorBoundary.js +11 -3
- package/dist/components/FullNodeViewer/FullNodeViewer.d.ts +2 -2
- package/dist/components/FullNodeViewer/FullNodeViewer.js +1 -1
- package/dist/components/LagImages/LagImages.js +2 -2
- package/dist/components/ProgressViewer/ProgressViewer.js +6 -5
- package/dist/components/ProgressViewer/ProgressViewer.scss +33 -17
- package/dist/components/TabletsOverall/TabletsOverall.js +6 -6
- package/dist/containers/App/App.js +2 -1
- package/dist/containers/App/Content.js +6 -12
- package/dist/containers/App/Providers.js +2 -1
- package/dist/containers/App/appSlots.d.ts +7 -7
- package/dist/containers/AppIcons/AppIcons.js +1 -1
- package/dist/containers/Cluster/Cluster.js +45 -27
- package/dist/containers/Cluster/Cluster.scss +15 -0
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +4 -18
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +0 -40
- package/dist/containers/Cluster/utils.d.ts +6 -1
- package/dist/containers/Cluster/utils.js +11 -3
- package/dist/containers/ClusterModeGuard/ClusterModeGuard.d.ts +6 -0
- package/dist/containers/ClusterModeGuard/ClusterModeGuard.js +6 -0
- package/dist/containers/ClusterModeGuard/index.d.ts +1 -0
- package/dist/containers/ClusterModeGuard/index.js +1 -0
- package/dist/containers/Clusters/Clusters.js +4 -3
- package/dist/containers/Clusters/columns.js +1 -1
- package/dist/containers/Clusters/constants.d.ts +1 -1
- package/dist/containers/Clusters/i18n/en.json +2 -1
- package/dist/containers/Clusters/i18n/index.d.ts +1 -1
- package/dist/containers/Clusters/i18n/index.js +2 -4
- package/dist/containers/Clusters/i18n/ru.json +2 -1
- package/dist/containers/Node/Node.js +11 -13
- package/dist/containers/Node/NodePages.js +4 -1
- package/dist/containers/Node/i18n/index.d.ts +1 -1
- package/dist/containers/Node/i18n/index.js +2 -4
- package/dist/containers/Nodes/getNodesColumns.js +2 -1
- package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.d.ts +1 -1
- package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.d.ts +1 -1
- package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.js +2 -1
- package/dist/containers/Tablet/Tablet.js +24 -20
- package/dist/containers/Tablet/i18n/index.d.ts +1 -1
- package/dist/containers/Tablet/i18n/index.js +2 -4
- package/dist/containers/TabletsFilters/TabletsFilters.d.ts +2 -0
- package/dist/containers/TabletsFilters/TabletsFilters.js +25 -19
- package/dist/containers/TabletsFilters/i18n/en.json +3 -0
- package/dist/containers/TabletsFilters/i18n/index.d.ts +2 -0
- package/dist/containers/TabletsFilters/i18n/index.js +5 -0
- package/dist/containers/TabletsFilters/i18n/ru.json +3 -0
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js +12 -11
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +19 -0
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +2 -1
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.d.ts +7 -25
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +88 -92
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.scss +1 -33
- package/dist/containers/Tenant/Diagnostics/HotKeys/i18n/en.json +4 -0
- package/dist/containers/Tenant/Diagnostics/HotKeys/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Diagnostics/HotKeys/i18n/index.js +5 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricCard/MetricCard.js +4 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.js +3 -4
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +12 -5
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TenantStorage.d.ts +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TenantStorage.js +7 -10
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/en.json +7 -5
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.js +0 -2
- package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.js +10 -0
- package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.d.ts +1 -1
- package/dist/containers/Tenant/Query/Query.d.ts +2 -2
- package/dist/containers/Tenant/Query/Query.js +5 -2
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +29 -31
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +150 -167
- package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.d.ts +2 -2
- package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +3 -3
- package/dist/containers/Tenant/Query/QueryTabs/QueryTabs.d.ts +10 -0
- package/dist/containers/Tenant/Query/QueryTabs/QueryTabs.js +1 -1
- package/dist/containers/Tenant/Query/utils/getPreparedResult.d.ts +1 -1
- package/dist/containers/Tenant/Query/utils/getPreparedResult.js +18 -16
- package/dist/containers/Tenant/Tenant.js +4 -1
- package/dist/containers/Tenant/i18n/en.json +1 -0
- package/dist/containers/Tenant/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/i18n/index.js +2 -4
- package/dist/containers/Tenant/i18n/ru.json +1 -0
- package/dist/containers/UserSettings/Setting.d.ts +2 -1
- package/dist/containers/UserSettings/Setting.js +2 -2
- package/dist/containers/UserSettings/i18n/en.json +2 -0
- package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
- package/dist/containers/UserSettings/i18n/index.js +2 -6
- package/dist/containers/UserSettings/settings.d.ts +1 -0
- package/dist/containers/UserSettings/settings.js +9 -2
- package/dist/containers/Versions/NodesTreeTitle/NodesTreeTitle.scss +1 -1
- package/dist/lib.d.ts +2 -1
- package/dist/lib.js +2 -1
- package/dist/routes.d.ts +5 -0
- package/dist/routes.js +4 -0
- package/dist/services/api.d.ts +2 -1
- package/dist/services/api.js +10 -3
- package/dist/services/settings.d.ts +0 -1
- package/dist/services/settings.js +2 -14
- package/dist/store/index.d.ts +1 -1
- package/dist/store/reducers/cluster/cluster.d.ts +8 -2
- package/dist/store/reducers/cluster/cluster.js +29 -1
- package/dist/store/reducers/cluster/types.d.ts +4 -2
- package/dist/store/reducers/executeQuery.d.ts +1 -10
- package/dist/store/reducers/executeQuery.js +26 -29
- package/dist/store/reducers/executeTopQueries/executeTopQueries.js +2 -1
- package/dist/store/reducers/executeTopQueries/utils.js +7 -4
- package/dist/store/reducers/hotKeys/hotKeys.d.ts +25 -0
- package/dist/store/reducers/hotKeys/hotKeys.js +49 -0
- package/dist/store/reducers/hotKeys/types.d.ts +10 -0
- package/dist/store/reducers/hotKeys/types.js +1 -0
- package/dist/store/reducers/index.d.ts +2 -6
- package/dist/store/reducers/index.js +1 -1
- package/dist/store/reducers/node/node.d.ts +1 -1
- package/dist/store/reducers/node/node.js +2 -0
- package/dist/store/reducers/node/selectors.js +1 -1
- package/dist/store/reducers/node/types.d.ts +7 -3
- package/dist/store/reducers/node/utils.d.ts +3 -0
- package/dist/store/reducers/node/utils.js +8 -0
- package/dist/store/reducers/nodes/types.d.ts +1 -1
- package/dist/store/reducers/nodes/utils.js +3 -3
- package/dist/store/reducers/storage/types.d.ts +2 -0
- package/dist/store/reducers/storage/utils.js +3 -3
- package/dist/store/reducers/tenants/utils.d.ts +4 -3
- package/dist/store/reducers/tenants/utils.js +17 -12
- package/dist/store/reducers/tooltip.d.ts +1 -1
- package/dist/types/api/hotkeys.d.ts +7 -0
- package/dist/types/api/hotkeys.js +1 -0
- package/dist/types/api/nodes.d.ts +2 -1
- package/dist/types/store/executeQuery.d.ts +3 -6
- package/dist/types/store/explainQuery.d.ts +1 -0
- package/dist/utils/constants.d.ts +2 -1
- package/dist/utils/constants.js +2 -1
- package/dist/utils/diagnostics.d.ts +1 -0
- package/dist/utils/diagnostics.js +1 -0
- package/dist/utils/i18n/i18n.d.ts +2 -1
- package/dist/utils/i18n/i18n.js +15 -2
- package/dist/utils/monitoring.js +1 -3
- package/dist/utils/versions/getVersionsColors.js +1 -1
- package/package.json +9 -8
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/ru.json +0 -26
- package/dist/containers/UserSettings/i18n/ru.json +0 -20
- package/dist/store/reducers/hotKeys.d.ts +0 -11
- package/dist/store/reducers/hotKeys.js +0 -34
@@ -34,7 +34,7 @@ import executeTopTables from './tenantOverview/executeTopTables/executeTopTables
|
|
34
34
|
import healthcheckInfo from './healthcheckInfo';
|
35
35
|
import shardsWorkload from './shardsWorkload/shardsWorkload';
|
36
36
|
import { tenantOverviewTopShards } from './tenantOverview/topShards/tenantOverviewTopShards';
|
37
|
-
import hotKeys from './hotKeys';
|
37
|
+
import hotKeys from './hotKeys/hotKeys';
|
38
38
|
import olapStats from './olapStats';
|
39
39
|
import authentication from './authentication/authentication';
|
40
40
|
import header from './header/header';
|
@@ -11,7 +11,7 @@ export declare const FETCH_NODE_STRUCTURE: {
|
|
11
11
|
readonly FAILURE: "node/FETCH_NODE_STRUCTURE_FAILURE";
|
12
12
|
};
|
13
13
|
declare const node: Reducer<NodeState, NodeAction>;
|
14
|
-
export declare const getNodeInfo: (id: string) => (dispatch: import("redux").Dispatch<import("redux").AnyAction>, getState: import("..").GetState) => Promise<
|
14
|
+
export declare const getNodeInfo: (id: string) => (dispatch: import("redux").Dispatch<import("redux").AnyAction>, getState: import("..").GetState) => Promise<import("./types").PreparedNode | undefined>;
|
15
15
|
export declare const getNodeStructure: (nodeId: string) => (dispatch: import("redux").Dispatch<import("redux").AnyAction>, getState: import("..").GetState) => Promise<unknown>;
|
16
16
|
export declare function resetNode(): {
|
17
17
|
readonly type: "node/RESET_NODE";
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { createRequestActionTypes, createApiRequest } from '../../utils';
|
2
|
+
import { prepareNodeData } from './utils';
|
2
3
|
export const FETCH_NODE = createRequestActionTypes('node', 'FETCH_NODE');
|
3
4
|
export const FETCH_NODE_STRUCTURE = createRequestActionTypes('node', 'FETCH_NODE_STRUCTURE');
|
4
5
|
const RESET_NODE = 'node/RESET_NODE';
|
@@ -41,6 +42,7 @@ export const getNodeInfo = (id) => {
|
|
41
42
|
return createApiRequest({
|
42
43
|
request: window.api.getNodeInfo(id),
|
43
44
|
actions: FETCH_NODE,
|
45
|
+
dataHandler: prepareNodeData,
|
44
46
|
});
|
45
47
|
};
|
46
48
|
export const getNodeStructure = (nodeId) => {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { createSelector } from 'reselect';
|
2
2
|
import { stringifyVdiskId } from '../../../utils/dataFormatters/dataFormatters';
|
3
|
-
const selectNodeId = (state) => { var _a, _b
|
3
|
+
const selectNodeId = (state) => { var _a, _b; return (_b = (_a = state.node) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.NodeId; };
|
4
4
|
const selectRawNodeStructure = (state) => { var _a; return (_a = state.node) === null || _a === void 0 ? void 0 : _a.nodeStructure; };
|
5
5
|
export const selectNodeStructure = createSelector([selectNodeId, selectRawNodeStructure], (nodeId, storageInfo) => {
|
6
6
|
const pools = storageInfo === null || storageInfo === void 0 ? void 0 : storageInfo.StoragePools;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { IResponseError } from '../../../types/api/error';
|
2
|
+
import type { TSystemStateInfo } from '../../../types/api/nodes';
|
2
3
|
import type { TPDiskStateInfo } from '../../../types/api/pdisk';
|
3
4
|
import type { TStorageInfo } from '../../../types/api/storage';
|
4
|
-
import type { TEvSystemStateResponse } from '../../../types/api/systemState';
|
5
5
|
import type { TVDiskStateInfo } from '../../../types/api/vdisk';
|
6
6
|
import type { ApiRequestAction } from '../../utils';
|
7
7
|
import { FETCH_NODE, FETCH_NODE_STRUCTURE, resetNode } from './node';
|
@@ -17,8 +17,12 @@ export interface PreparedStructurePDisk extends TPDiskStateInfo {
|
|
17
17
|
vDisks: PreparedStructureVDisk[];
|
18
18
|
}
|
19
19
|
export declare type PreparedNodeStructure = Record<string, PreparedStructurePDisk>;
|
20
|
+
export interface PreparedNode extends TSystemStateInfo {
|
21
|
+
DC?: string;
|
22
|
+
Rack?: string;
|
23
|
+
}
|
20
24
|
export interface NodeState {
|
21
|
-
data:
|
25
|
+
data: PreparedNode;
|
22
26
|
loading: boolean;
|
23
27
|
wasLoaded: boolean;
|
24
28
|
error?: IResponseError;
|
@@ -27,7 +31,7 @@ export interface NodeState {
|
|
27
31
|
wasLoadedStructure: boolean;
|
28
32
|
errorStructure?: IResponseError;
|
29
33
|
}
|
30
|
-
export declare type NodeAction = ApiRequestAction<typeof FETCH_NODE,
|
34
|
+
export declare type NodeAction = ApiRequestAction<typeof FETCH_NODE, PreparedNode, IResponseError> | ApiRequestAction<typeof FETCH_NODE_STRUCTURE, TStorageInfo, IResponseError> | ReturnType<typeof resetNode>;
|
31
35
|
export interface NodeStateSlice {
|
32
36
|
node: NodeState;
|
33
37
|
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export const prepareNodeData = (data) => {
|
2
|
+
var _a, _b, _c;
|
3
|
+
if (!((_a = data.SystemStateInfo) === null || _a === void 0 ? void 0 : _a.length)) {
|
4
|
+
return {};
|
5
|
+
}
|
6
|
+
const nodeData = data.SystemStateInfo[0];
|
7
|
+
return Object.assign(Object.assign({}, nodeData), { DC: (_b = nodeData.Location) === null || _b === void 0 ? void 0 : _b.DataCenter, Rack: (_c = nodeData.Location) === null || _c === void 0 ? void 0 : _c.Rack });
|
8
|
+
};
|
@@ -4,7 +4,7 @@ const prepareComputeNode = (node, tenantName) => {
|
|
4
4
|
var _a;
|
5
5
|
return Object.assign(Object.assign({}, node), {
|
6
6
|
// v2 response has tenant name, v1 - doesn't
|
7
|
-
TenantName: (_a = node.Tenant) !== null && _a !== void 0 ? _a : tenantName, SystemState: node === null || node === void 0 ? void 0 : node.Overall, Uptime: calcUptime(node === null || node === void 0 ? void 0 : node.StartTime) });
|
7
|
+
TenantName: (_a = node.Tenant) !== null && _a !== void 0 ? _a : tenantName, SystemState: node === null || node === void 0 ? void 0 : node.Overall, Uptime: calcUptime(node === null || node === void 0 ? void 0 : node.StartTime), DC: node.DataCenter });
|
8
8
|
};
|
9
9
|
export const prepareComputeNodes = (nodes, tenants) => {
|
10
10
|
var _a;
|
@@ -36,10 +36,10 @@ export const prepareComputeNodesData = (data) => {
|
|
36
36
|
export const prepareNodesData = (data) => {
|
37
37
|
const rawNodes = data.Nodes || [];
|
38
38
|
const preparedNodes = rawNodes.map((node) => {
|
39
|
-
var _a, _b, _c, _d, _e;
|
39
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
40
40
|
// 0 limit means that limit is not set, so it should be undefined
|
41
41
|
const sharedCacheLimit = Number((_a = node.SystemState.SharedCacheStats) === null || _a === void 0 ? void 0 : _a.LimitBytes) || undefined;
|
42
|
-
return Object.assign(Object.assign({}, node.SystemState), { Tablets: node.Tablets, NodeId: node.NodeId, Uptime: calcUptime((_b = node.SystemState) === null || _b === void 0 ? void 0 : _b.StartTime), TenantName: (_d = (_c = node.SystemState) === null || _c === void 0 ? void 0 : _c.Tenants) === null || _d === void 0 ? void 0 : _d[0],
|
42
|
+
return Object.assign(Object.assign({}, node.SystemState), { Tablets: node.Tablets, NodeId: node.NodeId, Uptime: calcUptime((_b = node.SystemState) === null || _b === void 0 ? void 0 : _b.StartTime), TenantName: (_d = (_c = node.SystemState) === null || _c === void 0 ? void 0 : _c.Tenants) === null || _d === void 0 ? void 0 : _d[0], DC: (_e = node.SystemState.Location) === null || _e === void 0 ? void 0 : _e.DataCenter, Rack: (_f = node.SystemState.Location) === null || _f === void 0 ? void 0 : _f.Rack, SharedCacheUsed: (_g = node.SystemState.SharedCacheStats) === null || _g === void 0 ? void 0 : _g.UsedBytes, SharedCacheLimit: sharedCacheLimit });
|
43
43
|
});
|
44
44
|
return {
|
45
45
|
Nodes: preparedNodes,
|
@@ -85,7 +85,7 @@ export const prepareStorageGroups = (StorageGroups, StoragePools) => {
|
|
85
85
|
};
|
86
86
|
// ==== Prepare nodes ====
|
87
87
|
const prepareStorageNodeData = (node) => {
|
88
|
-
var _a, _b;
|
88
|
+
var _a, _b, _c, _d;
|
89
89
|
const systemState = (_a = node.SystemState) !== null && _a !== void 0 ? _a : {};
|
90
90
|
const missing = ((_b = node.PDisks) === null || _b === void 0 ? void 0 : _b.filter((pDisk) => {
|
91
91
|
return pDisk.State !== TPDiskState.Normal;
|
@@ -93,8 +93,8 @@ const prepareStorageNodeData = (node) => {
|
|
93
93
|
return {
|
94
94
|
NodeId: node.NodeId,
|
95
95
|
SystemState: systemState.SystemState,
|
96
|
-
|
97
|
-
Rack: systemState.Rack,
|
96
|
+
DC: (_c = systemState.Location) === null || _c === void 0 ? void 0 : _c.DataCenter,
|
97
|
+
Rack: (_d = systemState.Location) === null || _d === void 0 ? void 0 : _d.Rack,
|
98
98
|
Host: systemState.Host,
|
99
99
|
Endpoints: systemState.Endpoints,
|
100
100
|
Uptime: calcUptime(systemState.StartTime),
|
@@ -1,13 +1,14 @@
|
|
1
|
+
import type { TPoolStats } from '../../../types/api/nodes';
|
1
2
|
import type { TTenant } from '../../../types/api/tenant';
|
2
3
|
export declare const calculateTenantMetrics: (tenant?: TTenant | undefined) => {
|
3
4
|
cpu: number | undefined;
|
4
5
|
memory: number | undefined;
|
5
6
|
blobStorage: number | undefined;
|
6
|
-
|
7
|
+
tabletStorage: number | undefined;
|
7
8
|
cpuUsage: number | undefined;
|
8
9
|
memoryLimit: number | undefined;
|
9
10
|
blobStorageLimit: number | undefined;
|
10
|
-
|
11
|
+
tabletStorageLimit: number | undefined;
|
11
12
|
};
|
12
13
|
export declare const prepareTenants: (tenants: TTenant[], useNodeAsBackend: boolean) => {
|
13
14
|
backend: string | undefined;
|
@@ -30,7 +31,7 @@ export declare const prepareTenants: (tenants: TTenant[], useNodeAsBackend: bool
|
|
30
31
|
CreateTime?: string | undefined;
|
31
32
|
Owner?: string | undefined;
|
32
33
|
Users?: string[] | undefined;
|
33
|
-
PoolStats?:
|
34
|
+
PoolStats?: TPoolStats[] | undefined;
|
34
35
|
UserAttributes?: Record<string, string> | undefined;
|
35
36
|
Overall?: import("../../../types/api/enums").EFlag | undefined;
|
36
37
|
SystemTablets?: import("../../../types/api/tablet").TTabletStateInfo[] | undefined;
|
@@ -17,36 +17,41 @@ const getTenantBackend = (tenant) => {
|
|
17
17
|
: undefined;
|
18
18
|
return node.Host ? `${node.Host}${address ? address : ''}` : undefined;
|
19
19
|
};
|
20
|
+
const calculateCpuUsage = (poolsStats) => {
|
21
|
+
var _a, _b, _c;
|
22
|
+
if (!poolsStats) {
|
23
|
+
return undefined;
|
24
|
+
}
|
25
|
+
const systemPoolUsage = ((_a = poolsStats === null || poolsStats === void 0 ? void 0 : poolsStats.find(({ Name }) => Name === 'System')) === null || _a === void 0 ? void 0 : _a.Usage) || 0;
|
26
|
+
const userPoolUsage = ((_b = poolsStats === null || poolsStats === void 0 ? void 0 : poolsStats.find(({ Name }) => Name === 'User')) === null || _b === void 0 ? void 0 : _b.Usage) || 0;
|
27
|
+
const icPoolUsage = ((_c = poolsStats === null || poolsStats === void 0 ? void 0 : poolsStats.find(({ Name }) => Name === 'IC')) === null || _c === void 0 ? void 0 : _c.Usage) || 0;
|
28
|
+
// We use max of system, user and ic pools usage to calculate cpu usage because
|
29
|
+
// only these pools directly indicate resources available to perform user queries
|
30
|
+
return Math.max(Number(systemPoolUsage), Number(userPoolUsage), Number(icPoolUsage)) * 100;
|
31
|
+
};
|
20
32
|
export const calculateTenantMetrics = (tenant) => {
|
21
|
-
var _a, _b;
|
22
33
|
const { CoresUsed, MemoryUsed, StorageAllocatedSize, MemoryLimit, StorageAllocatedLimit, PoolStats, Metrics = {}, DatabaseQuotas = {}, } = tenant || {};
|
23
|
-
const systemPoolUsage = (_a = PoolStats === null || PoolStats === void 0 ? void 0 : PoolStats.find(({ Name }) => Name === 'System')) === null || _a === void 0 ? void 0 : _a.Usage;
|
24
|
-
const userPoolUsage = (_b = PoolStats === null || PoolStats === void 0 ? void 0 : PoolStats.find(({ Name }) => Name === 'User')) === null || _b === void 0 ? void 0 : _b.Usage;
|
25
34
|
const cpu = isNumeric(CoresUsed) ? Number(CoresUsed) * 1000000 : undefined;
|
26
35
|
const memory = isNumeric(MemoryUsed) ? Number(MemoryUsed) : undefined;
|
27
36
|
const blobStorage = isNumeric(StorageAllocatedSize) ? Number(StorageAllocatedSize) : undefined;
|
28
|
-
const
|
29
|
-
|
30
|
-
// only these pools directly indicate resources available to perform user queries
|
31
|
-
const cpuUsage = isNumeric(systemPoolUsage) || isNumeric(userPoolUsage)
|
32
|
-
? Math.max(Number(systemPoolUsage), Number(userPoolUsage)) * 100
|
33
|
-
: undefined;
|
37
|
+
const tabletStorage = isNumeric(Metrics.Storage) ? Number(Metrics.Storage) : undefined;
|
38
|
+
const cpuUsage = calculateCpuUsage(PoolStats);
|
34
39
|
const memoryLimit = isNumeric(MemoryLimit) ? Number(MemoryLimit) : undefined;
|
35
40
|
const blobStorageLimit = isNumeric(StorageAllocatedLimit)
|
36
41
|
? Number(StorageAllocatedLimit)
|
37
42
|
: undefined;
|
38
|
-
const
|
43
|
+
const tabletStorageLimit = isNumeric(DatabaseQuotas.data_size_hard_quota)
|
39
44
|
? Number(DatabaseQuotas.data_size_hard_quota)
|
40
45
|
: undefined;
|
41
46
|
return {
|
42
47
|
cpu,
|
43
48
|
memory,
|
44
49
|
blobStorage,
|
45
|
-
|
50
|
+
tabletStorage,
|
46
51
|
cpuUsage,
|
47
52
|
memoryLimit,
|
48
53
|
blobStorageLimit,
|
49
|
-
|
54
|
+
tabletStorageLimit,
|
50
55
|
};
|
51
56
|
};
|
52
57
|
const calculateTenantEntities = (tenant) => {
|
@@ -8,7 +8,7 @@ export declare const showTooltip: (node: EventTarget | null, data: any, template
|
|
8
8
|
type: string;
|
9
9
|
node: EventTarget | null;
|
10
10
|
data: any;
|
11
|
-
templateType: "node" | "
|
11
|
+
templateType: "node" | "tablet" | "pool" | "nodeEndpoints" | "tabletsOverall" | "histogram" | "cell" | "json";
|
12
12
|
additionalData: any;
|
13
13
|
positions: ITooltipPositions | undefined;
|
14
14
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -73,8 +73,9 @@ export interface TSystemStateInfo {
|
|
73
73
|
SharedCacheStats?: TNodeSharedCache;
|
74
74
|
TotalSessions?: number;
|
75
75
|
}
|
76
|
+
export declare type PoolName = 'System' | 'User' | 'Batch' | 'IO' | 'IC';
|
76
77
|
export interface TPoolStats {
|
77
|
-
Name?:
|
78
|
+
Name?: PoolName;
|
78
79
|
/** double */
|
79
80
|
Usage?: number;
|
80
81
|
Threads?: number;
|
@@ -1,8 +1,6 @@
|
|
1
|
-
import { SEND_QUERY, changeUserInput, saveQueryToHistory, goToPreviousQuery,
|
1
|
+
import { SEND_QUERY, changeUserInput, saveQueryToHistory, goToPreviousQuery, goToNextQuery, setTenantPath } from '../../store/reducers/executeQuery';
|
2
2
|
import type { ApiRequestAction } from '../../store/utils';
|
3
|
-
import type { ValueOf } from '../common';
|
4
3
|
import type { IQueryResult, QueryError, QueryErrorResponse } from './query';
|
5
|
-
export declare type MonacoHotKeyAction = ValueOf<typeof MONACO_HOT_KEY_ACTIONS>;
|
6
4
|
export interface QueryInHistory {
|
7
5
|
queryText: string;
|
8
6
|
syntax?: string;
|
@@ -11,17 +9,16 @@ export interface ExecuteQueryState {
|
|
11
9
|
loading: boolean;
|
12
10
|
input: string;
|
13
11
|
history: {
|
14
|
-
queries:
|
12
|
+
queries: QueryInHistory[];
|
15
13
|
currentIndex: number;
|
16
14
|
};
|
17
|
-
monacoHotKey: null | MonacoHotKeyAction;
|
18
15
|
tenantPath?: string;
|
19
16
|
data?: IQueryResult;
|
20
17
|
stats?: IQueryResult['stats'];
|
21
18
|
error?: string | QueryErrorResponse;
|
22
19
|
}
|
23
20
|
declare type SendQueryAction = ApiRequestAction<typeof SEND_QUERY, IQueryResult, QueryError>;
|
24
|
-
export declare type ExecuteQueryAction = SendQueryAction | ReturnType<typeof goToNextQuery> | ReturnType<typeof goToPreviousQuery> | ReturnType<typeof changeUserInput> | ReturnType<typeof saveQueryToHistory> | ReturnType<typeof
|
21
|
+
export declare type ExecuteQueryAction = SendQueryAction | ReturnType<typeof goToNextQuery> | ReturnType<typeof goToPreviousQuery> | ReturnType<typeof changeUserInput> | ReturnType<typeof saveQueryToHistory> | ReturnType<typeof setTenantPath>;
|
25
22
|
export interface ExecuteQueryStateSlice {
|
26
23
|
executeQuery: ExecuteQueryState;
|
27
24
|
}
|
@@ -56,12 +56,14 @@ export declare const SAVED_QUERIES_KEY = "saved_queries";
|
|
56
56
|
export declare const ASIDE_HEADER_COMPACT_KEY = "asideHeaderCompact";
|
57
57
|
export declare const QUERIES_HISTORY_KEY = "queries_history";
|
58
58
|
export declare const DATA_QA_TUNE_COLUMNS_POPUP = "tune-columns-popup";
|
59
|
+
export declare const BINARY_DATA_IN_PLAIN_TEXT_DISPLAY = "binaryDataInPlainTextDisplay";
|
59
60
|
export declare const DEFAULT_SIZE_RESULT_PANE_KEY = "default-size-result-pane";
|
60
61
|
export declare const DEFAULT_SIZE_TENANT_SUMMARY_KEY = "default-size-tenant-summary-pane";
|
61
62
|
export declare const DEFAULT_SIZE_TENANT_KEY = "default-size-tenant-pane";
|
62
63
|
export declare const DEFAULT_IS_TENANT_SUMMARY_COLLAPSED = "default-is-tenant-summary-collapsed";
|
63
64
|
export declare const DEFAULT_IS_TENANT_COMMON_INFO_COLLAPSED = "default-is-tenant-common-info-collapsed";
|
64
65
|
export declare const DEFAULT_IS_QUERY_RESULT_COLLAPSED = "default-is-query-result-collapsed";
|
66
|
+
export declare const DEFAULT_CLUSTER_TAB_KEY = "default-cluster-tab";
|
65
67
|
export declare const DEFAULT_TABLE_SETTINGS: {
|
66
68
|
readonly displayIndices: false;
|
67
69
|
readonly stickyHead: "moving";
|
@@ -79,7 +81,6 @@ export declare const TENANT_OVERVIEW_TABLES_SETTINGS: {
|
|
79
81
|
export declare const QUERY_INITIAL_MODE_KEY = "query_initial_mode";
|
80
82
|
export declare const LAST_USED_QUERY_ACTION_KEY = "last_used_query_action";
|
81
83
|
export declare const PARTITIONS_HIDDEN_COLUMNS_KEY = "partitionsHiddenColumns";
|
82
|
-
export declare const CLUSTER_INFO_HIDDEN_KEY = "clusterInfoHidden";
|
83
84
|
export declare const TENANT_INITIAL_PAGE_KEY = "saved_tenant_initial_tab";
|
84
85
|
export declare const USE_BACKEND_PARAMS_FOR_TABLES_KEY = "useBackendParamsForTables";
|
85
86
|
export declare const QUERY_USE_MULTI_SCHEMA_KEY = "queryUseMultiSchema";
|
package/dist/utils/constants.js
CHANGED
@@ -72,12 +72,14 @@ export const SAVED_QUERIES_KEY = 'saved_queries';
|
|
72
72
|
export const ASIDE_HEADER_COMPACT_KEY = 'asideHeaderCompact';
|
73
73
|
export const QUERIES_HISTORY_KEY = 'queries_history';
|
74
74
|
export const DATA_QA_TUNE_COLUMNS_POPUP = 'tune-columns-popup';
|
75
|
+
export const BINARY_DATA_IN_PLAIN_TEXT_DISPLAY = 'binaryDataInPlainTextDisplay';
|
75
76
|
export const DEFAULT_SIZE_RESULT_PANE_KEY = 'default-size-result-pane';
|
76
77
|
export const DEFAULT_SIZE_TENANT_SUMMARY_KEY = 'default-size-tenant-summary-pane';
|
77
78
|
export const DEFAULT_SIZE_TENANT_KEY = 'default-size-tenant-pane';
|
78
79
|
export const DEFAULT_IS_TENANT_SUMMARY_COLLAPSED = 'default-is-tenant-summary-collapsed';
|
79
80
|
export const DEFAULT_IS_TENANT_COMMON_INFO_COLLAPSED = 'default-is-tenant-common-info-collapsed';
|
80
81
|
export const DEFAULT_IS_QUERY_RESULT_COLLAPSED = 'default-is-query-result-collapsed';
|
82
|
+
export const DEFAULT_CLUSTER_TAB_KEY = 'default-cluster-tab';
|
81
83
|
export const DEFAULT_TABLE_SETTINGS = {
|
82
84
|
displayIndices: false,
|
83
85
|
stickyHead: DataTable.MOVING,
|
@@ -89,7 +91,6 @@ export const TENANT_OVERVIEW_TABLES_SETTINGS = Object.assign(Object.assign({}, D
|
|
89
91
|
export const QUERY_INITIAL_MODE_KEY = 'query_initial_mode';
|
90
92
|
export const LAST_USED_QUERY_ACTION_KEY = 'last_used_query_action';
|
91
93
|
export const PARTITIONS_HIDDEN_COLUMNS_KEY = 'partitionsHiddenColumns';
|
92
|
-
export const CLUSTER_INFO_HIDDEN_KEY = 'clusterInfoHidden';
|
93
94
|
// Remain "tab" in key name for backward compatibility
|
94
95
|
export const TENANT_INITIAL_PAGE_KEY = 'saved_tenant_initial_tab';
|
95
96
|
// Send filters and sort params to backend for Nodes and Storage tables
|
@@ -10,6 +10,7 @@ declare const TOP_QUERIES_SORT_VALUES: {
|
|
10
10
|
readonly ReadRows: "ReadRows";
|
11
11
|
readonly ReadBytes: "ReadBytes";
|
12
12
|
readonly UserSID: "UserSID";
|
13
|
+
readonly Duration: "Duration";
|
13
14
|
};
|
14
15
|
declare type TopShardsSortValue = ValueOf<typeof TOP_SHARDS_SORT_VALUES>;
|
15
16
|
declare type TopQueriesSortValue = ValueOf<typeof TOP_QUERIES_SORT_VALUES>;
|
@@ -9,6 +9,7 @@ const TOP_QUERIES_SORT_VALUES = {
|
|
9
9
|
ReadRows: 'ReadRows',
|
10
10
|
ReadBytes: 'ReadBytes',
|
11
11
|
UserSID: 'UserSID',
|
12
|
+
Duration: 'Duration',
|
12
13
|
};
|
13
14
|
export const isSortableTopShardsProperty = (value) => Object.values(TOP_SHARDS_SORT_VALUES).includes(value);
|
14
15
|
export const isSortableTopQueriesProperty = (value) => Object.values(TOP_QUERIES_SORT_VALUES).includes(value);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { I18N } from '@gravity-ui/i18n';
|
1
|
+
import { I18N, KeysData } from '@gravity-ui/i18n';
|
2
2
|
declare enum Lang {
|
3
3
|
En = "en",
|
4
4
|
Ru = "ru"
|
@@ -6,4 +6,5 @@ declare enum Lang {
|
|
6
6
|
declare const defaultLang = Lang.En;
|
7
7
|
declare const currentLang: Lang;
|
8
8
|
declare const i18n: I18N;
|
9
|
+
export declare function registerKeysets<Keyset extends KeysData>(id: string, data: Record<string, Keyset>): (key: Extract<keyof Keyset, string>, params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
9
10
|
export { i18n, Lang, currentLang, defaultLang };
|
package/dist/utils/i18n/i18n.js
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
import { I18N } from '@gravity-ui/i18n';
|
2
2
|
import { configure as configureUiKit } from '@gravity-ui/uikit';
|
3
|
+
import { configure as configureUiKitComponents } from '@gravity-ui/components';
|
4
|
+
import { configure as configureUiKitNavigation } from '@gravity-ui/navigation';
|
3
5
|
import { configure as configureYdbUiComponents } from 'ydb-ui-components';
|
4
6
|
import { LANGUAGE_KEY } from '../constants';
|
5
7
|
import { settingsManager } from '../../services/settings';
|
@@ -10,8 +12,19 @@ var Lang;
|
|
10
12
|
})(Lang || (Lang = {}));
|
11
13
|
const defaultLang = Lang.En;
|
12
14
|
const currentLang = settingsManager.readUserSettingsValue(LANGUAGE_KEY, defaultLang);
|
13
|
-
const i18n = new I18N(
|
14
|
-
|
15
|
+
const i18n = new I18N({
|
16
|
+
lang: currentLang,
|
17
|
+
// Enable keysets with only en lang
|
18
|
+
fallbackLang: Lang.En,
|
19
|
+
});
|
15
20
|
configureYdbUiComponents({ lang: currentLang });
|
16
21
|
configureUiKit({ lang: currentLang });
|
22
|
+
configureUiKitComponents({ lang: currentLang });
|
23
|
+
configureUiKitNavigation({ lang: currentLang });
|
24
|
+
export function registerKeysets(id, data) {
|
25
|
+
for (const lang of Object.keys(data)) {
|
26
|
+
i18n.registerKeyset(lang, id, data[lang]);
|
27
|
+
}
|
28
|
+
return i18n.keyset(id);
|
29
|
+
}
|
17
30
|
export { i18n, Lang, currentLang, defaultLang };
|
package/dist/utils/monitoring.js
CHANGED
@@ -20,7 +20,7 @@ export const COLORS = [
|
|
20
20
|
'#3cb371',
|
21
21
|
'#b22222', // firebrick
|
22
22
|
];
|
23
|
-
export const GRAY_COLOR = '#bfbfbf';
|
23
|
+
export const GRAY_COLOR = '#bfbfbf';
|
24
24
|
export const getVersionsMap = (versions, initialMap = new Map()) => {
|
25
25
|
versions.forEach((version) => {
|
26
26
|
var _a;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ydb-embedded-ui",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.2.0",
|
4
4
|
"files": [
|
5
5
|
"dist"
|
6
6
|
],
|
@@ -11,15 +11,15 @@
|
|
11
11
|
},
|
12
12
|
"dependencies": {
|
13
13
|
"@gravity-ui/axios-wrapper": "^1.3.0",
|
14
|
-
"@gravity-ui/chartkit": "^4.
|
15
|
-
"@gravity-ui/components": "^2.
|
16
|
-
"@gravity-ui/date-utils": "^1.
|
17
|
-
"@gravity-ui/i18n": "^1.
|
14
|
+
"@gravity-ui/chartkit": "^4.20.1",
|
15
|
+
"@gravity-ui/components": "^2.12.0",
|
16
|
+
"@gravity-ui/date-utils": "^1.4.2",
|
17
|
+
"@gravity-ui/i18n": "^1.2.0",
|
18
18
|
"@gravity-ui/icons": "^2.8.1",
|
19
|
-
"@gravity-ui/navigation": "^1.
|
19
|
+
"@gravity-ui/navigation": "^1.9.0",
|
20
20
|
"@gravity-ui/paranoid": "^1.4.0",
|
21
|
-
"@gravity-ui/react-data-table": "^1.0
|
22
|
-
"@gravity-ui/uikit": "^5.
|
21
|
+
"@gravity-ui/react-data-table": "^1.2.0",
|
22
|
+
"@gravity-ui/uikit": "^5.30.1",
|
23
23
|
"axios": "^0.21.2",
|
24
24
|
"bem-cn-lite": "^4.1.0",
|
25
25
|
"copy-to-clipboard": "^3.3.3",
|
@@ -32,6 +32,7 @@
|
|
32
32
|
"qs": "^6.11.0",
|
33
33
|
"react-error-boundary": "^4.0.12",
|
34
34
|
"react-json-inspector": "^7.1.1",
|
35
|
+
"react-helmet-async": "2.0.4",
|
35
36
|
"react-list": "^0.8.11",
|
36
37
|
"react-monaco-editor": "^0.47.0",
|
37
38
|
"react-redux": "^7.2.6",
|
@@ -1,26 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"no-data": "Нет данных",
|
3
|
-
"no-pools-data": "Нет данных о пулах",
|
4
|
-
"top-nodes.empty-data": "Нет узлов",
|
5
|
-
"title.pools": "Пулы",
|
6
|
-
"title.metrics": "Метрики",
|
7
|
-
"top-groups.empty-data": "Нет групп",
|
8
|
-
"top": "Топ",
|
9
|
-
"nodes": "узлов",
|
10
|
-
"shards": "шардов",
|
11
|
-
"groups": "групп",
|
12
|
-
"queries": "запросов",
|
13
|
-
"tables": "таблиц",
|
14
|
-
"by-pools-usage": "по использованию пулов",
|
15
|
-
"by-cpu-time": "по времени cpu",
|
16
|
-
"by-cpu-usage": "по использованию cpu",
|
17
|
-
"by-load": "по нагрузке",
|
18
|
-
"by-memory": "по памяти",
|
19
|
-
"by-usage": "по потреблению",
|
20
|
-
"by-size": "по размеру",
|
21
|
-
"charts.queries-per-second": "Количество запросов в секунду",
|
22
|
-
"charts.transaction-latency": "Задержка транзакций {{percentile}}",
|
23
|
-
"charts.cpu-usage": "Использование CPU",
|
24
|
-
"charts.storage-usage": "Использование хранилища",
|
25
|
-
"charts.memory-usage": "Использование памяти"
|
26
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"page.general": "Общие",
|
3
|
-
"section.appearance": "Внешний вид",
|
4
|
-
"page.experiments": "Эксперименты",
|
5
|
-
"section.experiments": "Эксперименты",
|
6
|
-
"settings.theme.title": "Тема",
|
7
|
-
"settings.theme.option-dark": "Тёмная",
|
8
|
-
"settings.theme.option-light": "Светлая",
|
9
|
-
"settings.theme.option-system": "Системная",
|
10
|
-
"settings.language.title": "Язык интерфейса",
|
11
|
-
"settings.language.option-russian": "Русский",
|
12
|
-
"settings.language.option-english": "English",
|
13
|
-
"settings.invertedDisks.title": "Инвертированные индикаторы места на дисках",
|
14
|
-
"settings.useNodesEndpoint.title": "Сломать вкладку Nodes в диагностике",
|
15
|
-
"settings.useNodesEndpoint.popover": "Использовать эндпоинт /viewer/json/nodes для вкладки Nodes в диагностике. Может возвращать некорректные данные на некоторых версиях",
|
16
|
-
"settings.useVirtualTables.title": "Использовать таблицу с загрузкой данных по скроллу для вкладок Nodes и Storage",
|
17
|
-
"settings.useVirtualTables.popover": "Это улучшит производительность, но может работать нестабильно",
|
18
|
-
"settings.queryUseMultiSchema.title": "Разрешить запросы с несколькими результатами",
|
19
|
-
"settings.queryUseMultiSchema.popover": "Использовать для запросов схему 'multi', которая позволяет выполнять запросы с несколькими результатами. На версиях 23-3 и старше результат не возвращается вообще"
|
20
|
-
}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
export function getHotKeys(currentSchemaPath: any, enableSampling: any): (dispatch: import("redux").Dispatch<import("redux").AnyAction>, getState: import(".").GetState) => Promise<any>;
|
2
|
-
export function setHotKeysOptions(options: any): {
|
3
|
-
type: string;
|
4
|
-
data: any;
|
5
|
-
};
|
6
|
-
export default hotKeys;
|
7
|
-
declare function hotKeys(state: {
|
8
|
-
loading: boolean;
|
9
|
-
data: {};
|
10
|
-
wasLoaded: boolean;
|
11
|
-
} | undefined, action: any): any;
|
@@ -1,34 +0,0 @@
|
|
1
|
-
import { createRequestActionTypes, createApiRequest } from '../utils';
|
2
|
-
const FETCH_HOT_KEYS = createRequestActionTypes('hot_keys', 'FETCH_HOT_KEYS');
|
3
|
-
const SET_HOT_KEYS_OPTIONS = 'hot_keys/SET_HOT_KEYS_OPTIONS';
|
4
|
-
const initialState = { loading: true, data: {}, wasLoaded: false };
|
5
|
-
const hotKeys = function (state = initialState, action) {
|
6
|
-
switch (action.type) {
|
7
|
-
case FETCH_HOT_KEYS.REQUEST: {
|
8
|
-
return Object.assign(Object.assign({}, state), { loading: true });
|
9
|
-
}
|
10
|
-
case FETCH_HOT_KEYS.SUCCESS: {
|
11
|
-
return Object.assign(Object.assign({}, state), { data: action.data.hotkeys, loading: false, error: undefined, wasLoaded: true });
|
12
|
-
}
|
13
|
-
case FETCH_HOT_KEYS.FAILURE: {
|
14
|
-
return Object.assign(Object.assign({}, state), { error: action.error, loading: false });
|
15
|
-
}
|
16
|
-
case SET_HOT_KEYS_OPTIONS:
|
17
|
-
return Object.assign(Object.assign({}, state), action.data);
|
18
|
-
default:
|
19
|
-
return state;
|
20
|
-
}
|
21
|
-
};
|
22
|
-
export function getHotKeys(currentSchemaPath, enableSampling) {
|
23
|
-
return createApiRequest({
|
24
|
-
request: window.api.getHotKeys(currentSchemaPath, enableSampling),
|
25
|
-
actions: FETCH_HOT_KEYS,
|
26
|
-
});
|
27
|
-
}
|
28
|
-
export function setHotKeysOptions(options) {
|
29
|
-
return {
|
30
|
-
type: SET_HOT_KEYS_OPTIONS,
|
31
|
-
data: options,
|
32
|
-
};
|
33
|
-
}
|
34
|
-
export default hotKeys;
|