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 2022/03/09 13:30:53 UTC

[GitHub] [airflow] EricGao888 opened a new pull request #22118: Separate dag UI display name from dag_id

EricGao888 opened a new pull request #22118:
URL: https://github.com/apache/airflow/pull/22118


   * Enable users to use their national characters, which are usually non-ASCIIs as the display names of their dags.
   * To be more specific, this commit adds `display_name` field to dag model, and uses it as dag name instead of `dag_id` in airflow homepage. 
   * related: #22073


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] EricGao888 commented on a change in pull request #22118: Separate dag UI display name from dag_id

Posted by GitBox <gi...@apache.org>.
EricGao888 commented on a change in pull request #22118:
URL: https://github.com/apache/airflow/pull/22118#discussion_r822832550



##########
File path: airflow/www/templates/airflow/dags.html
##########
@@ -164,7 +164,7 @@ <h2>{{ page_title }}</h2>
                 <td>
                   <a href="{{ url_for('Airflow.'+ dag.get_default_view(), dag_id=dag.dag_id) }}"
                      title="{{ dag.description[0:80] + '…' if dag.description and dag.description|length > 80 else dag.description|default('', true) }}">
-                    <strong>{{ dag.dag_id }}</strong>
+                    <strong>{{ dag.display_name }}</strong>

Review comment:
       > Let's still expose the `dag_id` on hover.
   
   Cool! Will fix it in the next commit. Thx for the suggestions : )




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] bbovenzi commented on a change in pull request #22118: Separate dag UI display name from dag_id

Posted by GitBox <gi...@apache.org>.
bbovenzi commented on a change in pull request #22118:
URL: https://github.com/apache/airflow/pull/22118#discussion_r822680661



##########
File path: airflow/www/templates/airflow/dags.html
##########
@@ -164,7 +164,7 @@ <h2>{{ page_title }}</h2>
                 <td>
                   <a href="{{ url_for('Airflow.'+ dag.get_default_view(), dag_id=dag.dag_id) }}"
                      title="{{ dag.description[0:80] + '…' if dag.description and dag.description|length > 80 else dag.description|default('', true) }}">
-                    <strong>{{ dag.dag_id }}</strong>
+                    <strong>{{ dag.display_name }}</strong>

Review comment:
       ```suggestion
                       <strong title="{{ dag.dag_id }}">{{ dag.display_name }}</strong>
   ```
   
   Let's still expose the `dag_id` on hover.




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] bbovenzi commented on pull request #22118: Separate dag UI display name from dag_id

Posted by GitBox <gi...@apache.org>.
bbovenzi commented on pull request #22118:
URL: https://github.com/apache/airflow/pull/22118#issuecomment-1062952359


   Nice work. I think there are a few other areas of the UI we need to update once all the python code is ready.
   
   - The title of a DAG page: https://github.com/apache/airflow/blob/main/airflow/www/templates/airflow/dag.html#L83
   - We'll want to show both `dag_id` and `display_name` to all the details pages: https://github.com/apache/airflow/blob/main/airflow/www/templates/airflow/dag_details.html
   https://github.com/apache/airflow/blob/main/airflow/www/templates/airflow/dagrun_details.html
   https://github.com/apache/airflow/blob/main/airflow/www/templates/airflow/task.html
   - We probably want to search by `display_name` on the home page: https://github.com/apache/airflow/blob/main/airflow/www/views.py#L707
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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