Skip to content

Commit

Permalink
added button in service edit mode which enables user to check what cu…
Browse files Browse the repository at this point in the history
…rrently attached resources will comply with the selected capabilities.
  • Loading branch information
OrGur1987 committed Apr 10, 2023
1 parent c2083d1 commit c0e2d6b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/controllers/api/storage_services_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,12 @@ def edit_resource(type, id, data = {})
{:task_id => storage_service.update_storage_service_queue(User.current_userid, data)}
end
end

def check_compliance_resource(type, _id = nil, data = {})
data["_id"] = _id
api_ems_resource(type, data, "Checking Compliance", :supports => :check_compliance) do |ems, storage_service|
{:task_id => storage_service.get_compliant_resources_queue(User.current_userid, ems, data)}
end
end
end
end
3 changes: 3 additions & 0 deletions config/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4221,6 +4221,7 @@
:identifier: storage_service
:options:
- :collection
- :custom_actions
:verbs: *gpppd
:klass: StorageService
:subcollections:
Expand All @@ -4239,6 +4240,8 @@
:identifier: storage_service_refresh
- :name: query
:identifier: storage_service_show_list
- :name: check_compliance
:identifier: get_compliant_resources
:resource_actions:
:get:
- :name: read
Expand Down

0 comments on commit c0e2d6b

Please sign in to comment.