ydb-embedded-ui 4.29.0 → 4.31.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -1
- package/dist/components/ClipboardButton/ClipboardButton.tsx +52 -0
- package/dist/components/ClipboardButton/index.ts +1 -0
- package/dist/components/EntityStatus/EntityStatus.js +9 -12
- package/dist/components/EntityStatus/EntityStatus.scss +2 -13
- package/dist/components/MetricChart/MetricChart.scss +34 -0
- package/dist/components/MetricChart/MetricChart.tsx +198 -0
- package/dist/components/MetricChart/convertReponse.ts +32 -0
- package/dist/components/MetricChart/getChartData.ts +20 -0
- package/dist/components/MetricChart/getDefaultDataFormatter.ts +36 -0
- package/dist/components/MetricChart/index.ts +2 -0
- package/dist/components/MetricChart/reducer.ts +86 -0
- package/dist/components/MetricChart/types.ts +32 -0
- package/dist/components/TimeFrameSelector/TimeFrameSelector.scss +5 -0
- package/dist/components/TimeFrameSelector/TimeFrameSelector.tsx +33 -0
- package/dist/containers/App/App.scss +9 -9
- package/dist/containers/App/Content.js +16 -12
- package/dist/containers/Tenant/Diagnostics/TenantOverview/DefaultDashboard.tsx +50 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.tsx +13 -4
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/CpuDashboard.tsx +18 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TenantCpu.tsx +2 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantDashboard/TenantDashboard.scss +14 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantDashboard/TenantDashboard.tsx +71 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/MemoryDashboard.tsx +21 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TenantMemory.tsx +7 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.tsx +2 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/StorageDashboard.tsx +21 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TenantStorage.tsx +2 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/en.json +7 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/ru.json +7 -1
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.tsx +24 -30
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.tsx +10 -16
- package/dist/containers/UserSettings/i18n/en.json +4 -1
- package/dist/containers/UserSettings/i18n/ru.json +4 -1
- package/dist/containers/UserSettings/settings.ts +12 -1
- package/dist/containers/Versions/NodesTreeTitle/NodesTreeTitle.scss +15 -0
- package/dist/containers/Versions/NodesTreeTitle/NodesTreeTitle.tsx +9 -6
- package/dist/services/api.ts +18 -0
- package/dist/services/settings.ts +2 -0
- package/dist/store/reducers/tenant/tenant.ts +6 -1
- package/dist/types/api/render.ts +34 -0
- package/dist/utils/cn.ts +3 -0
- package/dist/utils/constants.ts +2 -0
- package/dist/utils/timeParsers/formatDuration.ts +10 -0
- package/dist/utils/timeframes.ts +10 -0
- package/dist/utils/versions/getVersionsColors.ts +1 -0
- package/package.json +4 -2
- package/CHANGELOG.md +0 -1552
- package/dist/components/CopyToClipboard/CopyToClipboard.tsx +0 -38
@@ -1,38 +0,0 @@
|
|
1
|
-
import {Button, CopyToClipboard as CopyToClipboardUiKit} from '@gravity-ui/uikit';
|
2
|
-
import createToast from '../../utils/createToast';
|
3
|
-
import {Icon} from '../Icon';
|
4
|
-
|
5
|
-
interface CopyToClipboardProps {
|
6
|
-
text: string;
|
7
|
-
title?: string;
|
8
|
-
disabled?: boolean;
|
9
|
-
toastText?: string;
|
10
|
-
}
|
11
|
-
|
12
|
-
function CopyToClipboard(props: CopyToClipboardProps) {
|
13
|
-
return (
|
14
|
-
<CopyToClipboardUiKit text={props.text} timeout={1000}>
|
15
|
-
{(state) => {
|
16
|
-
if (state === 'success') {
|
17
|
-
createToast({
|
18
|
-
name: 'Copied',
|
19
|
-
title: props.toastText ?? 'Data was copied to clipboard successfully',
|
20
|
-
type: state,
|
21
|
-
});
|
22
|
-
}
|
23
|
-
|
24
|
-
return (
|
25
|
-
<Button
|
26
|
-
disabled={props.disabled}
|
27
|
-
title={props.title ?? 'Copy'}
|
28
|
-
view="flat-secondary"
|
29
|
-
>
|
30
|
-
<Icon name="copy" viewBox={'0 0 16 16'} width={16} height={16} />
|
31
|
-
</Button>
|
32
|
-
);
|
33
|
-
}}
|
34
|
-
</CopyToClipboardUiKit>
|
35
|
-
);
|
36
|
-
}
|
37
|
-
|
38
|
-
export default CopyToClipboard;
|