Skip to content

Commit bcd81e5

Browse files
committed
feat(Healthcheck): use TreeView in issues viewer
1 parent 09135a2 commit bcd81e5

File tree

2 files changed

+17
-29
lines changed

2 files changed

+17
-29
lines changed

src/containers/Tenant/Diagnostics/Healthcheck/IssuesViewer/IssueViewer.scss

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,14 @@
55
align-items: center;
66

77
height: 40px;
8-
margin-left: 36px;
98

109
cursor: pointer;
11-
.km-tree-view__arrow-icon + & {
12-
margin-left: 0;
13-
}
1410

1511
&_active {
1612
border-radius: 4px;
1713
background: var(--yc-color-base-info);
1814
}
1915

20-
&__wpapper {
21-
& .km-tree-view__node-wrapper {
22-
height: 40px;
23-
24-
& .km-tree-view__arrow-icon {
25-
display: flex;
26-
align-items: center;
27-
28-
width: 36px;
29-
height: 36px;
30-
margin: 0;
31-
}
32-
}
33-
34-
& .tree-view_item {
35-
margin: 0;
36-
}
37-
}
38-
3916
&__field {
4017
padding: 0 10px;
4118

@@ -173,4 +150,15 @@
173150
}
174151
}
175152
}
153+
154+
.ydb-tree-view {
155+
&__item {
156+
height: 40px;
157+
}
158+
159+
.tree-view_arrow {
160+
width: 40px;
161+
height: 40px;
162+
}
163+
}
176164
}

src/containers/Tenant/Diagnostics/Healthcheck/IssuesViewer/IssuesViewer.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import _filter from 'lodash/fp/filter';
77
import _sortBy from 'lodash/fp/sortBy';
88
import _uniqBy from 'lodash/fp/uniqBy';
99

10-
import TreeView from '../../../../../components/TreeView/TreeView';
10+
import {TreeView} from 'ydb-ui-components';
11+
1112
import EntityStatus from '../../../../../components/EntityStatus/EntityStatus';
1213

1314
import './IssueViewer.scss';
@@ -45,7 +46,7 @@ const IssueRow = ({data, treeLevel, active, setInfoForActive, onClick}) => {
4546
</div>
4647
<div
4748
className={issueBlock('field', {message: true})}
48-
style={{marginLeft: -treeLevel * 25 + 'px'}}
49+
style={{marginLeft: -treeLevel * 24 + 'px'}}
4950
>
5051
{message}
5152
</div>
@@ -85,21 +86,20 @@ const IssuesViewer = ({issues}) => {
8586
return (
8687
<TreeView
8788
key={id}
88-
nodeLabel={
89+
name={
8990
<IssueRow
9091
data={item}
9192
treeLevel={treeLevel}
9293
active={isActive}
9394
setInfoForActive={setInfoData}
94-
onClick={() => setActiveItem(id)}
9595
/>
9696
}
97-
className={issueBlock('wpapper', {active: isActive})}
9897
collapsed={
9998
typeof collapsedIssues[id] === 'undefined' || collapsedIssues[id]
10099
}
101100
hasArrow={hasArrow}
102-
onClick={() => {
101+
onClick={() => setActiveItem(id)}
102+
onArrowClick={() => {
103103
const newValue =
104104
typeof collapsedIssues[id] === 'undefined'
105105
? false

0 commit comments

Comments
 (0)