2021-11-18 22:05:49 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Projects::ClusterAgentsHelper
|
|
|
|
def js_cluster_agent_details_data(agent_name, project)
|
|
|
|
{
|
2022-03-02 08:16:31 +05:30
|
|
|
activity_empty_state_image: image_path('illustrations/empty-state/empty-state-agents.svg'),
|
2021-11-18 22:05:49 +05:30
|
|
|
agent_name: agent_name,
|
2022-04-04 11:22:00 +05:30
|
|
|
can_admin_vulnerability: can?(current_user, :admin_vulnerability, project).to_s,
|
2022-03-02 08:16:31 +05:30
|
|
|
empty_state_svg_path: image_path('illustrations/operations-dashboard_empty.svg'),
|
2022-05-07 20:08:51 +05:30
|
|
|
project_path: project.full_path,
|
|
|
|
kas_address: Gitlab::Kas.external_url,
|
2022-07-16 23:28:13 +05:30
|
|
|
kas_version: Gitlab::Kas.version_info,
|
2022-05-07 20:08:51 +05:30
|
|
|
can_admin_cluster: can?(current_user, :admin_cluster, project).to_s
|
2021-11-18 22:05:49 +05:30
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|