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

Add different redirect options #197

Merged
merged 1 commit into from
Sep 8, 2023
Merged

Add different redirect options #197

merged 1 commit into from
Sep 8, 2023

Conversation

yhabteab
Copy link
Member

@yhabteab yhabteab commented Sep 5, 2023

TODO

Test commit:Icinga/icingaweb2-module-reporting#194

@cla-bot cla-bot bot added the cla/signed label Sep 5, 2023
@yhabteab yhabteab force-pushed the redirect-options branch 5 times, most recently from bfee188 to f299762 Compare September 6, 2023 11:05
@yhabteab
Copy link
Member Author

yhabteab commented Sep 6, 2023

TODO

  • Sending extra updates for the col2 container shouldn't open a new one if it isn't already there (has to be fixed in Icinga Web 2.).

Copy link
Member

@nilmerg nilmerg left a comment

Choose a reason for hiding this comment

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

With Icinga/icingaweb2#5108 it's now possible to refresh only the column that would also be affected by any other redirect such as __CLOSE__. (i.e. for modals, the opener)

Please rely on that for closeCurrentAndRefreshRelatedView. Though, rename it to closeModalAndRefreshRelatedView. I'd also suggest to add a second optional parameter which allows to define which column should be refreshed by an extra update in case of a legacy Web version.

Then, for the case where #col1 and #col2 should be refreshed, please add a new method. As name I'd suggest closeModalAndRefreshRemainingViews and assume that the modal is always shown in #col2 so you can issue a __REFRESH__ and an extra update for #col1. This is the only known case where refreshing both columns is required, so I think it's sufficient this way.

src/Compat/CompatController.php Outdated Show resolved Hide resolved
src/Compat/CompatController.php Outdated Show resolved Hide resolved
src/Compat/CompatController.php Outdated Show resolved Hide resolved
src/Compat/CompatController.php Outdated Show resolved Hide resolved
src/Compat/CompatController.php Outdated Show resolved Hide resolved
src/Compat/CompatController.php Outdated Show resolved Hide resolved
src/Compat/CompatController.php Outdated Show resolved Hide resolved
src/Compat/CompatController.php Outdated Show resolved Hide resolved
src/Compat/CompatController.php Outdated Show resolved Hide resolved
@yhabteab
Copy link
Member Author

yhabteab commented Sep 7, 2023

GitHub actions fail with function never exit execution or throw exception.

@nilmerg
Copy link
Member

nilmerg commented Sep 7, 2023

Then we'll add the same doc return type to ActionController::redirectNow()

@yhabteab yhabteab added the enhancement New feature or request label Sep 7, 2023
@yhabteab yhabteab self-assigned this Sep 7, 2023
@yhabteab
Copy link
Member Author

yhabteab commented Sep 7, 2023

Requires Icinga/icingaweb2#5110

src/Compat/CompatController.php Outdated Show resolved Hide resolved
src/Compat/CompatController.php Outdated Show resolved Hide resolved
src/Compat/CompatController.php Outdated Show resolved Hide resolved
src/Compat/CompatController.php Outdated Show resolved Hide resolved
Copy link
Member

@nilmerg nilmerg left a comment

Choose a reason for hiding this comment

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

One last thing: The url shouldn't be optional, should it? Any module not passing it, only supports Icinga Web v2.12, which isn't released yet anyway. I don't think anyone developing a module will only support the latest major, and support for 2.11.x won't end soon enough.

@nilmerg nilmerg merged commit 12820bc into main Sep 8, 2023
12 checks passed
@nilmerg nilmerg deleted the redirect-options branch September 8, 2023 09:13
@nilmerg nilmerg added this to the v0.9.0 milestone Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla/signed enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants