-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support operation delete
on CloudObjectStoreContainer
#420
Conversation
I have not read the code yet, but I can see that there's a bunch of Rubocop issues and there are no tests for the newly added functions. So marking this as WIP for now. |
e9fb792
to
5661331
Compare
Hello @martinpovolny I've added a dozen of unit tests and fixed rubocop issues. I'm not sure, however, whether it's better now that there is a mixed code styling with less rubocop issues or was it more readable before when code styling was consistent across the file (e.g. https://github.com/ManageIQ/manageiq-ui-classic/pull/420/files#diff-4b513b358c3d87df7b0be7e0eef4d95e). Could you please take a look if there is anything else that can be improved? :D |
N_('Remove Object Storage Container'), | ||
:url_parms => "main_div", | ||
:confirm => N_("Warning: The selected Object Storage Container and ALL related Objects will be "\ | ||
"permanently removed!"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are missing supports check https://github.com/Ladas/manageiq-ui-classic/blob/29e35d051703fc0b1e85ec88d14ca62d972dcad5/app/helpers/application_helper/toolbar/cloud_subnet_center.rb#L25-L25
similar supports check should be also in the controller @romanblanco ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ladas The support check is in the Toolbar Button code. In Toolbar is only specified feature that you want to test.
9581e93
to
8f09667
Compare
I've noticed an unused function in my commit so I've removed it and repushed. |
8f09667
to
a229590
Compare
2b5dc65
to
8abd781
Compare
@miha-plesko : the failed tests seem to be relevant and related to these changes. Please, take a look, |
@martinpovolny I think all failed tests are a result of related PR in |
@miha-plesko close & reopen in case the merged PR (ManageIQ/manageiq#13965) affects this. |
8abd781
to
5af5159
Compare
@martinpovolny any suggestion why Travis fails here The easiest workaround would be to delete the two tests that are failing, but I would feel better if we somehow make them green instead 😄 |
5af5159
to
58fb986
Compare
delete
on CloudObjectStoreContainer
Hi @martinpovolny The code is ready to merge, could you please have a look at it? Thanks, |
@@ -1840,6 +1840,49 @@ def vm_button_operation(method, display_name, partial_after_single_selection = n | |||
vms.count | |||
end | |||
|
|||
def process_cloud_object_storage_buttons |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you, please, pass in params[:pressed]
as an argument here?
(better for testing, code readability etc.)
This looks good! Please, just add the argument mentioned above. The Rubocops about complexity we don't really enforce at this point, but I don't see the reason for the compaints in I see you have hash arguments there, which looks good to me. So we'll ignore that too. |
CloudObjectStoreContainer model had no support for operations (e.g. delete) since they were not supported by backend. Well, now the backend supports deleting bucket hence we add "Configuration" menu option for this. This commit brings a new mid-page menu item "Configuration->Remove Object Storage Container" to the following pages: * cloud object container details page * cloud object container full list * cloud object container list per StorageManager Signed-off-by: Miha Pleško <[email protected]>
58fb986
to
b3b5cc2
Compare
Some comments on commit miha-plesko@b3b5cc2 spec/controllers/application_controller/ci_processing_spec.rb
spec/controllers/cloud_object_store_container_spec.rb
|
Checked commit miha-plesko@b3b5cc2 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 app/controllers/application_controller/ci_processing.rb
spec/controllers/application_controller/ci_processing_spec.rb
spec/controllers/cloud_object_store_container_spec.rb
|
Thank you for the review @martinpovolny, I totally agree with your suggestions. I've applied them and repushed, please take a look. |
Thx! |
With this commit we add "Configuration" menu option to the list of CloudObjectStore containers where we support operation
delete
.This commit brings a new mid-page menu item "Configuration->Remove Object Storage Container" to the following pages:
cloud object container details page
cloud object container full list
cloud object container list per StorageManager
Video:
delete_bucket.zip
Links: