summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-10 09:09:39 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-10 09:09:39 +0000
commitc52b81f45762cb7f05a950689dfc6d51b197ea73 (patch)
treec44830c2fc21d13b81814958c44b09fa8d11c805 /lib
parent187ee320b39af22929d74c5a2d9b0650bf50a09b (diff)
downloadgitlab-ce-c52b81f45762cb7f05a950689dfc6d51b197ea73.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/alerting/alert.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/gitlab/alerting/alert.rb b/lib/gitlab/alerting/alert.rb
index 531307b93d4..f6f52e392c6 100644
--- a/lib/gitlab/alerting/alert.rb
+++ b/lib/gitlab/alerting/alert.rb
@@ -69,6 +69,12 @@ module Gitlab
end
end
+ def y_label
+ strong_memoize(:y_label) do
+ parse_y_label_from_payload || title
+ end
+ end
+
def alert_markdown
strong_memoize(:alert_markdown) do
parse_alert_markdown_from_payload
@@ -162,6 +168,10 @@ module Gitlab
def parse_alert_markdown_from_payload
payload&.dig('annotations', 'gitlab_incident_markdown')
end
+
+ def parse_y_label_from_payload
+ payload&.dig('annotations', 'gitlab_y_label')
+ end
end
end
end