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

Make throttle an optional dependency for extratio #2685

Merged
merged 2 commits into from
Jul 1, 2024

Conversation

jevenski
Copy link
Contributor

Added a conditional statement to check if the throttle plugin is installed, and to initialize the WebUI and adjust the http request accordingly.

There is one thing that's worth our notice, though. If we set up a rule that contains a throttle option, and disable the throttle plugin, and modify the rule setting again, and then enable the throttle plugin again, the original throttle option will be lost. It behaves this way because the PHP scripts take every submission of rule sets as creating new rules, instead of updating the existing ones.

  1. With the throttle plugin installed
    Screenshot 2024-06-29 154820

  2. With the throttle plugin disabled
    Screenshot 2024-06-29 160054

Copy link
Collaborator

@stickz stickz left a comment

Choose a reason for hiding this comment

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

Overall looks good. Just one thing to improve, before I test this change.

plugins/extratio/init.js Outdated Show resolved Hide resolved
@stickz
Copy link
Collaborator

stickz commented Jul 1, 2024

Looks good, thanks!

@stickz stickz merged commit 981d142 into Novik:develop Jul 1, 2024
@jevenski jevenski deleted the ratio-rules-throttle branch July 8, 2024 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants