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

Release 0.7.2 #31

Merged
merged 57 commits into from
Jul 13, 2023
Merged

Release 0.7.2 #31

merged 57 commits into from
Jul 13, 2023

Conversation

jirivrany
Copy link
Collaborator

Version 0.7.2 into master

jakubman1 and others added 30 commits March 13, 2023 11:43
Using the application context (current_app) helps prevent circular
imports when using app context (such as accessing config values)
from blueprints or other parts of the application.

Furthermore, when creating an app using the factory pattern,
the app variable is not available outside of the factory
method.

For more information see [1].

[1] https://flask.palletsprojects.com/en/2.2.x/appcontext/
The factory pattern allows more control for when the application
is created.

It also enables more flexibility for the server software
used to run the application. Server softwares (such as gunicorn)
can now create ExaFS instances on demand and dynamically scale the
application.
The GUI would crash on KeyError when trying to add a new rule,
unless the 'EXA_API' key was set in the config. Since the key
is not in the example config, just renaming the example config
would lead to the GUI not working.

This commit fixes the issue.

Fixes: 0e45cd0 ("v 0.7.0 - two options for ExaAPI")
The group_delete method inserted 'rtbh' as rule_type attribute
for the Log table, however the rule_type attribute is of type int.

This commit fixes the issue by inserting the numeric representation
of the RTBH rule type when creating records in the Log table.
The previous formatting would lead to an error "str is not callable",
instead of formatting properly.

This commit fixes the issue.
The setup.py file allows the application to be packaged for easier
distribution.
Use app factory to initialize the application
Introduce setuptools configuration
Fix various unhandled exceptions and errors
The setup.py did not install dependencies due to trying to import
the __version__ variable from __init__.py file, which is dependent
on the babel library.

This commit fixes the issue by moving version specification to a
separate file without any dependencies.
Move version definition to a separate file
…gnature must be the same as models.get_ip_rules.
Importing the variable using a regular package import can lead to
errors, if installed from a fresh virtual environment, due to
__init__.py being executed and failing on missing packages.

This commit fixes the issue by executing the __about__.py file
directly instead of importing it using the flowapp module.
jirivrany and others added 27 commits March 20, 2023 08:57
The version specified in setup.py was different from version
specified in requirements.txt. This could lead to errors after
installation.

This commit fixes the issue.
fix Flask-SQLAlchemy version in setup.py
Moving the app version frees-up some space in the navbar for future
additions.
The bi-x-lg icon is more suitable for buttons, since it is larger
and therefore more visible.
The tag to set bootstrap tooltips changed from data-toggle to
data-bs-toggle in Bootstrap 5. This commit fixes the occurences
of the old tag.
Increased border radius and added shadow.
The backref attribute is considered legacy in current versions
of SQLAlchemy and should be replaced with back_populates with
explicit relationship definition [1].

This commit fixes the "relationship X will copy column Q to column P,
which conflicts with relationship(s): Y" warnings on ExaFS startup
by removing the duplicate relationship caused by combining
backref attribute with explicit relationship definition on API key model.

[1] https://docs.sqlalchemy.org/en/20/orm/backref.html
Checks "if not mask:" would return True if mask was set to 0.
This would lead to mask being set to default value, which is /32 for
IPv4 and /128 for IPv6, which is not the intended behaviour, since
it prevented explicitly specifying full IP range (0.0.0.0/0).
The mask would also not show up in dashboard.

This commit fixes the issue by checking the mask values for equality
to None.
The backref attribute is considered legacy in current versions
of SQLAlchemy and should be replaced with back_populates with
explicit relationship definition [1].

This commit fixes the "relationship X will copy column Q to column P,
which conflicts with relationship(s): Y" warnings on ExaFS startup
by removing the duplicate relationship caused by combining
backref attribute with explicit relationship definition on API key model.

[1] https://docs.sqlalchemy.org/en/20/orm/backref.html
* remove redundant checks in IP validators

The validators first converted the string to any IP address and
then checked for the IP version. This commit removes the redundant
checks by directly trying to parse address string as IPv4 or IPv6.

* add proper styling to form fields with errors

Error messages are now red and error fields have red border.
This helps users to notice the error fields more easily.

* remove unused jQuery scripts in forms

jQuery is no longer available since switching to Bootstrap 5.
These scripts were throwing errors in the browser console and
did nothing else, since datetime picker was replaced by a HTML
datetime input.

* add star to required field labels
@jirivrany jirivrany changed the title Develop Release 0.7.2 Jul 13, 2023
@jirivrany jirivrany merged commit 4893aaa into master Jul 13, 2023
2 checks passed
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