ydb-embedded-ui 1.5.2 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/dist/assets/icons/circle-exclamation.svg +1 -0
- package/dist/assets/icons/circle-info.svg +1 -0
- package/dist/assets/icons/circle-xmark.svg +1 -0
- package/dist/assets/icons/triangle-exclamation.svg +1 -0
- package/dist/components/AsideNavigation/Settings/Settings.scss +4 -4
- package/dist/components/Breadcrumbs/Breadcrumbs.scss +1 -1
- package/dist/components/Collapse/Collapse.scss +8 -8
- package/dist/components/EmptyState/EmptyState.scss +6 -6
- package/dist/components/EntityStatus/EntityStatus.scss +6 -6
- package/dist/components/FullNodeViewer/FullNodeViewer.scss +7 -7
- package/dist/components/GroupViewer/GroupViewer.scss +1 -1
- package/dist/components/InfoViewer/InfoViewer.scss +4 -4
- package/dist/components/PDiskViewer/PDiskViewer.scss +1 -1
- package/dist/components/PoolUsage/PoolUsage.scss +5 -5
- package/dist/components/ProgressViewer/ProgressViewer.scss +9 -9
- package/dist/components/ShortyString/ShortyString.scss +7 -0
- package/dist/components/ShortyString/ShortyString.tsx +53 -0
- package/dist/components/TableSkeleton/TableSkeleton.scss +1 -1
- package/dist/components/TabletsViewer/TabletsViewer.scss +2 -2
- package/dist/containers/App/App.js +2 -1
- package/dist/containers/App/App.scss +6 -0
- package/dist/containers/App/TipPopup/TipPopup.js +1 -1
- package/dist/containers/AsideNavigation/AsideNavigation.scss +1 -1
- package/dist/containers/Authentication/Authentication.scss +2 -2
- package/dist/containers/Header/Header.scss +2 -2
- package/dist/containers/Header/Host/Host.scss +6 -6
- package/dist/containers/Heatmap/Heatmap.js +1 -2
- package/dist/containers/Heatmap/Heatmap.scss +2 -2
- package/dist/containers/Node/Node.scss +0 -1
- package/dist/containers/Node/Node.tsx +1 -0
- package/dist/containers/Node/NodeStructure/NodeStructure.scss +3 -3
- package/dist/containers/Node/NodeStructure/Pdisk.tsx +6 -6
- package/dist/containers/Pdisk/Pdisk.scss +2 -2
- package/dist/containers/Pool/Pool.scss +3 -3
- package/dist/containers/Storage/DiskStateProgressBar/DiskStateProgressBar.scss +2 -2
- package/dist/containers/Storage/Storage.scss +3 -3
- package/dist/containers/Storage/StorageGroups/StorageGroups.tsx +4 -4
- package/dist/containers/Storage/StorageNodes/StorageNodes.tsx +4 -4
- package/dist/containers/Tablet/Tablet.scss +4 -4
- package/dist/containers/Tablets/Tablets.js +1 -2
- package/dist/containers/TabletsFilters/TabletsFilters.js +1 -2
- package/dist/containers/TabletsFilters/TabletsFilters.scss +2 -2
- package/dist/containers/Tenant/Acl/Acl.scss +2 -2
- package/dist/containers/Tenant/Diagnostics/Diagnostics.tsx +1 -0
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +3 -2
- package/dist/containers/Tenant/Diagnostics/Network/Network.scss +6 -6
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.scss +4 -4
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +5 -4
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.scss +2 -2
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +8 -7
- package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.scss +7 -8
- package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.tsx +2 -12
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.tsx +3 -2
- package/dist/containers/Tenant/Preview/Preview.js +2 -2
- package/dist/containers/Tenant/QueryEditor/Issues/Issues.scss +124 -0
- package/dist/containers/Tenant/QueryEditor/Issues/Issues.tsx +171 -0
- package/dist/containers/Tenant/QueryEditor/Issues/models.ts +27 -0
- package/dist/containers/Tenant/QueryEditor/QueryEditor.js +38 -52
- package/dist/containers/Tenant/QueryEditor/QueryExplain/QueryExplain.js +4 -1
- package/dist/containers/Tenant/QueryEditor/QueryResult/QueryResult.js +32 -5
- package/dist/containers/Tenant/QueryEditor/SaveQuery/SaveQuery.scss +1 -1
- package/dist/containers/Tenant/Tenant.scss +2 -2
- package/dist/containers/Tenants/Tenants.js +1 -1
- package/dist/containers/Vdisk/Vdisk.scss +2 -2
- package/dist/containers/VdiskPdiskNode/VdiskPdiskNode.scss +2 -2
- package/dist/store/utils.js +1 -1
- package/dist/styles/mixins.scss +13 -13
- package/dist/utils/getNodesColumns.js +2 -3
- package/dist/utils/index.js +4 -0
- package/package.json +6 -7
@@ -0,0 +1,171 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import cn from 'bem-cn-lite';
|
3
|
+
|
4
|
+
import {Button, Icon, ArrowToggle} from '@yandex-cloud/uikit';
|
5
|
+
import ShortyString from '../../../../components/ShortyString/ShortyString';
|
6
|
+
|
7
|
+
import {IssueType, SEVERITY, getSeverity} from './models';
|
8
|
+
|
9
|
+
import fatalIcon from '../../../../assets/icons/circle-xmark.svg';
|
10
|
+
import errorIcon from '../../../../assets/icons/triangle-exclamation.svg';
|
11
|
+
import warningIcon from '../../../../assets/icons/circle-exclamation.svg';
|
12
|
+
import infoIcon from '../../../../assets/icons/circle-info.svg';
|
13
|
+
|
14
|
+
import './Issues.scss';
|
15
|
+
|
16
|
+
const blockWrapper = cn('kv-result-issues');
|
17
|
+
const blockIssues = cn('kv-issues');
|
18
|
+
const blockIssue = cn('kv-issue');
|
19
|
+
|
20
|
+
type DataIssues = {
|
21
|
+
error: IssueType;
|
22
|
+
issues?: IssueType[];
|
23
|
+
};
|
24
|
+
|
25
|
+
interface ResultIssuesProps {
|
26
|
+
data: DataIssues | string;
|
27
|
+
className: string;
|
28
|
+
}
|
29
|
+
|
30
|
+
export default function ResultIssues({data, className}: ResultIssuesProps) {
|
31
|
+
const [showIssues, setShowIssues] = React.useState(false);
|
32
|
+
|
33
|
+
const hasIssues = typeof data === 'string' ? false : Array.isArray(data?.issues);
|
34
|
+
|
35
|
+
const renderTitle = () => {
|
36
|
+
let content;
|
37
|
+
if (typeof data === 'string') {
|
38
|
+
content = data;
|
39
|
+
} else {
|
40
|
+
const severity = getSeverity(data?.error?.severity);
|
41
|
+
content = (
|
42
|
+
<React.Fragment>
|
43
|
+
<IssueSeverity severity={severity} />{' '}
|
44
|
+
<span className={blockWrapper('error-message-text')}>
|
45
|
+
{data?.error?.message}
|
46
|
+
</span>
|
47
|
+
</React.Fragment>
|
48
|
+
);
|
49
|
+
}
|
50
|
+
|
51
|
+
return content;
|
52
|
+
};
|
53
|
+
|
54
|
+
return (
|
55
|
+
<div className={blockWrapper()}>
|
56
|
+
<div className={blockWrapper('error-message')}>
|
57
|
+
{renderTitle()}
|
58
|
+
{hasIssues && (
|
59
|
+
<Button view="normal" onClick={() => setShowIssues(!showIssues)}>
|
60
|
+
{showIssues ? 'Hide details' : 'Show details'}
|
61
|
+
</Button>
|
62
|
+
)}
|
63
|
+
</div>
|
64
|
+
{hasIssues && showIssues && (
|
65
|
+
<Issues issues={(data as DataIssues).issues!} className={className} />
|
66
|
+
)}
|
67
|
+
</div>
|
68
|
+
);
|
69
|
+
}
|
70
|
+
|
71
|
+
interface IssuesProps {
|
72
|
+
className?: string;
|
73
|
+
issues: IssueType[];
|
74
|
+
}
|
75
|
+
export function Issues({issues, className}: IssuesProps) {
|
76
|
+
const mostSevereIssue = issues.reduce((result, issue) => {
|
77
|
+
const severity = issue.severity ?? 10;
|
78
|
+
return Math.min(result, severity);
|
79
|
+
}, 10);
|
80
|
+
return (
|
81
|
+
<div className={blockIssues(null, className)}>
|
82
|
+
{issues.map((issue, index) => (
|
83
|
+
<Issue key={index} issue={issue} expanded={issue === mostSevereIssue} />
|
84
|
+
))}
|
85
|
+
</div>
|
86
|
+
);
|
87
|
+
}
|
88
|
+
|
89
|
+
function Issue({issue, level = 0}: {issue: IssueType; expanded?: boolean; level?: number}) {
|
90
|
+
const [isExpand, setIsExpand] = React.useState(true);
|
91
|
+
const severity = getSeverity(issue.severity);
|
92
|
+
const hasIssues = Array.isArray(issue.issues) && issue.issues.length > 0;
|
93
|
+
const position = getIssuePosition(issue);
|
94
|
+
|
95
|
+
const arrowDirection = isExpand ? 'bottom' : 'right';
|
96
|
+
|
97
|
+
return (
|
98
|
+
<div
|
99
|
+
className={blockIssue({
|
100
|
+
leaf: !hasIssues,
|
101
|
+
'has-issues': hasIssues,
|
102
|
+
})}
|
103
|
+
>
|
104
|
+
<div className={blockIssue('line')}>
|
105
|
+
{hasIssues && (
|
106
|
+
<Button
|
107
|
+
view="flat-secondary"
|
108
|
+
onClick={() => setIsExpand(!isExpand)}
|
109
|
+
className={blockIssue('arrow-toggle')}
|
110
|
+
>
|
111
|
+
<ArrowToggle direction={arrowDirection} size={16} />
|
112
|
+
</Button>
|
113
|
+
)}
|
114
|
+
<IssueSeverity severity={severity} />
|
115
|
+
|
116
|
+
<span className={blockIssue('message')}>
|
117
|
+
{position && (
|
118
|
+
<span className={blockIssue('place-text')} title="Position">
|
119
|
+
{position}
|
120
|
+
</span>
|
121
|
+
)}
|
122
|
+
<div className={blockIssue('message-text')}>
|
123
|
+
<ShortyString value={issue.message} expandLabel={'Show full message'} />
|
124
|
+
</div>
|
125
|
+
</span>
|
126
|
+
{issue.code ? <span className={blockIssue('code')}>Code: {issue.code}</span> : null}
|
127
|
+
</div>
|
128
|
+
{hasIssues && isExpand && (
|
129
|
+
<div className={blockIssue('issues')}>
|
130
|
+
<IssueList issues={issue.issues!} level={level + 1} expanded={isExpand} />
|
131
|
+
</div>
|
132
|
+
)}
|
133
|
+
</div>
|
134
|
+
);
|
135
|
+
}
|
136
|
+
|
137
|
+
function IssueList(props: {issues: IssueType[]; expanded: boolean; level: number}) {
|
138
|
+
const {issues, level, expanded} = props;
|
139
|
+
return (
|
140
|
+
<div className={blockIssue('list')}>
|
141
|
+
{issues.map((issue, index) => (
|
142
|
+
<Issue key={index} issue={issue} level={level} expanded={expanded} />
|
143
|
+
))}
|
144
|
+
</div>
|
145
|
+
);
|
146
|
+
}
|
147
|
+
|
148
|
+
const severityIcons: Record<SEVERITY, any> = {
|
149
|
+
S_INFO: infoIcon,
|
150
|
+
S_WARNING: warningIcon,
|
151
|
+
S_ERROR: errorIcon,
|
152
|
+
S_FATAL: fatalIcon,
|
153
|
+
};
|
154
|
+
const blockIssueSeverity = cn('yql-issue-severity');
|
155
|
+
function IssueSeverity({severity}: {severity: SEVERITY}) {
|
156
|
+
const shortenSeverity = severity.slice(2).toLowerCase();
|
157
|
+
return (
|
158
|
+
<span className={blockIssueSeverity({severity: shortenSeverity})}>
|
159
|
+
<Icon className={blockIssueSeverity('icon')} data={severityIcons[severity]} size={16} />
|
160
|
+
<span className={blockIssueSeverity('title')}>{shortenSeverity}</span>
|
161
|
+
</span>
|
162
|
+
);
|
163
|
+
}
|
164
|
+
|
165
|
+
function getIssuePosition(issue: IssueType) {
|
166
|
+
const {file, position} = issue;
|
167
|
+
if (!position) {
|
168
|
+
return false;
|
169
|
+
}
|
170
|
+
return `${file ? 'file:' : ''}${position.row}:${position.column}`;
|
171
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
export interface IssueType {
|
2
|
+
file?: string;
|
3
|
+
position?: {row: number; column: number};
|
4
|
+
// eslint-disable-next-line camelcase
|
5
|
+
end_position?: {row: number; column: number};
|
6
|
+
message?: string;
|
7
|
+
code?: number;
|
8
|
+
severity?: number;
|
9
|
+
issues?: IssueType[];
|
10
|
+
}
|
11
|
+
|
12
|
+
export const SEVERITY_LIST = ['S_FATAL', 'S_ERROR', 'S_WARNING', 'S_INFO'] as const;
|
13
|
+
|
14
|
+
export type SEVERITY = typeof SEVERITY_LIST[number];
|
15
|
+
|
16
|
+
// Severity values from ydb/library/yql/public/issue/protos/issue_severity.proto
|
17
|
+
// FATAL = 0;
|
18
|
+
// ERROR = 1;
|
19
|
+
// WARNING = 2;
|
20
|
+
// INFO = 3;
|
21
|
+
export function isSeverity(value: number | undefined) {
|
22
|
+
return value ? SEVERITY_LIST[value] !== undefined : false;
|
23
|
+
}
|
24
|
+
|
25
|
+
export function getSeverity(value: number | undefined) {
|
26
|
+
return isSeverity(value) ? SEVERITY_LIST[value!] : 'S_INFO';
|
27
|
+
}
|
@@ -307,58 +307,56 @@ function QueryEditor(props) {
|
|
307
307
|
executeQuery: {data, error, stats},
|
308
308
|
showTooltip,
|
309
309
|
} = props;
|
310
|
-
const result = getExecuteResult();
|
311
|
-
const shouldRenderAnswer = result.length || error;
|
312
310
|
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
311
|
+
let content;
|
312
|
+
if (data) {
|
313
|
+
let columns = [];
|
314
|
+
if (data.length > 0) {
|
315
|
+
columns = Object.keys(data[0]).map((key) => ({
|
316
|
+
name: key,
|
317
|
+
render: ({value}) => {
|
318
|
+
return (
|
319
|
+
<span
|
320
|
+
className={b('cell')}
|
321
|
+
onClick={(e) => showTooltip(e.target, value, 'cell')}
|
322
|
+
>
|
323
|
+
{value}
|
324
|
+
</span>
|
325
|
+
);
|
326
|
+
},
|
327
|
+
}));
|
328
|
+
const preparedData = prepareQueryResponse(data);
|
329
|
+
|
330
|
+
content = columns.length ? (
|
331
|
+
<DataTable
|
332
|
+
columns={columns}
|
333
|
+
data={preparedData}
|
334
|
+
settings={TABLE_SETTINGS}
|
335
|
+
theme="yandex-cloud"
|
336
|
+
rowKey={(_, index) => index}
|
337
|
+
/>
|
338
|
+
) : (
|
339
|
+
<div>{data}</div>
|
340
|
+
);
|
341
|
+
}
|
332
342
|
}
|
343
|
+
const textResults = getPreparedResult();
|
344
|
+
const disabled = !textResults.length || resultType !== RESULT_TYPES.EXECUTE;
|
333
345
|
|
334
|
-
|
335
|
-
|
336
|
-
const content = columns.length ? (
|
337
|
-
<DataTable
|
338
|
-
columns={columns}
|
339
|
-
data={preparedData}
|
340
|
-
settings={TABLE_SETTINGS}
|
341
|
-
theme="yandex-cloud"
|
342
|
-
rowKey={(_, index) => index}
|
343
|
-
/>
|
344
|
-
) : (
|
345
|
-
<div>{result}</div>
|
346
|
-
);
|
347
|
-
const results = getPreparedResult();
|
348
|
-
const disabled = !results.length || resultType !== RESULT_TYPES.EXECUTE;
|
349
|
-
return (
|
346
|
+
return data || error ? (
|
350
347
|
<QueryResult
|
351
348
|
result={content}
|
352
349
|
stats={stats}
|
353
|
-
error={
|
354
|
-
textResults={
|
350
|
+
error={error}
|
351
|
+
textResults={textResults}
|
355
352
|
copyDisabled={disabled}
|
356
353
|
isResultsCollapsed={resultVisibilityState.collapsed}
|
357
354
|
onExpandResults={onExpandResultHandler}
|
358
355
|
onCollapseResults={onCollapseResultHandler}
|
359
356
|
/>
|
360
|
-
);
|
357
|
+
) : null;
|
361
358
|
};
|
359
|
+
|
362
360
|
const renderExplainQuery = () => {
|
363
361
|
const {
|
364
362
|
explainQuery: {data, dataAst, error, loading, loadingAst},
|
@@ -463,18 +461,6 @@ function QueryEditor(props) {
|
|
463
461
|
);
|
464
462
|
};
|
465
463
|
|
466
|
-
const getExecuteResult = () => {
|
467
|
-
const {data = [], error} = props.executeQuery;
|
468
|
-
|
469
|
-
if (error) {
|
470
|
-
return error.data || error;
|
471
|
-
} else if (data.length > 0) {
|
472
|
-
return data;
|
473
|
-
} else {
|
474
|
-
return '';
|
475
|
-
}
|
476
|
-
};
|
477
|
-
|
478
464
|
const getPreparedResult = () => {
|
479
465
|
const {
|
480
466
|
executeQuery: {data},
|
@@ -234,7 +234,10 @@ function QueryExplain(props) {
|
|
234
234
|
}
|
235
235
|
|
236
236
|
if (error) {
|
237
|
-
|
237
|
+
if (error.data) {
|
238
|
+
return typeof error.data === 'string' ? error.data : error.data.error?.message;
|
239
|
+
}
|
240
|
+
return error;
|
238
241
|
}
|
239
242
|
|
240
243
|
switch (activeOption) {
|
@@ -13,6 +13,7 @@ import './QueryResult.scss';
|
|
13
13
|
import {PaneVisibilityToggleButtons} from '../../utils/paneVisibilityToggleHelpers';
|
14
14
|
import QueryExecutionStatus from '../../../../components/QueryExecutionStatus/QueryExecutionStatus';
|
15
15
|
import EnableFullscreenButton from '../../../../components/EnableFullscreenButton/EnableFullscreenButton';
|
16
|
+
import ResultIssues from '../Issues/Issues';
|
16
17
|
|
17
18
|
const b = cn('kv-query-result');
|
18
19
|
|
@@ -27,7 +28,9 @@ const resultOptions = [
|
|
27
28
|
];
|
28
29
|
|
29
30
|
function QueryResult(props) {
|
30
|
-
const [activeSection, setActiveSection] = useState(
|
31
|
+
const [activeSection, setActiveSection] = useState(
|
32
|
+
props.result ? resultOptionsIds.result : resultOptionsIds.stats,
|
33
|
+
);
|
31
34
|
const isFullscreen = useSelector((state) => state.fullscreen);
|
32
35
|
const dispatch = useDispatch();
|
33
36
|
|
@@ -83,11 +86,34 @@ function QueryResult(props) {
|
|
83
86
|
return (
|
84
87
|
<React.Fragment>
|
85
88
|
{result}
|
86
|
-
{isFullscreen &&
|
89
|
+
{isFullscreen && (
|
90
|
+
<Fullscreen>
|
91
|
+
<div className={b('result', {fullscreen: true})}>{result}</div>
|
92
|
+
</Fullscreen>
|
93
|
+
)}
|
87
94
|
</React.Fragment>
|
88
95
|
);
|
89
96
|
};
|
90
97
|
|
98
|
+
const renderIssues = () => {
|
99
|
+
const error = props.error?.data;
|
100
|
+
|
101
|
+
const hasIssues = error?.issues && Array.isArray(error.issues);
|
102
|
+
|
103
|
+
return hasIssues ? (
|
104
|
+
<React.Fragment>
|
105
|
+
<ResultIssues data={error} />
|
106
|
+
{isFullscreen && (
|
107
|
+
<Fullscreen>
|
108
|
+
<div className={b('result', {fullscreen: true})}>
|
109
|
+
<ResultIssues data={error} />
|
110
|
+
</div>
|
111
|
+
</Fullscreen>
|
112
|
+
)}
|
113
|
+
</React.Fragment>
|
114
|
+
) : <span>{error?.data ?? error}</span>;
|
115
|
+
};
|
116
|
+
|
91
117
|
return (
|
92
118
|
<React.Fragment>
|
93
119
|
<div className={b('controls')}>
|
@@ -107,7 +133,7 @@ function QueryResult(props) {
|
|
107
133
|
</div>
|
108
134
|
<div className={b('controls-left')}>
|
109
135
|
{renderClipboardButton()}
|
110
|
-
<EnableFullscreenButton
|
136
|
+
<EnableFullscreenButton />
|
111
137
|
<PaneVisibilityToggleButtons
|
112
138
|
onCollapse={props.onCollapseResults}
|
113
139
|
onExpand={props.onExpandResults}
|
@@ -117,8 +143,9 @@ function QueryResult(props) {
|
|
117
143
|
</div>
|
118
144
|
</div>
|
119
145
|
<div className={b('result')}>
|
120
|
-
{activeSection === resultOptionsIds.result && renderResult()}
|
121
|
-
{activeSection === resultOptionsIds.stats && renderStats()}
|
146
|
+
{activeSection === resultOptionsIds.result && !props.error && renderResult()}
|
147
|
+
{activeSection === resultOptionsIds.stats && !props.error && renderStats()}
|
148
|
+
{renderIssues()}
|
122
149
|
</div>
|
123
150
|
</React.Fragment>
|
124
151
|
);
|
@@ -3,8 +3,8 @@
|
|
3
3
|
.tenant-page {
|
4
4
|
overflow: hidden;
|
5
5
|
|
6
|
-
font-size: var(--yc-text-
|
7
|
-
line-height: var(--yc-text-
|
6
|
+
font-size: var(--yc-text-body-2-font-size);
|
7
|
+
line-height: var(--yc-text-body-2-line-height);
|
8
8
|
@include flex-container();
|
9
9
|
|
10
10
|
.yc-tabs {
|
@@ -20,9 +20,9 @@
|
|
20
20
|
&__title {
|
21
21
|
margin-right: 16px;
|
22
22
|
|
23
|
-
font-size: var(--yc-text-
|
23
|
+
font-size: var(--yc-text-body-2-font-size);
|
24
24
|
font-weight: 500;
|
25
|
-
line-height: var(--yc-text-
|
25
|
+
line-height: var(--yc-text-body-2-line-height);
|
26
26
|
text-transform: uppercase;
|
27
27
|
}
|
28
28
|
|
@@ -27,9 +27,9 @@
|
|
27
27
|
&__title {
|
28
28
|
margin-right: 16px;
|
29
29
|
|
30
|
-
font-size: var(--yc-text-
|
30
|
+
font-size: var(--yc-text-body-2-font-size);
|
31
31
|
font-weight: 500;
|
32
|
-
line-height: var(--yc-text-
|
32
|
+
line-height: var(--yc-text-body-2-line-height);
|
33
33
|
text-transform: uppercase;
|
34
34
|
}
|
35
35
|
|
package/dist/store/utils.js
CHANGED
@@ -32,7 +32,7 @@ export function createApiRequest({actions, request, dataHandler = nop}) {
|
|
32
32
|
dispatch({
|
33
33
|
type: SET_UNAUTHENTICATED.SUCCESS,
|
34
34
|
});
|
35
|
-
} else if (error && error.status && error.statusText) {
|
35
|
+
} else if (error && Number(error.status) >= 500 && error.statusText) {
|
36
36
|
createToast({
|
37
37
|
name: 'Request failure',
|
38
38
|
title: 'Request failure',
|
package/dist/styles/mixins.scss
CHANGED
@@ -16,25 +16,25 @@
|
|
16
16
|
}
|
17
17
|
|
18
18
|
@mixin body-typography() {
|
19
|
-
font-size: var(--yc-text-body-font-size);
|
20
|
-
line-height: var(--yc-text-body-line-height);
|
19
|
+
font-size: var(--yc-text-body-1-font-size);
|
20
|
+
line-height: var(--yc-text-body-1-line-height);
|
21
21
|
}
|
22
22
|
@mixin body2-typography() {
|
23
|
-
font-size: var(--yc-text-
|
24
|
-
line-height: var(--yc-text-
|
23
|
+
font-size: var(--yc-text-body-2-font-size);
|
24
|
+
line-height: var(--yc-text-body-2-line-height);
|
25
25
|
}
|
26
26
|
@mixin body3-typography() {
|
27
|
-
font-size: var(--yc-text-
|
28
|
-
line-height: var(--yc-text-
|
27
|
+
font-size: var(--yc-text-body-3-font-size);
|
28
|
+
line-height: var(--yc-text-body-3-line-height);
|
29
29
|
}
|
30
30
|
@mixin lead-typography() {
|
31
|
-
font-size: var(--yc-text-
|
32
|
-
line-height: var(--yc-text-
|
31
|
+
font-size: var(--yc-text-subheader-3-font-size);
|
32
|
+
line-height: var(--yc-text-subheader-3-line-height);
|
33
33
|
}
|
34
34
|
|
35
35
|
@mixin title-typography() {
|
36
|
-
font-size: var(--yc-text-
|
37
|
-
line-height: var(--yc-text-
|
36
|
+
font-size: var(--yc-text-header-2-font-size);
|
37
|
+
line-height: var(--yc-text-header-2-line-height);
|
38
38
|
}
|
39
39
|
|
40
40
|
@mixin sticky-top {
|
@@ -188,8 +188,8 @@
|
|
188
188
|
@mixin json-tree-styles {
|
189
189
|
// stylelint-disable
|
190
190
|
font-family: var(--yc-font-family-monospace) !important;
|
191
|
-
font-size: var(--yc-text-code-font-size) !important;
|
192
|
-
line-height: var(--yc-text-code-line-height) !important;
|
191
|
+
font-size: var(--yc-text-code-1-font-size) !important;
|
192
|
+
line-height: var(--yc-text-code-1-line-height) !important;
|
193
193
|
// stylelint-enable
|
194
194
|
|
195
195
|
.json-inspector__leaf_composite:before {
|
@@ -239,7 +239,7 @@
|
|
239
239
|
margin: 0;
|
240
240
|
padding: 0;
|
241
241
|
|
242
|
-
font-family: var(--yc-font-family);
|
242
|
+
font-family: var(--yc-text-body-font-family);
|
243
243
|
font-size: 13px;
|
244
244
|
vertical-align: top;
|
245
245
|
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import React from 'react';
|
2
1
|
import cn from 'bem-cn-lite';
|
3
2
|
import DataTable from '@yandex-cloud/react-data-table';
|
4
|
-
import {Button,
|
3
|
+
import {Button, Popover} from '@yandex-cloud/uikit';
|
5
4
|
|
6
5
|
import Icon from '../components/Icon/Icon';
|
7
6
|
import EntityStatus from '../components/EntityStatus/EntityStatus';
|
@@ -62,7 +61,7 @@ export function getNodesColumns({showTooltip, hideTooltip, tabletsPath, getNodeR
|
|
62
61
|
width: '200px',
|
63
62
|
align: DataTable.LEFT,
|
64
63
|
render: ({value}) => {
|
65
|
-
return <
|
64
|
+
return <Popover content={value}>{value}</Popover>;
|
66
65
|
},
|
67
66
|
},
|
68
67
|
{
|
package/dist/utils/index.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ydb-embedded-ui",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.6.1",
|
4
4
|
"files": [
|
5
5
|
"dist"
|
6
6
|
],
|
@@ -40,7 +40,7 @@
|
|
40
40
|
"reselect": "4.0.0",
|
41
41
|
"sass": "1.32.8",
|
42
42
|
"web-vitals": "1.1.2",
|
43
|
-
"ydb-ui-components": "
|
43
|
+
"ydb-ui-components": "2.0.1"
|
44
44
|
},
|
45
45
|
"scripts": {
|
46
46
|
"start": "react-app-rewired start",
|
@@ -52,9 +52,7 @@
|
|
52
52
|
"test": "react-app-rewired test",
|
53
53
|
"eject": "react-scripts eject",
|
54
54
|
"prepublishOnly": "npm run package",
|
55
|
-
"typecheck": "
|
56
|
-
"typecheck:server": "tsc -p src/server --noEmit",
|
57
|
-
"typecheck:ui": "tsc -p src/ui --noEmit",
|
55
|
+
"typecheck": "tsc --noEmit",
|
58
56
|
"prepare": "husky install"
|
59
57
|
},
|
60
58
|
"lint-staged": {
|
@@ -93,7 +91,7 @@
|
|
93
91
|
"@yandex-cloud/prettier-config": "^1.0.0",
|
94
92
|
"@yandex-cloud/stylelint-config": "^1.1.0",
|
95
93
|
"@yandex-cloud/tsconfig": "^1.0.0",
|
96
|
-
"@yandex-cloud/uikit": "^
|
94
|
+
"@yandex-cloud/uikit": "^2.4.0",
|
97
95
|
"copyfiles": "^2.4.1",
|
98
96
|
"eslint-config-prettier": "^8.3.0",
|
99
97
|
"husky": "^7.0.4",
|
@@ -107,6 +105,7 @@
|
|
107
105
|
"typescript": "^4.5.5"
|
108
106
|
},
|
109
107
|
"peerDependencies": {
|
110
|
-
"@yandex-cloud/browserslist-config": "^1.0.1"
|
108
|
+
"@yandex-cloud/browserslist-config": "^1.0.1",
|
109
|
+
"@yandex-cloud/uikit": "^2.4.0"
|
111
110
|
}
|
112
111
|
}
|