debian-mirror-gitlab/app/helpers/projects/terraform_helper.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
542 B
Ruby
Raw Permalink Normal View History

2021-01-29 00:20:46 +05:30
# frozen_string_literal: true
module Projects::TerraformHelper
2021-02-22 17:27:13 +05:30
def js_terraform_list_data(current_user, project)
2021-01-29 00:20:46 +05:30
{
empty_state_image: image_path('illustrations/empty-state/empty-serverless-lg.svg'),
2021-02-22 17:27:13 +05:30
project_path: project.full_path,
2021-10-27 15:23:28 +05:30
terraform_admin: current_user&.can?(:admin_terraform_state, project),
access_tokens_path: profile_personal_access_tokens_path,
username: current_user&.username,
terraform_api_url: "#{Settings.gitlab.url}/api/v4/projects/#{project.id}/terraform/state"
2021-01-29 00:20:46 +05:30
}
end
end