ydb-embedded-ui 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/README.md +2 -2
- package/dist/assets/icons/cluster.svg +1 -0
- package/dist/assets/icons/hide.svg +1 -0
- package/dist/assets/icons/show.svg +1 -0
- package/dist/assets/icons/user-check.svg +1 -1
- package/dist/assets/icons/user-secret.svg +1 -1
- package/dist/components/AsideNavigation/AsideHeader.scss +1 -2
- package/dist/components/AsideNavigation/AsideHeaderFooterItem/AsideHeaderFooterItem.scss +7 -7
- package/dist/components/AsideNavigation/AsideHeaderTooltip/AsideHeaderTooltip.scss +2 -2
- package/dist/components/AsideNavigation/CompositeBar/CompositeBar.scss +6 -6
- package/dist/components/AsideNavigation/Drawer/Drawer.scss +5 -5
- package/dist/components/AsideNavigation/Logo/Logo.scss +3 -4
- package/dist/components/AsideNavigation/Settings/Settings.scss +27 -12
- package/dist/components/AsideNavigation/Settings/SettingsMenu/SettingsMenu.scss +14 -6
- package/dist/components/Breadcrumbs/Breadcrumbs.scss +2 -1
- package/dist/components/ClusterInfo/ClusterInfo.scss +19 -12
- package/dist/components/ClusterInfo/ClusterInfo.tsx +110 -10
- package/dist/components/CopyToClipboard/CopyToClipboard.tsx +39 -0
- package/dist/components/CriticalActionDialog/CriticalActionDialog.scss +5 -4
- package/dist/components/Divider/Divider.scss +7 -0
- package/dist/components/Divider/Divider.tsx +11 -0
- package/dist/components/EmptyState/EmptyState.scss +14 -10
- package/dist/components/EnableFullscreenButton/EnableFullscreenButton.tsx +22 -0
- package/dist/components/EntityStatus/EntityStatus.js +5 -3
- package/dist/components/EntityStatus/EntityStatus.scss +35 -13
- package/dist/components/FullGroupViewer/FullGroupViewer.js +2 -4
- package/dist/components/FullGroupViewer/FullGroupViewer.scss +6 -3
- package/dist/components/FullNodeViewer/FullNodeViewer.scss +19 -11
- package/dist/components/Fullscreen/Fullscreen.scss +28 -0
- package/dist/components/Fullscreen/Fullscreen.tsx +81 -0
- package/dist/components/GroupTreeViewer/GroupTreeViewer.scss +1 -0
- package/dist/components/GroupViewer/GroupViewer.scss +8 -4
- package/dist/components/Icon/Icon.js +2 -0
- package/dist/components/InfoViewer/InfoViewer.scss +22 -16
- package/dist/components/NodesViewer/NodesViewer.js +25 -35
- package/dist/components/NodesViewer/NodesViewer.scss +15 -11
- package/dist/components/PDiskViewer/PDiskViewer.scss +10 -4
- package/dist/components/Pagination/Pagination.scss +6 -3
- package/dist/components/PoolBar/PoolBar.scss +14 -10
- package/dist/components/PoolUsage/PoolUsage.scss +17 -9
- package/dist/components/ProgressViewer/ProgressViewer.js +1 -1
- package/dist/components/ProgressViewer/ProgressViewer.scss +28 -18
- package/dist/components/QueryExecutionStatus/QueryExecutionStatus.scss +14 -0
- package/dist/components/QueryExecutionStatus/QueryExecutionStatus.tsx +29 -0
- package/dist/components/SplitPane/SplitPane.scss +33 -40
- package/dist/components/SplitPane/SplitPane.tsx +94 -0
- package/dist/components/Tablet/Tablet.scss +9 -6
- package/dist/components/TabletsOverall/TabletsOverall.scss +19 -0
- package/dist/components/TabletsOverall/TabletsOverall.tsx +105 -0
- package/dist/components/TabletsStatistic/TabletsStatistic.scss +24 -18
- package/dist/components/TabletsViewer/TabletsViewer.scss +12 -9
- package/dist/components/Tag/Tag.scss +6 -4
- package/dist/components/Tags/Tags.scss +1 -1
- package/dist/components/TreeView/TreeView.js +1 -1
- package/dist/components/TreeView/TreeView.scss +9 -0
- package/dist/components/TruncatedQuery/TruncatedQuery.scss +4 -3
- package/dist/containers/App/App.js +1 -0
- package/dist/containers/App/App.scss +50 -31
- package/dist/containers/App/Content.js +2 -2
- package/dist/containers/App/NodesTable.scss +25 -0
- package/dist/containers/App/TipPopup/TipPopup.scss +10 -6
- package/dist/containers/AppIcons/AppIcons.js +46 -22
- package/dist/containers/AsideNavigation/AsideNavigation.scss +1 -1
- package/dist/containers/AsideNavigation/AsideNavigation.tsx +12 -5
- package/dist/containers/Authentication/Authentication.scss +63 -14
- package/dist/containers/Authentication/Authentication.tsx +42 -9
- package/dist/containers/Cluster/Cluster.scss +5 -3
- package/dist/containers/Cluster/Cluster.tsx +49 -0
- package/dist/containers/Group/Group.scss +1 -1
- package/dist/containers/Header/Header.scss +15 -59
- package/dist/containers/Header/Header.tsx +75 -0
- package/dist/containers/Header/Host/Host.scss +10 -3
- package/dist/containers/Heatmap/Heatmap.js +1 -1
- package/dist/containers/Heatmap/Heatmap.scss +16 -7
- package/dist/containers/Heatmap/HeatmapCanvas/HeatmapCanvas.js +3 -3
- package/dist/containers/Heatmap/Histogram/Histogram.scss +21 -9
- package/dist/containers/Node/Node.js +1 -1
- package/dist/containers/Node/Node.scss +6 -4
- package/dist/containers/Nodes/Nodes.js +28 -27
- package/dist/containers/Nodes/Nodes.scss +5 -17
- package/dist/containers/Pdisk/Pdisk.scss +6 -4
- package/dist/containers/Pool/Pool.scss +7 -4
- package/dist/containers/ReduxTooltip/ReduxTooltip.scss +5 -1
- package/dist/containers/Storage/DiskStateProgressBar/DiskStateProgressBar.scss +77 -0
- package/dist/containers/{StorageV2 → Storage}/DiskStateProgressBar/DiskStateProgressBar.tsx +1 -1
- package/dist/containers/{StorageV2 → Storage}/Pdisk/Pdisk.scss +6 -4
- package/dist/containers/{StorageV2 → Storage}/Pdisk/Pdisk.tsx +1 -2
- package/dist/containers/{StorageV2 → Storage}/Storage.js +72 -34
- package/dist/containers/{StorageV2 → Storage}/Storage.scss +12 -14
- package/dist/containers/{StorageV2 → Storage}/StorageFilter/StorageFilter.js +1 -9
- package/dist/containers/{StorageV2 → Storage}/StorageGroups/StorageGroups.scss +2 -0
- package/dist/containers/{StorageV2 → Storage}/StorageGroups/StorageGroups.tsx +1 -1
- package/dist/containers/{StorageV2 → Storage}/StorageNodes/StorageNodes.scss +2 -0
- package/dist/containers/{StorageV2 → Storage}/StorageNodes/StorageNodes.tsx +1 -1
- package/dist/containers/{StorageV2 → Storage}/Vdisk/Vdisk.js +0 -0
- package/dist/containers/{StorageV2 → Storage}/Vdisk/Vdisk.scss +6 -4
- package/dist/containers/Tablet/Tablet.scss +13 -9
- package/dist/containers/Tablets/Tablets.js +21 -90
- package/dist/containers/Tablets/Tablets.scss +9 -35
- package/dist/containers/TabletsFilters/TabletsFilters.js +2 -75
- package/dist/containers/TabletsFilters/TabletsFilters.scss +15 -35
- package/dist/containers/Tenant/Acl/Acl.js +54 -47
- package/dist/containers/Tenant/Acl/Acl.scss +15 -4
- package/dist/containers/Tenant/{Compute → Diagnostics/Compute}/Compute.js +35 -12
- package/dist/containers/Tenant/Diagnostics/Compute/Compute.scss +14 -0
- package/dist/containers/Tenant/{Describe → Diagnostics/Describe}/Describe.js +50 -1
- package/dist/containers/Tenant/{Describe → Diagnostics/Describe}/Describe.scss +5 -3
- package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.scss +27 -0
- package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.tsx +88 -0
- package/dist/containers/Tenant/Diagnostics/Diagnostics.scss +50 -0
- package/dist/containers/Tenant/Diagnostics/Diagnostics.tsx +208 -0
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.ts +75 -0
- package/dist/containers/Tenant/Diagnostics/Healthcheck/Healthcheck.js +191 -0
- package/dist/containers/Tenant/Diagnostics/Healthcheck/Healthcheck.scss +79 -0
- package/dist/containers/Tenant/{Healthcheck → Diagnostics/Healthcheck}/IssuesViewer/IssueViewer.scss +25 -13
- package/dist/containers/Tenant/{Healthcheck → Diagnostics/Healthcheck}/IssuesViewer/IssuesViewer.js +2 -2
- package/dist/containers/Tenant/{Schema → Diagnostics}/HotKeys/HotKeys.js +14 -8
- package/dist/containers/Tenant/{Schema → Diagnostics}/HotKeys/HotKeys.scss +7 -5
- package/dist/containers/Tenant/{Network → Diagnostics/Network}/Network.js +39 -9
- package/dist/containers/Tenant/{Network → Diagnostics/Network}/Network.scss +35 -36
- package/dist/containers/Tenant/{Network → Diagnostics/Network}/NodeNetwork/NodeNetwork.js +0 -0
- package/dist/containers/Tenant/{Network → Diagnostics/Network}/NodeNetwork/NodeNetwork.scss +11 -9
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.scss +13 -0
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.tsx +123 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +200 -0
- package/dist/{components → containers/Tenant/Diagnostics}/TenantOverview/TenantOverview.scss +24 -17
- package/dist/containers/Tenant/{TopQueries → Diagnostics/TopQueries}/TopQueries.js +32 -30
- package/dist/containers/Tenant/{TopQueries → Diagnostics/TopQueries}/TopQueries.scss +10 -9
- package/dist/containers/Tenant/{TopShards → Diagnostics/TopShards}/TopShards.js +25 -29
- package/dist/containers/Tenant/{TopShards → Diagnostics/TopShards}/TopShards.scss +1 -13
- package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.scss +38 -0
- package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.tsx +104 -0
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.scss +165 -0
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.tsx +310 -0
- package/dist/containers/Tenant/Preview/Preview.js +50 -12
- package/dist/containers/Tenant/Preview/Preview.scss +45 -3
- package/dist/containers/Tenant/QueryEditor/QueriesHistory/QueriesHistory.scss +85 -0
- package/dist/containers/Tenant/QueryEditor/QueriesHistory/QueriesHistory.tsx +94 -0
- package/dist/containers/Tenant/QueryEditor/QueryEditor.js +291 -264
- package/dist/containers/Tenant/QueryEditor/QueryEditor.scss +47 -18
- package/dist/containers/Tenant/QueryEditor/QueryExplain/QueryExplain.js +132 -32
- package/dist/containers/Tenant/QueryEditor/QueryExplain/QueryExplain.scss +47 -11
- package/dist/containers/Tenant/QueryEditor/QueryResult/QueryResult.js +89 -20
- package/dist/containers/Tenant/QueryEditor/QueryResult/QueryResult.scss +60 -6
- package/dist/containers/Tenant/QueryEditor/SaveQuery/SaveQuery.js +10 -23
- package/dist/containers/Tenant/QueryEditor/SaveQuery/SaveQuery.scss +15 -7
- package/dist/containers/Tenant/QueryEditor/SavedQueries/SavedQueries.js +7 -3
- package/dist/containers/Tenant/QueryEditor/SavedQueries/SavedQueries.scss +28 -17
- package/dist/containers/Tenant/Schema/SchemaInfoViewer/SchemaInfoViewer.js +7 -7
- package/dist/containers/Tenant/Schema/SchemaInfoViewer/SchemaInfoViewer.scss +1 -11
- package/dist/containers/Tenant/Schema/SchemaNode/SchemaNode.js +37 -17
- package/dist/containers/Tenant/Schema/SchemaNode/SchemaNode.scss +33 -12
- package/dist/containers/Tenant/Schema/SchemaNodeActions/SchemaNodeActions.scss +17 -0
- package/dist/containers/Tenant/Schema/SchemaNodeActions/SchemaNodeActions.tsx +125 -0
- package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.js +5 -4
- package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.scss +6 -2
- package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +53 -34
- package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.scss +1 -22
- package/dist/containers/Tenant/Tenant.scss +3 -32
- package/dist/containers/Tenant/Tenant.tsx +161 -0
- package/dist/containers/Tenant/TenantPages.tsx +48 -0
- package/dist/containers/Tenant/utils/ToggleButton.scss +26 -0
- package/dist/containers/Tenant/utils/paneVisibilityToggleHelpers.tsx +126 -0
- package/dist/containers/Tenants/Tenants.js +41 -55
- package/dist/containers/Tenants/Tenants.scss +4 -17
- package/dist/containers/UserSettings/UserSettings.tsx +0 -2
- package/dist/containers/Vdisk/Vdisk.scss +6 -4
- package/dist/containers/VdiskPdiskNode/VdiskPdiskNode.js +1 -1
- package/dist/containers/VdiskPdiskNode/VdiskPdiskNode.scss +5 -5
- package/dist/{routes.js → routes.ts} +14 -4
- package/dist/store/reducers/clusterNodes.js +1 -1
- package/dist/store/reducers/fullscreen.ts +31 -0
- package/dist/store/reducers/header.ts +23 -0
- package/dist/store/reducers/hotKeys.js +1 -1
- package/dist/store/reducers/index.js +6 -0
- package/dist/store/reducers/saveQuery.ts +33 -0
- package/dist/store/reducers/schema.js +14 -0
- package/dist/store/reducers/shardsWorkload.js +1 -1
- package/dist/store/state-url-mapping.js +1 -1
- package/dist/store/utils.js +2 -6
- package/dist/styles/mixins.scss +49 -34
- package/dist/utils/autofetcher.ts +51 -0
- package/dist/utils/constants.js +25 -7
- package/dist/utils/createToast.tsx +23 -0
- package/dist/utils/getNodesColumns.js +25 -28
- package/dist/utils/index.js +6 -2
- package/package.json +8 -4
- package/dist/components/SplitPane/SplitPane.js +0 -368
- package/dist/components/TenantOverview/TenantOverview.js +0 -148
- package/dist/containers/Cluster/Cluster.js +0 -168
- package/dist/containers/Header/Header.js +0 -88
- package/dist/containers/StorageV2/DiskStateProgressBar/DiskStateProgressBar.scss +0 -81
- package/dist/containers/Tenant/Compute/Compute.scss +0 -6
- package/dist/containers/Tenant/Healthcheck/Healthcheck.js +0 -116
- package/dist/containers/Tenant/Healthcheck/Healthcheck.scss +0 -64
- package/dist/containers/Tenant/Schema/Info/Info.js +0 -84
- package/dist/containers/Tenant/Schema/Info/Info.scss +0 -3
- package/dist/containers/Tenant/Schema/SchemaMain/SchemaMain.js +0 -439
- package/dist/containers/Tenant/Schema/SchemaMain/SchemaMain.scss +0 -90
- package/dist/containers/Tenant/Schema/SchemaPages.js +0 -56
- package/dist/containers/Tenant/Tenant.js +0 -199
- package/dist/containers/Tenant/TenantPages.js +0 -35
@@ -1,10 +1,14 @@
|
|
1
1
|
import {KeyboardEvent, useEffect, useState} from 'react';
|
2
2
|
import cn from 'bem-cn-lite';
|
3
3
|
import {connect} from 'react-redux';
|
4
|
-
import {Button, TextInput} from '@yandex-cloud/uikit';
|
4
|
+
import {Button, TextInput, Icon, Link as ExternalLink} from '@yandex-cloud/uikit';
|
5
5
|
//@ts-ignore
|
6
6
|
import {authenticate} from '../../store/reducers/authentication';
|
7
7
|
|
8
|
+
import ydbLogoIcon from '../../assets/icons/ydb.svg';
|
9
|
+
import showIcon from '../../assets/icons/show.svg';
|
10
|
+
import hideIcon from '../../assets/icons/hide.svg';
|
11
|
+
|
8
12
|
import './Authentication.scss';
|
9
13
|
|
10
14
|
const b = cn('authentication');
|
@@ -14,6 +18,7 @@ function Authentication({authenticate, error}: any) {
|
|
14
18
|
const [pass, setPass] = useState('');
|
15
19
|
const [loginError, setLoginError] = useState('');
|
16
20
|
const [passwordError, setPasswordError] = useState('');
|
21
|
+
const [showPassword, setShowPassword] = useState(false);
|
17
22
|
|
18
23
|
useEffect(() => {
|
19
24
|
if (error?.data?.error?.includes('user')) {
|
@@ -44,34 +49,62 @@ function Authentication({authenticate, error}: any) {
|
|
44
49
|
}
|
45
50
|
};
|
46
51
|
|
52
|
+
const onTogglePasswordVisibility = () => {
|
53
|
+
setShowPassword((prev) => !prev);
|
54
|
+
};
|
55
|
+
|
47
56
|
return (
|
48
57
|
<section className={b()}>
|
49
|
-
<
|
50
|
-
<
|
58
|
+
<form className={b('form-wrapper')}>
|
59
|
+
<div className={b('header')}>
|
60
|
+
<div className={b('logo')}>
|
61
|
+
<Icon data={ydbLogoIcon} size={24} />
|
62
|
+
YDB
|
63
|
+
</div>
|
64
|
+
<ExternalLink href="http://ydb.tech/docs" target="_blank">
|
65
|
+
Documentation
|
66
|
+
</ExternalLink>
|
67
|
+
</div>
|
68
|
+
<h2 className={b('title')}>Sign in</h2>
|
51
69
|
<div className={b('field-wrapper')}>
|
52
70
|
<TextInput
|
53
71
|
value={login}
|
54
72
|
onUpdate={onLoginUpdate}
|
55
73
|
placeholder={'Username'}
|
56
74
|
error={loginError}
|
75
|
+
size="l"
|
76
|
+
autoFocus
|
57
77
|
/>
|
58
78
|
</div>
|
59
79
|
<div className={b('field-wrapper')}>
|
60
80
|
<TextInput
|
61
81
|
value={pass}
|
62
82
|
onUpdate={onPassUpdate}
|
63
|
-
type=
|
83
|
+
type={showPassword ? 'text' : 'password'}
|
64
84
|
placeholder={'Password'}
|
65
85
|
error={passwordError}
|
66
86
|
onKeyDown={onEnterClick}
|
87
|
+
size="l"
|
67
88
|
/>
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
89
|
+
<Button
|
90
|
+
onClick={onTogglePasswordVisibility}
|
91
|
+
size="l"
|
92
|
+
className={b('show-password-button')}
|
93
|
+
>
|
94
|
+
<Icon data={showPassword ? hideIcon : showIcon} size={16} />
|
72
95
|
</Button>
|
73
96
|
</div>
|
74
|
-
|
97
|
+
<Button
|
98
|
+
view="action"
|
99
|
+
onClick={onLoginClick}
|
100
|
+
width="max"
|
101
|
+
size="l"
|
102
|
+
disabled={Boolean(!login || !pass || loginError || passwordError)}
|
103
|
+
className={b('button-sign-in')}
|
104
|
+
>
|
105
|
+
Sign in
|
106
|
+
</Button>
|
107
|
+
</form>
|
75
108
|
</section>
|
76
109
|
);
|
77
110
|
}
|
@@ -1,10 +1,11 @@
|
|
1
1
|
@import '../../styles/mixins.scss';
|
2
2
|
|
3
3
|
.cluster {
|
4
|
-
@include flex-container();
|
5
|
-
padding: 0 20px;
|
6
4
|
overflow: auto;
|
7
5
|
|
6
|
+
padding: 0 20px;
|
7
|
+
@include flex-container();
|
8
|
+
|
8
9
|
&__tab {
|
9
10
|
text-decoration: none;
|
10
11
|
|
@@ -41,12 +42,13 @@
|
|
41
42
|
&__controls {
|
42
43
|
display: flex;
|
43
44
|
justify-content: space-between;
|
45
|
+
|
44
46
|
margin: 17px 0;
|
45
47
|
}
|
46
48
|
|
47
49
|
&__table-wrapper {
|
48
50
|
display: flex;
|
49
|
-
flex-direction: column;
|
50
51
|
flex: 1 1 auto;
|
52
|
+
flex-direction: column;
|
51
53
|
}
|
52
54
|
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import cn from 'bem-cn-lite';
|
2
|
+
//@ts-ignore
|
3
|
+
import Tenants from '../Tenants/Tenants';
|
4
|
+
//@ts-ignore
|
5
|
+
import Nodes from '../Nodes/Nodes';
|
6
|
+
//@ts-ignore
|
7
|
+
import Storage from '../Storage/Storage';
|
8
|
+
import routes, {CLUSTER_PAGES} from '../../routes';
|
9
|
+
|
10
|
+
import './Cluster.scss';
|
11
|
+
import {useRouteMatch} from 'react-router';
|
12
|
+
import ClusterInfo from '../../components/ClusterInfo/ClusterInfo';
|
13
|
+
|
14
|
+
const b = cn('cluster');
|
15
|
+
|
16
|
+
interface ClusterProps {
|
17
|
+
additionalClusterInfo: any;
|
18
|
+
additionalTenantsInfo: any;
|
19
|
+
additionalNodesInfo: any;
|
20
|
+
}
|
21
|
+
|
22
|
+
function Cluster(props: ClusterProps) {
|
23
|
+
const match = useRouteMatch<{activeTab?: string}>(routes.cluster);
|
24
|
+
const activeTab = match?.params?.activeTab ?? CLUSTER_PAGES.tenants.id;
|
25
|
+
const renderRoutes = () => {
|
26
|
+
switch (activeTab) {
|
27
|
+
case CLUSTER_PAGES.tenants.id: {
|
28
|
+
return <Tenants {...props} />;
|
29
|
+
}
|
30
|
+
case CLUSTER_PAGES.nodes.id: {
|
31
|
+
return <Nodes {...props} />;
|
32
|
+
}
|
33
|
+
case CLUSTER_PAGES.storage.id: {
|
34
|
+
//@ts-ignore
|
35
|
+
return <Storage {...props} />;
|
36
|
+
}
|
37
|
+
case CLUSTER_PAGES.cluster.id: {
|
38
|
+
return <ClusterInfo />;
|
39
|
+
}
|
40
|
+
default: {
|
41
|
+
return null;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
};
|
45
|
+
|
46
|
+
return <div className={b()}>{renderRoutes()}</div>;
|
47
|
+
}
|
48
|
+
|
49
|
+
export default Cluster;
|
@@ -1,72 +1,28 @@
|
|
1
|
+
@import '../../styles/mixins.scss';
|
2
|
+
|
1
3
|
.header {
|
2
|
-
height: 60px;
|
3
|
-
flex: 0 0 auto;
|
4
|
-
padding: 0 15px;
|
5
4
|
display: flex;
|
6
|
-
|
5
|
+
flex: 0 0 40px;
|
7
6
|
justify-content: space-between;
|
8
|
-
|
9
|
-
|
10
|
-
&__logo {
|
11
|
-
margin-right: 40px;
|
12
|
-
color: var(--yc-color-text-dark-primary);
|
13
|
-
.yc-root_theme_dark & {
|
14
|
-
color: var(--yc-color-text-light-primary);
|
15
|
-
}
|
16
|
-
.yc-root_theme_light & {
|
17
|
-
color: var(--yc-color-text-dark-primary);
|
18
|
-
}
|
19
|
-
user-select: none;
|
20
|
-
height: 38px;
|
21
|
-
width: 143px;
|
22
|
-
}
|
23
|
-
&__cluster-info {
|
24
|
-
}
|
25
|
-
&__cluster-info-title {
|
26
|
-
color: var(--yc-color-text-secondary);
|
27
|
-
text-transform: uppercase;
|
28
|
-
font-size: 12px;
|
29
|
-
margin-bottom: 3px;
|
30
|
-
}
|
31
|
-
&__cluster-info-name {
|
32
|
-
font-size: 17px;
|
33
|
-
font-weight: 500;
|
34
|
-
}
|
7
|
+
align-items: center;
|
35
8
|
|
36
|
-
|
37
|
-
display: flex;
|
38
|
-
align-items: center;
|
39
|
-
margin-right: 15px;
|
40
|
-
margin-left: auto;
|
41
|
-
color: var(--yc-color-text-primary);
|
9
|
+
padding: 0 20px 0 18px;
|
42
10
|
|
43
|
-
|
44
|
-
display: flex;
|
45
|
-
align-items: center;
|
46
|
-
justify-content: center;
|
47
|
-
}
|
11
|
+
font-weight: 600;
|
48
12
|
|
49
|
-
|
50
|
-
margin: 0;
|
51
|
-
}
|
52
|
-
}
|
13
|
+
border-bottom: 1px solid var(--yc-color-line-generic);
|
53
14
|
|
54
|
-
|
55
|
-
margin-left: 25px;
|
56
|
-
}
|
15
|
+
@include body2-typography;
|
57
16
|
|
58
|
-
&
|
59
|
-
|
60
|
-
|
17
|
+
&__cluster-info-title {
|
18
|
+
font-size: var(--yc-text-body-font-size);
|
19
|
+
text-transform: uppercase;
|
61
20
|
|
62
|
-
|
63
|
-
width: 36px;
|
64
|
-
display: flex;
|
65
|
-
align-items: center;
|
66
|
-
justify-content: center;
|
21
|
+
color: var(--yc-color-text-secondary);
|
67
22
|
}
|
68
23
|
|
69
|
-
&
|
70
|
-
|
24
|
+
&__cluster-info-name {
|
25
|
+
font-size: var(--yc-text-body2-font-size);
|
26
|
+
font-weight: 500;
|
71
27
|
}
|
72
28
|
}
|
@@ -0,0 +1,75 @@
|
|
1
|
+
import {useEffect} from 'react';
|
2
|
+
import {useDispatch, useSelector} from 'react-redux';
|
3
|
+
import cn from 'bem-cn-lite';
|
4
|
+
import {useHistory, useLocation} from 'react-router';
|
5
|
+
|
6
|
+
import {clusterName as clusterNameLocation} from '../../store';
|
7
|
+
import {getClusterInfo} from '../../store/reducers/cluster';
|
8
|
+
import {getHostInfo} from '../../store/reducers/host';
|
9
|
+
|
10
|
+
import './Header.scss';
|
11
|
+
import {Breadcrumbs, BreadcrumbsItem} from '@yandex-cloud/uikit';
|
12
|
+
import {HeaderItemType} from '../../store/reducers/header';
|
13
|
+
|
14
|
+
const b = cn('header');
|
15
|
+
|
16
|
+
function ClusterName({name}: {name: string}) {
|
17
|
+
return (
|
18
|
+
<div className={b('cluster-info')}>
|
19
|
+
<div className={b('cluster-info-title')}>cluster</div>
|
20
|
+
<div className={b('cluster-info-name')}>{name}</div>
|
21
|
+
</div>
|
22
|
+
);
|
23
|
+
}
|
24
|
+
|
25
|
+
function Header() {
|
26
|
+
const dispatch = useDispatch();
|
27
|
+
const {data: host}: {data: {ClusterName?: string}} = useSelector((state: any) => state.host);
|
28
|
+
const {singleClusterMode, header}: {singleClusterMode: boolean; header: HeaderItemType[]} =
|
29
|
+
useSelector((state: any) => state);
|
30
|
+
|
31
|
+
const clusterName: string = useSelector(
|
32
|
+
(state: any) => state.cluster.data?.Name || state.clusterInfo.title,
|
33
|
+
);
|
34
|
+
|
35
|
+
const location = useLocation();
|
36
|
+
const history = useHistory();
|
37
|
+
|
38
|
+
const {pathname} = location;
|
39
|
+
|
40
|
+
useEffect(() => {
|
41
|
+
const isClustersPage = pathname.includes('/clusters');
|
42
|
+
|
43
|
+
if (!isClustersPage && !clusterName && !singleClusterMode) {
|
44
|
+
dispatch(getClusterInfo(clusterNameLocation));
|
45
|
+
}
|
46
|
+
dispatch(getHostInfo());
|
47
|
+
}, []);
|
48
|
+
|
49
|
+
const renderHeader = () => {
|
50
|
+
const clusterNameFinal = singleClusterMode ? host.ClusterName : clusterName;
|
51
|
+
|
52
|
+
const breadcrumbItems = header.reduce((acc, el) => {
|
53
|
+
acc.push({text: el.text, action: () => history.push(el.link)});
|
54
|
+
return acc;
|
55
|
+
}, [] as BreadcrumbsItem[]);
|
56
|
+
|
57
|
+
return (
|
58
|
+
<header className={b()}>
|
59
|
+
<div>
|
60
|
+
<Breadcrumbs
|
61
|
+
items={breadcrumbItems}
|
62
|
+
lastDisplayedItemsCount={1}
|
63
|
+
firstDisplayedItemsCount={1}
|
64
|
+
/>
|
65
|
+
</div>
|
66
|
+
<div>
|
67
|
+
{clusterNameFinal && <ClusterName name={clusterNameFinal} />}
|
68
|
+
</div>
|
69
|
+
</header>
|
70
|
+
);
|
71
|
+
};
|
72
|
+
return renderHeader();
|
73
|
+
}
|
74
|
+
|
75
|
+
export default Header;
|
@@ -5,11 +5,14 @@
|
|
5
5
|
&__common {
|
6
6
|
display: flex;
|
7
7
|
align-items: center;
|
8
|
+
|
8
9
|
margin-bottom: 4px;
|
9
10
|
}
|
10
11
|
&__status {
|
11
12
|
display: flex;
|
13
|
+
|
12
14
|
margin-right: 15px;
|
15
|
+
|
13
16
|
font-size: var(--yc-text-body2-font-size);
|
14
17
|
line-height: var(--yc-text-body2-line-height);
|
15
18
|
}
|
@@ -19,6 +22,7 @@
|
|
19
22
|
}
|
20
23
|
&__info-item {
|
21
24
|
display: flex;
|
25
|
+
|
22
26
|
margin-right: 20px;
|
23
27
|
|
24
28
|
&:last-child {
|
@@ -26,18 +30,21 @@
|
|
26
30
|
}
|
27
31
|
}
|
28
32
|
&__label {
|
29
|
-
|
33
|
+
margin-right: 10px;
|
34
|
+
|
30
35
|
font-size: var(--yc-text-body-font-size);
|
31
36
|
line-height: var(--yc-text-body-line-height);
|
32
|
-
|
37
|
+
|
38
|
+
color: var(--yc-color-text-hint);
|
33
39
|
|
34
40
|
.yc-root_theme_dark & {
|
35
41
|
color: var(--yc-color-text-hint);
|
36
42
|
}
|
37
43
|
}
|
38
44
|
&__value {
|
39
|
-
color: var(--yc-color-text-primary);
|
40
45
|
font-size: var(--yc-text-body-font-size);
|
41
46
|
line-height: var(--yc-text-body-line-height);
|
47
|
+
|
48
|
+
color: var(--yc-color-text-primary);
|
42
49
|
}
|
43
50
|
}
|
@@ -12,7 +12,7 @@ import {Loader, Checkbox} from '@yandex-cloud/uikit';
|
|
12
12
|
import {Select} from '@yandex-cloud/uikit/build/esm/components/unstable/Select';
|
13
13
|
import {HeatmapCanvas} from './HeatmapCanvas/HeatmapCanvas';
|
14
14
|
import {Histogram} from './Histogram/Histogram';
|
15
|
-
import {AutoFetcher} from '
|
15
|
+
import {AutoFetcher} from '../../utils/autofetcher';
|
16
16
|
|
17
17
|
import './Heatmap.scss';
|
18
18
|
|
@@ -1,28 +1,33 @@
|
|
1
1
|
@import '../../styles/mixins';
|
2
2
|
|
3
3
|
.heatmap {
|
4
|
-
@include flex-container();
|
5
4
|
overflow: auto;
|
6
5
|
|
6
|
+
height: 100%;
|
7
|
+
@include flex-container();
|
8
|
+
|
7
9
|
&__loader {
|
8
10
|
display: flex;
|
9
11
|
flex: 1 1 auto;
|
10
|
-
align-items: center;
|
11
12
|
justify-content: center;
|
13
|
+
align-items: center;
|
12
14
|
}
|
13
15
|
|
14
16
|
&__limits {
|
15
17
|
display: flex;
|
16
18
|
align-items: center;
|
19
|
+
|
17
20
|
margin-left: 20px;
|
18
21
|
}
|
19
22
|
&__limits-block {
|
20
23
|
display: flex;
|
24
|
+
|
21
25
|
margin-right: 10px;
|
22
26
|
}
|
23
27
|
&__limits-title {
|
24
|
-
color: var(--yc-color-text-secondary);
|
25
28
|
margin-right: 5px;
|
29
|
+
|
30
|
+
color: var(--yc-color-text-secondary);
|
26
31
|
}
|
27
32
|
&__limits-value {
|
28
33
|
}
|
@@ -42,11 +47,12 @@
|
|
42
47
|
}
|
43
48
|
|
44
49
|
&__label {
|
50
|
+
margin-right: 16px;
|
51
|
+
|
45
52
|
font-size: var(--yc-text-body2-font-size);
|
46
|
-
line-height: var(--yc-text-body2-line-height);
|
47
53
|
font-weight: 500;
|
54
|
+
line-height: var(--yc-text-body2-line-height);
|
48
55
|
text-transform: uppercase;
|
49
|
-
margin-right: 16px;
|
50
56
|
|
51
57
|
&_overall {
|
52
58
|
margin-right: 15px;
|
@@ -58,19 +64,21 @@
|
|
58
64
|
}
|
59
65
|
&__canvas-container {
|
60
66
|
overflow: auto;
|
67
|
+
|
61
68
|
cursor: pointer;
|
62
69
|
}
|
63
70
|
|
64
71
|
&__filters {
|
65
72
|
display: flex;
|
66
73
|
align-items: center;
|
67
|
-
|
74
|
+
|
75
|
+
margin: 0 0 10px;
|
68
76
|
}
|
69
77
|
|
70
78
|
&__filter-control {
|
71
|
-
margin-right: 10px;
|
72
79
|
min-width: 100px;
|
73
80
|
max-width: 200px;
|
81
|
+
margin-right: 10px;
|
74
82
|
|
75
83
|
&:last-child {
|
76
84
|
margin-right: 0;
|
@@ -85,6 +93,7 @@
|
|
85
93
|
|
86
94
|
&__row {
|
87
95
|
display: flex;
|
96
|
+
|
88
97
|
margin-bottom: 2px;
|
89
98
|
}
|
90
99
|
|
@@ -111,9 +111,9 @@ export const HeatmapCanvas = (props) => {
|
|
111
111
|
}
|
112
112
|
};
|
113
113
|
const _onCanvasMouseLeave = () => {
|
114
|
-
//
|
115
|
-
//
|
116
|
-
//
|
114
|
+
// Timeout is needed to surely hide tooltip. In _onCanvasMouseMove method is is used "throttle"
|
115
|
+
// and it can cause tooltip render function after canvas field is actually leaved.
|
116
|
+
//So we use in timeout we use a delay greater then delay in throttle.
|
117
117
|
setTimeout(() => {
|
118
118
|
props.hideTooltip();
|
119
119
|
}, 40);
|
@@ -4,46 +4,58 @@
|
|
4
4
|
|
5
5
|
&__chart {
|
6
6
|
position: relative;
|
7
|
+
|
7
8
|
display: flex;
|
8
9
|
align-items: baseline;
|
10
|
+
|
9
11
|
width: 800px;
|
10
12
|
height: 300px;
|
13
|
+
margin-top: 30px;
|
14
|
+
margin-left: 50px;
|
15
|
+
|
11
16
|
border-bottom: 1px solid var(--yc-color-base-generic);
|
12
17
|
border-left: 1px solid var(--yc-color-base-generic);
|
13
|
-
margin-left: 50px;
|
14
|
-
margin-top: 30px;
|
15
18
|
}
|
16
19
|
&__x-min {
|
17
|
-
color: var(--yc-color-text-secondary);
|
18
20
|
position: absolute;
|
19
21
|
bottom: -25px;
|
20
22
|
left: -3px;
|
23
|
+
|
24
|
+
color: var(--yc-color-text-secondary);
|
21
25
|
}
|
22
26
|
&__x-max {
|
23
|
-
color: var(--yc-color-text-secondary);
|
24
27
|
position: absolute;
|
25
|
-
bottom: -25px;
|
26
28
|
right: 0;
|
29
|
+
bottom: -25px;
|
30
|
+
|
31
|
+
color: var(--yc-color-text-secondary);
|
27
32
|
}
|
28
33
|
&__y-min {
|
29
|
-
color: var(--yc-color-text-secondary);
|
30
34
|
position: absolute;
|
31
|
-
width: 20px;
|
32
35
|
bottom: -7px;
|
33
36
|
left: -30px;
|
37
|
+
|
38
|
+
width: 20px;
|
39
|
+
|
34
40
|
text-align: right;
|
41
|
+
|
42
|
+
color: var(--yc-color-text-secondary);
|
35
43
|
}
|
36
44
|
&__y-max {
|
37
|
-
color: var(--yc-color-text-secondary);
|
38
45
|
position: absolute;
|
39
|
-
width: 50px;
|
40
46
|
top: -5px;
|
41
47
|
left: -60px;
|
48
|
+
|
49
|
+
width: 50px;
|
50
|
+
|
42
51
|
text-align: right;
|
52
|
+
|
53
|
+
color: var(--yc-color-text-secondary);
|
43
54
|
}
|
44
55
|
&__item {
|
45
56
|
width: 1.5%;
|
46
57
|
margin-right: 0.5%;
|
58
|
+
|
47
59
|
cursor: pointer;
|
48
60
|
}
|
49
61
|
}
|
@@ -10,7 +10,7 @@ import {withRouter, Link} from 'react-router-dom';
|
|
10
10
|
import FullNodeViewer from '../../components/FullNodeViewer/FullNodeViewer';
|
11
11
|
import {TABLETS, STORAGE, NODE_PAGES} from './NodePages';
|
12
12
|
import Tablets from '../Tablets/Tablets';
|
13
|
-
import Storage from '../
|
13
|
+
import Storage from '../Storage/Storage';
|
14
14
|
|
15
15
|
import {getNodeInfo} from '../../store/reducers/node';
|
16
16
|
import {NODE_AUTO_RELOAD_INTERVAL} from '../../utils/constants';
|
@@ -1,18 +1,19 @@
|
|
1
1
|
@import '../../styles/mixins';
|
2
2
|
|
3
3
|
.node {
|
4
|
-
@include flex-container();
|
5
4
|
overflow: auto;
|
5
|
+
@include flex-container();
|
6
6
|
|
7
7
|
&__content {
|
8
|
-
@include flex-container();
|
9
8
|
overflow: auto;
|
9
|
+
@include flex-container();
|
10
10
|
}
|
11
11
|
|
12
12
|
&__storage {
|
13
|
-
padding-left: 20px;
|
14
13
|
overflow: auto;
|
14
|
+
|
15
15
|
height: 100%;
|
16
|
+
padding-left: 20px;
|
16
17
|
}
|
17
18
|
|
18
19
|
&__tabs {
|
@@ -20,9 +21,10 @@
|
|
20
21
|
}
|
21
22
|
|
22
23
|
&__tab {
|
23
|
-
text-decoration: none;
|
24
24
|
margin-right: 40px;
|
25
25
|
|
26
|
+
text-decoration: none;
|
27
|
+
|
26
28
|
&:last-child {
|
27
29
|
margin-right: 0;
|
28
30
|
}
|