Commit 1ab26e7f authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera

Merge branch 'tr-add-detail-fields-to-table' into 'master'

Add hosts field to alert detail table

See merge request gitlab-org/gitlab!43087
parents 6ac2bfe3 040f3180
......@@ -10,6 +10,7 @@ fragment AlertDetailItem on AlertManagementAlert {
description
updatedAt
endedAt
hosts
details
runbook
todos {
......
......@@ -13,6 +13,7 @@ query getAlert($iid: String!, $fullPath: ID!) {
service
description
endedAt
hosts
details
}
}
......
......@@ -23,6 +23,7 @@ const allowedFields = [
'endedAt',
'details',
'environment',
'hosts',
];
const isAllowed = fieldName => allowedFields.includes(fieldName);
......
---
title: Add hosts field to alert detail table
merge_request: 43087
author:
type: changed
......@@ -14,6 +14,7 @@ const mockAlert = {
assignees: { nodes: [] },
notes: { nodes: [] },
todos: { nodes: [] },
hosts: ['host1', 'host2'],
__typename: 'AlertManagementAlert',
};
......@@ -83,6 +84,7 @@ describe('AlertDetails', () => {
expect(findTableField(fields, 'Severity').exists()).toBe(true);
expect(findTableField(fields, 'Status').exists()).toBe(true);
expect(findTableField(fields, 'Environment').exists()).toBe(true);
expect(findTableField(fields, 'Hosts').exists()).toBe(true);
});
it('should not show disallowed alert fields', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment