ydb-embedded-ui 6.26.1 → 6.27.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/DiagnosticCard/DiagnosticCard.d.ts +4 -3
- package/dist/components/DiagnosticCard/DiagnosticCard.js +2 -2
- package/dist/components/DiagnosticCard/DiagnosticCard.js.map +1 -1
- package/dist/components/DiagnosticCard/DiagnosticCard.scss +17 -4
- package/dist/components/DoughnutMetrics/DoughnutMetrics.d.ts +20 -0
- package/dist/components/DoughnutMetrics/DoughnutMetrics.js +26 -0
- package/dist/components/DoughnutMetrics/DoughnutMetrics.js.map +1 -0
- package/dist/components/DoughnutMetrics/DoughnutMetrics.scss +58 -0
- package/dist/components/PaginatedTable/TableChunk.js +2 -0
- package/dist/components/PaginatedTable/TableChunk.js.map +1 -1
- package/dist/components/PaginatedTable/types.d.ts +1 -0
- package/dist/components/ProgressViewer/ProgressViewer.js +10 -11
- package/dist/components/ProgressViewer/ProgressViewer.js.map +1 -1
- package/dist/components/ProgressViewer/ProgressViewer.scss +1 -1
- package/dist/components/TableWithControlsLayout/TableWithControlsLayout.scss +4 -2
- package/dist/components/Tag/Tag.scss +1 -2
- package/dist/components/Tags/Tags.d.ts +3 -2
- package/dist/components/Tags/Tags.js +3 -5
- package/dist/components/Tags/Tags.js.map +1 -1
- package/dist/components/nodesColumns/columns.d.ts +2 -1
- package/dist/components/nodesColumns/columns.js.map +1 -1
- package/dist/components/nodesColumns/constants.d.ts +4 -0
- package/dist/components/nodesColumns/constants.js +25 -0
- package/dist/components/nodesColumns/constants.js.map +1 -1
- package/dist/components/nodesColumns/i18n/en.json +2 -1
- package/dist/components/nodesColumns/i18n/index.d.ts +1 -1
- package/dist/components/nodesColumns/types.d.ts +0 -3
- package/dist/containers/Cluster/Cluster.js +4 -3
- package/dist/containers/Cluster/Cluster.js.map +1 -1
- package/dist/containers/Cluster/Cluster.scss +35 -8
- package/dist/containers/Cluster/ClusterDashboard/ClusterDashboard.d.ts +10 -0
- package/dist/containers/Cluster/ClusterDashboard/ClusterDashboard.js +66 -0
- package/dist/containers/Cluster/ClusterDashboard/ClusterDashboard.js.map +1 -0
- package/dist/containers/Cluster/ClusterDashboard/ClusterDashboard.scss +46 -0
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsCard.d.ts +17 -0
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsCard.js +20 -0
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsCard.js.map +1 -0
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsCores.d.ts +5 -0
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsCores.js +19 -0
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsCores.js.map +1 -0
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsMemory.d.ts +5 -0
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsMemory.js +20 -0
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsMemory.js.map +1 -0
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsStorage.d.ts +5 -0
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsStorage.js +20 -0
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsStorage.js.map +1 -0
- package/dist/containers/Cluster/ClusterDashboard/shared.d.ts +9 -0
- package/dist/containers/Cluster/ClusterDashboard/shared.js +3 -0
- package/dist/containers/Cluster/ClusterDashboard/shared.js.map +1 -0
- package/dist/containers/Cluster/ClusterDashboard/utils.d.ts +19 -0
- package/dist/containers/Cluster/ClusterDashboard/utils.js +63 -0
- package/dist/containers/Cluster/ClusterDashboard/utils.js.map +1 -0
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.d.ts +1 -3
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +3 -15
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js.map +1 -1
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +1 -18
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStatsBars.d.ts +4 -3
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStatsBars.js +14 -15
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStatsBars.js.map +1 -1
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStatsBars.scss +1 -6
- package/dist/containers/Cluster/ClusterInfo/components/NodesState/NodesState.scss +3 -2
- package/dist/containers/Cluster/ClusterInfo/utils.d.ts +1 -4
- package/dist/containers/Cluster/ClusterInfo/utils.js +20 -107
- package/dist/containers/Cluster/ClusterInfo/utils.js.map +1 -1
- package/dist/containers/Cluster/i18n/en.json +11 -12
- package/dist/containers/Cluster/i18n/index.d.ts +1 -1
- package/dist/containers/Nodes/columns/columns.d.ts +2 -1
- package/dist/containers/Nodes/columns/columns.js.map +1 -1
- package/dist/containers/Nodes/columns/hooks.d.ts +1 -1
- package/dist/containers/Nodes/getNodes.js +5 -1
- package/dist/containers/Nodes/getNodes.js.map +1 -1
- package/dist/containers/Operations/Operations.d.ts +5 -0
- package/dist/containers/Operations/Operations.js +33 -0
- package/dist/containers/Operations/Operations.js.map +1 -0
- package/dist/containers/Operations/OperationsControls.d.ts +12 -0
- package/dist/containers/Operations/OperationsControls.js +12 -0
- package/dist/containers/Operations/OperationsControls.js.map +1 -0
- package/dist/containers/Operations/columns.d.ts +3 -0
- package/dist/containers/Operations/columns.js +103 -0
- package/dist/containers/Operations/columns.js.map +1 -0
- package/dist/containers/Operations/constants.d.ts +23 -0
- package/dist/containers/Operations/constants.js +32 -0
- package/dist/containers/Operations/constants.js.map +1 -0
- package/dist/containers/Operations/i18n/en.json +16 -0
- package/dist/containers/Operations/i18n/index.d.ts +2 -0
- package/dist/containers/Operations/i18n/index.js +5 -0
- package/dist/containers/Operations/i18n/index.js.map +1 -0
- package/dist/containers/Operations/index.d.ts +1 -0
- package/dist/containers/Operations/index.js +2 -0
- package/dist/containers/Operations/index.js.map +1 -0
- package/dist/containers/Operations/shared.d.ts +1 -0
- package/dist/containers/Operations/shared.js +3 -0
- package/dist/containers/Operations/shared.js.map +1 -0
- package/dist/containers/Operations/useOperationsQueryParams.d.ts +11 -0
- package/dist/containers/Operations/useOperationsQueryParams.js +39 -0
- package/dist/containers/Operations/useOperationsQueryParams.js.map +1 -0
- package/dist/containers/Storage/StorageGroups/columns/constants.d.ts +3 -3
- package/dist/containers/Storage/StorageGroups/columns/constants.js +25 -0
- package/dist/containers/Storage/StorageGroups/columns/constants.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/columns/types.d.ts +2 -3
- package/dist/containers/Storage/StorageGroups/getGroups.js +5 -1
- package/dist/containers/Storage/StorageGroups/getGroups.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/columns/columns.js +3 -3
- package/dist/containers/Storage/StorageNodes/columns/columns.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/columns/constants.d.ts +3 -43
- package/dist/containers/Storage/StorageNodes/columns/constants.js +2 -15
- package/dist/containers/Storage/StorageNodes/columns/constants.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/columns/hooks.js +4 -3
- package/dist/containers/Storage/StorageNodes/columns/hooks.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/columns/types.d.ts +1 -1
- package/dist/containers/Storage/StorageNodes/getNodes.js +5 -1
- package/dist/containers/Storage/StorageNodes/getNodes.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js +4 -0
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +6 -0
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +5 -0
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.js.map +1 -1
- package/dist/containers/Tenant/Query/Preview/Preview.js +1 -3
- package/dist/containers/Tenant/Query/Preview/Preview.js.map +1 -1
- package/dist/containers/Tenant/utils/schemaQueryTemplates.d.ts +1 -1
- package/dist/containers/Tenant/utils/schemaQueryTemplates.js +2 -2
- package/dist/containers/Tenant/utils/schemaQueryTemplates.js.map +1 -1
- package/dist/services/api.d.ts +2 -0
- package/dist/services/api.js +6 -0
- package/dist/services/api.js.map +1 -1
- package/dist/store/reducers/operationList.d.ts +4 -0
- package/dist/store/reducers/operationList.js +19 -0
- package/dist/store/reducers/operationList.js.map +1 -0
- package/dist/store/reducers/overview/overview.js +2 -2
- package/dist/store/reducers/overview/overview.js.map +1 -1
- package/dist/store/reducers/tableData.d.ts +1 -0
- package/dist/store/reducers/tableData.js +2 -1
- package/dist/store/reducers/tableData.js.map +1 -1
- package/dist/store/reducers/tenant/constants.d.ts +1 -0
- package/dist/store/reducers/tenant/constants.js +1 -0
- package/dist/store/reducers/tenant/constants.js.map +1 -1
- package/dist/store/reducers/topic.js +1 -1
- package/dist/store/reducers/topic.js.map +1 -1
- package/dist/types/api/cluster.d.ts +3 -0
- package/dist/types/api/cluster.js.map +1 -1
- package/dist/types/api/operationList.d.ts +114 -0
- package/dist/types/api/operationList.js +42 -0
- package/dist/types/api/operationList.js.map +1 -0
- package/dist/types/api/storage.d.ts +1 -1
- package/dist/utils/bytesParsers/__test__/formatBytes.test.js +23 -22
- package/dist/utils/bytesParsers/__test__/formatBytes.test.js.map +1 -1
- package/dist/utils/bytesParsers/formatBytes.d.ts +2 -1
- package/dist/utils/bytesParsers/formatBytes.js +5 -5
- package/dist/utils/bytesParsers/formatBytes.js.map +1 -1
- package/dist/utils/dataFormatters/__test__/formatStorageValues.test.d.ts +1 -0
- package/dist/utils/dataFormatters/__test__/formatStorageValues.test.js +37 -0
- package/dist/utils/dataFormatters/__test__/formatStorageValues.test.js.map +1 -0
- package/dist/utils/dataFormatters/dataFormatters.d.ts +3 -1
- package/dist/utils/dataFormatters/dataFormatters.js +33 -3
- package/dist/utils/dataFormatters/dataFormatters.js.map +1 -1
- package/dist/utils/numeral.js +2 -1
- package/dist/utils/numeral.js.map +1 -1
- package/dist/utils/progress.d.ts +10 -0
- package/dist/utils/progress.js +13 -0
- package/dist/utils/progress.js.map +1 -0
- package/dist/utils/tableUtils/getRequiredDataFields.d.ts +1 -0
- package/dist/utils/tableUtils/getRequiredDataFields.js +11 -0
- package/dist/utils/tableUtils/getRequiredDataFields.js.map +1 -0
- package/dist/utils/tableUtils/types.d.ts +3 -0
- package/dist/utils/tableUtils/types.js +2 -0
- package/dist/utils/tableUtils/types.js.map +1 -0
- package/dist/utils/utils.d.ts +1 -0
- package/dist/utils/utils.js +1 -0
- package/dist/utils/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/containers/Storage/StorageNodes/columns/i18n/en.json +0 -3
- package/dist/containers/Storage/StorageNodes/columns/i18n/index.d.ts +0 -2
- package/dist/containers/Storage/StorageNodes/columns/i18n/index.js +0 -5
- package/dist/containers/Storage/StorageNodes/columns/i18n/index.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DiskGroupsStatsBars.js","sourceRoot":"","sources":["../../../../../../src/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStatsBars.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,
|
1
|
+
{"version":3,"file":"DiskGroupsStatsBars.js","sourceRoot":"","sources":["../../../../../../src/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStatsBars.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,6DAA6D,CAAC;AAE7F,OAAO,EAAC,WAAW,EAAE,4BAA4B,EAAC,MAAM,mCAAmC,CAAC;AAC5F,OAAO,EAAC,EAAE,EAAC,MAAM,yBAAyB,CAAC;AAC3C,OAAO,IAAI,MAAM,eAAe,CAAC;AAEjC,OAAO,4BAA4B,CAAC;AAEpC,MAAM,CAA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W,CAAC;YACvB,OAAO,EAAE,sBAAsB;SAClC;QACD;YACI,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC;YACnB,OAAO,EAAE,KAAK,GAAG,GAAG;SACvB;KACJ,CAAC;IAEF,OAAO,KAAC,cAAc,IAAC,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,eAAe,CAAC,EAAE,UAAU,SAAG,CAAC;AACrF,CAAC"}
|
@@ -5,11 +5,12 @@
|
|
5
5
|
justify-content: center;
|
6
6
|
align-items: center;
|
7
7
|
|
8
|
-
|
8
|
+
width: max-content;
|
9
|
+
min-width: 26px;
|
10
|
+
height: 20px;
|
9
11
|
padding: 0 var(--g-spacing-1);
|
10
12
|
|
11
13
|
color: var(--entity-state-font-color);
|
12
|
-
border: 1px solid var(--entity-state-border-color);
|
13
14
|
border-radius: var(--g-spacing-1);
|
14
15
|
background-color: var(--entity-state-background-color);
|
15
16
|
@include entity-state-colors();
|
@@ -1,9 +1,6 @@
|
|
1
1
|
import type { InfoViewerItem } from '../../../components/InfoViewer/InfoViewer';
|
2
|
-
import type { ClusterGroupsStats } from '../../../store/reducers/cluster/types';
|
3
2
|
import type { ClusterLink } from '../../../types/additionalProps';
|
4
3
|
import type { TClusterInfo } from '../../../types/api/cluster';
|
5
4
|
import type { TTabletStateInfo } from '../../../types/api/tablet';
|
6
|
-
import type { VersionToColorMap, VersionValue } from '../../../types/versions';
|
7
5
|
export declare const compareTablets: (tablet1: TTabletStateInfo, tablet2: TTabletStateInfo) => 0 | 1 | -1;
|
8
|
-
export declare const getInfo: (cluster: TClusterInfo,
|
9
|
-
export declare const useGetVersionValues: (cluster?: TClusterInfo, versionToColor?: VersionToColorMap) => VersionValue[];
|
6
|
+
export declare const getInfo: (cluster: TClusterInfo, additionalInfo: InfoViewerItem[], links: ClusterLink[]) => InfoViewerItem[];
|
@@ -1,18 +1,13 @@
|
|
1
|
-
import {
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import React from 'react';
|
3
|
-
import {
|
3
|
+
import { Flex } from '@gravity-ui/uikit';
|
4
4
|
import { LinkWithIcon } from '../../../components/LinkWithIcon/LinkWithIcon';
|
5
5
|
import { ProgressViewer } from '../../../components/ProgressViewer/ProgressViewer';
|
6
|
-
import { Tablet } from '../../../components/Tablet';
|
7
6
|
import { Tags } from '../../../components/Tags';
|
8
|
-
import { nodesApi } from '../../../store/reducers/nodes/nodes';
|
9
7
|
import { isClusterInfoV2 } from '../../../types/api/cluster';
|
10
8
|
import { EType } from '../../../types/api/tablet';
|
11
|
-
import {
|
12
|
-
import { parseNodeGroupsToVersionsValues, parseNodesToVersionsValues } from '../../../utils/versions';
|
13
|
-
import { VersionsBar } from '../VersionsBar/VersionsBar';
|
9
|
+
import { formatNumber } from '../../../utils/dataFormatters/dataFormatters';
|
14
10
|
import i18n from '../i18n';
|
15
|
-
import { DiskGroupsStatsBars } from './components/DiskGroupsStatsBars/DiskGroupsStatsBars';
|
16
11
|
import { NodesState } from './components/NodesState/NodesState';
|
17
12
|
import { b } from './shared';
|
18
13
|
const COLORS_PRIORITY = {
|
@@ -32,63 +27,14 @@ export const compareTablets = (tablet1, tablet2) => {
|
|
32
27
|
}
|
33
28
|
return 0;
|
34
29
|
};
|
35
|
-
const getGroupsStatsFields = (groupsStats) => {
|
36
|
-
return Object.keys(groupsStats).map((diskType) => {
|
37
|
-
return {
|
38
|
-
label: i18n('storage-groups', { diskType }),
|
39
|
-
value: _jsx(DiskGroupsStatsBars, { stats: groupsStats[diskType] }),
|
40
|
-
};
|
41
|
-
});
|
42
|
-
};
|
43
30
|
const getDCInfo = (cluster) => {
|
44
|
-
var _a;
|
45
31
|
if (isClusterInfoV2(cluster) && cluster.MapDataCenters) {
|
46
|
-
return Object.entries(cluster.MapDataCenters).map(([dc, count]) => (_jsxs(React.Fragment, { children: [dc, ": ",
|
32
|
+
return Object.entries(cluster.MapDataCenters).map(([dc, count]) => (_jsxs(React.Fragment, { children: [dc, ": ", formatNumber(count)] }, dc)));
|
47
33
|
}
|
48
|
-
return
|
34
|
+
return undefined;
|
49
35
|
};
|
50
|
-
const
|
51
|
-
if (isClusterInfoV2(cluster) && cluster.MapDataCenters) {
|
52
|
-
const { MapStorageTotal, MapStorageUsed } = cluster;
|
53
|
-
const storageTypesSet = new Set(Object.keys(MapStorageTotal !== null && MapStorageTotal !== void 0 ? MapStorageTotal : []).concat(Object.keys(MapStorageUsed !== null && MapStorageUsed !== void 0 ? MapStorageUsed : [])));
|
54
|
-
if (storageTypesSet.size > 0) {
|
55
|
-
return Array.from(storageTypesSet).reduce((acc, storageType) => {
|
56
|
-
acc[storageType] = {
|
57
|
-
used: MapStorageUsed === null || MapStorageUsed === void 0 ? void 0 : MapStorageUsed[storageType],
|
58
|
-
total: MapStorageTotal === null || MapStorageTotal === void 0 ? void 0 : MapStorageTotal[storageType],
|
59
|
-
};
|
60
|
-
return acc;
|
61
|
-
}, {});
|
62
|
-
}
|
63
|
-
}
|
64
|
-
return { _default: { used: cluster === null || cluster === void 0 ? void 0 : cluster.StorageUsed, total: cluster === null || cluster === void 0 ? void 0 : cluster.StorageTotal } };
|
65
|
-
};
|
66
|
-
export const getInfo = (cluster, versionsValues, groupsStats, additionalInfo, links) => {
|
36
|
+
export const getInfo = (cluster, additionalInfo, links) => {
|
67
37
|
const info = [];
|
68
|
-
const dataCenters = getDCInfo(cluster);
|
69
|
-
if (dataCenters === null || dataCenters === void 0 ? void 0 : dataCenters.length) {
|
70
|
-
info.push({
|
71
|
-
label: i18n('dc'),
|
72
|
-
value: _jsx(Tags, { tags: dataCenters }),
|
73
|
-
});
|
74
|
-
}
|
75
|
-
if (cluster.SystemTablets) {
|
76
|
-
const tablets = cluster.SystemTablets.slice(0).sort(compareTablets);
|
77
|
-
info.push({
|
78
|
-
label: i18n('tablets'),
|
79
|
-
value: (_jsx("div", { className: b('system-tablets'), children: tablets.map((tablet, tabletIndex) => (_jsx(Tablet, { tablet: tablet }, tabletIndex))) })),
|
80
|
-
});
|
81
|
-
}
|
82
|
-
if (cluster.Tenants) {
|
83
|
-
info.push({
|
84
|
-
label: i18n('databases'),
|
85
|
-
value: cluster.Tenants,
|
86
|
-
});
|
87
|
-
}
|
88
|
-
info.push({
|
89
|
-
label: i18n('nodes'),
|
90
|
-
value: _jsx(ProgressViewer, { value: cluster === null || cluster === void 0 ? void 0 : cluster.NodesAlive, capacity: cluster === null || cluster === void 0 ? void 0 : cluster.NodesTotal }),
|
91
|
-
});
|
92
38
|
if (isClusterInfoV2(cluster) && cluster.MapNodeStates) {
|
93
39
|
const arrayNodesStates = Object.entries(cluster.MapNodeStates);
|
94
40
|
// sort stack to achieve order "green, orange, yellow, red, blue, grey"
|
@@ -97,61 +43,28 @@ export const getInfo = (cluster, versionsValues, groupsStats, additionalInfo, li
|
|
97
43
|
return (_jsx(NodesState, { state: state, children: count }, state));
|
98
44
|
});
|
99
45
|
info.push({
|
100
|
-
label: i18n('
|
101
|
-
value: _jsx(
|
46
|
+
label: i18n('label_nodes-state'),
|
47
|
+
value: _jsx(Flex, { gap: 2, children: nodesStates }),
|
48
|
+
});
|
49
|
+
}
|
50
|
+
const dataCenters = getDCInfo(cluster);
|
51
|
+
if (dataCenters === null || dataCenters === void 0 ? void 0 : dataCenters.length) {
|
52
|
+
info.push({
|
53
|
+
label: i18n('label_dc'),
|
54
|
+
value: _jsx(Tags, { tags: dataCenters, gap: 2 }),
|
102
55
|
});
|
103
56
|
}
|
104
57
|
info.push({
|
105
|
-
label: i18n('
|
58
|
+
label: i18n('label_load'),
|
106
59
|
value: _jsx(ProgressViewer, { value: cluster === null || cluster === void 0 ? void 0 : cluster.LoadAverage, capacity: cluster === null || cluster === void 0 ? void 0 : cluster.NumberOfCpus }),
|
107
60
|
});
|
108
|
-
|
109
|
-
|
110
|
-
let label = i18n('storage-size');
|
111
|
-
if (type !== '_default') {
|
112
|
-
label += `, ${type}`;
|
113
|
-
}
|
61
|
+
info.push(...additionalInfo);
|
62
|
+
if (links.length) {
|
114
63
|
info.push({
|
115
|
-
label:
|
116
|
-
value: (_jsx(
|
64
|
+
label: i18n('links'),
|
65
|
+
value: (_jsx("div", { className: b('links'), children: links.map(({ title, url }) => (_jsx(LinkWithIcon, { title: title, url: url }, title))) })),
|
117
66
|
});
|
118
|
-
});
|
119
|
-
if (Object.keys(groupsStats).length) {
|
120
|
-
info.push(...getGroupsStatsFields(groupsStats));
|
121
67
|
}
|
122
|
-
info.push(...additionalInfo, {
|
123
|
-
label: i18n('links'),
|
124
|
-
value: (_jsx("div", { className: b('links'), children: links.map(({ title, url }) => (_jsx(LinkWithIcon, { title: title, url: url }, title))) })),
|
125
|
-
}, {
|
126
|
-
label: i18n('versions'),
|
127
|
-
value: (_jsx(VersionsBar, { versionsValues: versionsValues.filter((el) => el.title !== 'unknown') })),
|
128
|
-
});
|
129
68
|
return info;
|
130
69
|
};
|
131
|
-
export const useGetVersionValues = (cluster, versionToColor) => {
|
132
|
-
const { currentData } = nodesApi.useGetNodesQuery(isClusterInfoV2(cluster)
|
133
|
-
? skipToken
|
134
|
-
: {
|
135
|
-
tablets: false,
|
136
|
-
fieldsRequired: ['SystemState'],
|
137
|
-
group: 'Version',
|
138
|
-
});
|
139
|
-
const versionsValues = React.useMemo(() => {
|
140
|
-
if (isClusterInfoV2(cluster) && cluster.MapVersions) {
|
141
|
-
const groups = Object.entries(cluster.MapVersions).map(([version, count]) => ({
|
142
|
-
name: version,
|
143
|
-
count,
|
144
|
-
}));
|
145
|
-
return parseNodeGroupsToVersionsValues(groups, versionToColor, cluster.NodesTotal);
|
146
|
-
}
|
147
|
-
if (!currentData) {
|
148
|
-
return [];
|
149
|
-
}
|
150
|
-
if (Array.isArray(currentData.NodeGroups)) {
|
151
|
-
return parseNodeGroupsToVersionsValues(currentData.NodeGroups, versionToColor, cluster === null || cluster === void 0 ? void 0 : cluster.NodesTotal);
|
152
|
-
}
|
153
|
-
return parseNodesToVersionsValues(currentData.Nodes, versionToColor);
|
154
|
-
}, [currentData, versionToColor, cluster]);
|
155
|
-
return versionsValues;
|
156
|
-
};
|
157
70
|
//# sourceMappingURL=utils.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/containers/Cluster/ClusterInfo/utils.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/containers/Cluster/ClusterInfo/utils.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAGvC,OAAO,EAAC,YAAY,EAAC,MAAM,+CAA+C,CAAC;AAC3E,OAAO,EAAC,cAAc,EAAC,MAAM,mDAAmD,CAAC;AACjF,OAAO,EAAC,IAAI,EAAC,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAC,eAAe,EAAC,MAAM,4BAA4B,CAAC;AAI3D,OAAO,EAAC,KAAK,EAAC,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAC,YAAY,EAAC,MAAM,8CAA8C,CAAC;AAC1E,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,EAAC,UAAU,EAAC,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAC,CAAC,EAAC,MAAM,UAAU,CAAC;AAC3B,MAAM,eAAe,GAA0B;IAC3C,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;CACV,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAyB,EAAE,OAAyB,EAAE,EAAE;IACnF,IAAI,OAAO,CAAC,IAAI,KAAK,KAAK,CAAC,WAAW,EAAE,CAAC;QACrC,OAAO,CAAC,CAAC;IACb,CAAC;IAED,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CAAC"}
|
@@ -4,19 +4,18 @@
|
|
4
4
|
"allocated": "Allocated",
|
5
5
|
"available": "Available",
|
6
6
|
"usage": "Usage",
|
7
|
-
"
|
8
|
-
"
|
9
|
-
"databases": "Databases",
|
10
|
-
"nodes": "Nodes",
|
11
|
-
"nodes-state": "Nodes state",
|
12
|
-
"load": "Load",
|
7
|
+
"label_nodes-state": "Nodes state",
|
8
|
+
"label_dc": "Nodes data centers",
|
13
9
|
"storage-size": "Storage size",
|
14
10
|
"storage-groups": "Storage groups, {{diskType}}",
|
15
11
|
"links": "Links",
|
16
|
-
"
|
17
|
-
"
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
12
|
+
"context_cores": "cores",
|
13
|
+
"title_cpu": "CPU",
|
14
|
+
"title_storage": "Storage",
|
15
|
+
"title_memory": "Memory",
|
16
|
+
"label_nodes": "Nodes",
|
17
|
+
"label_hosts": "Hosts",
|
18
|
+
"label_storage-groups": "Storage groups",
|
19
|
+
"label_databases": "Databases",
|
20
|
+
"label_load": "Load"
|
22
21
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: (key: "
|
1
|
+
declare const _default: (key: "links" | "erasure" | "usage" | "storage-groups" | "title_storage" | "disk-type" | "allocated" | "available" | "label_nodes-state" | "label_dc" | "storage-size" | "context_cores" | "title_cpu" | "title_memory" | "label_nodes" | "label_hosts" | "label_storage-groups" | "label_databases" | "label_load", params?: import("@gravity-ui/i18n").Params) => string;
|
2
2
|
export default _default;
|
@@ -1,3 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { GetNodesColumnsParams } from '../../../components/nodesColumns/types';
|
2
2
|
import type { NodesPreparedEntity } from '../../../store/reducers/nodes/types';
|
3
|
+
import type { Column } from '../../../utils/tableUtils/types';
|
3
4
|
export declare function getNodesColumns(params: GetNodesColumnsParams): Column<NodesPreparedEntity>[];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"columns.js","sourceRoot":"","sources":["../../../../src/containers/Nodes/columns/columns.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,gBAAgB,GACnB,MAAM,0CAA0C,CAAC;AAGlD,OAAO,EAAC,uBAAuB,EAAC,MAAM,sBAAsB,CAAC;
|
1
|
+
{"version":3,"file":"columns.js","sourceRoot":"","sources":["../../../../src/containers/Nodes/columns/columns.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,gBAAgB,GACnB,MAAM,0CAA0C,CAAC;AAGlD,OAAO,EAAC,uBAAuB,EAAC,MAAM,sBAAsB,CAAC;AAG7D,MAAM,UAAU,eAAe,CAAC,MAA6B;IACzD,MAAM,OAAO,GAAG;QACZ,eAAe,EAAuB;QACtC,aAAa,CAAsB,MAAM,CAAC;QAC1C,iBAAiB,EAAuB;QACxC,mBAAmB,EAAuB;QAC1C,aAAa,EAAuB;QACpC,gBAAgB,EAAuB;QACvC,eAAe,EAAuB;QACtC,eAAe,EAAuB;QACtC,YAAY,EAAuB;QACnC,oBAAoB,EAAuB;QAC3C,gBAAgB,CAAsB,MAAM,CAAC;KAChD,CAAC;IAEF,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAC1B,OAAO,EAAC,GAAG,MAAM,EAAE,QAAQ,EAAE,uBAAuB,CAAC,MAAM,CAAC,IAAI,CAAC,EAAC,CAAC;IACvE,CAAC,CAAC,CAAC;AACP,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { GetNodesColumnsParams } from '../../../components/nodesColumns/types';
|
2
2
|
export declare function useNodesSelectedColumns(params: GetNodesColumnsParams): {
|
3
|
-
columnsToShow: import("../../../
|
3
|
+
columnsToShow: import("../../../utils/tableUtils/types").Column<import("../../../store/reducers/nodes/types").NodesPreparedEntity>[];
|
4
4
|
columnsToSelect: import("@gravity-ui/uikit").TableColumnSetupItem[];
|
5
5
|
setColumns: (updated: import("@gravity-ui/uikit").TableColumnSetupItem[]) => void;
|
6
6
|
};
|
@@ -1,16 +1,19 @@
|
|
1
|
+
import { NODES_COLUMNS_TO_DATA_FIELDS } from '../../components/nodesColumns/constants';
|
1
2
|
import { prepareNodesData } from '../../store/reducers/nodes/utils';
|
2
3
|
import { prepareSortValue } from '../../utils/filters';
|
3
4
|
import { getProblemParamValue, getUptimeParamValue, isSortableNodesProperty, } from '../../utils/nodes';
|
5
|
+
import { getRequiredDataFields } from '../../utils/tableUtils/getRequiredDataFields';
|
4
6
|
const getConcurrentId = (limit, offset) => {
|
5
7
|
return `getNodes|offset${offset}|limit${limit}`;
|
6
8
|
};
|
7
9
|
export const getNodes = async (params) => {
|
8
|
-
const { type = 'any', storage = false, tablets = true, limit, offset, sortParams, filters, } = params;
|
10
|
+
const { type = 'any', storage = false, tablets = true, limit, offset, sortParams, filters, columnsIds, } = params;
|
9
11
|
const { sortOrder, columnId } = sortParams !== null && sortParams !== void 0 ? sortParams : {};
|
10
12
|
const { path, database, searchValue, problemFilter, uptimeFilter } = filters !== null && filters !== void 0 ? filters : {};
|
11
13
|
const sort = isSortableNodesProperty(columnId)
|
12
14
|
? prepareSortValue(columnId, sortOrder)
|
13
15
|
: undefined;
|
16
|
+
const dataFieldsRequired = getRequiredDataFields(columnsIds, NODES_COLUMNS_TO_DATA_FIELDS);
|
14
17
|
const response = await window.api.getNodes({
|
15
18
|
type,
|
16
19
|
storage,
|
@@ -23,6 +26,7 @@ export const getNodes = async (params) => {
|
|
23
26
|
filter: searchValue,
|
24
27
|
problems_only: getProblemParamValue(problemFilter),
|
25
28
|
uptime: getUptimeParamValue(uptimeFilter),
|
29
|
+
fieldsRequired: dataFieldsRequired,
|
26
30
|
}, { concurrentId: getConcurrentId(limit, offset), signal: params.signal });
|
27
31
|
const preparedResponse = prepareNodesData(response);
|
28
32
|
return {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getNodes.js","sourceRoot":"","sources":["../../../src/containers/Nodes/getNodes.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"getNodes.js","sourceRoot":"","sources":["../../../src/containers/Nodes/getNodes.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,4BAA4B,EAAC,MAAM,yCAAyC,CAAC;AAErF,OAAO,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAC;AAElE,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AACrD,OAAO,EACH,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,GAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAC,qBAAqB,EAAC,MAAM,8CAA8C,CAAC;AAEnF,MAAM,eAAe,GAAG,CAAC,KAAc,EAAE,MAAe,EAAE,EAAE;IACxD,OAAO,kBAAkB,MAAM,SAAS,KAAK,EAAE,CAAC;AACpD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAIjB,KAAK,EAAE,MAAM,EAAE,EAAE;IACjB,MAAM,EACF,IAAI,GAAG,KAAK,EACZ,OAAO,GAAG,KAAK,EACf,OAAO,GAAG,IAAI,EACd,KAAK,EACL,MAAM,EACN,UAAU,EACV,OAAO,EACP,UAAU,GACb,GAAG,MAAM,CAAC;IAEX,MAAM,EAAC,SAAS,EAAE,QAAQ,EAAC,GAAG,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,EAAE,CAAC;IAC/C,MAAM,EAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAC,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC;IAEjF,MAAM,IAAI,GAAG,uBAAuB,CAAC,QAAQ,CAAC;QAC1C,CAAC,CAAC,gBAAgB,CAAC,QAAQ,EAAE,SAAS,CAAC;QACvC,CAAC,CAAC,SAAS,CAAC;IAEhB,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,UAAU,EAAE,4BAA4B,CAAC,CAAC;IAE3F,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,QAAQ,CACtC;QACI,IAAI;QACJ,OAAO;QACP,OAAO;QACP,KAAK;QACL,MAAM;QACN,IAAI;QACJ,IAAI;QACJ,QAAQ;QACR,MAAM,EAAE,WAAW;QACnB,aAAa,EAAE,oBAAoB,CAAC,aAAa,CAAC;QAClD,MAAM,EAAE,mBAAmB,CAAC,YAAY,CAAC;QACzC,cAAc,EAAE,kBAAkB;KACrC,EACD,EAAC,YAAY,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAC,CACxE,CAAC;IACF,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAEpD,OAAO;QACH,IAAI,EAAE,gBAAgB,CAAC,KAAK,IAAI,EAAE;QAClC,KAAK,EAAE,gBAAgB,CAAC,UAAU,IAAI,CAAC;QACvC,KAAK,EAAE,gBAAgB,CAAC,UAAU,IAAI,CAAC;KAC1C,CAAC;AACN,CAAC,CAAC"}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import React from 'react';
|
3
|
+
import { AccessDenied } from '../../components/Errors/403';
|
4
|
+
import { isAccessError } from '../../components/Errors/PageError/PageError';
|
5
|
+
import { ResponseError } from '../../components/Errors/ResponseError';
|
6
|
+
import { ResizeableDataTable } from '../../components/ResizeableDataTable/ResizeableDataTable';
|
7
|
+
import { TableWithControlsLayout } from '../../components/TableWithControlsLayout/TableWithControlsLayout';
|
8
|
+
import { operationListApi } from '../../store/reducers/operationList';
|
9
|
+
import { useAutoRefreshInterval } from '../../utils/hooks';
|
10
|
+
import { OperationsControls } from './OperationsControls';
|
11
|
+
import { getColumns } from './columns';
|
12
|
+
import i18n from './i18n';
|
13
|
+
import { b } from './shared';
|
14
|
+
import { useOperationsQueryParams } from './useOperationsQueryParams';
|
15
|
+
export function Operations({ database }) {
|
16
|
+
var _a;
|
17
|
+
const [autoRefreshInterval] = useAutoRefreshInterval();
|
18
|
+
const { kind, searchValue, pageSize, pageToken, handleKindChange, handleSearchChange } = useOperationsQueryParams();
|
19
|
+
const { data, isFetching, error } = operationListApi.useGetOperationListQuery({ database, kind, page_size: pageSize, page_token: pageToken }, {
|
20
|
+
pollingInterval: autoRefreshInterval,
|
21
|
+
});
|
22
|
+
const filteredOperations = React.useMemo(() => {
|
23
|
+
if (!(data === null || data === void 0 ? void 0 : data.operations)) {
|
24
|
+
return [];
|
25
|
+
}
|
26
|
+
return data.operations.filter((op) => { var _a; return (_a = op.id) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(searchValue.toLowerCase()); });
|
27
|
+
}, [data === null || data === void 0 ? void 0 : data.operations, searchValue]);
|
28
|
+
if (isAccessError(error)) {
|
29
|
+
return _jsx(AccessDenied, { position: "left" });
|
30
|
+
}
|
31
|
+
return (_jsxs(TableWithControlsLayout, { children: [_jsx(TableWithControlsLayout.Controls, { children: _jsx(OperationsControls, { kind: kind, searchValue: searchValue, entitiesCountCurrent: filteredOperations.length, entitiesCountTotal: (_a = data === null || data === void 0 ? void 0 : data.operations) === null || _a === void 0 ? void 0 : _a.length, entitiesLoading: isFetching, handleKindChange: handleKindChange, handleSearchChange: handleSearchChange }) }), error ? _jsx(ResponseError, { error: error }) : null, _jsx(TableWithControlsLayout.Table, { loading: isFetching, className: b('table'), children: data ? (_jsx(ResizeableDataTable, { columns: getColumns(), data: filteredOperations, emptyDataMessage: i18n('title_empty') })) : null })] }));
|
32
|
+
}
|
33
|
+
//# sourceMappingURL=Operations.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Operations.js","sourceRoot":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ACL,CAAC,CAAC,CAAC,IAAI,GACoB,IACV,CAC7B,CAAC;AACN,CAAC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { OperationKind } from '../../types/api/operationList';
|
2
|
+
interface OperationsControlsProps {
|
3
|
+
kind: OperationKind;
|
4
|
+
searchValue: string;
|
5
|
+
entitiesCountCurrent: number;
|
6
|
+
entitiesCountTotal?: number;
|
7
|
+
entitiesLoading: boolean;
|
8
|
+
handleKindChange: (kind: OperationKind) => void;
|
9
|
+
handleSearchChange: (value: string) => void;
|
10
|
+
}
|
11
|
+
export declare function OperationsControls({ kind, searchValue, entitiesCountCurrent, entitiesCountTotal, entitiesLoading, handleKindChange, handleSearchChange, }: OperationsControlsProps): import("react/jsx-runtime").JSX.Element;
|
12
|
+
export {};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import React from 'react';
|
3
|
+
import { Select } from '@gravity-ui/uikit';
|
4
|
+
import { EntitiesCount } from '../../components/EntitiesCount';
|
5
|
+
import { Search } from '../../components/Search';
|
6
|
+
import { OPERATION_KINDS } from './constants';
|
7
|
+
import i18n from './i18n';
|
8
|
+
import { b } from './shared';
|
9
|
+
export function OperationsControls({ kind, searchValue, entitiesCountCurrent, entitiesCountTotal, entitiesLoading, handleKindChange, handleSearchChange, }) {
|
10
|
+
return (_jsxs(React.Fragment, { children: [_jsx(Search, { value: searchValue, onChange: handleSearchChange, placeholder: i18n('pleaceholder_search'), className: b('search') }), _jsx(Select, { value: [kind], options: OPERATION_KINDS, onUpdate: (value) => handleKindChange(value[0]) }), _jsx(EntitiesCount, { label: i18n('label_operations'), loading: entitiesLoading, total: entitiesCountTotal, current: entitiesCountCurrent })] }));
|
11
|
+
}
|
12
|
+
//# sourceMappingURL=OperationsControls.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"OperationsControls.js","sourceRoot":"","sources":["../../../src/containers/Operations/OperationsControls.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAC,aAAa,EAAC,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAC;AAG/C,OAAO,EAAC,eAAe,EAAC,MAAM,aAAa,CAAC;AAC5C,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAC,CAAC,EAAC,MAAM,UAAU,CAAC;AAY3B,MAAM,UAAU,kBAAkB,CAAC,EAC/B,IAAI,EACJ,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,GACI;IACtB,OAAO,CACH,MAAC,KAAK,CAAC,QAAQ,eACX,KAAC,MAAM,IACH,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,kBAAkB,EAC5B,WAAW,EAAE,IAAI,CAAC,qBAAqB,CAAC,EACxC,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,GACxB,EACF,KAAC,MAAM,IACH,KAAK,EAAE,CAAC,IAAI,CAAC,EACb,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAkB,CAAC,GAClE,EACF,KAAC,aAAa,IACV,KAAK,EAAE,IAAI,CAAC,kBAAkB,CAAC,EAC/B,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,kBAAkB,EACzB,OAAO,EAAE,oBAAoB,GAC/B,IACW,CACpB,CAAC;AACN,CAAC"}
|
@@ -0,0 +1,103 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { duration } from '@gravity-ui/date-utils';
|
3
|
+
import { Text } from '@gravity-ui/uikit';
|
4
|
+
import { CellWithPopover } from '../../components/CellWithPopover/CellWithPopover';
|
5
|
+
import { EStatusCode } from '../../types/api/operationList';
|
6
|
+
import { EMPTY_DATA_PLACEHOLDER, HOUR_IN_SECONDS, SECOND_IN_MS } from '../../utils/constants';
|
7
|
+
import { formatDateTime } from '../../utils/dataFormatters/dataFormatters';
|
8
|
+
import { parseProtobufTimestampToMs } from '../../utils/timeParsers';
|
9
|
+
import { COLUMNS_NAMES, COLUMNS_TITLES } from './constants';
|
10
|
+
import i18n from './i18n';
|
11
|
+
export function getColumns() {
|
12
|
+
return [
|
13
|
+
{
|
14
|
+
name: COLUMNS_NAMES.ID,
|
15
|
+
header: COLUMNS_TITLES[COLUMNS_NAMES.ID],
|
16
|
+
width: 340,
|
17
|
+
render: ({ row }) => {
|
18
|
+
if (!row.id) {
|
19
|
+
return EMPTY_DATA_PLACEHOLDER;
|
20
|
+
}
|
21
|
+
return (_jsx(CellWithPopover, { placement: ['top', 'bottom'], content: row.id, children: row.id }));
|
22
|
+
},
|
23
|
+
},
|
24
|
+
{
|
25
|
+
name: COLUMNS_NAMES.STATUS,
|
26
|
+
header: COLUMNS_TITLES[COLUMNS_NAMES.STATUS],
|
27
|
+
render: ({ row }) => {
|
28
|
+
if (!row.status) {
|
29
|
+
return EMPTY_DATA_PLACEHOLDER;
|
30
|
+
}
|
31
|
+
return (_jsx(Text, { color: row.status === EStatusCode.SUCCESS ? 'positive' : 'danger', children: row.status }));
|
32
|
+
},
|
33
|
+
},
|
34
|
+
{
|
35
|
+
name: COLUMNS_NAMES.CREATED_BY,
|
36
|
+
header: COLUMNS_TITLES[COLUMNS_NAMES.CREATED_BY],
|
37
|
+
render: ({ row }) => {
|
38
|
+
if (!row.created_by) {
|
39
|
+
return EMPTY_DATA_PLACEHOLDER;
|
40
|
+
}
|
41
|
+
return row.created_by;
|
42
|
+
},
|
43
|
+
},
|
44
|
+
{
|
45
|
+
name: COLUMNS_NAMES.CREATE_TIME,
|
46
|
+
header: COLUMNS_TITLES[COLUMNS_NAMES.CREATE_TIME],
|
47
|
+
render: ({ row }) => {
|
48
|
+
if (!row.create_time) {
|
49
|
+
return EMPTY_DATA_PLACEHOLDER;
|
50
|
+
}
|
51
|
+
return formatDateTime(parseProtobufTimestampToMs(row.create_time));
|
52
|
+
},
|
53
|
+
sortAccessor: (row) => row.create_time ? parseProtobufTimestampToMs(row.create_time) : 0,
|
54
|
+
},
|
55
|
+
{
|
56
|
+
name: COLUMNS_NAMES.END_TIME,
|
57
|
+
header: COLUMNS_TITLES[COLUMNS_NAMES.END_TIME],
|
58
|
+
render: ({ row }) => {
|
59
|
+
if (!row.end_time) {
|
60
|
+
return EMPTY_DATA_PLACEHOLDER;
|
61
|
+
}
|
62
|
+
return formatDateTime(parseProtobufTimestampToMs(row.end_time));
|
63
|
+
},
|
64
|
+
sortAccessor: (row) => row.end_time ? parseProtobufTimestampToMs(row.end_time) : Number.MAX_SAFE_INTEGER,
|
65
|
+
},
|
66
|
+
{
|
67
|
+
name: COLUMNS_NAMES.DURATION,
|
68
|
+
header: COLUMNS_TITLES[COLUMNS_NAMES.DURATION],
|
69
|
+
render: ({ row }) => {
|
70
|
+
let durationValue = 0;
|
71
|
+
if (!row.create_time) {
|
72
|
+
return EMPTY_DATA_PLACEHOLDER;
|
73
|
+
}
|
74
|
+
const createTime = parseProtobufTimestampToMs(row.create_time);
|
75
|
+
if (row.end_time) {
|
76
|
+
const endTime = parseProtobufTimestampToMs(row.end_time);
|
77
|
+
durationValue = endTime - createTime;
|
78
|
+
}
|
79
|
+
else {
|
80
|
+
durationValue = Date.now() - createTime;
|
81
|
+
}
|
82
|
+
const durationFormatted = durationValue > HOUR_IN_SECONDS * SECOND_IN_MS
|
83
|
+
? duration(durationValue).format('hh:mm:ss')
|
84
|
+
: duration(durationValue).format('mm:ss');
|
85
|
+
return row.end_time
|
86
|
+
? durationFormatted
|
87
|
+
: i18n('label_duration-ongoing', { value: durationFormatted });
|
88
|
+
},
|
89
|
+
sortAccessor: (row) => {
|
90
|
+
if (!row.create_time) {
|
91
|
+
return 0;
|
92
|
+
}
|
93
|
+
const createTime = parseProtobufTimestampToMs(row.create_time);
|
94
|
+
if (row.end_time) {
|
95
|
+
const endTime = parseProtobufTimestampToMs(row.end_time);
|
96
|
+
return endTime - createTime;
|
97
|
+
}
|
98
|
+
return Date.now() - createTime;
|
99
|
+
},
|
100
|
+
},
|
101
|
+
];
|
102
|
+
}
|
103
|
+
//# sourceMappingURL=columns.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"columns.js","sourceRoot":"","sources":["../../../src/containers/Operations/columns.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAC,eAAe,EAAC,MAAM,kDAAkD,CAAC;AAEjF,OAAO,EAAC,WAAW,EAAC,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAC,sBAAsB,EAAE,eAAe,EAAE,YAAY,EAAC,MAAM,uBAAuB,CAAC;AAC5F,OAAO,EAAC,cAAc,EAAC,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAC,0BAA0B,EAAC,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAC,aAAa,EAAE,cAAc,EAAC,MAAM,aAAa,CAAC;AAC1D,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,MAAM,UAAU,UAAU;IACtB,OAAO;QACH;YACI,IAAI,EAAE,aAAa,CAAC,EAAE;YACtB,MAAM,EAAE,cAAc,CAAC,aAAa,CAAC,EAAE,CAAC;YACxC,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,CAAC,EAAC,GAAG,EAAC,EAAE,EAAE;gBACd,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;oBACV,OAAO,sBAAsB,CAAC;gBAClC,CAAC;gBACD,OAAO,CACH,KAAC,eAAe,IAAC,SAAS,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE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a,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC;oBAC5C,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAElD,OAAO,GAAG,CAAC,QAAQ;oBACf,CAAC,CAAC,iBAAiB;oBACnB,CAAC,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAC,KAAK,EAAE,iBAAiB,EAAC,CAAC,CAAC;YACrE,CAAC;YACD,YAAY,EAAE,CAAC,GAAG,EAAE,EAAE;gBAClB,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;oBACnB,OAAO,CAAC,CAAC;gBACb,CAAC;gBACD,MAAM,UAAU,GAAG,0BAA0B,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;gBAC/D,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;oBACf,MAAM,OAAO,GAAG,0BAA0B,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;oBACzD,OAAO,OAAO,GAAG,UAAU,CAAC;gBAChC,CAAC;gBACD,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,UAAU,CAAC;YACnC,CAAC;SACJ;KACJ,CAAC;AACN,CAAC"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import type { OperationKind } from '../../types/api/operationList';
|
2
|
+
export declare const OPERATIONS_SELECTED_COLUMNS_KEY = "selectedOperationColumns";
|
3
|
+
export declare const COLUMNS_NAMES: {
|
4
|
+
readonly ID: "id";
|
5
|
+
readonly STATUS: "status";
|
6
|
+
readonly CREATED_BY: "created_by";
|
7
|
+
readonly CREATE_TIME: "create_time";
|
8
|
+
readonly END_TIME: "end_time";
|
9
|
+
readonly DURATION: "duration";
|
10
|
+
};
|
11
|
+
export declare const COLUMNS_TITLES: {
|
12
|
+
readonly id: string;
|
13
|
+
readonly status: string;
|
14
|
+
readonly created_by: string;
|
15
|
+
readonly create_time: string;
|
16
|
+
readonly end_time: string;
|
17
|
+
readonly duration: string;
|
18
|
+
};
|
19
|
+
export declare const BASE_COLUMNS: ("status" | "id" | "created_by" | "create_time" | "end_time" | "duration")[];
|
20
|
+
export declare const OPERATION_KINDS: {
|
21
|
+
value: OperationKind;
|
22
|
+
content: string;
|
23
|
+
}[];
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import i18n from './i18n';
|
2
|
+
export const OPERATIONS_SELECTED_COLUMNS_KEY = 'selectedOperationColumns';
|
3
|
+
export const COLUMNS_NAMES = {
|
4
|
+
ID: 'id',
|
5
|
+
STATUS: 'status',
|
6
|
+
CREATED_BY: 'created_by',
|
7
|
+
CREATE_TIME: 'create_time',
|
8
|
+
END_TIME: 'end_time',
|
9
|
+
DURATION: 'duration',
|
10
|
+
};
|
11
|
+
export const COLUMNS_TITLES = {
|
12
|
+
[COLUMNS_NAMES.ID]: i18n('column_operationId'),
|
13
|
+
[COLUMNS_NAMES.STATUS]: i18n('column_status'),
|
14
|
+
[COLUMNS_NAMES.CREATED_BY]: i18n('column_createdBy'),
|
15
|
+
[COLUMNS_NAMES.CREATE_TIME]: i18n('column_createTime'),
|
16
|
+
[COLUMNS_NAMES.END_TIME]: i18n('column_endTime'),
|
17
|
+
[COLUMNS_NAMES.DURATION]: i18n('column_duration'),
|
18
|
+
};
|
19
|
+
export const BASE_COLUMNS = [
|
20
|
+
COLUMNS_NAMES.ID,
|
21
|
+
COLUMNS_NAMES.STATUS,
|
22
|
+
COLUMNS_NAMES.CREATED_BY,
|
23
|
+
COLUMNS_NAMES.CREATE_TIME,
|
24
|
+
COLUMNS_NAMES.END_TIME,
|
25
|
+
COLUMNS_NAMES.DURATION,
|
26
|
+
];
|
27
|
+
export const OPERATION_KINDS = [
|
28
|
+
{ value: 'export', content: i18n('kind_export') },
|
29
|
+
{ value: 'ss/backgrounds', content: i18n('kind_ssBackgrounds') },
|
30
|
+
{ value: 'buildindex', content: i18n('kind_buildIndex') },
|
31
|
+
];
|
32
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+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