Skip to content

Commit 87f819b

Browse files
authored
Merge branch 'main' into 653-use-gravity-ui-browserslist-config
2 parents daa0a9c + cdf36da commit 87f819b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+925
-620
lines changed

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
packaje-lock.json
1+
package-lock.json
22

33
build
44
dist

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# Changelog
22

3+
## [6.6.1](https://github.com/ydb-platform/ydb-embedded-ui/compare/v6.6.0...v6.6.1) (2024-06-14)
4+
5+
6+
### Bug Fixes
7+
8+
* fix npm package ([#925](https://github.com/ydb-platform/ydb-embedded-ui/issues/925)) ([6a3a594](https://github.com/ydb-platform/ydb-embedded-ui/commit/6a3a5949ccccbe053e063276648ad4322ff9c063))
9+
10+
## [6.6.0](https://github.com/ydb-platform/ydb-embedded-ui/compare/v6.5.0...v6.6.0) (2024-06-14)
11+
12+
### Features
13+
14+
* @gravity-ui/websql-autocomplete -> 9.1.0, enable autocomplete by default ([#904](https://github.com/ydb-platform/ydb-embedded-ui/issues/904)) ([e71fad9](https://github.com/ydb-platform/ydb-embedded-ui/commit/e71fad97fe16ec56dd3ee14e2e1f9ac76eb1bed9))
15+
* **Diagnostics:** add tablets tab to all entities with tablets ([#892](https://github.com/ydb-platform/ydb-embedded-ui/issues/892)) ([e94d53a](https://github.com/ydb-platform/ydb-embedded-ui/commit/e94d53a1fb293119dc3383add220da5f0cf601c3))
16+
* **Overview:** add view info ([#912](https://github.com/ydb-platform/ydb-embedded-ui/issues/912)) ([02e0cd6](https://github.com/ydb-platform/ydb-embedded-ui/commit/02e0cd66739b442eed649c9edd257ac1de87dcae))
17+
* **SchemaViewer:** refactor, add view schema ([#910](https://github.com/ydb-platform/ydb-embedded-ui/issues/910)) ([3a10460](https://github.com/ydb-platform/ydb-embedded-ui/commit/3a1046031b0ced98494c821b8dc5bf13b87081c4))
18+
* **UserSettings:** display app version ([#889](https://github.com/ydb-platform/ydb-embedded-ui/issues/889)) ([e52639e](https://github.com/ydb-platform/ydb-embedded-ui/commit/e52639e84dc5e1ca2707bb38ed917cd613a9c395))
19+
20+
21+
### Bug Fixes
22+
23+
* **AsyncReplication:** fix table styles ([#891](https://github.com/ydb-platform/ydb-embedded-ui/issues/891)) ([f879369](https://github.com/ydb-platform/ydb-embedded-ui/commit/f87936951e28e18823c8743b3634f6f7d0d18b55))
24+
* **TenantOverview:** increase section margin ([#916](https://github.com/ydb-platform/ydb-embedded-ui/issues/916)) ([d8f97f0](https://github.com/ydb-platform/ydb-embedded-ui/commit/d8f97f0de7d452a5f741cca023e233968be97bfa))
25+
* revert release, fix package ([#920](https://github.com/ydb-platform/ydb-embedded-ui/issues/920)) ([5d3a7c6](https://github.com/ydb-platform/ydb-embedded-ui/commit/5d3a7c6cb347c6943a84e2938d836fca4da47328))
26+
327
## [6.5.0](https://github.com/ydb-platform/ydb-embedded-ui/compare/v6.4.0...v6.5.0) (2024-06-06)
428

529

package-lock.json

Lines changed: 34 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "ydb-embedded-ui",
3-
"version": "6.5.0",
3+
"version": "6.6.1",
44
"files": [
55
"dist"
66
],
7-
"main": "dist/lib.js",
7+
"main": "dist/src/lib.js",
88
"repository": {
99
"type": "git",
1010
"url": "[email protected]:ydb-platform/ydb-embedded-ui.git"
@@ -13,17 +13,18 @@
1313
"@bem-react/classname": "^1.6.0",
1414
"@gravity-ui/axios-wrapper": "^1.4.1",
1515
"@gravity-ui/chartkit": "^5.5.0",
16-
"@gravity-ui/components": "^3.4.1",
16+
"@gravity-ui/components": "^3.6.2",
1717
"@gravity-ui/date-utils": "^2.4.0",
1818
"@gravity-ui/i18n": "^1.5.0",
1919
"@gravity-ui/icons": "^2.9.1",
2020
"@gravity-ui/navigation": "^2.10.0",
2121
"@gravity-ui/paranoid": "^2.0.1",
2222
"@gravity-ui/react-data-table": "^2.1.1",
2323
"@gravity-ui/uikit": "^6.15.0",
24-
"@gravity-ui/websql-autocomplete": "^9.0.0",
24+
"@gravity-ui/websql-autocomplete": "^9.1.0",
2525
"@reduxjs/toolkit": "^2.2.3",
2626
"axios": "^1.6.8",
27+
"axios-retry": "^4.4.0",
2728
"colord": "^2.9.3",
2829
"copy-to-clipboard": "^3.3.3",
2930
"crc-32": "^1.2.2",
@@ -65,7 +66,7 @@
6566
"lint:other": "npm run prettier -- --check",
6667
"prettier": "prettier '**/*.{json,yaml,yml,md}'",
6768
"unimported": "npx unimported --no-cache",
68-
"package": "rm -rf dist && tsc -p tsconfig.package.json && copyfiles -u 1 'src/**/*.{css,scss,svg}' dist",
69+
"package": "rm -rf dist && tsc -p tsconfig.package.json && copyfiles -u 1 'src/**/*.{css,scss,svg}' dist/src",
6970
"test": "react-app-rewired test",
7071
"eject": "react-scripts eject",
7172
"prepublishOnly": "npm run package",

src/containers/App/App.scss

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ body,
2929
--g-color-base-yellow-light: rgba(255, 199, 0, 0.15);
3030
--g-color-base-yellow-medium: rgba(255, 219, 77, 0.4);
3131

32-
--data-table-row-height: 40px;
32+
--tenant-object-info-max-value-width: 300px;
33+
--diagnostics-section-title-margin: 20px;
34+
--diagnostics-section-margin: 30px;
35+
--diagnostics-section-table-width: 872px;
3336
}
3437

3538
.g-root {
@@ -74,42 +77,12 @@ body,
7477
.app {
7578
height: 100%;
7679
@include flex-container();
80+
@include data-table-styles();
7781

7882
&__main {
7983
overflow: auto;
8084
@include flex-container();
8185
}
82-
83-
.data-table {
84-
width: 100%;
85-
@include body-2-typography();
86-
87-
&__table {
88-
max-width: 100%;
89-
90-
border-spacing: 0;
91-
border-collapse: separate;
92-
}
93-
}
94-
95-
.data-table__th {
96-
font-weight: bold;
97-
98-
border-top: unset;
99-
border-right: unset;
100-
border-left: unset;
101-
}
102-
103-
.data-table__sticky .data-table__th,
104-
.data-table__td {
105-
height: var(--data-table-row-height);
106-
107-
vertical-align: middle;
108-
109-
border-top: unset;
110-
border-right: unset;
111-
border-left: unset;
112-
}
11386
}
11487

11588
.error {

src/containers/AppWithClusters/ExtendedTenant/ExtendedTenant.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {MonitoringButton} from '../../../components/MonitoringButton/MonitoringButton';
2+
import type {ETenantType} from '../../../types/api/tenant';
23
import type {GetMonitoringLink} from '../../../utils/monitoring';
34
import type Tenant from '../../Tenant/Tenant';
45
import {useClusterData} from '../useClusterData';
@@ -15,7 +16,7 @@ export function ExtendedTenant({
1516
const {additionalNodesProps, cluster, monitoring} = useClusterData();
1617

1718
const additionalTenantProps = {
18-
getMonitoringLink: (dbName?: string, dbType?: string) => {
19+
getMonitoringLink: (dbName?: string, dbType?: ETenantType) => {
1920
if (monitoring && dbName && dbType && getMonitoringLink) {
2021
const href = getMonitoringLink({
2122
monitoring,

src/containers/Header/Header.scss

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,23 @@
1010

1111
border-bottom: 1px solid var(--g-color-line-generic);
1212

13-
&__breadcrumb {
13+
&__breadcrumbs-item {
1414
display: flex;
15-
align-items: center;
15+
gap: 3px;
16+
17+
color: var(--g-color-text-secondary);
1618

17-
&__icon {
18-
display: flex;
19+
&_link:hover {
20+
color: var(--g-color-text-complementary);
21+
}
1922

20-
margin-right: 3px;
23+
&_active {
24+
color: var(--g-color-text-primary);
2125
}
2226
}
27+
28+
&__breadcrumbs-icon {
29+
display: flex;
30+
align-items: center;
31+
}
2332
}

src/containers/Header/Header.tsx

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import React from 'react';
22

33
import {Breadcrumbs} from '@gravity-ui/uikit';
4+
import {get} from 'lodash';
45
import {useHistory, useLocation} from 'react-router';
56

7+
import {InternalLink} from '../../components/InternalLink';
68
import {LinkWithIcon} from '../../components/LinkWithIcon/LinkWithIcon';
79
import {parseQuery} from '../../routes';
810
import {backend, customBackend} from '../../store';
@@ -33,66 +35,65 @@ interface HeaderProps {
3335
function Header({mainPage}: HeaderProps) {
3436
const history = useHistory();
3537
const location = useLocation();
38+
const queryParams = parseQuery(location);
3639

3740
const singleClusterMode = useTypedSelector((state) => state.singleClusterMode);
3841
const {page, pageBreadcrumbsOptions} = useTypedSelector((state) => state.header);
3942

40-
const queryParams = parseQuery(location);
41-
42-
const clusterNameFromQuery = queryParams.clusterName?.toString();
43-
const {currentData: {clusterData: data} = {}} =
44-
clusterApi.useGetClusterInfoQuery(clusterNameFromQuery);
43+
const clusterInfo = clusterApi.useGetClusterInfoQuery(queryParams.clusterName);
4544

46-
const clusterNameFinal = data?.Name || clusterNameFromQuery;
45+
const clusterName = get(
46+
clusterInfo,
47+
['currentData', 'clusterData', 'Name'],
48+
queryParams.clusterName,
49+
);
4750

4851
const breadcrumbItems = React.useMemo(() => {
4952
const rawBreadcrumbs: RawBreadcrumbItem[] = [];
50-
let options = pageBreadcrumbsOptions;
53+
const options = pageBreadcrumbsOptions;
5154

5255
if (mainPage) {
5356
rawBreadcrumbs.push(mainPage);
5457
}
5558

56-
if (clusterNameFinal) {
57-
options = {
58-
...pageBreadcrumbsOptions,
59-
clusterName: clusterNameFinal,
60-
};
59+
if (clusterName) {
60+
options.clusterName = clusterName;
6161
}
6262

6363
const breadcrumbs = getBreadcrumbs(page, options, rawBreadcrumbs, queryParams);
6464

6565
return breadcrumbs.map((item) => {
66-
const action = () => {
67-
if (item.link) {
68-
history.push(item.link);
69-
}
70-
};
71-
return {...item, action};
66+
return {...item, action: () => {}};
7267
});
73-
}, [clusterNameFinal, mainPage, history, queryParams, page, pageBreadcrumbsOptions]);
68+
}, [clusterName, mainPage, history, queryParams, page, pageBreadcrumbsOptions]);
7469

7570
const renderHeader = () => {
7671
return (
7772
<header className={b()}>
78-
<div>
79-
<Breadcrumbs
80-
items={breadcrumbItems}
81-
lastDisplayedItemsCount={1}
82-
firstDisplayedItemsCount={1}
83-
renderItemContent={({icon, text}) => {
84-
if (!icon) {
85-
return text;
86-
}
87-
return (
88-
<span className={b('breadcrumb')}>
89-
<div className={b('breadcrumb__icon')}>{icon}</div>
90-
{text}
91-
</span>
92-
);
93-
}}
94-
/>
95-
</div>
73+
<Breadcrumbs
74+
items={breadcrumbItems}
75+
lastDisplayedItemsCount={1}
76+
firstDisplayedItemsCount={1}
77+
className={b('breadcrumbs')}
78+
renderItem={({item, isCurrent}) => {
79+
const {icon, text, link} = item;
80+
81+
return (
82+
<InternalLink
83+
className={b('breadcrumbs-item', {
84+
active: isCurrent,
85+
link: !isCurrent,
86+
})}
87+
to={isCurrent ? undefined : link}
88+
>
89+
{icon ? (
90+
<span className={b('breadcrumbs-icon')}>{icon}</span>
91+
) : null}
92+
<span>{text}</span>
93+
</InternalLink>
94+
);
95+
}}
96+
/>
9697

9798
<LinkWithIcon title={DEVELOPER_UI_TITLE} url={getInternalLink(singleClusterMode)} />
9899
</header>

0 commit comments

Comments
 (0)