Commit 258b1d31 authored by can eldem's avatar can eldem

Showing basic UI

parent 15a3481e
......@@ -14,6 +14,11 @@ module Projects
def show
render_404 unless Feature.enabled?(:security_orchestration_policies_configuration, project) && can?(current_user, :security_orchestration_policies, project)
end
# arams {"utf8"=>"✓", "authenticity_token"=>"LYYIbIqd2gBMMP2Wjy+Q2JhhXZ4TFps0BW3t+cslPOadSoK7e13efQ9VFtyZxMzyJXYWtmD66mWrjbg/P3JDQQ==", "orchestration"=>{"management_project_id"=>"21"}, "controller"=>"projects/security/policies", "action"=>"assign", "namespace_id"=>"root", "project_id"=>"alpine"}
# Project 23
def assign
end
end
end
end
= s_('Security|Policies')
%body
= form_with url:assign_project_security_policy_url(@project), as: :cluster, html: { class: 'cluster_management_form' } do |field|
%h4
= s_('CreatePolicy|Create a policy')
%p
= project_select_tag('orchestration[management_project_id]', class: 'hidden-filter-value', toggle_class: 'js-project-search js-project-filter js-filter-submit', dropdown_class: 'dropdown-menu-selectable dropdown-menu-project js-filter-submit',
placeholder: _('Select project'), idAttribute: 'id', data: { order_by: 'last_activity_at', idattribute: 'id', simple_filter: true, allow_clear: true, include_groups: false, include_projects_in_subgroups: true, user_id: current_user.id }, value: 123)
.text-muted
= html_escape(s_('SecurityOrchestration|A security policy project can be used enforce policies for a given project, group, or instance. It allows you to speficy security policies that are important to you and enforce them with every commit.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
= link_to _('More information'), help_page_path('user/clusters/management_project.md'), target: '_blank'
= field.submit _('Save changes'), class: 'btn gl-button btn-success'
\ No newline at end of file
......@@ -64,7 +64,9 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
resources :dashboard, only: [:index], controller: :dashboard
resources :vulnerability_report, only: [:index], controller: :vulnerability_report
resource :policy, only: [:show]
resource :policy, only: [:show] do
post :assign
end
resource :configuration, only: [], controller: :configuration do
post :auto_fix, on: :collection
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment