Skip to content
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

feat(volumes): add browse volume button to other related views #3089

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

diegovilar
Copy link

@diegovilar diegovilar commented Aug 15, 2019

Closes #2265

Added to the following views the same "browse" button used by the volumesDatatable component that allows the user to browse files in a volume:

Volume details view
Volume details

Container details view
Container details

The buttons use the authorization DockerAgentBrowseList and are only shown when these both expressions are true:

  • !EndpointProvider.offlineMode()
  • StateManager.getState().endpoint.mode.agentProxy

@diegovilar diegovilar changed the title Feat2265 browse volume button feat(volumes) add browse volume button do other related views Aug 15, 2019
@diegovilar diegovilar changed the title feat(volumes) add browse volume button do other related views feat(volumes): add browse volume button do other related views Aug 15, 2019
@ghost ghost added this to Accepted in Contributions Sep 6, 2019
@ghost ghost moved this from Accepted to Validation (technical/functional/documentation) in Contributions Oct 10, 2019
@ghost ghost self-requested a review October 10, 2019 04:48
@ghost ghost added the status/1-functional-review Indicates that the PR is currently under functional review label Oct 10, 2019
@ghost ghost changed the title feat(volumes): add browse volume button do other related views feat(volumes): add browse volume button to other related views Oct 21, 2019
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionally this looks 100% good to me and is ready for technical view.
cc @xAt0mZ for technical review

@deviantony as a note: with the disable volume browse toggle introduced in 1.22.1, we need to make sure that volume browse is correctly restricted in the new areas this PR introduces

@ghost ghost added status/2-technical-review Indicates that the PR is currently under technical review and removed status/1-functional-review Indicates that the PR is currently under functional review labels Oct 21, 2019
Copy link
Member

@xAt0mZ xAt0mZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Don't merge as it can require some changes for the point mentionned above

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@diegovilar are you able to rebase this to version 1.22.1? I will need to test this after rebasing to make sure that it does not conflict with this volume browse toggle feature introduced in Portainer version 1.22.1

@xAt0mZ xAt0mZ added the rebase-required Indicates that the PR must be rebased on the latest development branch label Oct 22, 2019
@diegovilar diegovilar requested a review from a user February 8, 2020 02:35
@diegovilar
Copy link
Author

diegovilar commented Feb 8, 2020

@itsconquest, I've rebased it (current master) and made the necessary changes to work with this volume browse toggle feature. Please re-review the PR.

Also, CodeClimate is complaining that the code used to check if the user can browse is found in 3 different files. Since the code requires access to the services ExtensionService, Authentication and ApplicationState, all of which need to be injected by Angular, I guess the correct way would be to extract it to a utility service, or to a simple utility method that requires those services as parameters. If you guys want that issue handled, please let me know how to proceed.

@deviantony
Copy link
Member

@diegovilar don't worry about codeclimate.

cc @itsconquest for functional review first

@deviantony deviantony removed the request for review from xAt0mZ February 9, 2020 16:12
@deviantony deviantony added status/1-functional-review Indicates that the PR is currently under functional review and removed rebase-required Indicates that the PR must be rebased on the latest development branch status/2-technical-review Indicates that the PR is currently under technical review labels Feb 9, 2020
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@diegovilar Apologies for the late update on this, things have been crazy leading up to the 2.0 release.

I've just tested this with RBAC and functionally this looked OK, with one minor thing that I think needs changing:

For RBAC users logged in (when browsing is disabled), the browse button is shown (as disabled) in the container details and volume details views, rather than being hidden as we currently do for the button in the volumes view. This will need to be changed so that the button is not shown in these views when the setting is disabled.

This PR will also require another rebase as the develop branch has now gotten ahead.

If you are not able to contribute further on this PR (due to the time it has taken us to move ahead on it) I can rebase and make the require changes on your behalf :)

@ghost ghost added changes-required Waiting for an update of the contributor rebase-required Indicates that the PR must be rebased on the latest development branch and removed status/1-functional-review Indicates that the PR is currently under functional review labels Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes-required Waiting for an update of the contributor has conflicts rebase-required Indicates that the PR must be rebased on the latest development branch
Projects
Contributions
Validation (technical/functional/docu...
Development

Successfully merging this pull request may close these issues.

Feature Request: Missing "Browse files" button on Volume Detail page
3 participants