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,16 +1,37 @@
|
|
1
1
|
import React, {ReactNode} from 'react';
|
2
2
|
import cn from 'bem-cn-lite';
|
3
|
+
import {connect} from 'react-redux';
|
3
4
|
|
5
|
+
//@ts-ignore
|
4
6
|
import EntityStatus from '../EntityStatus/EntityStatus';
|
7
|
+
//@ts-ignore
|
5
8
|
import ProgressViewer from '../ProgressViewer/ProgressViewer';
|
9
|
+
//@ts-ignore
|
6
10
|
import InfoViewer from '../InfoViewer/InfoViewer';
|
11
|
+
//@ts-ignore
|
7
12
|
import Tags from '../Tags/Tags';
|
13
|
+
//@ts-ignore
|
8
14
|
import Tablet from '../Tablet/Tablet';
|
9
15
|
|
16
|
+
//@ts-ignore
|
17
|
+
import {hideTooltip, showTooltip} from '../../store/reducers/tooltip';
|
18
|
+
//@ts-ignore
|
19
|
+
import {getClusterInfo} from '../../store/reducers/cluster';
|
20
|
+
//@ts-ignore
|
21
|
+
import {clusterName, backend, customBackend} from '../../store';
|
22
|
+
|
23
|
+
//@ts-ignore
|
10
24
|
import {formatStorageValues} from '../../utils';
|
25
|
+
//@ts-ignore
|
11
26
|
import {TxAllocator} from '../../utils/constants';
|
12
27
|
|
13
28
|
import './ClusterInfo.scss';
|
29
|
+
import {AutoFetcher} from '../../utils/autofetcher';
|
30
|
+
import {Link, Loader} from '@yandex-cloud/uikit';
|
31
|
+
//@ts-ignore
|
32
|
+
import Icon from '../Icon/Icon';
|
33
|
+
import {setHeader} from '../../store/reducers/header';
|
34
|
+
import routes, { CLUSTER_PAGES, createHref } from '../../routes';
|
14
35
|
|
15
36
|
const b = cn('cluster-info');
|
16
37
|
|
@@ -34,12 +55,18 @@ interface ICluster {
|
|
34
55
|
}
|
35
56
|
|
36
57
|
interface ClusterInfoProps {
|
37
|
-
className
|
58
|
+
className?: string;
|
38
59
|
cluster?: ICluster;
|
39
60
|
hideTooltip: VoidFunction;
|
40
61
|
showTooltip: VoidFunction;
|
41
|
-
|
62
|
+
setHeader: any;
|
63
|
+
getClusterInfo: (clusterName: string) => void;
|
64
|
+
clusterTitle?: string;
|
42
65
|
additionalInfo?: IClusterInfoItem[];
|
66
|
+
loading: boolean;
|
67
|
+
singleClusterMode: boolean;
|
68
|
+
wasLoaded: boolean;
|
69
|
+
error?: {statusText: string};
|
43
70
|
}
|
44
71
|
|
45
72
|
interface ITablet {
|
@@ -59,19 +86,57 @@ class ClusterInfo extends React.Component<ClusterInfoProps> {
|
|
59
86
|
return 0;
|
60
87
|
}
|
61
88
|
|
89
|
+
componentDidMount() {
|
90
|
+
const {setHeader} = this.props;
|
91
|
+
setHeader([
|
92
|
+
{
|
93
|
+
text: CLUSTER_PAGES.cluster.title,
|
94
|
+
link: createHref(routes.cluster, {activeTab: CLUSTER_PAGES.cluster.id}),
|
95
|
+
},
|
96
|
+
]);
|
97
|
+
this.props.getClusterInfo(clusterName);
|
98
|
+
this.autofetcher = new AutoFetcher();
|
99
|
+
this.autofetcher.fetch(() => this.props.getClusterInfo(clusterName));
|
100
|
+
}
|
101
|
+
|
62
102
|
shouldComponentUpdate(nextProps: ClusterInfoProps) {
|
63
103
|
const {cluster = {}} = nextProps;
|
64
104
|
return !(Object.keys(cluster).length === 0);
|
65
105
|
}
|
66
106
|
|
107
|
+
componentWillUnmount() {
|
108
|
+
this.autofetcher.stop();
|
109
|
+
}
|
110
|
+
|
111
|
+
renderLoader() {
|
112
|
+
return (
|
113
|
+
<div className={b('loader')}>
|
114
|
+
<Loader size="l" />
|
115
|
+
</div>
|
116
|
+
);
|
117
|
+
}
|
118
|
+
|
67
119
|
render() {
|
68
|
-
|
120
|
+
const {className, error} = this.props;
|
121
|
+
let helper;
|
122
|
+
if (error) {
|
123
|
+
helper = error.statusText;
|
124
|
+
}
|
125
|
+
return <div className={b(null, className)}>{helper || this.renderContent()}</div>;
|
69
126
|
}
|
70
127
|
|
128
|
+
private autofetcher: any;
|
129
|
+
|
71
130
|
private getInfo() {
|
72
|
-
const {cluster = {} as ICluster, additionalInfo = []} = this.props;
|
131
|
+
const {cluster = {} as ICluster, additionalInfo = [], singleClusterMode} = this.props;
|
73
132
|
const {StorageTotal, StorageUsed} = cluster;
|
74
133
|
|
134
|
+
let link = backend + '/internal';
|
135
|
+
|
136
|
+
if (singleClusterMode && !customBackend) {
|
137
|
+
link = `/internal`;
|
138
|
+
}
|
139
|
+
|
75
140
|
const info: IClusterInfoItem[] = [
|
76
141
|
{
|
77
142
|
label: 'Nodes',
|
@@ -109,21 +174,37 @@ class ClusterInfo extends React.Component<ClusterInfoProps> {
|
|
109
174
|
value: <div>{cluster.Versions?.join(', ')}</div>,
|
110
175
|
},
|
111
176
|
...additionalInfo,
|
177
|
+
{
|
178
|
+
label: 'Internal viewer',
|
179
|
+
value: (
|
180
|
+
<Link href={link} target="_blank">
|
181
|
+
<Icon name="external" viewBox={'0 0 16 16'} width={16} height={16} />
|
182
|
+
</Link>
|
183
|
+
),
|
184
|
+
},
|
112
185
|
];
|
113
186
|
|
114
187
|
return info;
|
115
188
|
}
|
116
189
|
|
117
190
|
private renderContent = () => {
|
118
|
-
const {
|
191
|
+
const {
|
192
|
+
cluster = {} as ICluster,
|
193
|
+
showTooltip,
|
194
|
+
hideTooltip,
|
195
|
+
clusterTitle,
|
196
|
+
loading,
|
197
|
+
wasLoaded,
|
198
|
+
} = this.props;
|
119
199
|
const {Name: clusterName = 'Unknown cluster'} = cluster;
|
120
200
|
|
121
201
|
const info = this.getInfo();
|
122
202
|
|
123
|
-
return (
|
124
|
-
|
203
|
+
return loading && !wasLoaded ? (
|
204
|
+
this.renderLoader()
|
205
|
+
) : (
|
206
|
+
<React.Fragment>
|
125
207
|
<div className={b('common')}>
|
126
|
-
<span className={b('title')}>cluster</span>
|
127
208
|
<div className={b('url')}>
|
128
209
|
<EntityStatus
|
129
210
|
size="m"
|
@@ -149,9 +230,28 @@ class ClusterInfo extends React.Component<ClusterInfoProps> {
|
|
149
230
|
</div>
|
150
231
|
</div>
|
151
232
|
<InfoViewer dots={true} info={info} />
|
152
|
-
</
|
233
|
+
</React.Fragment>
|
153
234
|
);
|
154
235
|
};
|
155
236
|
}
|
156
237
|
|
157
|
-
|
238
|
+
const mapStateToProps = (state: any) => {
|
239
|
+
const {data: cluster, loading, error, wasLoaded} = state.cluster;
|
240
|
+
|
241
|
+
return {
|
242
|
+
cluster,
|
243
|
+
loading,
|
244
|
+
wasLoaded,
|
245
|
+
error,
|
246
|
+
singleClusterMode: state.singleClusterMode,
|
247
|
+
};
|
248
|
+
};
|
249
|
+
|
250
|
+
const mapDispatchToProps = {
|
251
|
+
getClusterInfo,
|
252
|
+
hideTooltip,
|
253
|
+
showTooltip,
|
254
|
+
setHeader,
|
255
|
+
};
|
256
|
+
|
257
|
+
export default connect(mapStateToProps, mapDispatchToProps)(ClusterInfo);
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import {Button, CopyToClipboard as CopyToClipboardUiKit} from '@yandex-cloud/uikit';
|
2
|
+
import createToast from '../../utils/createToast';
|
3
|
+
//@ts-ignore
|
4
|
+
import Icon from '../Icon/Icon';
|
5
|
+
|
6
|
+
interface CopyToClipboardProps {
|
7
|
+
text: string;
|
8
|
+
title?: string;
|
9
|
+
disabled?: boolean;
|
10
|
+
toastText?: string;
|
11
|
+
}
|
12
|
+
|
13
|
+
function CopyToClipboard(props: CopyToClipboardProps) {
|
14
|
+
return (
|
15
|
+
<CopyToClipboardUiKit text={props.text} timeout={1000}>
|
16
|
+
{(state) => {
|
17
|
+
if (state === 'success') {
|
18
|
+
createToast({
|
19
|
+
name: 'Copied',
|
20
|
+
title: props.toastText ?? 'Data was copied to clipboard successfully',
|
21
|
+
type: state,
|
22
|
+
});
|
23
|
+
}
|
24
|
+
|
25
|
+
return (
|
26
|
+
<Button
|
27
|
+
disabled={props.disabled}
|
28
|
+
title={props.title ?? 'Copy'}
|
29
|
+
view="flat-secondary"
|
30
|
+
>
|
31
|
+
<Icon name="copy" viewBox={'0 0 16 16'} width={16} height={16} />
|
32
|
+
</Button>
|
33
|
+
);
|
34
|
+
}}
|
35
|
+
</CopyToClipboardUiKit>
|
36
|
+
);
|
37
|
+
}
|
38
|
+
|
39
|
+
export default CopyToClipboard;
|
@@ -8,11 +8,12 @@
|
|
8
8
|
&__body {
|
9
9
|
display: flex;
|
10
10
|
align-items: center;
|
11
|
-
|
11
|
+
|
12
|
+
padding: 16px 16px 0;
|
12
13
|
}
|
13
14
|
|
14
15
|
& .yc-dialog-footer {
|
15
|
-
padding: 20px 4px 4px
|
16
|
+
padding: 20px 4px 4px;
|
16
17
|
}
|
17
18
|
|
18
19
|
& .yc-dialog-footer__children {
|
@@ -20,9 +21,9 @@
|
|
20
21
|
}
|
21
22
|
|
22
23
|
& .yc-dialog-footer__button {
|
23
|
-
margin: 0;
|
24
|
-
min-width: 120px;
|
25
24
|
box-sizing: border-box;
|
25
|
+
min-width: 120px;
|
26
|
+
margin: 0;
|
26
27
|
}
|
27
28
|
|
28
29
|
& .yc-dialog-footer__button_action_cancel {
|
@@ -6,31 +6,33 @@
|
|
6
6
|
}
|
7
7
|
|
8
8
|
&__wrapper {
|
9
|
+
display: grid;
|
10
|
+
grid-template-areas:
|
11
|
+
'image title'
|
12
|
+
'image description'
|
13
|
+
'image description'
|
14
|
+
'image actions';
|
9
15
|
&_size_s {
|
10
16
|
width: 460px;
|
11
17
|
height: 120px;
|
12
18
|
}
|
13
19
|
|
14
20
|
&_size_m {
|
21
|
+
position: relative;
|
22
|
+
top: 20%;
|
23
|
+
|
15
24
|
width: 800px;
|
16
25
|
height: 240px;
|
17
26
|
margin: 0 auto;
|
18
|
-
position: relative;
|
19
|
-
top: 20%;
|
20
27
|
}
|
21
|
-
|
22
|
-
display: grid;
|
23
|
-
grid-template-areas:
|
24
|
-
'image title'
|
25
|
-
'image description'
|
26
|
-
'image description'
|
27
|
-
'image actions';
|
28
28
|
}
|
29
29
|
|
30
30
|
&__image {
|
31
31
|
grid-area: image;
|
32
32
|
justify-self: end;
|
33
|
+
|
33
34
|
margin-right: 60px;
|
35
|
+
|
34
36
|
color: var(--yc-color-base-info-hover);
|
35
37
|
|
36
38
|
.yc-root_theme_dark & {
|
@@ -39,8 +41,9 @@
|
|
39
41
|
}
|
40
42
|
|
41
43
|
&__title {
|
42
|
-
grid-area: title;
|
43
44
|
align-self: center;
|
45
|
+
grid-area: title;
|
46
|
+
|
44
47
|
font-weight: 500;
|
45
48
|
|
46
49
|
&_size_s {
|
@@ -56,6 +59,7 @@
|
|
56
59
|
|
57
60
|
&__description {
|
58
61
|
grid-area: description;
|
62
|
+
|
59
63
|
font-size: var(--yc-text-body2-font-size);
|
60
64
|
line-height: var(--yc-text-body2-line-height);
|
61
65
|
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import {Button} from '@yandex-cloud/uikit';
|
2
|
+
import {useDispatch} from 'react-redux';
|
3
|
+
import {enableFullscreen} from '../../store/reducers/fullscreen';
|
4
|
+
import Icon from '../Icon/Icon';
|
5
|
+
|
6
|
+
interface EnableFullscreenButtonProps {
|
7
|
+
disabled?: boolean;
|
8
|
+
}
|
9
|
+
|
10
|
+
function EnableFullscreenButton({disabled}: EnableFullscreenButtonProps) {
|
11
|
+
const dispatch = useDispatch();
|
12
|
+
const onEnableFullscreen = () => {
|
13
|
+
dispatch(enableFullscreen());
|
14
|
+
};
|
15
|
+
return (
|
16
|
+
<Button onClick={onEnableFullscreen} view="flat-secondary" disabled={disabled} title='Fullscreen'>
|
17
|
+
<Icon name="enableFullscreen" viewBox={'0 0 16 16'} height={16} width={16} />
|
18
|
+
</Button>
|
19
|
+
);
|
20
|
+
}
|
21
|
+
|
22
|
+
export default EnableFullscreenButton;
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import cn from 'bem-cn-lite';
|
4
4
|
import {Link} from 'react-router-dom';
|
5
|
-
import {ClipboardButton, Link as ExternalLink} from '@yandex-cloud/uikit';
|
5
|
+
import {ClipboardButton, Link as ExternalLink, Button} from '@yandex-cloud/uikit';
|
6
6
|
|
7
7
|
import './EntityStatus.scss';
|
8
8
|
|
@@ -25,7 +25,7 @@ class EntityStatus extends React.Component {
|
|
25
25
|
static defaultProps = {
|
26
26
|
status: 'gray',
|
27
27
|
text: '',
|
28
|
-
size: '
|
28
|
+
size: 's',
|
29
29
|
label: '',
|
30
30
|
showStatus: true,
|
31
31
|
externalLink: false,
|
@@ -85,7 +85,9 @@ class EntityStatus extends React.Component {
|
|
85
85
|
visible: false,
|
86
86
|
})}
|
87
87
|
>
|
88
|
-
<
|
88
|
+
<Button size="s">
|
89
|
+
<ClipboardButton text={name} size={16} />
|
90
|
+
</Button>
|
89
91
|
</span>
|
90
92
|
)}
|
91
93
|
</div>
|
@@ -1,26 +1,39 @@
|
|
1
1
|
.entity-status {
|
2
2
|
display: inline-flex;
|
3
|
-
max-width: 100%;
|
4
3
|
align-items: center;
|
4
|
+
|
5
|
+
max-width: 100%;
|
6
|
+
height: 100%;
|
7
|
+
|
5
8
|
font-size: var(--yc-text-body2-font-size);
|
6
9
|
line-height: var(--yc-text-body2-line-height);
|
7
10
|
|
8
11
|
&__clipboard-button {
|
12
|
+
display: flex;
|
9
13
|
visibility: hidden;
|
10
|
-
|
14
|
+
align-items: center;
|
15
|
+
|
16
|
+
margin-left: 8px;
|
17
|
+
|
11
18
|
color: var(--yc-color-text-secondary);
|
12
19
|
|
20
|
+
.yc-button__text {
|
21
|
+
margin: 0 4px;
|
22
|
+
}
|
23
|
+
|
13
24
|
&_visible {
|
14
25
|
visibility: visible;
|
15
26
|
}
|
16
27
|
}
|
17
28
|
|
18
29
|
a {
|
19
|
-
color: var(--yc-color-text-link);
|
20
|
-
text-decoration: none;
|
21
|
-
text-overflow: ellipsis;
|
22
30
|
overflow: hidden;
|
31
|
+
|
23
32
|
white-space: nowrap;
|
33
|
+
text-decoration: none;
|
34
|
+
text-overflow: ellipsis;
|
35
|
+
|
36
|
+
color: var(--yc-color-text-link);
|
24
37
|
}
|
25
38
|
|
26
39
|
a:hover {
|
@@ -29,9 +42,11 @@
|
|
29
42
|
|
30
43
|
&__label {
|
31
44
|
margin-right: 2px;
|
32
|
-
|
45
|
+
|
33
46
|
font-size: var(--yc-text-body2-font-size);
|
34
47
|
line-height: var(--yc-text-body2-line-height);
|
48
|
+
|
49
|
+
color: var(--yc-color-text-complementary);
|
35
50
|
}
|
36
51
|
|
37
52
|
&__name {
|
@@ -39,31 +54,38 @@
|
|
39
54
|
}
|
40
55
|
|
41
56
|
&__status-icon {
|
42
|
-
border-radius: 3px;
|
43
57
|
margin-right: 8px;
|
44
58
|
|
59
|
+
border-radius: 3px;
|
45
60
|
&_size_xs {
|
46
|
-
|
61
|
+
aspect-ratio: 1;
|
62
|
+
|
63
|
+
height: 12px;
|
64
|
+
}
|
65
|
+
&_size_s {
|
66
|
+
aspect-ratio: 1;
|
67
|
+
|
47
68
|
height: 16px;
|
48
69
|
}
|
49
70
|
&_size_m {
|
50
|
-
|
71
|
+
aspect-ratio: 1;
|
72
|
+
|
51
73
|
height: 18px;
|
52
74
|
}
|
53
75
|
|
54
76
|
&_state_running,
|
55
77
|
&_state_green {
|
56
|
-
background-color: var(--yc-color-
|
78
|
+
background-color: var(--yc-color-infographics-positive-heavy);
|
57
79
|
}
|
58
80
|
&_state_yellow {
|
59
|
-
background-color: var(--yc-color-
|
81
|
+
background-color: var(--yc-color-infographics-warning-heavy);
|
60
82
|
}
|
61
83
|
&_state_blue {
|
62
|
-
background-color: var(--yc-color-
|
84
|
+
background-color: var(--yc-color-infographics-info-heavy);
|
63
85
|
}
|
64
86
|
|
65
87
|
&_state_red {
|
66
|
-
background: var(--yc-color-
|
88
|
+
background: var(--yc-color-infographics-danger-heavy);
|
67
89
|
}
|
68
90
|
&_state_gray,
|
69
91
|
&_state_grey {
|
@@ -10,7 +10,7 @@ import ProgressViewer from '../ProgressViewer/ProgressViewer';
|
|
10
10
|
import Breadcrumbs from '../Breadcrumbs/Breadcrumbs';
|
11
11
|
|
12
12
|
import {stringifyVdiskId, formatStorageValues} from '../../utils';
|
13
|
-
import {PDISK_CATEGORIES} from '../../utils/constants';
|
13
|
+
import {DEFAULT_TABLE_SETTINGS, PDISK_CATEGORIES} from '../../utils/constants';
|
14
14
|
import routes, {createHref} from '../../routes';
|
15
15
|
|
16
16
|
import './FullGroupViewer.scss';
|
@@ -18,10 +18,8 @@ import './FullGroupViewer.scss';
|
|
18
18
|
const b = cn('full-group-viewer');
|
19
19
|
|
20
20
|
const tableSettings = {
|
21
|
-
|
21
|
+
...DEFAULT_TABLE_SETTINGS,
|
22
22
|
stickyHead: DataTable.FIXED,
|
23
|
-
syncHeadOnResize: true,
|
24
|
-
dynamicRender: true,
|
25
23
|
};
|
26
24
|
|
27
25
|
class FullGroupViewer extends React.Component {
|
@@ -1,14 +1,16 @@
|
|
1
1
|
@import '../../styles/mixins';
|
2
2
|
|
3
3
|
.full-group-viewer {
|
4
|
+
overflow: auto;
|
4
5
|
@include container-fluid();
|
5
6
|
@include flex-container();
|
6
|
-
overflow: auto;
|
7
7
|
|
8
8
|
&__section {
|
9
|
-
min-width: 315px;
|
10
9
|
display: inline-block;
|
10
|
+
|
11
|
+
min-width: 315px;
|
11
12
|
margin-right: 40px;
|
13
|
+
|
12
14
|
border-radius: 5px;
|
13
15
|
|
14
16
|
.info-viewer__label {
|
@@ -21,9 +23,10 @@
|
|
21
23
|
}
|
22
24
|
|
23
25
|
.data-table {
|
26
|
+
overflow: auto;
|
27
|
+
|
24
28
|
margin-top: 50px;
|
25
29
|
@include flex-container();
|
26
|
-
overflow: auto;
|
27
30
|
}
|
28
31
|
|
29
32
|
.data-table__table {
|
@@ -1,21 +1,23 @@
|
|
1
1
|
@import '../../styles/mixins.scss';
|
2
2
|
|
3
3
|
.full-node-viewer {
|
4
|
-
@include container-fluid();
|
5
4
|
font-size: var(--yc-text-body2-font-size);
|
6
5
|
line-height: var(--yc-text-body2-line-height);
|
6
|
+
@include container-fluid();
|
7
7
|
|
8
8
|
&__title {
|
9
|
-
font-size: var(--yc-text-body2-font-size);
|
10
|
-
line-height: var(--yc-text-body2-line-height);
|
11
9
|
margin: 0 20px 0 0;
|
10
|
+
|
11
|
+
font-size: var(--yc-text-body2-font-size);
|
12
12
|
font-weight: 500;
|
13
|
+
line-height: var(--yc-text-body2-line-height);
|
13
14
|
text-transform: uppercase;
|
14
15
|
}
|
15
16
|
|
16
17
|
&__row {
|
17
18
|
display: flex;
|
18
19
|
align-items: center;
|
20
|
+
|
19
21
|
margin: 15px 0;
|
20
22
|
|
21
23
|
&_id {
|
@@ -25,20 +27,23 @@
|
|
25
27
|
|
26
28
|
&__common-info {
|
27
29
|
display: flex;
|
28
|
-
align-items: stretch;
|
29
30
|
justify-content: flex-start;
|
31
|
+
align-items: stretch;
|
30
32
|
}
|
31
33
|
|
32
34
|
&__section {
|
33
|
-
padding: 15px;
|
34
35
|
margin-right: 20px;
|
36
|
+
padding: 15px;
|
37
|
+
|
35
38
|
border-radius: 10px;
|
36
39
|
|
37
40
|
&_pools {
|
38
|
-
padding: 15px 15px 15px 0;
|
39
41
|
display: grid;
|
40
|
-
grid-template-columns: 110px 110px;
|
41
42
|
grid-gap: 7px 20px;
|
43
|
+
|
44
|
+
grid-template-columns: 110px 110px;
|
45
|
+
|
46
|
+
padding: 15px 15px 15px 0;
|
42
47
|
}
|
43
48
|
}
|
44
49
|
|
@@ -47,13 +52,15 @@
|
|
47
52
|
}
|
48
53
|
|
49
54
|
&__label {
|
50
|
-
color: var(--yc-color-text-hint);
|
51
|
-
font-size: var(--yc-text-body2-font-size);
|
52
55
|
min-width: 100px;
|
53
56
|
margin-right: 25px;
|
57
|
+
|
58
|
+
font-size: var(--yc-text-body2-font-size);
|
54
59
|
line-height: 18px;
|
55
60
|
white-space: nowrap;
|
56
61
|
|
62
|
+
color: var(--yc-color-text-hint);
|
63
|
+
|
57
64
|
.yc-root_theme_dark & {
|
58
65
|
color: var(--yc-color-text-hint);
|
59
66
|
}
|
@@ -65,10 +72,11 @@
|
|
65
72
|
}
|
66
73
|
|
67
74
|
&__section-title {
|
75
|
+
margin: 15px 0 0;
|
76
|
+
|
68
77
|
font-size: var(--yc-text-body2-font-size);
|
69
|
-
line-height: var(--yc-text-body2-line-height);
|
70
|
-
margin: 15px 0 0 0;
|
71
78
|
font-weight: 500;
|
79
|
+
line-height: var(--yc-text-body2-line-height);
|
72
80
|
}
|
73
81
|
|
74
82
|
&__link {
|
@@ -0,0 +1,28 @@
|
|
1
|
+
.kv-fullscreen {
|
2
|
+
position: fixed;
|
3
|
+
z-index: 10;
|
4
|
+
top: 0;
|
5
|
+
left: var(--nv-aside-header-size);
|
6
|
+
|
7
|
+
display: flex;
|
8
|
+
overflow: hidden;
|
9
|
+
flex-grow: 1;
|
10
|
+
|
11
|
+
width: calc(100% - var(--nv-aside-header-size));
|
12
|
+
height: 100%;
|
13
|
+
|
14
|
+
background-color: var(--yc-color-base-background);
|
15
|
+
|
16
|
+
&__close-button {
|
17
|
+
position: fixed;
|
18
|
+
z-index: 11;
|
19
|
+
top: 8px;
|
20
|
+
right: 20px;
|
21
|
+
.yc-button__text {
|
22
|
+
display: flex;
|
23
|
+
align-items: center;
|
24
|
+
|
25
|
+
margin: 0 6px;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|