Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
EuiFlexItem,
EuiHorizontalRule,
EuiButtonEmpty,
EuiLink,
} from '@elastic/eui';
import { useKibana } from '../../../../utils/kibana_react';
export interface DashboardMetadata {
Expand Down Expand Up @@ -48,24 +49,15 @@ export function DashboardTile({
<>
<EuiFlexGroup gutterSize="xs" responsive={false} key={dashboard.id}>
<EuiFlexItem key={dashboard.id}>
<EuiText size="s">
<a
href="#"
onClick={async (e) => {
e.preventDefault();
if (dashboardLocator) {
const url = await dashboardLocator.getUrl({
dashboardId: dashboard.id,
});
window.open(url, '_blank');
} else {
console.error('Dashboard locator is not available');
}
}}
>
{dashboard.title}
</a>
</EuiText>
<EuiLink
data-test-subj="o11yDashboardTileLink"
href={dashboardLocator?.getRedirectUrl({
dashboardId: dashboard.id,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also pass the time range for the alert here? The dashboard locator supports adding a time range.

})}
target="_blank"
>
{dashboard.title}
</EuiLink>
<EuiText color={'subdued'} size="s">
{dashboard.description}
</EuiText>
Expand Down