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

fix(docker): missing browse volume option [EE-7179] #11901

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

Conversation

oscarzhou-portainer
Copy link
Collaborator

closes EE-7179

Copy link
Contributor

@chiptus chiptus left a comment

Choose a reason for hiding this comment

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

I don't understand why your fix is changing anything. why is AccessDatatable related?

@oscarzhou-portainer
Copy link
Collaborator Author

oscarzhou-portainer commented Jun 6, 2024

I don't understand why your fix is changing anything. why is AccessDatatable related?

Because I noticed that the codebase for extendTableOption settings is not consistent throughout the project. Even in cases where there are "single extendTableOptions", you also have wrapped them with mergeOptions. An example can be found here 1261887#diff-fc05a87bac4bd4de2239bd6026a578ea922c7e8a7db63751d9dd00bc92933344R97-R102. Therefore, I believe it would be beneficial to add this wrapper to the remaining extendTableOption settings as well. Besides, it is intuitive for others to work on extendTableOption setting in the future.

@chiptus
Copy link
Contributor

chiptus commented Jun 9, 2024

@oscarzhou-portainer I don't see the added value. where we have it's because it used to be multiple values. but how does it fixes the issue?

@oscarzhou-portainer
Copy link
Collaborator Author

@oscarzhou-portainer I don't see the added value. where we have it's because it used to be multiple values. but how does it fixes the issue?

The main fix for the issue can be found https://github.com/portainer/portainer/pull/11901/files#diff-ee4ca3e2b0441ac5ba3be0fa63c816a8f7df3597efba58805fdeea6086cac77dL72-R74. The problem was that two extend table options were added to the VolumesDatatable, but they were not wrapped with the mergeOptions function.

The reason why I suggest including mergeOptions in all extenTableOptions settings is that it makes it easier for other developers to grasp how to incorporate multiple values into extendTableOptions and reduces the likelihood of errors.

In this code snippet, you can see that the mergeOptions function is used even when there are no multiple values. You can find this example here: link. Another example can be found here: link. There are more instances of this usage in your original PR.

Copy link
Contributor

@chiptus chiptus left a comment

Choose a reason for hiding this comment

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

I guess we could change extendTableOptions to accept an array of extenders.

LGTM

@oscarzhou-portainer oscarzhou-portainer force-pushed the fix/EE-7179/missing-browse-volumes-option branch from a3c12d1 to dfb2876 Compare June 11, 2024 10:01
@chiptus
Copy link
Contributor

chiptus commented Jun 12, 2024

@oscarzhou-portainer you need to run yarn format on this pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants