ydb-embedded-ui 1.0.1 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +24 -0
- package/dist/containers/Header/Header.scss +12 -0
- package/dist/containers/Header/Header.tsx +28 -6
- package/dist/containers/Storage/StorageGroups/StorageGroups.tsx +4 -1
- package/dist/containers/Storage/StorageNodes/StorageNodes.tsx +6 -1
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.scss +1 -0
- package/dist/containers/Tenant/QueryEditor/QueryEditor.js +2 -9
- package/dist/containers/Tenant/QueryEditor/QueryExplain/QueryExplain.js +25 -21
- package/dist/containers/Tenant/QueryEditor/QueryExplain/QueryExplain.scss +1 -0
- package/dist/containers/Tenant/QueryEditor/QueryResult/QueryResult.scss +1 -0
- package/dist/store/reducers/executeQuery.js +4 -1
- package/dist/store/reducers/storage.js +2 -2
- package/package.json +56 -55
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,29 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
### [1.0.4](https://www.github.com/ydb-platform/ydb-embedded-ui/compare/v1.0.3...v1.0.4) (2022-03-24)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* freeze deps ([349dee8](https://www.github.com/ydb-platform/ydb-embedded-ui/commit/349dee8cbc7376e316e3cb87f5eb46142975de6c))
|
9
|
+
* styles ([502bc0b](https://www.github.com/ydb-platform/ydb-embedded-ui/commit/502bc0bd319a141e2d3e90787eae41abcd24e76d))
|
10
|
+
|
11
|
+
### [1.0.3](https://www.github.com/ydb-platform/ydb-embedded-ui/compare/v1.0.2...v1.0.3) (2022-03-21)
|
12
|
+
|
13
|
+
|
14
|
+
### Bug Fixes
|
15
|
+
|
16
|
+
* query status should not be shown when query is loading ([d214eee](https://www.github.com/ydb-platform/ydb-embedded-ui/commit/d214eee575b63341082f0be33163e3fce520df88))
|
17
|
+
* should set correct initial current index in queries history ([c3228d7](https://www.github.com/ydb-platform/ydb-embedded-ui/commit/c3228d7a6a0c810982db1bdbec7762889ac44ffa))
|
18
|
+
* **Storage:** wording fixed [YDB-1552] ([3f487ff](https://www.github.com/ydb-platform/ydb-embedded-ui/commit/3f487ff01117963760b676d14281e93e5f3002c0))
|
19
|
+
|
20
|
+
### [1.0.2](https://www.github.com/ydb-platform/ydb-embedded-ui/compare/v1.0.1...v1.0.2) (2022-03-11)
|
21
|
+
|
22
|
+
|
23
|
+
### Bug Fixes
|
24
|
+
|
25
|
+
* **Header:** add link to internal viewer ([64af24f](https://www.github.com/ydb-platform/ydb-embedded-ui/commit/64af24f8d78cf0d34466ac129be10c0764cce3d4))
|
26
|
+
|
3
27
|
### [1.0.1](https://www.github.com/ydb-platform/ydb-embedded-ui/compare/v1.0.0...v1.0.1) (2022-03-05)
|
4
28
|
|
5
29
|
|
@@ -1,15 +1,19 @@
|
|
1
|
-
import {useEffect} from 'react';
|
1
|
+
import React, {useEffect} from 'react';
|
2
2
|
import {useDispatch, useSelector} from 'react-redux';
|
3
3
|
import cn from 'bem-cn-lite';
|
4
4
|
import {useHistory, useLocation} from 'react-router';
|
5
|
+
import {Breadcrumbs, BreadcrumbsItem, Link} from '@yandex-cloud/uikit';
|
5
6
|
|
6
|
-
import
|
7
|
+
import Divider from '../../components/Divider/Divider';
|
8
|
+
//@ts-ignore
|
9
|
+
import Icon from '../../components/Icon/Icon';
|
10
|
+
|
11
|
+
import {clusterName as clusterNameLocation, backend, customBackend} from '../../store';
|
7
12
|
import {getClusterInfo} from '../../store/reducers/cluster';
|
8
13
|
import {getHostInfo} from '../../store/reducers/host';
|
14
|
+
import {HeaderItemType} from '../../store/reducers/header';
|
9
15
|
|
10
16
|
import './Header.scss';
|
11
|
-
import {Breadcrumbs, BreadcrumbsItem} from '@yandex-cloud/uikit';
|
12
|
-
import {HeaderItemType} from '../../store/reducers/header';
|
13
17
|
|
14
18
|
const b = cn('header');
|
15
19
|
|
@@ -49,6 +53,12 @@ function Header() {
|
|
49
53
|
const renderHeader = () => {
|
50
54
|
const clusterNameFinal = singleClusterMode ? host.ClusterName : clusterName;
|
51
55
|
|
56
|
+
let link = backend + '/internal';
|
57
|
+
|
58
|
+
if (singleClusterMode && !customBackend) {
|
59
|
+
link = `/internal`;
|
60
|
+
}
|
61
|
+
|
52
62
|
const breadcrumbItems = header.reduce((acc, el) => {
|
53
63
|
acc.push({text: el.text, action: () => history.push(el.link)});
|
54
64
|
return acc;
|
@@ -63,8 +73,20 @@ function Header() {
|
|
63
73
|
firstDisplayedItemsCount={1}
|
64
74
|
/>
|
65
75
|
</div>
|
66
|
-
|
67
|
-
|
76
|
+
|
77
|
+
<div className={b('cluster-name-wrapper')}>
|
78
|
+
<Link href={link} target="_blank">
|
79
|
+
Internal viewer{' '}
|
80
|
+
<Icon name="external" viewBox={'0 0 16 16'} width={16} height={16} />
|
81
|
+
</Link>
|
82
|
+
{clusterNameFinal && (
|
83
|
+
<React.Fragment>
|
84
|
+
<div className={b('divider')}>
|
85
|
+
<Divider />
|
86
|
+
</div>
|
87
|
+
<ClusterName name={clusterNameFinal} />
|
88
|
+
</React.Fragment>
|
89
|
+
)}
|
68
90
|
</div>
|
69
91
|
</header>
|
70
92
|
);
|
@@ -210,13 +210,16 @@ function StorageGroups({data, tableSettings, visibleEntities, nodes}: StorageGro
|
|
210
210
|
];
|
211
211
|
|
212
212
|
let columns = allColumns;
|
213
|
+
let emptyMessage = 'No such groups.';
|
213
214
|
|
214
215
|
if (visibleEntities === VisibleEntities.Space) {
|
215
216
|
columns = allColumns.filter((col) => col.name !== TableColumnsIds.Missing);
|
217
|
+
emptyMessage = 'No storage groups with space problems.';
|
216
218
|
}
|
217
219
|
|
218
220
|
if (visibleEntities === VisibleEntities.Missing) {
|
219
221
|
columns = allColumns.filter((col) => col.name !== TableColumnsIds.UsedSpaceFlag);
|
222
|
+
emptyMessage = 'No degraded groups.';
|
220
223
|
}
|
221
224
|
return data ? (
|
222
225
|
<DataTable
|
@@ -226,7 +229,7 @@ function StorageGroups({data, tableSettings, visibleEntities, nodes}: StorageGro
|
|
226
229
|
columns={columns}
|
227
230
|
settings={tableSettings}
|
228
231
|
initialSortOrder={setSortOrder(visibleEntities)}
|
229
|
-
emptyDataMessage=
|
232
|
+
emptyDataMessage={emptyMessage}
|
230
233
|
/>
|
231
234
|
) : null;
|
232
235
|
}
|
@@ -114,9 +114,14 @@ function StorageNodes({data, tableSettings, visibleEntities}: StorageGroupsProps
|
|
114
114
|
];
|
115
115
|
|
116
116
|
let columns = allColumns;
|
117
|
+
let emptyMessage = 'No such nodes.';
|
117
118
|
|
118
119
|
if (visibleEntities === VisibleEntities.Space) {
|
119
120
|
columns = allColumns.filter((col) => col.name !== TableColumnsIds.Missing);
|
121
|
+
emptyMessage = 'No nodes with space problems.';
|
122
|
+
}
|
123
|
+
if (visibleEntities === VisibleEntities.Missing) {
|
124
|
+
emptyMessage = 'No degraded nodes.';
|
120
125
|
}
|
121
126
|
|
122
127
|
return data ? (
|
@@ -127,7 +132,7 @@ function StorageNodes({data, tableSettings, visibleEntities}: StorageGroupsProps
|
|
127
132
|
columns={columns}
|
128
133
|
settings={tableSettings}
|
129
134
|
initialSortOrder={setSortOrder(visibleEntities)}
|
130
|
-
emptyDataMessage=
|
135
|
+
emptyDataMessage={emptyMessage}
|
131
136
|
/>
|
132
137
|
) : null;
|
133
138
|
}
|
@@ -154,7 +154,7 @@ function QueryEditor(props) {
|
|
154
154
|
useEffect(() => {
|
155
155
|
const {monacoHotKey, setMonacoHotKey} = props;
|
156
156
|
if (monacoHotKey === null) {
|
157
|
-
return
|
157
|
+
return;
|
158
158
|
}
|
159
159
|
setMonacoHotKey(null);
|
160
160
|
switch (monacoHotKey) {
|
@@ -464,19 +464,12 @@ function QueryEditor(props) {
|
|
464
464
|
};
|
465
465
|
|
466
466
|
const getExecuteResult = () => {
|
467
|
-
const {
|
468
|
-
data = [],
|
469
|
-
error,
|
470
|
-
loading,
|
471
|
-
history: {queries},
|
472
|
-
} = props.executeQuery;
|
467
|
+
const {data = [], error} = props.executeQuery;
|
473
468
|
|
474
469
|
if (error) {
|
475
470
|
return error.data || error;
|
476
471
|
} else if (data.length > 0) {
|
477
472
|
return data;
|
478
|
-
} else if (!loading && queries.length) {
|
479
|
-
return 'The request was successful';
|
480
473
|
} else {
|
481
474
|
return '';
|
482
475
|
}
|
@@ -252,28 +252,32 @@ function QueryExplain(props) {
|
|
252
252
|
return (
|
253
253
|
<React.Fragment>
|
254
254
|
<div className={b('controls')}>
|
255
|
-
|
256
|
-
<
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
255
|
+
{!props.loading && (
|
256
|
+
<React.Fragment>
|
257
|
+
<div className={b('controls-right')}>
|
258
|
+
<QueryExecutionStatus hasError={Boolean(props.error)} />
|
259
|
+
{!props.error && (
|
260
|
+
<React.Fragment>
|
261
|
+
<Divider />
|
262
|
+
<RadioButton
|
263
|
+
options={explainOptions}
|
264
|
+
value={activeOption}
|
265
|
+
onUpdate={onSelectOption}
|
266
|
+
/>
|
267
|
+
</React.Fragment>
|
268
|
+
)}
|
269
|
+
</div>
|
270
|
+
<div className={b('controls-left')}>
|
271
|
+
<EnableFullscreenButton disabled={Boolean(props.error)} />
|
272
|
+
<PaneVisibilityToggleButtons
|
273
|
+
onCollapse={props.onCollapseResults}
|
274
|
+
onExpand={props.onExpandResults}
|
275
|
+
isCollapsed={props.isResultsCollapsed}
|
276
|
+
initialDirection="bottom"
|
264
277
|
/>
|
265
|
-
</
|
266
|
-
|
267
|
-
|
268
|
-
<div className={b('controls-left')}>
|
269
|
-
<EnableFullscreenButton disabled={Boolean(props.error)} />
|
270
|
-
<PaneVisibilityToggleButtons
|
271
|
-
onCollapse={props.onCollapseResults}
|
272
|
-
onExpand={props.onExpandResults}
|
273
|
-
isCollapsed={props.isResultsCollapsed}
|
274
|
-
initialDirection="bottom"
|
275
|
-
/>
|
276
|
-
</div>
|
278
|
+
</div>
|
279
|
+
</React.Fragment>
|
280
|
+
)}
|
277
281
|
</div>
|
278
282
|
<div className={b('result')}>{renderContent()}</div>
|
279
283
|
</React.Fragment>
|
@@ -34,7 +34,10 @@ const initialState = {
|
|
34
34
|
input: '',
|
35
35
|
history: {
|
36
36
|
queries: queriesHistoryInitial.slice(sliceLimit < 0 ? 0 : sliceLimit),
|
37
|
-
currentIndex:
|
37
|
+
currentIndex:
|
38
|
+
queriesHistoryInitial.length > MAXIMUM_QUERIES_IN_HISTORY
|
39
|
+
? MAXIMUM_QUERIES_IN_HISTORY - 1
|
40
|
+
: queriesHistoryInitial.length - 1,
|
38
41
|
},
|
39
42
|
runAction: RUN_ACTIONS_VALUES.script,
|
40
43
|
monacoHotKey: null,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ydb-embedded-ui",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.4",
|
4
4
|
"files": [
|
5
5
|
"dist"
|
6
6
|
],
|
@@ -9,38 +9,38 @@
|
|
9
9
|
"url": "git@github.com:ydb-platform/ydb-embedded-ui.git"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
|
-
"@testing-library/jest-dom": "
|
13
|
-
"@testing-library/react": "
|
14
|
-
"@testing-library/user-event": "
|
15
|
-
"@types/qs": "
|
16
|
-
"@yandex-cloud/i18n": "
|
17
|
-
"@yandex-cloud/paranoid": "
|
18
|
-
"@yandex-cloud/react-data-table": "
|
19
|
-
"axios": "
|
20
|
-
"bem-cn-lite": "
|
21
|
-
"history": "
|
22
|
-
"js-cookie": "
|
23
|
-
"keymaster": "
|
24
|
-
"lodash": "
|
25
|
-
"monaco-editor": "
|
26
|
-
"numeral": "
|
27
|
-
"path-to-regexp": "
|
28
|
-
"react-json-inspector": "
|
29
|
-
"react-list": "
|
30
|
-
"react-monaco-editor": "
|
31
|
-
"react-redux": "
|
32
|
-
"react-router": "
|
33
|
-
"react-router-dom": "
|
12
|
+
"@testing-library/jest-dom": "5.15.0",
|
13
|
+
"@testing-library/react": "11.2.7",
|
14
|
+
"@testing-library/user-event": "12.8.3",
|
15
|
+
"@types/qs": "6.9.7",
|
16
|
+
"@yandex-cloud/i18n": "0.2.0",
|
17
|
+
"@yandex-cloud/paranoid": "1.0.0",
|
18
|
+
"@yandex-cloud/react-data-table": "0.2.1",
|
19
|
+
"axios": "0.19.2",
|
20
|
+
"bem-cn-lite": "4.0.0",
|
21
|
+
"history": "4.9.0",
|
22
|
+
"js-cookie": "2.2.1",
|
23
|
+
"keymaster": "1.6.2",
|
24
|
+
"lodash": "4.17.11",
|
25
|
+
"monaco-editor": "0.24.0",
|
26
|
+
"numeral": "2.0.6",
|
27
|
+
"path-to-regexp": "3.0.0",
|
28
|
+
"react-json-inspector": "7.1.1",
|
29
|
+
"react-list": "0.8.11",
|
30
|
+
"react-monaco-editor": "0.30.1",
|
31
|
+
"react-redux": "7.2.6",
|
32
|
+
"react-router": "5.2.0",
|
33
|
+
"react-router-dom": "5.2.0",
|
34
34
|
"react-scripts": "4.0.3",
|
35
|
-
"react-split": "
|
36
|
-
"react-transition-group": "
|
37
|
-
"react-treeview": "
|
38
|
-
"redux": "
|
39
|
-
"redux-location-state": "
|
40
|
-
"redux-thunk": "
|
41
|
-
"reselect": "
|
42
|
-
"sass": "
|
43
|
-
"web-vitals": "
|
35
|
+
"react-split": "2.0.14",
|
36
|
+
"react-transition-group": "4.4.2",
|
37
|
+
"react-treeview": "0.4.7",
|
38
|
+
"redux": "4.0.1",
|
39
|
+
"redux-location-state": "2.6.0",
|
40
|
+
"redux-thunk": "2.3.0",
|
41
|
+
"reselect": "4.0.0",
|
42
|
+
"sass": "1.32.8",
|
43
|
+
"web-vitals": "1.1.2"
|
44
44
|
},
|
45
45
|
"scripts": {
|
46
46
|
"start": "react-app-rewired start",
|
@@ -66,28 +66,29 @@
|
|
66
66
|
]
|
67
67
|
},
|
68
68
|
"devDependencies": {
|
69
|
-
"@commitlint/cli": "
|
70
|
-
"@commitlint/config-conventional": "
|
71
|
-
"@types/
|
72
|
-
"@types/
|
73
|
-
"@types/react-
|
74
|
-
"@types/react-router
|
75
|
-
"@types/react-
|
76
|
-
"@types/react-
|
77
|
-
"@
|
78
|
-
"@yandex-cloud/
|
79
|
-
"@yandex-cloud/
|
80
|
-
"@yandex-cloud/
|
81
|
-
"@yandex-cloud/
|
82
|
-
"@yandex-cloud/
|
83
|
-
"
|
84
|
-
"
|
85
|
-
"
|
86
|
-
"
|
87
|
-
"
|
88
|
-
"react
|
89
|
-
"react-
|
90
|
-
"
|
91
|
-
"
|
69
|
+
"@commitlint/cli": "15.0.0",
|
70
|
+
"@commitlint/config-conventional": "15.0.0",
|
71
|
+
"@types/history": "4.7.11",
|
72
|
+
"@types/lodash": "4.14.178",
|
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
|
+
"postcss": "8.4.6",
|
87
|
+
"prettier": "2.5.1",
|
88
|
+
"react": "17.0.2",
|
89
|
+
"react-app-rewired": "2.1.11",
|
90
|
+
"react-dom": "17.0.2",
|
91
|
+
"stylelint": "14.3.0",
|
92
|
+
"typescript": "4.5.4"
|
92
93
|
}
|
93
94
|
}
|