summaryrefslogtreecommitdiff
path: root/app/views/projects/environments/_metrics_button.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/environments/_metrics_button.html.haml')
-rw-r--r--app/views/projects/environments/_metrics_button.html.haml6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/views/projects/environments/_metrics_button.html.haml b/app/views/projects/environments/_metrics_button.html.haml
new file mode 100644
index 00000000000..acbac1869fd
--- /dev/null
+++ b/app/views/projects/environments/_metrics_button.html.haml
@@ -0,0 +1,6 @@
+- environment = local_assigns.fetch(:environment)
+
+- return unless environment.has_metrics? && can?(current_user, :read_environment, environment)
+
+= link_to environment_metrics_path(environment), title: 'See metrics', class: 'btn metrics-button' do
+ = icon('area-chart')