diff options
author | Scott Hampton <shampton@gitlab.com> | 2019-01-11 19:14:49 +0300 |
---|---|---|
committer | Scott Hampton <shampton@gitlab.com> | 2019-01-11 19:47:19 +0300 |
commit | 3e60798e110764cd06a2966c3be8e048b2b9019c (patch) | |
tree | f94dfa0d87eb857bc21d65b56f87ff0d5ae42364 /app/helpers | |
parent | 1a3193318813d268ef3dc6b879ea0fd82cc40402 (diff) |
Backporting environments helper
Allowing the EE to override a helper function to pass more data to vue
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/environments_helper.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/helpers/environments_helper.rb b/app/helpers/environments_helper.rb index 7b22bc8f98f..dca36ac6db1 100644 --- a/app/helpers/environments_helper.rb +++ b/app/helpers/environments_helper.rb @@ -7,6 +7,15 @@ module EnvironmentsHelper } end + def environments_folder_list_view_data + { + "endpoint" => folder_project_environments_path(@project, @folder, format: :json), + "folder-name" => @folder, + "can-create-deployment" => can?(current_user, :create_deployment, @project).to_s, + "can-read-environment" => can?(current_user, :read_environment, @project).to_s, + } + end + def metrics_data(project, environment) { "settings-path" => edit_project_service_path(project, 'prometheus'), |