ydb-embedded-ui 1.0.4 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +38 -0
- package/dist/assets/icons/question.svg +1 -0
- package/dist/components/AsideNavigation/AsideHeader.tsx +2 -1
- package/dist/components/ClusterInfo/ClusterInfo.tsx +8 -4
- package/dist/components/FullNodeViewer/FullNodeViewer.scss +4 -9
- package/dist/components/InfoViewer/InfoViewer.scss +3 -2
- package/dist/components/InternalLink/InternalLink.js +8 -0
- package/dist/components/Loader/Loader.scss +5 -0
- package/dist/components/Loader/Loader.tsx +16 -0
- package/dist/components/PDiskViewer/PDiskViewer.js +3 -4
- package/dist/containers/App/App.scss +4 -0
- package/dist/containers/App/Content.js +0 -2
- package/dist/containers/AppIcons/AppIcons.js +4 -0
- package/dist/containers/Authentication/Authentication.tsx +2 -2
- package/dist/containers/Cluster/Cluster.tsx +1 -1
- package/dist/containers/Header/Header.tsx +6 -1
- package/dist/containers/Heatmap/Heatmap.js +0 -1
- package/dist/containers/Node/Node.scss +12 -1
- package/dist/containers/Node/Node.tsx +174 -0
- package/dist/containers/Node/NodeOverview/NodeOverview.scss +0 -0
- package/dist/containers/Node/NodeOverview/NodeOverview.tsx +23 -0
- package/dist/containers/Node/NodePages.js +16 -0
- package/dist/containers/Node/NodeStructure/NodeStructure.scss +151 -0
- package/dist/containers/Node/NodeStructure/NodeStructure.tsx +155 -0
- package/dist/containers/Node/NodeStructure/Pdisk.tsx +299 -0
- package/dist/containers/Node/NodeStructure/Vdisk.tsx +153 -0
- package/dist/containers/Pdisk/Pdisk.js +2 -5
- package/dist/containers/Storage/DiskStateProgressBar/DiskStateProgressBar.scss +10 -3
- package/dist/containers/Storage/DiskStateProgressBar/DiskStateProgressBar.tsx +20 -15
- package/dist/containers/Storage/Pdisk/Pdisk.scss +1 -0
- package/dist/containers/Storage/Pdisk/Pdisk.tsx +7 -5
- package/dist/containers/Storage/Storage.js +12 -9
- package/dist/containers/Storage/StorageGroups/StorageGroups.scss +2 -1
- package/dist/containers/Storage/StorageGroups/StorageGroups.tsx +2 -2
- package/dist/containers/Storage/StorageNodes/StorageNodes.scss +3 -2
- package/dist/containers/Storage/StorageNodes/StorageNodes.tsx +2 -2
- package/dist/containers/Storage/Vdisk/Vdisk.js +7 -6
- package/dist/containers/Storage/Vdisk/Vdisk.scss +1 -0
- package/dist/containers/Tablet/Tablet.js +2 -7
- package/dist/containers/Tablets/Tablets.js +4 -12
- package/dist/containers/Tenant/Acl/Acl.js +0 -3
- package/dist/containers/Tenant/Diagnostics/Compute/Compute.js +1 -3
- package/dist/containers/Tenant/Diagnostics/Network/Network.js +3 -6
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.tsx +2 -2
- package/dist/containers/Tenant/QueryEditor/QueryEditor.js +24 -24
- package/dist/containers/Tenant/QueryEditor/QueryEditor.scss +4 -0
- package/dist/containers/Tenant/QueryEditor/QueryExplain/QueryExplain.js +4 -1
- package/dist/containers/Tenant/QueryEditor/QueryResult/QueryResult.scss +1 -0
- package/dist/containers/Vdisk/Vdisk.js +2 -4
- package/dist/containers/VdiskPdiskNode/VdiskPdiskNode.js +4 -6
- package/dist/services/api.js +0 -1
- package/dist/store/reducers/executeQuery.js +1 -1
- package/dist/store/reducers/header.ts +1 -1
- package/dist/store/reducers/node.js +98 -3
- package/dist/store/reducers/nodes.js +0 -3
- package/dist/store/reducers/storage.js +8 -2
- package/dist/store/reducers/tablets.js +0 -3
- package/dist/utils/constants.js +0 -6
- package/dist/utils/getNodesColumns.js +2 -9
- package/dist/utils/utils.js +10 -1
- package/package.json +43 -29
- package/dist/containers/Node/Node.js +0 -184
@@ -5,8 +5,7 @@ import cn from 'bem-cn-lite';
|
|
5
5
|
import _ from 'lodash';
|
6
6
|
import MonacoEditor from 'react-monaco-editor';
|
7
7
|
import DataTable from '@yandex-cloud/react-data-table';
|
8
|
-
import {Button} from '@yandex-cloud/uikit';
|
9
|
-
import {Select} from '@yandex-cloud/uikit/build/esm/components/unstable/Select';
|
8
|
+
import {Button, DropdownMenu} from '@yandex-cloud/uikit';
|
10
9
|
import SplitPane from '../../../components/SplitPane';
|
11
10
|
|
12
11
|
import SaveQuery from './SaveQuery/SaveQuery';
|
@@ -340,6 +339,7 @@ function QueryEditor(props) {
|
|
340
339
|
data={preparedData}
|
341
340
|
settings={TABLE_SETTINGS}
|
342
341
|
theme="yandex-cloud"
|
342
|
+
rowKey={(_, index) => index}
|
343
343
|
/>
|
344
344
|
) : (
|
345
345
|
<div>{result}</div>
|
@@ -552,10 +552,18 @@ function QueryEditor(props) {
|
|
552
552
|
};
|
553
553
|
|
554
554
|
const renderControls = () => {
|
555
|
-
const {executeQuery, explainQuery, savedQueries} = props;
|
555
|
+
const {executeQuery, explainQuery, savedQueries, selectRunAction} = props;
|
556
556
|
const {runAction} = executeQuery;
|
557
557
|
const runIsDisabled = !executeQuery.input || executeQuery.loading;
|
558
558
|
const runText = _.find(RUN_ACTIONS, {value: runAction}).content;
|
559
|
+
|
560
|
+
const menuItems = RUN_ACTIONS.map((action) => {
|
561
|
+
return {
|
562
|
+
text: action.content,
|
563
|
+
action: () => selectRunAction(action.value),
|
564
|
+
};
|
565
|
+
});
|
566
|
+
|
559
567
|
return (
|
560
568
|
<div className={b('controls')}>
|
561
569
|
<div className={b('control-run')}>
|
@@ -569,27 +577,19 @@ function QueryEditor(props) {
|
|
569
577
|
<Icon name="startPlay" viewBox="0 0 16 16" width={16} height={16} />
|
570
578
|
{runText}
|
571
579
|
</Button>
|
572
|
-
<
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
// >
|
586
|
-
// <Icon name="chevron-down" width={16} height={16} />
|
587
|
-
// </Button>
|
588
|
-
// </div>
|
589
|
-
// )}
|
590
|
-
onUpdate={(value) => {
|
591
|
-
props.selectRunAction(value[0]);
|
592
|
-
}}
|
580
|
+
<DropdownMenu
|
581
|
+
items={menuItems}
|
582
|
+
switcher={
|
583
|
+
<Button
|
584
|
+
view="action"
|
585
|
+
pin="brick-round"
|
586
|
+
disabled={runIsDisabled}
|
587
|
+
loading={executeQuery.loading}
|
588
|
+
className={b('select-query-action')}
|
589
|
+
>
|
590
|
+
<Icon name="chevron-down" width={16} height={16} />
|
591
|
+
</Button>
|
592
|
+
}
|
593
593
|
/>
|
594
594
|
</div>
|
595
595
|
<Button
|
@@ -72,6 +72,9 @@ function GraphRoot(props) {
|
|
72
72
|
paranoid = getCompactTopology('graphRoot', data, opts);
|
73
73
|
paranoid.renderCompactTopology();
|
74
74
|
}
|
75
|
+
return () => {
|
76
|
+
paranoid = undefined;
|
77
|
+
};
|
75
78
|
}, []);
|
76
79
|
|
77
80
|
useEffect(() => {
|
@@ -89,7 +92,7 @@ function GraphRoot(props) {
|
|
89
92
|
}, [props.opts.colors]);
|
90
93
|
|
91
94
|
useEffect(() => {
|
92
|
-
paranoid
|
95
|
+
paranoid?.updateData(props.data);
|
93
96
|
}, [props.data]);
|
94
97
|
|
95
98
|
return <div id="graphRoot" style={{height: '100vh'}} />;
|
@@ -13,6 +13,7 @@ import {getVdiskInfo, clearStore} from '../../store/reducers/vdisk';
|
|
13
13
|
import {VDISK_AUTO_RELOAD_INTERVAL} from '../../utils/constants';
|
14
14
|
import {formatBytes, calcUptime, stringifyVdiskId} from '../../utils';
|
15
15
|
import routes, {createHref} from '../../routes';
|
16
|
+
import {getDefaultNodePath} from '../Node/NodePages';
|
16
17
|
|
17
18
|
import './Vdisk.scss';
|
18
19
|
|
@@ -80,10 +81,7 @@ class Vdisk extends React.Component {
|
|
80
81
|
{
|
81
82
|
label: 'NodeId',
|
82
83
|
value: (
|
83
|
-
<Link
|
84
|
-
className={b('link')}
|
85
|
-
to={createHref(routes.node, {id: NodeId, activeTab: 'storage'})}
|
86
|
-
>
|
84
|
+
<Link className={b('link')} to={getDefaultNodePath(NodeId)}>
|
87
85
|
{NodeId}
|
88
86
|
</Link>
|
89
87
|
),
|
@@ -20,6 +20,7 @@ import {getNodeInfo} from '../../store/reducers/node';
|
|
20
20
|
import {calcUptime, stringifyVdiskId, formatStorageValuesToGb} from '../../utils';
|
21
21
|
import routes, {createHref} from '../../routes';
|
22
22
|
import {bytesToSpeed, bytesToGB} from '../../utils/utils';
|
23
|
+
import {getDefaultNodePath} from '../Node/NodePages';
|
23
24
|
|
24
25
|
import './VdiskPdiskNode.scss';
|
25
26
|
|
@@ -29,7 +30,7 @@ function valueIsDefined(value) {
|
|
29
30
|
return value !== null && value !== undefined;
|
30
31
|
}
|
31
32
|
|
32
|
-
function Vdisk({
|
33
|
+
export function Vdisk({
|
33
34
|
AllocatedSize,
|
34
35
|
DiskSpace,
|
35
36
|
FrontQueues,
|
@@ -83,7 +84,7 @@ function Vdisk({
|
|
83
84
|
value: <EntityStatus status={SatisfactionRank.LevelRank.Flag} />,
|
84
85
|
});
|
85
86
|
}
|
86
|
-
vdiskInfo.push({label: 'Replicated', value: Replicated ? '
|
87
|
+
vdiskInfo.push({label: 'Replicated', value: Replicated ? 'Yes' : 'No'});
|
87
88
|
vdiskInfo.push({label: 'Allocated Size', value: bytesToGB(AllocatedSize)});
|
88
89
|
vdiskInfo.push({label: 'Available Size', value: bytesToGB(AvailableSize)});
|
89
90
|
if (Number(AllocatedSize) >= 0 && Number(AvailableSize) >= 0) {
|
@@ -329,10 +330,7 @@ class VdiskPdiskNode extends React.Component {
|
|
329
330
|
{
|
330
331
|
label: 'Node Id',
|
331
332
|
value: (
|
332
|
-
<Link
|
333
|
-
className={b('link')}
|
334
|
-
to={createHref(routes.node, {id: NodeId, activeTab: 'storage'})}
|
335
|
-
>
|
333
|
+
<Link className={b('link')} to={getDefaultNodePath(NodeId)}>
|
336
334
|
{NodeId}
|
337
335
|
</Link>
|
338
336
|
),
|
package/dist/services/api.js
CHANGED
@@ -13,7 +13,7 @@ const GO_TO_NEXT_QUERY = 'query/GO_TO_NEXT_QUERY';
|
|
13
13
|
const SELECT_RUN_ACTION = 'query/SELECT_RUN_ACTION';
|
14
14
|
const MONACO_HOT_KEY = 'query/MONACO_HOT_KEY';
|
15
15
|
|
16
|
-
const queriesHistoryInitial = parseJson(getValueFromLS(QUERIES_HISTORY_KEY, []));
|
16
|
+
const queriesHistoryInitial = parseJson(getValueFromLS(QUERIES_HISTORY_KEY, '[]'));
|
17
17
|
|
18
18
|
const sliceLimit = queriesHistoryInitial.length - MAXIMUM_QUERIES_IN_HISTORY;
|
19
19
|
|
@@ -1,9 +1,23 @@
|
|
1
1
|
import {createRequestActionTypes, createApiRequest} from '../utils';
|
2
2
|
import '../../services/api';
|
3
|
+
import {stringifyVdiskId} from '../../utils';
|
4
|
+
import {createSelector} from 'reselect';
|
3
5
|
|
4
|
-
const FETCH_NODE = createRequestActionTypes('
|
6
|
+
const FETCH_NODE = createRequestActionTypes('node', 'FETCH_NODE');
|
7
|
+
const FETCH_NODE_STRUCTURE = createRequestActionTypes('node', 'FETCH_NODE_STRUCTURE');
|
8
|
+
const RESET_NODE = 'node/RESET_NODE';
|
5
9
|
|
6
|
-
const
|
10
|
+
const node = (
|
11
|
+
state = {
|
12
|
+
data: {},
|
13
|
+
loading: true,
|
14
|
+
wasLoaded: false,
|
15
|
+
nodeStructure: {},
|
16
|
+
loadingStructure: true,
|
17
|
+
wasLoadedStructure: false,
|
18
|
+
},
|
19
|
+
action,
|
20
|
+
) => {
|
7
21
|
switch (action.type) {
|
8
22
|
case FETCH_NODE.REQUEST: {
|
9
23
|
return {
|
@@ -27,6 +41,37 @@ const NODE = (state = {data: {}, loading: true, wasLoaded: false}, action) => {
|
|
27
41
|
loading: false,
|
28
42
|
};
|
29
43
|
}
|
44
|
+
case FETCH_NODE_STRUCTURE.REQUEST: {
|
45
|
+
return {
|
46
|
+
...state,
|
47
|
+
loadingStructure: true,
|
48
|
+
};
|
49
|
+
}
|
50
|
+
case FETCH_NODE_STRUCTURE.SUCCESS: {
|
51
|
+
return {
|
52
|
+
...state,
|
53
|
+
nodeStructure: action.data,
|
54
|
+
loadingStructure: false,
|
55
|
+
wasLoadedStructure: true,
|
56
|
+
errorStructure: undefined,
|
57
|
+
};
|
58
|
+
}
|
59
|
+
case FETCH_NODE_STRUCTURE.FAILURE: {
|
60
|
+
return {
|
61
|
+
...state,
|
62
|
+
errorStructure: action.error,
|
63
|
+
loadingStructure: false,
|
64
|
+
};
|
65
|
+
}
|
66
|
+
case RESET_NODE: {
|
67
|
+
return {
|
68
|
+
...state,
|
69
|
+
data: {},
|
70
|
+
wasLoaded: false,
|
71
|
+
nodeStructure: {},
|
72
|
+
wasLoadedStructure: false,
|
73
|
+
};
|
74
|
+
}
|
30
75
|
default:
|
31
76
|
return state;
|
32
77
|
}
|
@@ -39,4 +84,54 @@ export const getNodeInfo = (id) => {
|
|
39
84
|
});
|
40
85
|
};
|
41
86
|
|
42
|
-
export
|
87
|
+
export const getNodeStructure = (nodeId) => {
|
88
|
+
return createApiRequest({
|
89
|
+
request: window.api.getStorageInfo({nodeId}),
|
90
|
+
actions: FETCH_NODE_STRUCTURE,
|
91
|
+
});
|
92
|
+
};
|
93
|
+
|
94
|
+
export function resetNode() {
|
95
|
+
return {
|
96
|
+
type: RESET_NODE,
|
97
|
+
};
|
98
|
+
}
|
99
|
+
|
100
|
+
const getNodeId = (state) => state.node?.data?.SystemStateInfo?.[0].NodeId;
|
101
|
+
|
102
|
+
const getRawNodeStructure = (state) => state.node?.nodeStructure;
|
103
|
+
|
104
|
+
export const selectNodeStructure = createSelector(
|
105
|
+
[getNodeId, getRawNodeStructure],
|
106
|
+
(nodeId, rawNodeStructure) => {
|
107
|
+
const pools = rawNodeStructure?.StoragePools;
|
108
|
+
const structure = {};
|
109
|
+
pools?.forEach((pool) => {
|
110
|
+
const groups = pool.Groups;
|
111
|
+
groups?.forEach((group) => {
|
112
|
+
const vDisks = group.VDisks?.filter((el) => el.NodeId === nodeId);
|
113
|
+
vDisks?.forEach((vd) => {
|
114
|
+
const vDiskId = stringifyVdiskId(vd.VDiskId);
|
115
|
+
const pDiskId = vd.PDisk?.PDiskId;
|
116
|
+
if (!structure[String(pDiskId)]) {
|
117
|
+
structure[String(pDiskId)] = {vDisks: {}, ...vd.PDisk};
|
118
|
+
}
|
119
|
+
structure[String(pDiskId)].vDisks[vDiskId] = vd;
|
120
|
+
});
|
121
|
+
});
|
122
|
+
});
|
123
|
+
|
124
|
+
const structureWithVdisksArray = Object.keys(structure).reduce((acc, el) => {
|
125
|
+
const vDisks = structure[el].vDisks;
|
126
|
+
const vDisksArray = Object.keys(vDisks).reduce((acc, key, index) => {
|
127
|
+
acc.push({...vDisks[key], id: key, order: index});
|
128
|
+
return acc;
|
129
|
+
}, []);
|
130
|
+
acc[el] = {...structure[el], vDisks: vDisksArray};
|
131
|
+
return acc;
|
132
|
+
}, {});
|
133
|
+
return structureWithVdisksArray;
|
134
|
+
},
|
135
|
+
);
|
136
|
+
|
137
|
+
export default node;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import {createRequestActionTypes, createApiRequest} from '../utils';
|
2
2
|
import '../../services/api';
|
3
|
-
import {AUTO_RELOAD_INTERVAL} from '../../utils/constants';
|
4
3
|
|
5
4
|
const FETCH_NODES = createRequestActionTypes('nodes', 'FETCH_NODES');
|
6
5
|
|
@@ -14,13 +13,11 @@ const nodes = function z(state = {loading: true, wasLoaded: false}, action) {
|
|
14
13
|
};
|
15
14
|
}
|
16
15
|
case FETCH_NODES.SUCCESS: {
|
17
|
-
const timeout = new Date().getTime() - state.requestTime;
|
18
16
|
return {
|
19
17
|
...state,
|
20
18
|
data: action.data,
|
21
19
|
loading: false,
|
22
20
|
wasLoaded: true,
|
23
|
-
timeoutForRequest: timeout > AUTO_RELOAD_INTERVAL ? timeout : AUTO_RELOAD_INTERVAL,
|
24
21
|
error: undefined,
|
25
22
|
};
|
26
23
|
}
|
@@ -6,8 +6,14 @@ import {calcUptime} from '../../utils';
|
|
6
6
|
|
7
7
|
export const VisibleEntities = {
|
8
8
|
All: 'All',
|
9
|
-
Missing: '
|
10
|
-
Space: '
|
9
|
+
Missing: 'Missing',
|
10
|
+
Space: 'Space',
|
11
|
+
};
|
12
|
+
|
13
|
+
export const VisibleEntitiesTitles = {
|
14
|
+
[VisibleEntities.All]: 'All',
|
15
|
+
[VisibleEntities.Missing]: 'Degraded',
|
16
|
+
[VisibleEntities.Space]: 'Out of Space',
|
11
17
|
};
|
12
18
|
|
13
19
|
export const StorageTypes = {
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import {createRequestActionTypes, createApiRequest} from '../utils';
|
2
2
|
import '../../services/api';
|
3
|
-
import {AUTO_RELOAD_INTERVAL} from '../../utils/constants';
|
4
3
|
|
5
4
|
const FETCH_TABLETS = createRequestActionTypes('tablets', 'FETCH_TABLETS');
|
6
5
|
|
@@ -21,12 +20,10 @@ const tablets = function z(state = initialState, action) {
|
|
21
20
|
};
|
22
21
|
}
|
23
22
|
case FETCH_TABLETS.SUCCESS: {
|
24
|
-
const timeout = new Date().getTime() - state.requestTime;
|
25
23
|
return {
|
26
24
|
...state,
|
27
25
|
data: action.data,
|
28
26
|
loading: false,
|
29
|
-
timeoutForRequest: timeout > AUTO_RELOAD_INTERVAL ? timeout : AUTO_RELOAD_INTERVAL,
|
30
27
|
error: undefined,
|
31
28
|
wasLoaded: true,
|
32
29
|
};
|
package/dist/utils/constants.js
CHANGED
@@ -2,16 +2,10 @@ import DataTable from '@yandex-cloud/react-data-table';
|
|
2
2
|
|
3
3
|
const SECOND = 1000;
|
4
4
|
|
5
|
-
export const CLUSTER_AUTO_RELOAD_INTERVAL = 10 * SECOND;
|
6
|
-
export const TENANT_AUTO_RELOAD_INTERVAL = 10 * SECOND;
|
7
|
-
export const TENANTS_AUTO_RELOAD_INTERVAL = 10 * SECOND;
|
8
|
-
export const STORAGE_AUTO_RELOAD_INTERVAL = 10 * SECOND;
|
9
5
|
export const GROUP_AUTO_RELOAD_INTERVAL = 10 * SECOND;
|
10
|
-
export const NODE_AUTO_RELOAD_INTERVAL = 10 * SECOND;
|
11
6
|
export const PDISK_AUTO_RELOAD_INTERVAL = 10 * SECOND;
|
12
7
|
export const VDISK_AUTO_RELOAD_INTERVAL = 10 * SECOND;
|
13
8
|
export const AUTO_RELOAD_INTERVAL = 10 * SECOND;
|
14
|
-
export const HEALTHCHECK_RELOAD_INTERVAL = 10 * SECOND;
|
15
9
|
export const MEGABYTE = 1_000_000;
|
16
10
|
export const GIGABYTE = 1_000_000_000;
|
17
11
|
export const TERABYTE = 1_000_000_000_000;
|
@@ -1,18 +1,15 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import cn from 'bem-cn-lite';
|
3
|
-
import _ from 'lodash';
|
4
3
|
import DataTable from '@yandex-cloud/react-data-table';
|
5
4
|
import {Button, Tooltip} from '@yandex-cloud/uikit';
|
6
5
|
|
7
6
|
import Icon from '../components/Icon/Icon';
|
8
7
|
import EntityStatus from '../components/EntityStatus/EntityStatus';
|
9
|
-
import {STORAGE_ROLE} from '../containers/Node/Node';
|
10
8
|
import PoolsGraph from '../components/PoolsGraph/PoolsGraph';
|
11
9
|
import ProgressViewer from '../components/ProgressViewer/ProgressViewer';
|
12
10
|
import TabletsStatistic from '../components/TabletsStatistic/TabletsStatistic';
|
13
11
|
|
14
|
-
import
|
15
|
-
import {STORAGE, TABLETS} from '../containers/Node/NodePages';
|
12
|
+
import {getDefaultNodePath} from '../containers/Node/NodePages';
|
16
13
|
import {formatBytes} from './index';
|
17
14
|
|
18
15
|
const b = cn('kv-nodes');
|
@@ -28,7 +25,6 @@ export function getNodesColumns({showTooltip, hideTooltip, tabletsPath, getNodeR
|
|
28
25
|
{
|
29
26
|
name: 'Host',
|
30
27
|
render: ({row, value}) => {
|
31
|
-
const hasStorage = _.find(row?.Roles, (el) => el === STORAGE_ROLE);
|
32
28
|
const nodeRef = getNodeRef ? getNodeRef(row) : undefined;
|
33
29
|
|
34
30
|
if (typeof value === 'undefined') {
|
@@ -39,10 +35,7 @@ export function getNodesColumns({showTooltip, hideTooltip, tabletsPath, getNodeR
|
|
39
35
|
<EntityStatus
|
40
36
|
name={row.Host}
|
41
37
|
status={row.Overall}
|
42
|
-
path={
|
43
|
-
id: row.NodeId,
|
44
|
-
activeTab: hasStorage ? STORAGE : TABLETS,
|
45
|
-
})}
|
38
|
+
path={getDefaultNodePath(row.NodeId)}
|
46
39
|
hasClipboardButton
|
47
40
|
className={b('host-name')}
|
48
41
|
/>
|
package/dist/utils/utils.js
CHANGED
@@ -19,7 +19,7 @@ export function getValueFromLS(key, defaultValue) {
|
|
19
19
|
return;
|
20
20
|
}
|
21
21
|
|
22
|
-
const sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'];
|
22
|
+
const sizes = [' B', ' KB', ' MB', ' GB', ' TB', ' PB', ' EB'];
|
23
23
|
const base = 1000;
|
24
24
|
|
25
25
|
export function bytesToSize(bytes) {
|
@@ -73,3 +73,12 @@ export function bytesToGB(bytes, shouldRound) {
|
|
73
73
|
return val.toFixed() + sizes[3];
|
74
74
|
}
|
75
75
|
}
|
76
|
+
|
77
|
+
export function pad9(val) {
|
78
|
+
const len = String(val).length;
|
79
|
+
let result = val
|
80
|
+
for (let i = len; i < 9; i++) {
|
81
|
+
result = "0" + result;
|
82
|
+
}
|
83
|
+
return result;
|
84
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ydb-embedded-ui",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.1.2",
|
4
4
|
"files": [
|
5
5
|
"dist"
|
6
6
|
],
|
@@ -18,7 +18,7 @@
|
|
18
18
|
"@yandex-cloud/react-data-table": "0.2.1",
|
19
19
|
"axios": "0.19.2",
|
20
20
|
"bem-cn-lite": "4.0.0",
|
21
|
-
"history": "4.
|
21
|
+
"history": "4.10.1",
|
22
22
|
"js-cookie": "2.2.1",
|
23
23
|
"keymaster": "1.6.2",
|
24
24
|
"lodash": "4.17.11",
|
@@ -29,8 +29,8 @@
|
|
29
29
|
"react-list": "0.8.11",
|
30
30
|
"react-monaco-editor": "0.30.1",
|
31
31
|
"react-redux": "7.2.6",
|
32
|
-
"react-router": "5.2.
|
33
|
-
"react-router-dom": "5.
|
32
|
+
"react-router": "5.2.1",
|
33
|
+
"react-router-dom": "5.3.0",
|
34
34
|
"react-scripts": "4.0.3",
|
35
35
|
"react-split": "2.0.14",
|
36
36
|
"react-transition-group": "4.4.2",
|
@@ -51,7 +51,19 @@
|
|
51
51
|
"package": "rm -rf dist && copyfiles -u 1 'src/**/*' dist",
|
52
52
|
"test": "react-app-rewired test",
|
53
53
|
"eject": "react-scripts eject",
|
54
|
-
"prepublishOnly": "npm run package"
|
54
|
+
"prepublishOnly": "npm run package",
|
55
|
+
"typecheck": "npm run typecheck:server && npm run typecheck:ui",
|
56
|
+
"typecheck:server": "tsc -p src/server --noEmit",
|
57
|
+
"typecheck:ui": "tsc -p src/ui --noEmit",
|
58
|
+
"prepare": "husky install"
|
59
|
+
},
|
60
|
+
"lint-staged": {
|
61
|
+
"*.{scss}": [
|
62
|
+
"stylelint --fix --quiet"
|
63
|
+
],
|
64
|
+
"*.{js,jsx,ts,tsx}": [
|
65
|
+
"eslint --fix --quiet"
|
66
|
+
]
|
55
67
|
},
|
56
68
|
"browserslist": {
|
57
69
|
"production": [
|
@@ -66,29 +78,31 @@
|
|
66
78
|
]
|
67
79
|
},
|
68
80
|
"devDependencies": {
|
69
|
-
"@commitlint/cli": "15.0.0",
|
70
|
-
"@commitlint/config-conventional": "15.0.0",
|
71
|
-
"@types/
|
72
|
-
"@types/
|
73
|
-
"@types/react-dom": "17.0.11",
|
74
|
-
"@types/react-router": "5.1.17",
|
75
|
-
"@types/react-router-dom": "5.3.2",
|
76
|
-
"@types/react-transition-group": "4.4.4",
|
77
|
-
"@types/react-virtualized-auto-sizer": "1.0.1",
|
78
|
-
"@yandex-cloud/axios-wrapper": "1.0.2",
|
79
|
-
"@yandex-cloud/eslint-config": "1.0.0",
|
80
|
-
"@yandex-cloud/prettier-config": "1.0.0",
|
81
|
-
"@yandex-cloud/stylelint-config": "1.1.0",
|
82
|
-
"@yandex-cloud/tsconfig": "1.0.0",
|
83
|
-
"@yandex-cloud/uikit": "1.7.0",
|
84
|
-
"copyfiles": "2.4.1",
|
85
|
-
"eslint-config-prettier": "8.3.0",
|
86
|
-
"
|
87
|
-
"
|
88
|
-
"
|
89
|
-
"
|
90
|
-
"react
|
91
|
-
"
|
92
|
-
"
|
81
|
+
"@commitlint/cli": "^15.0.0",
|
82
|
+
"@commitlint/config-conventional": "^15.0.0",
|
83
|
+
"@types/lodash": "^4.14.178",
|
84
|
+
"@types/react": "^17.0.44",
|
85
|
+
"@types/react-dom": "^17.0.11",
|
86
|
+
"@types/react-router": "^5.1.17",
|
87
|
+
"@types/react-router-dom": "^5.3.2",
|
88
|
+
"@types/react-transition-group": "^4.4.4",
|
89
|
+
"@types/react-virtualized-auto-sizer": "^1.0.1",
|
90
|
+
"@yandex-cloud/axios-wrapper": "^1.0.2",
|
91
|
+
"@yandex-cloud/eslint-config": "^1.0.0",
|
92
|
+
"@yandex-cloud/prettier-config": "^1.0.0",
|
93
|
+
"@yandex-cloud/stylelint-config": "^1.1.0",
|
94
|
+
"@yandex-cloud/tsconfig": "^1.0.0",
|
95
|
+
"@yandex-cloud/uikit": "^1.7.0",
|
96
|
+
"copyfiles": "^2.4.1",
|
97
|
+
"eslint-config-prettier": "^8.3.0",
|
98
|
+
"husky": "^7.0.4",
|
99
|
+
"lint-staged": "^12.3.7",
|
100
|
+
"postcss": "^8.4.6",
|
101
|
+
"prettier": "^2.5.1",
|
102
|
+
"react": "^17.0.2",
|
103
|
+
"react-app-rewired": "^2.1.11",
|
104
|
+
"react-dom": "^17.0.2",
|
105
|
+
"stylelint": "^14.3.0",
|
106
|
+
"typescript": "^4.5.5"
|
93
107
|
}
|
94
108
|
}
|