Fix Silence table grid layout (#59415)

This commit is contained in:
Sonia Aguilar 2022-11-28 17:10:39 +01:00 committed by GitHub
parent 8ab7ca45cd
commit a5c58e46f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -186,7 +186,7 @@ function useColumns(alertManagerSourceName: string) {
renderCell: function renderStateTag({ data: { status } }) { renderCell: function renderStateTag({ data: { status } }) {
return <SilenceStateTag state={status.state} />; return <SilenceStateTag state={status.state} />;
}, },
size: '88px', size: 4,
}, },
{ {
id: 'matchers', id: 'matchers',
@ -194,7 +194,7 @@ function useColumns(alertManagerSourceName: string) {
renderCell: function renderMatchers({ data: { matchers } }) { renderCell: function renderMatchers({ data: { matchers } }) {
return <Matchers matchers={matchers || []} />; return <Matchers matchers={matchers || []} />;
}, },
size: 9, size: 10,
}, },
{ {
id: 'alerts', id: 'alerts',
@ -202,7 +202,7 @@ function useColumns(alertManagerSourceName: string) {
renderCell: function renderSilencedAlerts({ data: { silencedAlerts } }) { renderCell: function renderSilencedAlerts({ data: { silencedAlerts } }) {
return <span data-testid="alerts">{silencedAlerts.length}</span>; return <span data-testid="alerts">{silencedAlerts.length}</span>;
}, },
size: 1, size: 4,
}, },
{ {
id: 'schedule', id: 'schedule',
@ -215,12 +215,11 @@ function useColumns(alertManagerSourceName: string) {
<> <>
{' '} {' '}
{startsAtDate?.format(dateDisplayFormat)} {'-'} {startsAtDate?.format(dateDisplayFormat)} {'-'}
<br />
{endsAtDate?.format(dateDisplayFormat)} {endsAtDate?.format(dateDisplayFormat)}
</> </>
); );
}, },
size: '150px', size: 7,
}, },
]; ];
if (showActions) { if (showActions) {
@ -250,7 +249,7 @@ function useColumns(alertManagerSourceName: string) {
</Stack> </Stack>
); );
}, },
size: '147px', size: 5,
}); });
} }
return columns; return columns;