diff options
Diffstat (limited to 'app/presenters/projects/prometheus')
-rw-r--r-- | app/presenters/projects/prometheus/alert_presenter.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/presenters/projects/prometheus/alert_presenter.rb b/app/presenters/projects/prometheus/alert_presenter.rb index 1cf8b202810..49859f27edd 100644 --- a/app/presenters/projects/prometheus/alert_presenter.rb +++ b/app/presenters/projects/prometheus/alert_presenter.rb @@ -77,6 +77,15 @@ module Projects end end + def details_url + return unless am_alert + + ::Gitlab::Routing.url_helpers.details_project_alert_management_url( + project, + am_alert.iid + ) + end + private def alert_title @@ -97,6 +106,7 @@ module Projects metadata << list_item(service.label.humanize, service.value) if service metadata << list_item(monitoring_tool.label.humanize, monitoring_tool.value) if monitoring_tool metadata << list_item(hosts.label.humanize, host_links) if hosts + metadata << list_item('GitLab alert', details_url) if details_url metadata.join(MARKDOWN_LINE_BREAK) end @@ -173,7 +183,7 @@ module Projects { panel_groups: [{ panels: [{ - type: 'line-graph', + type: 'area-chart', title: title, y_label: y_label, metrics: [{ |