mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Graph: Fix annotation description not being shown on hover (#40581)
This commit is contained in:
parent
f4e78ea27b
commit
2ee0c73a8a
@ -36,7 +36,7 @@ export function annotationTooltipDirective(
|
||||
let tooltip = '<div class="graph-annotation">';
|
||||
let titleStateClass = '';
|
||||
|
||||
if (event.alertId !== undefined) {
|
||||
if (event.alertId !== undefined && event.newState) {
|
||||
const stateModel = alertDef.getStateDisplayModel(event.newState);
|
||||
titleStateClass = stateModel.stateClass;
|
||||
title = `<i class="${stateModel.iconClass}"></i> ${stateModel.text}`;
|
||||
@ -50,7 +50,7 @@ export function annotationTooltipDirective(
|
||||
}
|
||||
|
||||
let header = `<div class="graph-annotation__header">`;
|
||||
if (event.login) {
|
||||
if (event.login && event.avatarUrl) {
|
||||
header += `<div class="graph-annotation__user" bs-tooltip="'Created by ${event.login}'"><img src="${event.avatarUrl}" /></div>`;
|
||||
}
|
||||
header += `
|
||||
|
Loading…
Reference in New Issue
Block a user