ydb-embedded-ui 4.4.0 → 4.4.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +7 -0
- package/dist/containers/Nodes/Nodes.tsx +1 -1
- package/dist/containers/UserSettings/UserSettings.tsx +14 -17
- package/dist/containers/UserSettings/i18n/en.json +20 -0
- package/dist/containers/UserSettings/i18n/index.ts +11 -0
- package/dist/containers/UserSettings/i18n/ru.json +20 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [4.4.1](https://github.com/ydb-platform/ydb-embedded-ui/compare/v4.4.0...v4.4.1) (2023-05-25)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* **Nodes:** fix endpoint setting ([#397](https://github.com/ydb-platform/ydb-embedded-ui/issues/397)) ([4aea8a2](https://github.com/ydb-platform/ydb-embedded-ui/commit/4aea8a2597909338e31ac51577989a4d82ec93cf))
|
9
|
+
|
3
10
|
## [4.4.0](https://github.com/ydb-platform/ydb-embedded-ui/compare/v4.3.0...v4.4.0) (2023-05-25)
|
4
11
|
|
5
12
|
|
@@ -77,7 +77,7 @@ export const Nodes = ({path, type, className, additionalNodesInfo = {}}: NodesPr
|
|
77
77
|
const fetchNodes = useCallback(() => {
|
78
78
|
// For not DB entities we always use /compute endpoint instead of /nodes
|
79
79
|
// since /nodes can return data only for tenants
|
80
|
-
if (path && (useNodesEndpoint || !isDatabaseEntityType(type))) {
|
80
|
+
if (path && (!useNodesEndpoint || !isDatabaseEntityType(type))) {
|
81
81
|
dispatch(getComputeNodes(path));
|
82
82
|
} else {
|
83
83
|
dispatch(getNodes({tenant: path}));
|
@@ -13,6 +13,7 @@ import {
|
|
13
13
|
} from '../../utils/constants';
|
14
14
|
|
15
15
|
import {Setting, SettingProps} from './Setting';
|
16
|
+
import i18n from './i18n';
|
16
17
|
|
17
18
|
import './UserSettings.scss';
|
18
19
|
|
@@ -27,15 +28,15 @@ enum Theme {
|
|
27
28
|
const themeValues = [
|
28
29
|
{
|
29
30
|
value: Theme.system,
|
30
|
-
content: '
|
31
|
+
content: i18n('settings.theme.option-system'),
|
31
32
|
},
|
32
33
|
{
|
33
34
|
value: Theme.light,
|
34
|
-
content: '
|
35
|
+
content: i18n('settings.theme.option-light'),
|
35
36
|
},
|
36
37
|
{
|
37
38
|
value: Theme.dark,
|
38
|
-
content: '
|
39
|
+
content: i18n('settings.theme.option-dark'),
|
39
40
|
},
|
40
41
|
];
|
41
42
|
|
@@ -53,13 +54,13 @@ export const UserSettings = ({settings}: UserSettingsProps) => {
|
|
53
54
|
<Settings>
|
54
55
|
<Settings.Page
|
55
56
|
id={SettingsSection.general}
|
56
|
-
title=
|
57
|
+
title={i18n('page.general')}
|
57
58
|
icon={{data: favoriteFilledIcon, height: 14, width: 14}}
|
58
59
|
>
|
59
|
-
<Settings.Section title=
|
60
|
+
<Settings.Section title={i18n('section.general')}>
|
60
61
|
<Setting
|
61
62
|
settingKey={THEME_KEY}
|
62
|
-
title=
|
63
|
+
title={i18n('settings.theme.title')}
|
63
64
|
type="radio"
|
64
65
|
values={themeValues}
|
65
66
|
/>
|
@@ -70,27 +71,23 @@ export const UserSettings = ({settings}: UserSettingsProps) => {
|
|
70
71
|
</Settings.Page>
|
71
72
|
<Settings.Page
|
72
73
|
id={SettingsSection.experiments}
|
73
|
-
title=
|
74
|
+
title={i18n('page.experiments')}
|
74
75
|
icon={{data: flaskIcon}}
|
75
76
|
>
|
76
|
-
<Settings.Section title=
|
77
|
+
<Settings.Section title={i18n('section.experiments')}>
|
77
78
|
<Setting
|
78
79
|
settingKey={INVERTED_DISKS_KEY}
|
79
|
-
title={'
|
80
|
+
title={i18n('settings.invertedDisks.title')}
|
80
81
|
/>
|
81
82
|
<Setting
|
82
83
|
settingKey={USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY}
|
83
|
-
title={'
|
84
|
-
helpPopoverContent={
|
85
|
-
'Use /viewer/json/nodes endpoint for Nodes Tab in diagnostics. It returns incorrect data on older versions'
|
86
|
-
}
|
84
|
+
title={i18n('settings.useNodesEndpoint.title')}
|
85
|
+
helpPopoverContent={i18n('settings.useNodesEndpoint.popover')}
|
87
86
|
/>
|
88
87
|
<Setting
|
89
88
|
settingKey={ENABLE_QUERY_MODES_FOR_EXPLAIN}
|
90
|
-
title={'
|
91
|
-
helpPopoverContent={
|
92
|
-
'Enable script | scan query mode selector for both run and explain. May not work on some versions'
|
93
|
-
}
|
89
|
+
title={i18n('settings.enableQueryModesForExplain.title')}
|
90
|
+
helpPopoverContent={i18n('settings.enableQueryModesForExplain.popover')}
|
94
91
|
/>
|
95
92
|
{settings?.[SettingsSection.experiments]?.map((setting) => (
|
96
93
|
<Setting key={setting.settingKey} {...setting} />
|
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"page.general": "General",
|
3
|
+
"section.general": "General",
|
4
|
+
|
5
|
+
"page.experiments": "Experiments",
|
6
|
+
"section.experiments": "Experiments",
|
7
|
+
|
8
|
+
"settings.theme.title": "Interface theme",
|
9
|
+
"settings.theme.option-dark": "Dark",
|
10
|
+
"settings.theme.option-light": "Light",
|
11
|
+
"settings.theme.option-system": "System",
|
12
|
+
|
13
|
+
"settings.invertedDisks.title": "Inverted disks space indicators",
|
14
|
+
|
15
|
+
"settings.useNodesEndpoint.title": "Break the Nodes tab in Diagnostics",
|
16
|
+
"settings.useNodesEndpoint.popover": "Use /viewer/json/nodes endpoint for Nodes Tab in diagnostics. It returns incorrect data on versions before 23-1",
|
17
|
+
|
18
|
+
"settings.enableQueryModesForExplain.title": "Enable query modes for explain",
|
19
|
+
"settings.enableQueryModesForExplain.popover": "Enable script | scan query mode selector for both run and explain. May not work on versions before 23-2"
|
20
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import {i18n, Lang} from '../../../utils/i18n';
|
2
|
+
|
3
|
+
import en from './en.json';
|
4
|
+
import ru from './ru.json';
|
5
|
+
|
6
|
+
const COMPONENT = 'ydb-user-settings';
|
7
|
+
|
8
|
+
i18n.registerKeyset(Lang.En, COMPONENT, en);
|
9
|
+
i18n.registerKeyset(Lang.Ru, COMPONENT, ru);
|
10
|
+
|
11
|
+
export default i18n.keyset(COMPONENT);
|
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"page.general": "Общие",
|
3
|
+
"section.general": "Общие",
|
4
|
+
|
5
|
+
"page.experiments": "Эксперименты",
|
6
|
+
"section.experiments": "Эксперименты",
|
7
|
+
|
8
|
+
"settings.theme.title": "Тема",
|
9
|
+
"settings.theme.option-dark": "Тёмная",
|
10
|
+
"settings.theme.option-light": "Светлая",
|
11
|
+
"settings.theme.option-system": "Системная",
|
12
|
+
|
13
|
+
"settings.invertedDisks.title": "Инвертированные индикаторы места на дисках",
|
14
|
+
|
15
|
+
"settings.useNodesEndpoint.title": "Сломать вкладку Nodes в диагностике",
|
16
|
+
"settings.useNodesEndpoint.popover": "Использовать эндпоинт /viewer/json/nodes для вкладки Nodes в диагностике. Может возвращать некорректные данные на версиях до 23-1",
|
17
|
+
|
18
|
+
"settings.enableQueryModesForExplain.title": "Включить режимы выполнения запроса для explain",
|
19
|
+
"settings.enableQueryModesForExplain.popover": "Включить общий переключатель script | scan для run и explain. Может работать некорректно на версиях до 23-2"
|
20
|
+
}
|