ydb-embedded-ui 5.0.0 → 5.1.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/EntityStatus/EntityStatus.scss +1 -1
- 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/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/Versions/NodesTreeTitle/NodesTreeTitle.scss +1 -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 +2 -2
- package/dist/services/settings.d.ts +0 -1
- package/dist/services/settings.js +1 -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 +1 -1
- package/dist/utils/constants.js +1 -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/store/reducers/hotKeys.d.ts +0 -11
- package/dist/store/reducers/hotKeys.js +0 -34
@@ -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
|
}
|
@@ -62,6 +62,7 @@ export declare const DEFAULT_SIZE_TENANT_KEY = "default-size-tenant-pane";
|
|
62
62
|
export declare const DEFAULT_IS_TENANT_SUMMARY_COLLAPSED = "default-is-tenant-summary-collapsed";
|
63
63
|
export declare const DEFAULT_IS_TENANT_COMMON_INFO_COLLAPSED = "default-is-tenant-common-info-collapsed";
|
64
64
|
export declare const DEFAULT_IS_QUERY_RESULT_COLLAPSED = "default-is-query-result-collapsed";
|
65
|
+
export declare const DEFAULT_CLUSTER_TAB_KEY = "default-cluster-tab";
|
65
66
|
export declare const DEFAULT_TABLE_SETTINGS: {
|
66
67
|
readonly displayIndices: false;
|
67
68
|
readonly stickyHead: "moving";
|
@@ -79,7 +80,6 @@ export declare const TENANT_OVERVIEW_TABLES_SETTINGS: {
|
|
79
80
|
export declare const QUERY_INITIAL_MODE_KEY = "query_initial_mode";
|
80
81
|
export declare const LAST_USED_QUERY_ACTION_KEY = "last_used_query_action";
|
81
82
|
export declare const PARTITIONS_HIDDEN_COLUMNS_KEY = "partitionsHiddenColumns";
|
82
|
-
export declare const CLUSTER_INFO_HIDDEN_KEY = "clusterInfoHidden";
|
83
83
|
export declare const TENANT_INITIAL_PAGE_KEY = "saved_tenant_initial_tab";
|
84
84
|
export declare const USE_BACKEND_PARAMS_FOR_TABLES_KEY = "useBackendParamsForTables";
|
85
85
|
export declare const QUERY_USE_MULTI_SCHEMA_KEY = "queryUseMultiSchema";
|
package/dist/utils/constants.js
CHANGED
@@ -78,6 +78,7 @@ export const DEFAULT_SIZE_TENANT_KEY = 'default-size-tenant-pane';
|
|
78
78
|
export const DEFAULT_IS_TENANT_SUMMARY_COLLAPSED = 'default-is-tenant-summary-collapsed';
|
79
79
|
export const DEFAULT_IS_TENANT_COMMON_INFO_COLLAPSED = 'default-is-tenant-common-info-collapsed';
|
80
80
|
export const DEFAULT_IS_QUERY_RESULT_COLLAPSED = 'default-is-query-result-collapsed';
|
81
|
+
export const DEFAULT_CLUSTER_TAB_KEY = 'default-cluster-tab';
|
81
82
|
export const DEFAULT_TABLE_SETTINGS = {
|
82
83
|
displayIndices: false,
|
83
84
|
stickyHead: DataTable.MOVING,
|
@@ -89,7 +90,6 @@ export const TENANT_OVERVIEW_TABLES_SETTINGS = Object.assign(Object.assign({}, D
|
|
89
90
|
export const QUERY_INITIAL_MODE_KEY = 'query_initial_mode';
|
90
91
|
export const LAST_USED_QUERY_ACTION_KEY = 'last_used_query_action';
|
91
92
|
export const PARTITIONS_HIDDEN_COLUMNS_KEY = 'partitionsHiddenColumns';
|
92
|
-
export const CLUSTER_INFO_HIDDEN_KEY = 'clusterInfoHidden';
|
93
93
|
// Remain "tab" in key name for backward compatibility
|
94
94
|
export const TENANT_INITIAL_PAGE_KEY = 'saved_tenant_initial_tab';
|
95
95
|
// 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.1.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,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;
|