Skip to content

Commit 5181820

Browse files
Copilotastandrik
andcommitted
refactor: simplify monitoring component to only show iframe
Co-authored-by: astandrik <[email protected]>
1 parent 113aad8 commit 5181820

File tree

2 files changed

+6
-47
lines changed

2 files changed

+6
-47
lines changed

src/containers/Tenant/Diagnostics/Monitoring/Monitoring.scss

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,9 @@
11
@use '../../../../styles/mixins';
22

33
.ydb-monitoring {
4-
display: flex;
5-
flex-direction: column;
6-
74
width: 100%;
85
height: 100%;
96

10-
&__controls {
11-
padding: 16px 20px;
12-
13-
border-bottom: 1px solid var(--g-color-line-generic);
14-
}
15-
16-
&__content {
17-
position: relative;
18-
19-
overflow: hidden;
20-
flex: 1;
21-
}
22-
237
&__iframe {
248
width: 100%;
259
height: 100%;
Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
import React from 'react';
2-
3-
import {SegmentedRadioGroup} from '@gravity-ui/uikit';
4-
51
import {cn} from '../../../../utils/cn';
62

73
import './Monitoring.scss';
@@ -13,18 +9,7 @@ interface MonitoringProps {
139
monitoringUrl?: string;
1410
}
1511

16-
const MONITORING_TABS = [
17-
{value: 'diagnostics', content: 'Diagnostics'},
18-
{value: 'transactions', content: 'Transactions'},
19-
{value: 'calling-api', content: 'Calling API'},
20-
{value: 'yql-queries', content: 'YQL Queries'},
21-
{value: 'tables-rw', content: 'Tables R/W'},
22-
{value: 'topics-rw', content: 'Topics R/W'},
23-
];
24-
2512
export function Monitoring({monitoringUrl}: MonitoringProps) {
26-
const [activeTab, setActiveTab] = React.useState('diagnostics');
27-
2813
if (!monitoringUrl) {
2914
return (
3015
<div className={b('empty')}>
@@ -35,22 +20,12 @@ export function Monitoring({monitoringUrl}: MonitoringProps) {
3520

3621
return (
3722
<div className={b()}>
38-
<div className={b('controls')}>
39-
<SegmentedRadioGroup
40-
size="l"
41-
value={activeTab}
42-
onUpdate={setActiveTab}
43-
options={MONITORING_TABS}
44-
/>
45-
</div>
46-
<div className={b('content')}>
47-
<iframe
48-
className={b('iframe')}
49-
src={monitoringUrl}
50-
title="YDB Monitoring Dashboard"
51-
frameBorder="0"
52-
/>
53-
</div>
23+
<iframe
24+
className={b('iframe')}
25+
src={monitoringUrl}
26+
title="YDB Monitoring Dashboard"
27+
frameBorder="0"
28+
/>
5429
</div>
5530
);
5631
}

0 commit comments

Comments
 (0)