-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Allow passing labels to FAB Views registered via Plugins #39444
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Currently, we only allow passing "name" and "category" for any FAB View when registering via Airflow plugin. However, we do allow the same for the Menu Link as shown below: https://github.com/apache/airflow/blob/a74b5f069481e1a2339cfd95e137619b16390906/airflow/www/extensions/init_views.py#L154-L158 This PR makes it consistent so we can pass more info that is available in FAB's [`add_view`](https://github.com/dpgaspar/Flask-AppBuilder/blob/c65e067f09e741c00322221263c8599b8e8811d5/flask_appbuilder/base.py#L361-L372) method like `href`, `label`, `category_icons`, `icon` etc
kaxil
requested review from
ryanahamilton,
ashb,
bbovenzi and
pierrejeambrun
as code owners
May 6, 2024 19:28
pankajkoti
approved these changes
May 6, 2024
eladkal
approved these changes
May 6, 2024
sunank200
approved these changes
May 6, 2024
jedcunningham
approved these changes
May 6, 2024
Some related tests failing, maybe they need some refinement :) |
pateash
pushed a commit
to pateash/airflow
that referenced
this pull request
May 13, 2024
Currently, we only allow passing "name" and "category" for any FAB View when registering via Airflow plugin. However, we do allow the same for the Menu Link as shown below: https://github.com/apache/airflow/blob/a74b5f069481e1a2339cfd95e137619b16390906/airflow/www/extensions/init_views.py#L154-L158 This PR makes it consistent so we can pass more info that is available in FAB's [`add_view`](https://github.com/dpgaspar/Flask-AppBuilder/blob/c65e067f09e741c00322221263c8599b8e8811d5/flask_appbuilder/base.py#L361-L372) method like `href`, `label`, `category_icons`, `icon` etc
utkarsharma2
added
type:improvement
Changelog: Improvements
type:misc/internal
Changelog: Misc changes that should appear in change log
and removed
type:improvement
Changelog: Improvements
labels
Jun 3, 2024
ephraimbuddy
added
type:improvement
Changelog: Improvements
and removed
type:misc/internal
Changelog: Misc changes that should appear in change log
labels
Jun 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, we only allow passing "name" and "category" for any FAB View when registering via Airflow plugin.
However, we do allow the same for the Menu Link as shown below:
airflow/airflow/www/extensions/init_views.py
Lines 154 to 158 in a74b5f0
This PR makes it consistent so we can pass more info that is available in FAB's
add_view
method likehref
,label
,category_icons
,icon
etc^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.