You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/06/26 18:08:52 UTC

[GitHub] [airflow] joshkadis opened a new issue #9538: Add config variable for UI page title

joshkadis opened a new issue #9538:
URL: https://github.com/apache/airflow/issues/9538


   **Description**
   
   Enable installations to change the page title of the `/admin` base route using a config variable. It would default to `DAGs` which is hard-coded now but allow you to do something like this:
   
   ![Screen Shot 2020-06-26 at 2 06 53 PM](https://user-images.githubusercontent.com/997097/85887719-50750a80-b7b6-11ea-852b-7903ecc2f304.png)
   
   **Use case / motivation**
   
   I have a few different Airflow installation that I manage. If I have them open in different browser tabs, the only way to tell which one I'm looking at is from the names of the DAGs or the browser's URL (IP address in my case, not so helpful).
   
   **Related Issues**
   
   <!-- Is there currently another issue associated with this? -->
   
   I searched and couldn't find any.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj edited a comment on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
mik-laj edited a comment on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-662686985


   It's a good idea to add a test that will check that the content is securely protected against XSS attacks.
   For the Web UI, it is enough for us to have integration tests. You should use test client to send HTTP request and check text in response
   https://github.com/apache/airflow/blob/33f0cd2657b2e77ea3477e0c93f13f1474be628e/tests/www/test_views.py#L172
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida edited a comment on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida edited a comment on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-686053566


   Hi @joshkadis we could keep `page-title` to the DAG homepage and `site-title` to the various places that "Airflow" appears in a view as suggested by @mik-laj (I could be getting this the other way round!) I found a way to update some templates, but could not seem to find the base template that rendered other views (details ^ I believe) so am working on that at the moment. But it feels like it would be good to get some feedback from project members as we have some good ideas, but we could perhaps look to get some clarity on how we could proceed this issue as there are various paths we coud take: implementing your original request, updating _all_ views with the singular config or splitting the config options between `site-title` and `page-title`. If the latter, I could update the code so it updates only the `site-title` and I can open open a new issue to update all the templates/views for `page-title`. We could get multiple contributors working on this so could perhaps get it done f
 aster!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-650320949


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] joshkadis commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
joshkadis commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-660469282


   👍 I was probably looking at both and pasted a link to the wrong line of code. What do you think about having the config apply to both places?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-662682687


   I have tested with airflow.cfg and environment variables manually and the UI gets updated accordingly. I think for now Flask handles input so that code cannot be injected into `dags.html`. I am a bit stuck on how I can set up some unit tests for this; not sure if @mik-laj you might be able to provide some pointers here? But I'll continue looking into this this week. Hopefully once this is done, I should be ready to raise the PR.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] joshkadis commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
joshkadis commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-661926095


   Looks great to me. OH! I just thought of something. HTML encoding so you can't break the page by setting the title to `<div>hello` or `<script>alert('Give me your credit card number')</script>`


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] bhavaniravi commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
bhavaniravi commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-685293030


   I would love to have this feature, also have an option to change the `site-title` in the tab itself. One of the usecase I could see is to differentiate dev, test and prod environment


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-668868410


   Hi @joshkadis opened up a PR for this. @mik-laj not sure if you might be able to review when convenient/availability allows?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-686053566


   Hi @joshkadis we could keep `page-title` to the DAG homepage and `site-title` to the various places that "Airflow" appears in a view as suggested by @mik-laj (I could be getting this the other way round!) I found a way to update some templates, but could not seem to find the base template that rendered other views (details ^ I believe) so am working on that at the moment. But it feels like it would be good to get some feedback from project members as we have some good ideas, but we could perhaps look to get some clarity on how we could proceed this issue as there are various paths we coud take: implementing your original request, updating _all_ views with the singular config or splitting the config options between `site-title` and `page-title`. If the latter, I could update the code so it updates only the `site-title` and I can open open a new issue to update all the templates/views for `page-title`. We could get multiple contributors working on this so could perhaps get done fast
 er!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] joshkadis commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
joshkadis commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-662461190


   Make sense, thanks for checking that out


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-674444922


   Hi @joshkadis I've a bit of a stumbling block. It was suggested that I replace any view which includes `airflow` with the configuration text. I've done a few views but I am not able to find a way to amend some views (e.g, Browser > DAG Runs). I am thinking there is a root/base view which I will need to update, but not sure. Sorry for the delay on this!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
ashb commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-780434934


   @mtrovo I just finished off @pcandoalmeida's PR (resolved conflicts) and have merged it. This will be available in Airflow 2.1.0!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-660200928


   @pcandoalmeida I assigned you to this ticket.:-D 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-662742683


   Thank you for the pointers @mik-laj!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] joshkadis commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
joshkadis commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-660246274


   Ha, I was just coming back to ask the same thing. Good luck @pcandoalmeida !


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mtrovo commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
mtrovo commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-779174783


   @pcandoalmeida what's the status of this issue, is it something I could help with?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb closed issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
ashb closed issue #9538:
URL: https://github.com/apache/airflow/issues/9538


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-661975506


   Good point! I was thinking along similar lines. So anything that is passed in on the configuration file would get converted into a `String` as opposed to actual `HTML` or `Javascript`?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida edited a comment on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida edited a comment on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-685492510


   Hi @bhavaniravi I've got the open issue functionality working in the open PR. I am trying to work on getting the changes update in all possible views. I think splitting it `page-title` and `site-title` could be a good idea. That way, we could work on `site-title` changes incrementally and then merge in once all done, but offer the open issue feature as a first step (possibly). Would be keen to know thoughts.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mtrovo commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
mtrovo commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-780802382


   That's awesome, thanks all!
   
   On Wed, 17 Feb 2021 at 16:07, Josh Kadis <no...@github.com> wrote:
   
   > awesome, thanks all!
   >
   > —
   > You are receiving this because you were mentioned.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/airflow/issues/9538#issuecomment-780664273>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AAA2MW2BAUO73LN4WEQKHD3S7PSVBANCNFSM4OJRUFZQ>
   > .
   >
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] joshkadis commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
joshkadis commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-667252272


   That looks fine to me, thanks!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-665950954


   Hi @joshkadis @mik-laj I've added tests:
   
   - `test_page_site_title()`
   - `test_site_title_config_when_set()`
   - `test_site_title_config_when_not_set()`
   
   To:
   
   - `test_configuration.py`
   - `test_views.py`
   
   I wanted to get some feedback (if that's OK) on ways to test against XSS attacks:
   
   ```
       def test_page_site_title_xss_prevention(self):
           xss_string = "<script>alert('Give me your credit card number')</script>"
           with conf_vars({('webserver', 'site_title'): xss_string}):
               resp = self.client.get('home', follow_redirects=True)
               escaped_xss_string = "&lt;script&gt;alert(Give me your credit card number)&lt;/script&gt;"
               self.check_content_in_response(escaped_xss_string, resp)
   ```
   
   ```
       def test_page_site_title_xss_prevention(self):
           xss_string = "<script>alert('Give me your credit card number')</script>"
           with conf_vars({('webserver', 'site_title'): xss_string}):
               resp = self.client.get(
                   xss_string,
                   follow_redirects=True,
               )
               self.assertEqual(resp.status_code, 404)
               self.assertNotIn(xss_string,
                                resp.data.decode("utf-8"))
   ```
   
   Both tests pass and the latter is taken from another XSS test. I am hoping this checks for the correct logic. If OK, I can start raising the PR.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-660702026


   This could work! I've made some changes and am currently testing the header change, but if that works, I can then look to make it work for `site_title`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-660336778


   Thanks @joshkadis! I've checked the linked code and I believe the referenced line renders the browser's window (page) title. If I understood correctly the suggestion was to enable a configuration option for the UI `DAG` default header, so [here](https://github.com/apache/airflow/blob/ba2b5e24607eeef83fb13c958c5fb89131df4152/airflow/www/templates/airflow/dags.html#L37)? Just thought I'd clarify to make sure I understood the scope of the issue correctly.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-662686985


   It's a good idea to add a test that will check that the content is securely protected against XSS attacks.
   For the Web UI, it is enough for us to have integration tests.
   You should use test client to send HTTP request, check text in response
   https://github.com/apache/airflow/blob/33f0cd2657b2e77ea3477e0c93f13f1474be628e/tests/www/test_views.py#L172
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-660473048


   I think we could certainly look into it as it won't involve too much more work. A thought I have is if the UI options are already extensive, it could be a bit too much and would prefer the header option myself as I think that could be really useful over the page title. But if we think adding both would be valuable, then let's try and go for it.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida edited a comment on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida edited a comment on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-685492510


   Hi @bhavaniravi I've got the open issue functionality working in the open PR. I am trying to work on getting the changes update in all possible views. I think splitting `page-title` and `site-title` could be a good idea. That way, we could work on `site-title` changes incrementally and then merge in once all done, but offer the open issue feature as a first step (possibly). Would be keen to know thoughts.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida edited a comment on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida edited a comment on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-661975506


   Good point! I was thinking along similar lines.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida edited a comment on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida edited a comment on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-685492510


   Hi @bhavaniravi I've got the open issue functionality working in the open PR. I am trying to work on getting the changes updated in all possible views. I think splitting `page-title` and `site-title` could be a good idea. That way, we could work on `site-title` changes incrementally and then merge in once all done, but offer the open issue feature as a first step (possibly). Would be keen to know thoughts.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida edited a comment on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida edited a comment on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-674444922


   Hi @joshkadis I've a bit of a stumbling block. It was suggested that I replace any view which includes `airflow` with the configuration text. I've done a few views but I am not able to find a way to amend others (e.g, Browser > DAG Runs). I am thinking there is a root/base view which I will need to update, but not sure just yet. Sorry for the delay on this!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida edited a comment on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida edited a comment on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-674444922


   Hi @joshkadis I've hit a bit of a stumbling block. It was suggested that I replace any view which includes `airflow` with the configuration text. I've done a few views but I am not able to find a way to amend others (e.g, Browser > DAG Runs). I am thinking there is a root/base view which I will need to update, but not sure just yet. Sorry for the delay on this!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-660118481


   Hi there, I'm new to the project and was wondering if I could work on this?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-685492510


   Hi @bhavaniravi I've got the open issue functionality working in the open PR. I am trying to work on getting the changes update in all possible views.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida edited a comment on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida edited a comment on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-661975506


   
   ![Screenshot 2020-07-21 at 6 23 26 PM](https://user-images.githubusercontent.com/32943309/88086022-98513c80-cb7e-11ea-9bbf-f3f7716dc12f.png)
   
   Good point! I was thinking along similar lines. From what I can see, the current input gets escaped so that it does not render the code; this might be something built into Flask from some reading I have done.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-661501092


   <img width="812" alt="Screenshot 2020-07-21 at 1 23 15 AM" src="https://user-images.githubusercontent.com/32943309/87999014-870e1e80-caf1-11ea-85a0-66eda0d9c2a0.png">
   
   I've got this working for the pager header and the page title. Currently, it's under `admin` in airflow.cfg, but this can be changed if someone thinks there's a better place for this option.  The text defaults correctly to `DAGs` when no option is provided in the config file, but I need to re-work the code so that the page_title default appears, also. At the moment, both elements default to `DAGs`.
   
   I'm not sure how the environment variable option works, so I'm going to look into this next and will then look at fixing the page_title default, before finishing by writing some tests (unless not required). 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida edited a comment on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida edited a comment on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-674444922


   Hi @joshkadis I've a bit of a stumbling block. It was suggested that I replace any view which includes `airflow` with the configuration text. I've done a few views but I am not able to find a way to amend others (e.g, Browser > DAG Runs). I am thinking there is a root/base view which I will need to update, but not sure. Sorry for the delay on this!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-667290161


   lGTM. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] joshkadis commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
joshkadis commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-660539867


   As far as I can, the only configurable UI option is [`navbar_color`](https://airflow.apache.org/docs/stable/configurations-ref.html#navbar-color).
   
   Personally I'd find it super helpful to apply this option to the document title and the `<h2>` in the UI. How about a variable like:
   
   ----
   
   ### site_title
   Sets a title to show in the browser tab and the DAGs overview page.
   
   **Type**
   string
   **Default**
   `DAGs`
   **Environment Variable**
   `AIRFLOW__WEBSERVER__SITE_TITLE`


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] joshkadis commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
joshkadis commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-780664273


   awesome, thanks all!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] joshkadis commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
joshkadis commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-685894959


   @pcandoalmeida Sorry... Where would `page-title` vs`site-title` be rendered? (thanks!)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pcandoalmeida commented on issue #9538: Add config variable for UI page title

Posted by GitBox <gi...@apache.org>.
pcandoalmeida commented on issue #9538:
URL: https://github.com/apache/airflow/issues/9538#issuecomment-780435874


   Thanks @ashb! 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org