Commit 040f3180 authored by Tristan Read's avatar Tristan Read Committed by Nicolò Maria Mezzopera

Add hosts field to alert detail table

parent 7b1aab82
......@@ -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