Skip to content

Commit 40ef4fe

Browse files
committed
revert truncation
1 parent 69c6580 commit 40ef4fe

3 files changed

Lines changed: 13 additions & 8 deletions

File tree

x-pack/plugins/triggers_actions_ui/public/application/sections/alert_details/components/alert_instances.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export const alertInstancesTableColumns = (
3838
{ defaultMessage: 'Instance' }
3939
),
4040
sortable: false,
41+
truncateText: true,
4142
'data-test-subj': 'alertInstancesTableCell-instance',
4243
},
4344
{

x-pack/plugins/uptime/server/lib/alerts/__tests__/status_check.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,10 +1201,10 @@ describe('status check alert', () => {
12011201
it('creates a set of unique IDs from a list of composite unique objects', () => {
12021202
expect(getUniqueIdsByLoc(downItems, availItems)).toEqual(
12031203
new Set<string>([
1204-
'firstharrisburg',
1205-
'firstfairbanks',
1206-
'secondharrisburg',
1207-
'secondfairbanks',
1204+
'first-harrisburg',
1205+
'first-fairbanks',
1206+
'second-harrisburg',
1207+
'second-fairbanks',
12081208
])
12091209
);
12101210
});

x-pack/plugins/uptime/server/lib/alerts/status_check.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,19 @@ import { UMServerLibs } from '../lib';
3232

3333
const { MONITOR_STATUS } = ACTION_GROUP_DEFINITIONS;
3434

35+
const getMonIdByLoc = (monitorId: string, location: string) => {
36+
return monitorId + '-' + location;
37+
};
38+
3539
const uniqueDownMonitorIds = (items: GetMonitorStatusResult[]): Set<string> =>
3640
items.reduce(
37-
(acc, { monitorId, location }) => acc.add(monitorId + '-' + location),
41+
(acc, { monitorId, location }) => acc.add(getMonIdByLoc(monitorId, location)),
3842
new Set<string>()
3943
);
4044

4145
const uniqueAvailMonitorIds = (items: GetMonitorAvailabilityResult[]): Set<string> =>
4246
items.reduce(
43-
(acc, { monitorId, location }) => acc.add(monitorId + '-' + location),
47+
(acc, { monitorId, location }) => acc.add(getMonIdByLoc(monitorId, location)),
4448
new Set<string>()
4549
);
4650

@@ -330,11 +334,11 @@ export const statusCheckAlertFactory: UptimeAlertTypeFactory = (_server, libs) =
330334

331335
mergedIdsByLoc.forEach((monIdByLoc) => {
332336
const availMonInfo = availabilityResults.find(
333-
({ monitorId, location }) => monitorId + location === monIdByLoc
337+
({ monitorId, location }) => getMonIdByLoc(monitorId, location) === monIdByLoc
334338
);
335339

336340
const downMonInfo = downMonitorsByLocation.find(
337-
({ monitorId, location }) => monitorId + location === monIdByLoc
341+
({ monitorId, location }) => getMonIdByLoc(monitorId, location) === monIdByLoc
338342
)?.monitorInfo;
339343

340344
const monitorInfo = downMonInfo || availMonInfo?.monitorInfo!;

0 commit comments

Comments
 (0)