|
|
@ -23,12 +23,15 @@ export const getAlertOverrideDetail: RequestHandler<AlertOverrideReqParams> = |
|
|
|
b.recipient_name, |
|
|
|
b.recipient_name, |
|
|
|
c.host_uuid, |
|
|
|
c.host_uuid, |
|
|
|
c.host_name, |
|
|
|
c.host_name, |
|
|
|
c.host_type |
|
|
|
d.anvil_uuid, |
|
|
|
|
|
|
|
d.anvil_name |
|
|
|
FROM alert_overrides AS a |
|
|
|
FROM alert_overrides AS a |
|
|
|
JOIN recipients AS b |
|
|
|
JOIN recipients AS b |
|
|
|
ON a.alert_override_recipient_uuid = b.recipient_uuid |
|
|
|
ON a.alert_override_recipient_uuid = b.recipient_uuid |
|
|
|
JOIN hosts AS c |
|
|
|
JOIN hosts AS c |
|
|
|
ON a.alert_override_host_uuid = c.host_uuid |
|
|
|
ON a.alert_override_host_uuid = c.host_uuid |
|
|
|
|
|
|
|
JOIN anvils AS d |
|
|
|
|
|
|
|
ON c.host_uuid IN (d.anvil_node1_host_uuid, d.anvil_node2_host_uuid) |
|
|
|
WHERE a.alert_override_alert_level != -1 |
|
|
|
WHERE a.alert_override_alert_level != -1 |
|
|
|
AND b.recipient_name != '${DELETED}' |
|
|
|
AND b.recipient_name != '${DELETED}' |
|
|
|
AND a.alert_override_uuid = '${uuid}' |
|
|
|
AND a.alert_override_uuid = '${uuid}' |
|
|
@ -48,22 +51,26 @@ export const getAlertOverrideDetail: RequestHandler<AlertOverrideReqParams> = |
|
|
|
mailRecipientName, |
|
|
|
mailRecipientName, |
|
|
|
hostUuid, |
|
|
|
hostUuid, |
|
|
|
hostName, |
|
|
|
hostName, |
|
|
|
hostType, |
|
|
|
anvilUuid, |
|
|
|
|
|
|
|
anvilName, |
|
|
|
], |
|
|
|
], |
|
|
|
} = rows; |
|
|
|
} = rows; |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
host: { |
|
|
|
|
|
|
|
hostName, |
|
|
|
|
|
|
|
hostType, |
|
|
|
|
|
|
|
hostUUID: hostUuid, |
|
|
|
|
|
|
|
shortHostName: getShortHostName(hostName), |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
level: Number(level), |
|
|
|
level: Number(level), |
|
|
|
mailRecipient: { |
|
|
|
mailRecipient: { |
|
|
|
name: mailRecipientName, |
|
|
|
name: mailRecipientName, |
|
|
|
uuid: mailRecipientUuid, |
|
|
|
uuid: mailRecipientUuid, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
node: { |
|
|
|
|
|
|
|
name: anvilName, |
|
|
|
|
|
|
|
uuid: anvilUuid, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
subnode: { |
|
|
|
|
|
|
|
name: hostName, |
|
|
|
|
|
|
|
short: getShortHostName(hostName), |
|
|
|
|
|
|
|
uuid: hostUuid, |
|
|
|
|
|
|
|
}, |
|
|
|
uuid, |
|
|
|
uuid, |
|
|
|
}; |
|
|
|
}; |
|
|
|
}); |
|
|
|
}); |
|
|
|