mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[Synthetics UI] Prefer custom_heartbeat_id
to monitor.id
for Uptime detail link when present (#143128) (#143707)
* Prefer `custom_heartbeat_id` to `monitor.id` when present.
* Prefer `ConfigKey`.
(cherry picked from commit c25eedc402
)
Co-authored-by: Justin Kambic <jk@elastic.co>
This commit is contained in:
parent
8a9da5065d
commit
8a9a635d73
1 changed files with 3 additions and 1 deletions
|
@ -118,6 +118,7 @@ export const LastTenTestRuns = () => {
|
|||
},
|
||||
];
|
||||
|
||||
const historyIdParam = monitor?.[ConfigKey.CUSTOM_HEARTBEAT_ID] ?? monitor?.[ConfigKey.ID];
|
||||
return (
|
||||
<EuiPanel css={{ minHeight: 200 }}>
|
||||
<EuiFlexGroup alignItems="center" gutterSize="s">
|
||||
|
@ -133,7 +134,8 @@ export const LastTenTestRuns = () => {
|
|||
iconType="list"
|
||||
iconSide="left"
|
||||
data-test-subj="monitorSummaryViewLastTestRun"
|
||||
href={`${basePath}/app/uptime/monitor/${btoa(monitor?.id ?? '')}`}
|
||||
disabled={!historyIdParam}
|
||||
href={`${basePath}/app/uptime/monitor/${btoa(historyIdParam ?? '')}`}
|
||||
>
|
||||
{i18n.translate('xpack.synthetics.monitorDetails.summary.viewHistory', {
|
||||
defaultMessage: 'View History',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue