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 description to pools view #34862
Add description to pools view #34862
Conversation
I feel we should trim the string a bit, the description can be extremely long. |
cc72151
to
f026a2d
Compare
Is it possible to also do truncation when the rows are selected? Loading a long value into memory can be slow itself and bring down the entire view. I know it can be done with |
What do we do in the Variable page? We have description column there as well. |
Ah yes, However, to @uranusjr's point, we are still loading a potentially long value into memory. @uranusjr , when you say |
No, I’m thinking if it’d be posible to apply |
Ah I see. Wasn't sure if you were referring to browser memory or server memory. I profiled the render template code, and I'm not seeing an obvious place to add this. Are you thinking of something more custom on the sqlalchemy model? column_property or @hybrid_property come to mind but may be a bit overkill. |
@uranusjr , what are your thoughts on the previous comment? Sorry - forgot to tag ya. |
Yeah I was wondering if Flask Appbuilder has a solution to this without needing to add something to the model. In Django admin you can add a method on the view class and point a column to it, for example. But I wouldn’t be surprised if there’s nothing similar; F.A.B. is not particularly known for being flexible… If you don’t see anything straightforward I can live with just adding custom styling like Variable for now and wait for people to complain (if they ever do). |
ab0b7c7
to
3ed2101
Compare
Did a bit of research on FAB and am not seeing anything obvious that would allow us to modify the underlying query being executed against the model. Rebasing and I think this should be good to go provided tests continue to pass. |
closes: 34751
Expose description column in the pools view
Before:
After:
Not sure if it's okay to put styles inline. If I can refactor to a css file, please let me know.
^ 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.