@centreon/ui 23.10.30-MON-19324-dashboard-section-navigation.3 → 23.10.30
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/package.json +9 -12
- package/src/@assets/icons/downtime.icon.svg +1 -0
- package/src/Dashboard/DashboardLayout.stories.tsx +5 -3
- package/src/Dashboard/Layout.tsx +4 -4
- package/src/Dashboard/utils.ts +28 -28
- package/src/Graph/BasicComponents/Axes/UnitLabel.tsx +20 -0
- package/src/Graph/BasicComponents/Axes/index.tsx +88 -0
- package/src/Graph/BasicComponents/Axes/models.ts +26 -0
- package/src/Graph/BasicComponents/Axes/useAxisY.ts +100 -0
- package/src/Graph/BasicComponents/Grids/index.tsx +20 -0
- package/src/Graph/BasicComponents/Lines/RegularLines/index.tsx +91 -0
- package/src/Graph/BasicComponents/Lines/RegularLines/useRegularLines.ts +15 -0
- package/src/Graph/BasicComponents/Lines/StackedLines/index.tsx +76 -0
- package/src/Graph/BasicComponents/Lines/StackedLines/useStackedLines.ts +39 -0
- package/src/Graph/BasicComponents/Lines/Threshold/BasicThreshold.tsx +51 -0
- package/src/Graph/BasicComponents/Lines/Threshold/Circle.tsx +43 -0
- package/src/Graph/BasicComponents/Lines/Threshold/ThresholdWithPatternLines.tsx +73 -0
- package/src/Graph/BasicComponents/Lines/Threshold/ThresholdWithVariation.tsx +59 -0
- package/src/Graph/BasicComponents/Lines/Threshold/helpers/index.ts +69 -0
- package/src/Graph/BasicComponents/Lines/Threshold/index.tsx +138 -0
- package/src/Graph/BasicComponents/Lines/Threshold/models.ts +105 -0
- package/src/Graph/BasicComponents/Lines/Threshold/useCoordinateCircle.ts +46 -0
- package/src/Graph/BasicComponents/Lines/Threshold/useScaleThreshold.ts +171 -0
- package/src/Graph/BasicComponents/Lines/index.tsx +180 -0
- package/src/Graph/BasicComponents/Lines/models.ts +42 -0
- package/src/Graph/BasicComponents/LoadingProgress.tsx +46 -0
- package/src/Graph/BasicComponents/useFilterLines.ts +60 -0
- package/src/Graph/Graph.styles.ts +45 -0
- package/src/Graph/Graph.tsx +217 -0
- package/src/Graph/Header/index.tsx +65 -0
- package/src/Graph/Icons/Downtime.tsx +9 -0
- package/src/Graph/InteractiveComponents/AnchorPoint/AnchorPoint.styles.ts +58 -0
- package/src/Graph/InteractiveComponents/AnchorPoint/GuidingLines.tsx +45 -0
- package/src/Graph/InteractiveComponents/AnchorPoint/RegularAnchorPoint.tsx +66 -0
- package/src/Graph/InteractiveComponents/AnchorPoint/StackedAnchorPoint.tsx +76 -0
- package/src/Graph/InteractiveComponents/AnchorPoint/TooltipAnchorPoint.tsx +70 -0
- package/src/Graph/InteractiveComponents/AnchorPoint/index.tsx +20 -0
- package/src/Graph/InteractiveComponents/AnchorPoint/models.ts +62 -0
- package/src/Graph/InteractiveComponents/AnchorPoint/useTickGraph.ts +94 -0
- package/src/Graph/InteractiveComponents/AnchorPoint/useTooltipAnchorPoint.ts +107 -0
- package/src/Graph/InteractiveComponents/Annotations/Annotation/Area.tsx +114 -0
- package/src/Graph/InteractiveComponents/Annotations/Annotation/Line.tsx +103 -0
- package/src/Graph/InteractiveComponents/Annotations/Annotation/index.tsx +81 -0
- package/src/Graph/InteractiveComponents/Annotations/Area/Downtime.tsx +27 -0
- package/src/Graph/InteractiveComponents/Annotations/EventAnnotations.tsx +61 -0
- package/src/Graph/InteractiveComponents/Annotations/Line/Acknowledgement.tsx +27 -0
- package/src/Graph/InteractiveComponents/Annotations/Line/Comments.tsx +25 -0
- package/src/Graph/InteractiveComponents/Annotations/annotationsAtoms.ts +183 -0
- package/src/Graph/InteractiveComponents/Annotations/index.tsx +49 -0
- package/src/Graph/InteractiveComponents/Annotations/models.ts +25 -0
- package/src/Graph/InteractiveComponents/Annotations/useAnnotation.ts +56 -0
- package/src/Graph/InteractiveComponents/Bar.tsx +21 -0
- package/src/Graph/InteractiveComponents/TimeShiftZones/TimeShiftIcon.tsx +62 -0
- package/src/Graph/InteractiveComponents/TimeShiftZones/TimeShiftZone.tsx +74 -0
- package/src/Graph/InteractiveComponents/TimeShiftZones/index.tsx +85 -0
- package/src/Graph/InteractiveComponents/TimeShiftZones/models.ts +12 -0
- package/src/Graph/InteractiveComponents/TimeShiftZones/useTimeShiftZones.ts +72 -0
- package/src/Graph/InteractiveComponents/Tooltip/index.tsx +59 -0
- package/src/Graph/InteractiveComponents/Tooltip/models.ts +9 -0
- package/src/Graph/InteractiveComponents/Tooltip/useGraphTooltip.ts +67 -0
- package/src/Graph/InteractiveComponents/ZoomPreview/index.tsx +38 -0
- package/src/Graph/InteractiveComponents/ZoomPreview/models.ts +9 -0
- package/src/Graph/InteractiveComponents/ZoomPreview/useZoomPreview.ts +107 -0
- package/src/Graph/InteractiveComponents/ZoomPreview/zoomPreviewAtoms.ts +3 -0
- package/src/Graph/InteractiveComponents/index.tsx +168 -0
- package/src/Graph/InteractiveComponents/interactionWithGraphAtoms.ts +51 -0
- package/src/Graph/Legend/InteractiveValue.tsx +22 -0
- package/src/Graph/Legend/Legend.styles.ts +71 -0
- package/src/Graph/Legend/LegendContent.tsx +27 -0
- package/src/Graph/Legend/LegendHeader.tsx +45 -0
- package/src/Graph/Legend/Marker.tsx +43 -0
- package/src/Graph/Legend/index.tsx +166 -0
- package/src/Graph/Legend/models.ts +11 -0
- package/src/Graph/Legend/useInteractiveValues.ts +86 -0
- package/src/Graph/Legend/useLegend.ts +114 -0
- package/src/Graph/LoadingSkeleton.tsx +44 -0
- package/src/Graph/common/index.ts +35 -0
- package/src/Graph/graphAtoms.ts +6 -0
- package/src/Graph/helpers/doc.ts +560 -0
- package/src/Graph/helpers/index.ts +58 -0
- package/src/Graph/index.stories.tsx +372 -0
- package/src/Graph/index.tsx +90 -0
- package/src/Graph/mockedData/annotationData.json +326 -0
- package/src/Graph/mockedData/exclusionPeriodFirstPeriod.json +588 -0
- package/src/Graph/mockedData/exclusionPeriodSecondPeriod.json +588 -0
- package/src/Graph/mockedData/exclusionPeriodThirdPeriod.json +581 -0
- package/src/Graph/mockedData/lastDay.json +1326 -0
- package/src/Graph/mockedData/lastDayAreaStack.json +3106 -0
- package/src/Graph/mockedData/lastDayForward.json +1338 -0
- package/src/Graph/mockedData/lastDayThreshold.json +2352 -0
- package/src/Graph/mockedData/lastMonth.json +1674 -0
- package/src/Graph/mockedData/lastWeek.json +2202 -0
- package/src/Graph/mockedData/zoomPreview.json +742 -0
- package/src/Graph/models.ts +150 -0
- package/src/Graph/timeSeries/index.test.ts +506 -0
- package/src/Graph/timeSeries/index.ts +512 -0
- package/src/Graph/timeSeries/models.ts +120 -0
- package/src/Graph/translatedLabels.ts +9 -0
- package/src/Graph/useGraphData.ts +47 -0
- package/src/Graph/useGraphIntersection.ts +36 -0
- package/src/ThemeProvider/index.tsx +5 -6
- package/src/ThemeProvider/palettes.ts +215 -385
- package/src/TimePeriods/CustomTimePeriod/CompactCustomTimePeriod.styles.ts +51 -0
- package/src/TimePeriods/CustomTimePeriod/CompactCustomTimePeriod.tsx +95 -0
- package/src/TimePeriods/CustomTimePeriod/PopoverCustomTimePeriod/ErrorText.tsx +14 -0
- package/src/TimePeriods/CustomTimePeriod/PopoverCustomTimePeriod/PickersStartEndDate.tsx +163 -0
- package/src/TimePeriods/CustomTimePeriod/PopoverCustomTimePeriod/index.tsx +76 -0
- package/src/TimePeriods/CustomTimePeriod/PopoverCustomTimePeriod/models.ts +61 -0
- package/src/TimePeriods/CustomTimePeriod/PopoverCustomTimePeriod/usePickersStartEndDate.ts +82 -0
- package/src/TimePeriods/CustomTimePeriod/index.tsx +66 -0
- package/src/TimePeriods/DateTimePickerInput.tsx +49 -0
- package/src/TimePeriods/ResolutionTimePeriod.cypress.spec.tsx +65 -0
- package/src/TimePeriods/SelectedTimePeriod.tsx +102 -0
- package/src/TimePeriods/TimePeriods.cypress.spec.tsx +510 -0
- package/src/TimePeriods/TimePeriods.styles.ts +22 -0
- package/src/TimePeriods/helpers/index.ts +26 -0
- package/src/TimePeriods/index.stories.tsx +98 -0
- package/src/TimePeriods/index.tsx +78 -0
- package/src/TimePeriods/mockedData.ts +12 -0
- package/src/TimePeriods/models.ts +97 -0
- package/src/TimePeriods/timePeriodsAtoms.ts +102 -0
- package/src/TimePeriods/translatedLabels.ts +9 -0
- package/src/TimePeriods/useSortTimePeriods.ts +31 -0
- package/src/TimePeriods/useTimePeriod.ts +49 -0
- package/src/api/TestQueryProvider.tsx +1 -2
- package/src/api/useFetchQuery/index.ts +7 -8
- package/src/api/useMutationQuery/index.ts +10 -11
- package/src/components/Button/Button.styles.ts +3 -17
- package/src/components/Button/Button.tsx +3 -6
- package/src/components/Button/Icon/IconButton.styles.ts +2 -9
- package/src/components/DataTable/DataTable.stories.tsx +0 -9
- package/src/components/DataTable/DataTable.styles.ts +0 -5
- package/src/components/DataTable/DataTable.tsx +6 -8
- package/src/components/DataTable/EmptyState/DataTableEmptyState.tsx +1 -4
- package/src/components/DataTable/Item/DataTableItem.styles.ts +2 -5
- package/src/components/DataTable/Item/DataTableItem.tsx +18 -36
- package/src/components/Header/Header.stories.tsx +27 -0
- package/src/components/Header/Header.styles.ts +27 -0
- package/src/components/Header/Header.tsx +23 -0
- package/src/components/Header/index.ts +1 -1
- package/src/components/Modal/index.ts +0 -2
- package/src/components/index.ts +0 -3
- package/src/index.ts +2 -0
- package/src/layout/TiledListingPage/TiledListingActions.tsx +15 -0
- package/src/layout/TiledListingPage/TiledListingContent.tsx +21 -0
- package/src/layout/TiledListingPage/TiledListingList.tsx +11 -0
- package/src/layout/TiledListingPage/TiledListingPage.styles.ts +16 -0
- package/src/layout/TiledListingPage/TiledListingPage.tsx +15 -0
- package/src/layout/TiledListingPage/index.ts +4 -0
- package/src/screens/dashboard/DashboardsOverview.stories.tsx +102 -110
- package/src/utils/index.ts +1 -1
- package/src/utils/sanitizedHTML.ts +1 -1
- package/test/setupTests.js +0 -3
- package/src/base/tokens/README.md +0 -3
- package/src/base/tokens/source/$metadata.json +0 -5
- package/src/base/tokens/source/base.json +0 -142
- package/src/base/tokens/themes/base.tokens.d.ts +0 -38
- package/src/base/tokens/themes/base.tokens.json +0 -695
- package/src/base/tokens/themes/base.tokens.ts +0 -38
- package/src/base/tokens/themes/ui-dark.tokens.d.ts +0 -38
- package/src/base/tokens/themes/ui-dark.tokens.json +0 -695
- package/src/base/tokens/themes/ui-dark.tokens.ts +0 -38
- package/src/base/tokens/themes/ui-light.tokens.d.ts +0 -38
- package/src/base/tokens/themes/ui-light.tokens.json +0 -695
- package/src/base/tokens/themes/ui-light.tokens.ts +0 -38
- package/src/components/Header/PageHeader/PageHeader.stories.tsx +0 -88
- package/src/components/Header/PageHeader/PageHeader.styles.ts +0 -99
- package/src/components/Header/PageHeader/PageHeader.tsx +0 -15
- package/src/components/Header/PageHeader/PageHeaderActions.tsx +0 -17
- package/src/components/Header/PageHeader/PageHeaderMain.tsx +0 -15
- package/src/components/Header/PageHeader/PageHeaderMenu.tsx +0 -15
- package/src/components/Header/PageHeader/PageHeaderTitle.tsx +0 -47
- package/src/components/Header/PageHeader/index.ts +0 -12
- package/src/components/Layout/AreaIndicator.styles.ts +0 -33
- package/src/components/Layout/AreaIndicator.tsx +0 -35
- package/src/components/Layout/PageLayout/PageLayout.stories.tsx +0 -81
- package/src/components/Layout/PageLayout/PageLayout.styles.ts +0 -40
- package/src/components/Layout/PageLayout/PageLayout.tsx +0 -21
- package/src/components/Layout/PageLayout/PageLayoutActions.tsx +0 -15
- package/src/components/Layout/PageLayout/PageLayoutBody.tsx +0 -24
- package/src/components/Layout/PageLayout/PageLayoutHeader.tsx +0 -15
- package/src/components/Layout/PageLayout/index.ts +0 -10
- package/src/components/Layout/index.ts +0 -1
- package/src/components/Menu/Button/MenuButton.stories.tsx +0 -16
- package/src/components/Menu/Button/MenuButton.styles.ts +0 -27
- package/src/components/Menu/Button/MenuButton.tsx +0 -59
- package/src/components/Menu/Button/index.ts +0 -1
- package/src/components/Menu/Menu.stories.tsx +0 -71
- package/src/components/Menu/Menu.styles.ts +0 -70
- package/src/components/Menu/Menu.tsx +0 -25
- package/src/components/Menu/MenuDivider.tsx +0 -13
- package/src/components/Menu/MenuItem.tsx +0 -36
- package/src/components/Menu/MenuItems.tsx +0 -35
- package/src/components/Menu/index.ts +0 -12
- package/src/components/Menu/useMenu.tsx +0 -79
- package/src/components/Tooltip/TextOverflowTooltip/TextOverflowTooltip.stories.tsx +0 -71
- package/src/components/Tooltip/TextOverflowTooltip/TextOverflowTooltip.styles.ts +0 -5
- package/src/components/Tooltip/TextOverflowTooltip/TextOverflowTooltip.tsx +0 -115
- package/src/components/Tooltip/TextOverflowTooltip/index.tsx +0 -1
- package/src/components/Tooltip/Tooltip.stories.tsx +0 -41
- package/src/components/Tooltip/Tooltip.styles.ts +0 -5
- package/src/components/Tooltip/Tooltip.tsx +0 -46
- package/src/components/Tooltip/index.ts +0 -1
- package/src/screens/dashboard/DashboardsDetail.stories.tsx +0 -108
- package/src/utils/useResizeObserver.ts +0 -6
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
|
|
4
|
+
import Switch from '@mui/material/Switch';
|
|
5
|
+
|
|
6
|
+
import { dateFormat } from './models';
|
|
7
|
+
|
|
8
|
+
import TimePeriod from '.';
|
|
9
|
+
|
|
10
|
+
const meta: Meta<typeof TimePeriod> = {
|
|
11
|
+
component: TimePeriod,
|
|
12
|
+
tags: ['autodocs']
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
|
|
17
|
+
type Story = StoryObj<typeof TimePeriod>;
|
|
18
|
+
|
|
19
|
+
const Template: Story = {
|
|
20
|
+
render: (args) => <TimePeriod {...args} />
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const TemplateWithExternalComponent: Story = {
|
|
24
|
+
render: (args) => (
|
|
25
|
+
<TimePeriod {...args} renderExternalComponent={<Switch />} />
|
|
26
|
+
)
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const argTypes = {
|
|
30
|
+
disabled: {
|
|
31
|
+
control: 'boolean',
|
|
32
|
+
description: 'If true, the component is disabled.',
|
|
33
|
+
table: {
|
|
34
|
+
defaultValue: { summary: false },
|
|
35
|
+
type: { summary: 'boolean' }
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
extraTimePeriods: {
|
|
39
|
+
control: 'object',
|
|
40
|
+
description: 'soon',
|
|
41
|
+
table: {
|
|
42
|
+
defaultValue: { summary: '[]' },
|
|
43
|
+
type: { detail: 'extra selected time periods', summary: 'array' }
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
getIsError: {
|
|
47
|
+
description:
|
|
48
|
+
'Callback fired when The end date is smaller or equal to the start date',
|
|
49
|
+
table: {
|
|
50
|
+
category: 'Events',
|
|
51
|
+
type: { detail: '(value:boolean)=>void', summary: 'function' }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
getStartEndParameters: {
|
|
55
|
+
description: 'Callback fired when the the user select or pick a date',
|
|
56
|
+
table: {
|
|
57
|
+
category: 'Events',
|
|
58
|
+
type: {
|
|
59
|
+
detail: '({start:isoString,end:isoString})=>void',
|
|
60
|
+
summary: 'function'
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const args = {
|
|
66
|
+
extraTimePeriods: [
|
|
67
|
+
{
|
|
68
|
+
dateTimeFormat: dateFormat,
|
|
69
|
+
getStart: (): Date => dayjs(Date.now()).subtract(29, 'day').toDate(),
|
|
70
|
+
id: 'last_29_days',
|
|
71
|
+
largeName: 'last 29 days',
|
|
72
|
+
name: '29 days'
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
dateTimeFormat: dateFormat,
|
|
76
|
+
getStart: (): Date => dayjs(Date.now()).subtract(5, 'day').toDate(),
|
|
77
|
+
id: 'last_5_days',
|
|
78
|
+
largeName: 'last 5 days',
|
|
79
|
+
name: '5 days'
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export const BasicTimePeriod: Story = {
|
|
85
|
+
...Template,
|
|
86
|
+
argTypes
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export const WithExtraTimePeriods: Story = {
|
|
90
|
+
...Template,
|
|
91
|
+
argTypes,
|
|
92
|
+
args
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export const WithExternalComponent: Story = {
|
|
96
|
+
...TemplateWithExternalComponent,
|
|
97
|
+
argTypes
|
|
98
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import { Responsive } from '@visx/visx';
|
|
4
|
+
import dayjs from 'dayjs';
|
|
5
|
+
import 'dayjs/locale/en';
|
|
6
|
+
import 'dayjs/locale/es';
|
|
7
|
+
import 'dayjs/locale/fr';
|
|
8
|
+
import 'dayjs/locale/pt';
|
|
9
|
+
import duration from 'dayjs/plugin/duration';
|
|
10
|
+
import isSameOrAfter from 'dayjs/plugin/isSameOrAfter';
|
|
11
|
+
import timezonePlugin from 'dayjs/plugin/timezone';
|
|
12
|
+
import utcPlugin from 'dayjs/plugin/utc';
|
|
13
|
+
|
|
14
|
+
import { Paper } from '@mui/material';
|
|
15
|
+
|
|
16
|
+
import CustomTimePeriod from './CustomTimePeriod';
|
|
17
|
+
import SelectedTimePeriod from './SelectedTimePeriod';
|
|
18
|
+
import { useStyles } from './TimePeriods.styles';
|
|
19
|
+
import {
|
|
20
|
+
CustomTimePeriod as CustomTimePeriodModel,
|
|
21
|
+
EndStartInterval,
|
|
22
|
+
TimePeriod
|
|
23
|
+
} from './models';
|
|
24
|
+
import useTimePeriod from './useTimePeriod';
|
|
25
|
+
|
|
26
|
+
dayjs.extend(isSameOrAfter);
|
|
27
|
+
dayjs.extend(utcPlugin);
|
|
28
|
+
dayjs.extend(timezonePlugin);
|
|
29
|
+
dayjs.extend(duration);
|
|
30
|
+
interface Parameters extends EndStartInterval {
|
|
31
|
+
timelineEventsLimit: number;
|
|
32
|
+
}
|
|
33
|
+
export interface Props {
|
|
34
|
+
adjustTimePeriodData?: Omit<CustomTimePeriodModel, 'timelineEventsLimit'>;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
extraTimePeriods?: Array<Omit<TimePeriod, 'timelineEventsLimit'>>;
|
|
37
|
+
getIsError?: (value: boolean) => void;
|
|
38
|
+
getParameters?: ({ start, end, timelineEventsLimit }: Parameters) => void;
|
|
39
|
+
renderExternalComponent?: ReactNode;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const TimePeriod = ({
|
|
43
|
+
extraTimePeriods,
|
|
44
|
+
disabled = false,
|
|
45
|
+
getParameters,
|
|
46
|
+
getIsError,
|
|
47
|
+
adjustTimePeriodData,
|
|
48
|
+
renderExternalComponent
|
|
49
|
+
}: Props): JSX.Element => {
|
|
50
|
+
const { classes } = useStyles({ disabled });
|
|
51
|
+
|
|
52
|
+
useTimePeriod({
|
|
53
|
+
adjustTimePeriodData,
|
|
54
|
+
getIsError,
|
|
55
|
+
getParameters
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<div>
|
|
60
|
+
<Responsive.ParentSize>
|
|
61
|
+
{({ width }): JSX.Element => {
|
|
62
|
+
return (
|
|
63
|
+
<Paper className={classes.header} style={{ width }}>
|
|
64
|
+
<SelectedTimePeriod
|
|
65
|
+
disabled={disabled}
|
|
66
|
+
extraTimePeriods={extraTimePeriods}
|
|
67
|
+
width={width}
|
|
68
|
+
/>
|
|
69
|
+
<CustomTimePeriod disabled={disabled} />
|
|
70
|
+
<div>{renderExternalComponent}</div>
|
|
71
|
+
</Paper>
|
|
72
|
+
);
|
|
73
|
+
}}
|
|
74
|
+
</Responsive.ParentSize>
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
};
|
|
78
|
+
export default TimePeriod;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ListingVariant } from '@centreon/ui-context';
|
|
2
|
+
|
|
3
|
+
export const retrievedUser = {
|
|
4
|
+
alias: 'Admin alias',
|
|
5
|
+
default_page: '/monitoring/resources',
|
|
6
|
+
is_export_button_enabled: true,
|
|
7
|
+
isExportButtonEnabled: true,
|
|
8
|
+
locale: 'fr_FR.UTF8',
|
|
9
|
+
name: 'Admin',
|
|
10
|
+
use_deprecated_pages: false,
|
|
11
|
+
user_interface_density: ListingVariant.compact
|
|
12
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
labelLastDay,
|
|
5
|
+
label1Day,
|
|
6
|
+
label7Days,
|
|
7
|
+
label31Days,
|
|
8
|
+
labelLast7Days,
|
|
9
|
+
labelLast31Days
|
|
10
|
+
} from './translatedLabels';
|
|
11
|
+
|
|
12
|
+
export const dateFormat = 'L';
|
|
13
|
+
export const timeFormat = 'LT';
|
|
14
|
+
export const dateTimeFormat = `${dateFormat} ${timeFormat}`;
|
|
15
|
+
|
|
16
|
+
export enum CustomTimePeriodProperty {
|
|
17
|
+
end = 'end',
|
|
18
|
+
start = 'start'
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface TimePeriod {
|
|
22
|
+
dateTimeFormat: string;
|
|
23
|
+
getStart: () => Date;
|
|
24
|
+
id: string;
|
|
25
|
+
largeName: string;
|
|
26
|
+
name: string;
|
|
27
|
+
timelineEventsLimit: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const lastDayPeriod: TimePeriod = {
|
|
31
|
+
dateTimeFormat: timeFormat,
|
|
32
|
+
getStart: (): Date => dayjs(Date.now()).subtract(24, 'hour').toDate(),
|
|
33
|
+
id: 'last_24_h',
|
|
34
|
+
largeName: labelLastDay,
|
|
35
|
+
name: label1Day,
|
|
36
|
+
timelineEventsLimit: 20
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const last7Days: TimePeriod = {
|
|
40
|
+
dateTimeFormat: dateFormat,
|
|
41
|
+
getStart: (): Date => dayjs(Date.now()).subtract(7, 'day').toDate(),
|
|
42
|
+
id: 'last_7_days',
|
|
43
|
+
largeName: labelLast7Days,
|
|
44
|
+
name: label7Days,
|
|
45
|
+
timelineEventsLimit: 100
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const last31Days: TimePeriod = {
|
|
49
|
+
dateTimeFormat: dateFormat,
|
|
50
|
+
getStart: (): Date => dayjs(Date.now()).subtract(31, 'day').toDate(),
|
|
51
|
+
id: 'last_31_days',
|
|
52
|
+
largeName: labelLast31Days,
|
|
53
|
+
name: label31Days,
|
|
54
|
+
timelineEventsLimit: 500
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const timePeriods: Array<TimePeriod> = [
|
|
58
|
+
lastDayPeriod,
|
|
59
|
+
last7Days,
|
|
60
|
+
last31Days
|
|
61
|
+
];
|
|
62
|
+
|
|
63
|
+
export interface TimePeriodById {
|
|
64
|
+
id: string;
|
|
65
|
+
timePeriods: Array<TimePeriod>;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface CustomTimePeriod {
|
|
69
|
+
end: Date;
|
|
70
|
+
start: Date;
|
|
71
|
+
timelineEventsLimit: number;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface DateTimePickerInputModel {
|
|
75
|
+
changeDate: (props) => void;
|
|
76
|
+
date: Date | null;
|
|
77
|
+
disabled?: boolean;
|
|
78
|
+
maxDate?: Date;
|
|
79
|
+
minDate?: Date;
|
|
80
|
+
property: CustomTimePeriodProperty;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface TimeLineAxisTickFormat extends CustomTimePeriod {
|
|
84
|
+
timeLineLimit: number;
|
|
85
|
+
xAxisTickFormat: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface GraphQueryParametersProps {
|
|
89
|
+
endDate?: Date;
|
|
90
|
+
startDate?: Date;
|
|
91
|
+
timePeriod?: TimePeriod | null;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface EndStartInterval {
|
|
95
|
+
end: string;
|
|
96
|
+
start: string;
|
|
97
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import { atom } from 'jotai';
|
|
3
|
+
import { always, cond, gte, isNil, T } from 'ramda';
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
defaultTimePeriod,
|
|
7
|
+
getTimePeriodById,
|
|
8
|
+
getTimePeriodFromNow
|
|
9
|
+
} from './helpers';
|
|
10
|
+
import { CustomTimePeriod, TimePeriod, TimePeriodById } from './models';
|
|
11
|
+
|
|
12
|
+
export const selectedTimePeriodAtom = atom<TimePeriod | null>(
|
|
13
|
+
defaultTimePeriod
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
const defaultCustomTimePeriod = getTimePeriodFromNow(defaultTimePeriod);
|
|
17
|
+
|
|
18
|
+
export const customTimePeriodAtom = atom(defaultCustomTimePeriod);
|
|
19
|
+
|
|
20
|
+
export const errorTimePeriodAtom = atom(false);
|
|
21
|
+
|
|
22
|
+
export const getNewCustomTimePeriod = ({
|
|
23
|
+
start,
|
|
24
|
+
end
|
|
25
|
+
}: Omit<CustomTimePeriod, 'timelineEventsLimit'>): CustomTimePeriod => {
|
|
26
|
+
const customTimePeriodInDay = dayjs
|
|
27
|
+
.duration(dayjs(end).diff(dayjs(start)))
|
|
28
|
+
.asDays();
|
|
29
|
+
|
|
30
|
+
const timelineEventsLimit = cond<number, number>([
|
|
31
|
+
[gte(1), always(20)],
|
|
32
|
+
[gte(7), always(100)],
|
|
33
|
+
[T, always(500)]
|
|
34
|
+
])(customTimePeriodInDay) as number;
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
end,
|
|
38
|
+
start,
|
|
39
|
+
timelineEventsLimit
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const changeSelectedTimePeriodDerivedAtom = atom(
|
|
44
|
+
null,
|
|
45
|
+
(_, set, { id, timePeriods }: TimePeriodById) => {
|
|
46
|
+
const timePeriod = getTimePeriodById({ id, timePeriods });
|
|
47
|
+
|
|
48
|
+
set(selectedTimePeriodAtom, timePeriod);
|
|
49
|
+
|
|
50
|
+
const newCustomTimePeriod = getTimePeriodFromNow(timePeriod);
|
|
51
|
+
|
|
52
|
+
set(customTimePeriodAtom, newCustomTimePeriod);
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
export const changeCustomTimePeriodDerivedAtom = atom(
|
|
57
|
+
null,
|
|
58
|
+
(get, set, { date, property }) => {
|
|
59
|
+
const customTimePeriod = get(customTimePeriodAtom);
|
|
60
|
+
|
|
61
|
+
const newCustomTimePeriod = getNewCustomTimePeriod({
|
|
62
|
+
...customTimePeriod,
|
|
63
|
+
[property]: date
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
set(customTimePeriodAtom, newCustomTimePeriod);
|
|
67
|
+
set(selectedTimePeriodAtom, null);
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
export const getDatesDerivedAtom = atom(
|
|
72
|
+
(get) =>
|
|
73
|
+
(timePeriod?: TimePeriod | null): [string, string, number] => {
|
|
74
|
+
const customTimePeriod = get(customTimePeriodAtom);
|
|
75
|
+
|
|
76
|
+
if (isNil(timePeriod)) {
|
|
77
|
+
return [
|
|
78
|
+
customTimePeriod.start.toISOString(),
|
|
79
|
+
customTimePeriod.end.toISOString(),
|
|
80
|
+
customTimePeriod.timelineEventsLimit
|
|
81
|
+
];
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return [
|
|
85
|
+
timePeriod.getStart().toISOString(),
|
|
86
|
+
new Date(Date.now()).toISOString(),
|
|
87
|
+
timePeriod.timelineEventsLimit
|
|
88
|
+
];
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
export const adjustTimePeriodDerivedAtom = atom(
|
|
93
|
+
null,
|
|
94
|
+
(
|
|
95
|
+
_,
|
|
96
|
+
set,
|
|
97
|
+
adjustTimePeriodProps: Omit<CustomTimePeriod, 'timelineEventsLimit'>
|
|
98
|
+
) => {
|
|
99
|
+
set(customTimePeriodAtom, getNewCustomTimePeriod(adjustTimePeriodProps));
|
|
100
|
+
set(selectedTimePeriodAtom, null);
|
|
101
|
+
}
|
|
102
|
+
);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const label1Day = '1 day';
|
|
2
|
+
export const label7Days = '7 days';
|
|
3
|
+
export const label31Days = '31 days';
|
|
4
|
+
export const labelLastDay = 'Last day';
|
|
5
|
+
export const labelLast7Days = 'Last 7 days';
|
|
6
|
+
export const labelLast31Days = 'Last 31 days';
|
|
7
|
+
export const labelFrom = 'From';
|
|
8
|
+
export const labelTo = 'To';
|
|
9
|
+
export const labelCompactTimePeriod = 'Compact time period';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import { T, always, cond, gte } from 'ramda';
|
|
3
|
+
|
|
4
|
+
import { getTimePeriodFromNow } from './helpers';
|
|
5
|
+
import { TimePeriod } from './models';
|
|
6
|
+
|
|
7
|
+
const useSortTimePeriods = (
|
|
8
|
+
timePeriods: Array<TimePeriod>
|
|
9
|
+
): Array<TimePeriod> => {
|
|
10
|
+
const adjustedTimePeriods = timePeriods.map((item) => {
|
|
11
|
+
const { end, start } = getTimePeriodFromNow(item);
|
|
12
|
+
|
|
13
|
+
const numberOfDays = dayjs.duration(dayjs(end).diff(dayjs(start))).asDays();
|
|
14
|
+
|
|
15
|
+
const timelineEventsLimit = cond<number, number>([
|
|
16
|
+
[gte(1), always(20)],
|
|
17
|
+
[gte(7), always(100)],
|
|
18
|
+
[T, always(500)]
|
|
19
|
+
])(numberOfDays) as number;
|
|
20
|
+
|
|
21
|
+
return { item: { ...item, timelineEventsLimit }, numberOfDays };
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const sortedTimePeriods = adjustedTimePeriods.sort(
|
|
25
|
+
(a, b) => a.numberOfDays - b.numberOfDays
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
return sortedTimePeriods.map((element) => element.item);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default useSortTimePeriods;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
import { useAtomValue, useSetAtom } from 'jotai';
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
customTimePeriodAtom,
|
|
7
|
+
getDatesDerivedAtom,
|
|
8
|
+
selectedTimePeriodAtom,
|
|
9
|
+
errorTimePeriodAtom,
|
|
10
|
+
adjustTimePeriodDerivedAtom
|
|
11
|
+
} from './timePeriodsAtoms';
|
|
12
|
+
|
|
13
|
+
import { Props } from '.';
|
|
14
|
+
|
|
15
|
+
const useTimePeriod = ({
|
|
16
|
+
getParameters,
|
|
17
|
+
getIsError,
|
|
18
|
+
adjustTimePeriodData
|
|
19
|
+
}: Omit<Props, 'extraTimePeriods' | 'disabled'>): void => {
|
|
20
|
+
const selectedTimePeriod = useAtomValue(selectedTimePeriodAtom);
|
|
21
|
+
const customTimePeriod = useAtomValue(customTimePeriodAtom);
|
|
22
|
+
const getCurrentEndStartInterval = useAtomValue(getDatesDerivedAtom);
|
|
23
|
+
const errorTimePeriod = useAtomValue(errorTimePeriodAtom);
|
|
24
|
+
const adjustTimeTimePeriod = useSetAtom(adjustTimePeriodDerivedAtom);
|
|
25
|
+
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (!adjustTimePeriodData) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
adjustTimeTimePeriod(adjustTimePeriodData);
|
|
32
|
+
}, [adjustTimePeriodData?.start, adjustTimePeriodData?.end]);
|
|
33
|
+
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
const [start, end, timelineEventsLimit] =
|
|
36
|
+
getCurrentEndStartInterval(selectedTimePeriod);
|
|
37
|
+
|
|
38
|
+
getParameters?.({ end, start, timelineEventsLimit });
|
|
39
|
+
}, [customTimePeriod.start, customTimePeriod.end, selectedTimePeriod]);
|
|
40
|
+
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
if (!errorTimePeriod) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
getIsError?.(errorTimePeriod);
|
|
46
|
+
}, [errorTimePeriod]);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export default useTimePeriod;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
2
|
|
|
3
3
|
import 'ulog';
|
|
4
4
|
import {
|
|
@@ -30,13 +30,14 @@ export interface UseFetchQueryProps<T> {
|
|
|
30
30
|
>;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
export
|
|
33
|
+
export interface UseFetchQueryState<T>
|
|
34
|
+
extends Omit<QueryObserverBaseResult, 'data'> {
|
|
34
35
|
data?: T;
|
|
35
36
|
fetchQuery: () => Promise<T | ResponseError>;
|
|
36
37
|
prefetchNextPage: ({ page, getPrefetchQueryKey }) => void;
|
|
37
38
|
prefetchPreviousPage: ({ page, getPrefetchQueryKey }) => void;
|
|
38
39
|
prefetchQuery: ({ endpointParams, queryKey }) => void;
|
|
39
|
-
}
|
|
40
|
+
}
|
|
40
41
|
|
|
41
42
|
export interface PrefetchEndpointParams {
|
|
42
43
|
page: number;
|
|
@@ -154,11 +155,9 @@ const useFetchQuery = <T extends object>({
|
|
|
154
155
|
);
|
|
155
156
|
};
|
|
156
157
|
|
|
157
|
-
const data =
|
|
158
|
-
()
|
|
159
|
-
|
|
160
|
-
[queryData.data]
|
|
161
|
-
);
|
|
158
|
+
const data = not(has('isError', queryData.data))
|
|
159
|
+
? (queryData.data as T)
|
|
160
|
+
: undefined;
|
|
162
161
|
|
|
163
162
|
const errorData = queryData.data as ResponseError | undefined;
|
|
164
163
|
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import 'ulog';
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
useMutation,
|
|
6
|
-
UseMutationOptions,
|
|
7
|
-
UseMutationResult
|
|
8
|
-
} from '@tanstack/react-query';
|
|
4
|
+
import { useMutation } from '@tanstack/react-query';
|
|
9
5
|
import { JsonDecoder } from 'ts.data.json';
|
|
10
6
|
import anylogger from 'anylogger';
|
|
11
7
|
import { includes } from 'ramda';
|
|
@@ -21,7 +17,7 @@ export enum Method {
|
|
|
21
17
|
PUT = 'PUT'
|
|
22
18
|
}
|
|
23
19
|
|
|
24
|
-
export
|
|
20
|
+
export interface UseMutationQueryProps<T> {
|
|
25
21
|
catchError?: (props: CatchErrorProps) => void;
|
|
26
22
|
decoder?: JsonDecoder.Decoder<T>;
|
|
27
23
|
defaultFailureMessage?: string;
|
|
@@ -29,14 +25,16 @@ export type UseMutationQueryProps<T> = {
|
|
|
29
25
|
getEndpoint: (payload) => string;
|
|
30
26
|
httpCodesBypassErrorSnackbar?: Array<number>;
|
|
31
27
|
method: Method;
|
|
32
|
-
}
|
|
28
|
+
}
|
|
33
29
|
|
|
34
30
|
const log = anylogger('API Request');
|
|
35
31
|
|
|
36
|
-
export
|
|
32
|
+
export interface UseMutationQueryState<T> {
|
|
37
33
|
isError: boolean;
|
|
38
34
|
isMutating: boolean;
|
|
39
|
-
|
|
35
|
+
mutate: (payload) => void;
|
|
36
|
+
mutateAsync: (payload) => Promise<T | ResponseError>;
|
|
37
|
+
}
|
|
40
38
|
|
|
41
39
|
const useMutationQuery = <T extends object>({
|
|
42
40
|
getEndpoint,
|
|
@@ -86,9 +84,10 @@ const useMutationQuery = <T extends object>({
|
|
|
86
84
|
}, [queryData.data]);
|
|
87
85
|
|
|
88
86
|
return {
|
|
89
|
-
...queryData,
|
|
90
87
|
isError: (queryData.data as ResponseError | undefined)?.isError || false,
|
|
91
|
-
isMutating: queryData.isLoading
|
|
88
|
+
isMutating: queryData.isLoading,
|
|
89
|
+
mutate: queryData.mutate,
|
|
90
|
+
mutateAsync: queryData.mutateAsync
|
|
92
91
|
};
|
|
93
92
|
};
|
|
94
93
|
|
|
@@ -2,20 +2,9 @@ import { makeStyles } from 'tss-react/mui';
|
|
|
2
2
|
|
|
3
3
|
const useStyles = makeStyles()((theme) => ({
|
|
4
4
|
button: {
|
|
5
|
-
'&[data-size="medium"]': {
|
|
6
|
-
fontSize: '16px',
|
|
7
|
-
height: 'unset',
|
|
8
|
-
lineHeight: '24px'
|
|
9
|
-
},
|
|
10
|
-
|
|
11
5
|
'&[data-size="small"]': {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
paddingRight: theme.spacing(2)
|
|
15
|
-
},
|
|
16
|
-
fontSize: '14px',
|
|
17
|
-
height: 'unset',
|
|
18
|
-
lineHeight: '22px'
|
|
6
|
+
paddingLeft: theme.spacing(2),
|
|
7
|
+
paddingRight: theme.spacing(2)
|
|
19
8
|
},
|
|
20
9
|
|
|
21
10
|
'&[data-variant="primary"]:not(:disabled)': {
|
|
@@ -34,10 +23,7 @@ const useStyles = makeStyles()((theme) => ({
|
|
|
34
23
|
|
|
35
24
|
borderColor: theme.palette.primary.main,
|
|
36
25
|
color: theme.palette.primary.main
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
textWrap: 'noWrap',
|
|
40
|
-
transition: 'unset'
|
|
26
|
+
}
|
|
41
27
|
}
|
|
42
28
|
}));
|
|
43
29
|
|
|
@@ -16,15 +16,13 @@ const muiVariantMap: Record<
|
|
|
16
16
|
secondary: 'outlined'
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
type ButtonProps = {
|
|
20
20
|
children: ReactNode;
|
|
21
|
-
className?: string;
|
|
22
21
|
disabled?: boolean;
|
|
23
22
|
icon?: string | ReactNode;
|
|
24
23
|
iconVariant?: 'none' | 'start' | 'end';
|
|
25
24
|
isDanger?: boolean;
|
|
26
25
|
onClick?: (e) => void;
|
|
27
|
-
ref?: React.Ref<HTMLButtonElement>;
|
|
28
26
|
size?: 'small' | 'medium' | 'large';
|
|
29
27
|
type?: 'button' | 'submit' | 'reset';
|
|
30
28
|
variant?: 'primary' | 'secondary' | 'ghost';
|
|
@@ -41,10 +39,9 @@ const Button = ({
|
|
|
41
39
|
disabled = false,
|
|
42
40
|
onClick,
|
|
43
41
|
isDanger = false,
|
|
44
|
-
className = '',
|
|
45
42
|
...attr
|
|
46
43
|
}: ButtonProps): ReactElement => {
|
|
47
|
-
const { classes
|
|
44
|
+
const { classes } = useStyles();
|
|
48
45
|
|
|
49
46
|
const MuiOverrideProps = useMemo(
|
|
50
47
|
() => ({
|
|
@@ -57,7 +54,7 @@ const Button = ({
|
|
|
57
54
|
|
|
58
55
|
return (
|
|
59
56
|
<MuiButton
|
|
60
|
-
className={
|
|
57
|
+
className={classes.button}
|
|
61
58
|
data-icon-variant={iconVariant}
|
|
62
59
|
data-is-danger={isDanger}
|
|
63
60
|
data-size={size}
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import { makeStyles } from 'tss-react/mui';
|
|
2
2
|
|
|
3
|
-
const useStyles = makeStyles()((
|
|
4
|
-
iconButton: {
|
|
5
|
-
'&[data-size="small"]': {
|
|
6
|
-
'& > svg, & > .MuiSvgIcon-root': {
|
|
7
|
-
fontSize: '1.125rem'
|
|
8
|
-
},
|
|
9
|
-
padding: theme.spacing(0.75)
|
|
10
|
-
}
|
|
11
|
-
}
|
|
3
|
+
const useStyles = makeStyles()(() => ({
|
|
4
|
+
iconButton: {}
|
|
12
5
|
}));
|
|
13
6
|
|
|
14
7
|
export { useStyles };
|
|
@@ -40,12 +40,3 @@ export const AsEmptyState: Story = {
|
|
|
40
40
|
isEmpty: true
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
-
|
|
44
|
-
export const withFixedHeightContainer: Story = {
|
|
45
|
-
args: { ...Default.args },
|
|
46
|
-
render: (args) => (
|
|
47
|
-
<div style={{ height: '400px' }}>
|
|
48
|
-
<DataTable {...args} />
|
|
49
|
-
</div>
|
|
50
|
-
)
|
|
51
|
-
};
|