diff options
Diffstat (limited to 'lib/gitlab/alert_management/payload/prometheus.rb')
-rw-r--r-- | lib/gitlab/alert_management/payload/prometheus.rb | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/lib/gitlab/alert_management/payload/prometheus.rb b/lib/gitlab/alert_management/payload/prometheus.rb index 76f3da8366b..15fa91646c8 100644 --- a/lib/gitlab/alert_management/payload/prometheus.rb +++ b/lib/gitlab/alert_management/payload/prometheus.rb @@ -78,18 +78,6 @@ module Gitlab rescue URI::InvalidURIError, KeyError end - def metrics_dashboard_url - return unless environment && full_query && title - - metrics_dashboard_project_environment_url( - project, - environment, - embed_json: dashboard_json, - embedded: true, - **alert_embed_window_params - ) - end - def has_required_attributes? project && title && starts_at_raw end @@ -108,29 +96,6 @@ module Gitlab def plain_gitlab_fingerprint [starts_at_raw, title, full_query].join('/') end - - # Formatted for parsing by JS - def alert_embed_window_params - { - start: (starts_at - METRIC_TIME_WINDOW).utc.strftime('%FT%TZ'), - end: (starts_at + METRIC_TIME_WINDOW).utc.strftime('%FT%TZ') - } - end - - def dashboard_json - { - panel_groups: [{ - panels: [{ - type: 'area-chart', - title: title, - y_label: gitlab_y_label, - metrics: [{ - query_range: full_query - }] - }] - }] - }.to_json - end end end end |