Skip to content

Migration of all DAG details to existing grid view dag details panel#31690

Merged
bbovenzi merged 11 commits into
apache:mainfrom
Adaverse:dag-details
Jun 6, 2023
Merged

Migration of all DAG details to existing grid view dag details panel#31690
bbovenzi merged 11 commits into
apache:mainfrom
Adaverse:dag-details

Conversation

@Adaverse

@Adaverse Adaverse commented Jun 2, 2023

Copy link
Copy Markdown
Contributor

Addresses few sub tasks: #29859

Tasks

  • Add any important information in /dags/{dag_id}/details to the dag details panel in grid view from the API endpoints dags/{dag_id} and dag/{dag_id}/details (when a user doesn't have a task or run selected).
  • Redirect all URLs (Dag run for all its states and tags)
  • Delete the old dag details page

Below are screenshots -

screen 1

screen 3


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

@boring-cyborg boring-cyborg Bot added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Jun 2, 2023
@Adaverse Adaverse changed the title Dag details Migration of all DAG details to existing grid view dag details panel Jun 2, 2023

@bbovenzi bbovenzi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small changes to maintain UX compatibility for now.

A rebase is needed

Looks like we're not parsing objects correctly:
Screenshot 2023-06-02 at 2 16 00 PM

Final big piece of feedback, (which can be a secondary PR). It's a very long list of data, I think we should play with other ways to show this data. At least two columns on wide screens. Or maybe a dashboard style with various cards?

<Text>Total {val}</Text>
<SimpleStatus state={val as TaskState} />
<LinkButton
href={getRedirectUri(val)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want this to be just a link, not a button

@Adaverse Adaverse Jun 4, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made it a Link!
Shall we direct the users clikcing the Link in a new TAB?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the same tab is fine, new tab is mainly for external links. Wanna make it blue and/or underlined to let users still know they can click it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread airflow/www/views.py
wrapped=conf.getboolean("webserver", "default_wrap"),
)

@expose("/dag_details")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're missing the redirect for this URL and the legacy one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will revert this

@Adaverse Adaverse Jun 2, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reverted the changes! Not much idea on the legacy side. Would need your help with the removal of irrelevant parts

<span class="material-icons" aria-hidden="true">code</span>
Code
</a>
<a href="{{ url_for('Airflow.dag_details', dag_id=dag.dag_id) }}" class="dags-table-more__link">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's leave this and just change the URL

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

U mean to change the url to {{ url_for('Airflow.grid', dag_id=dag.dag_id, num_runs=num_runs) }} i.e the dag detials in Grid view?

@Adaverse Adaverse Jun 4, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But there's already a Grid option here that directs to the above URL.
Lets keep the dag_details.html and all the button leading to it intact and remove them all at once?

<li><a href="{{ url_for('Airflow.gantt', dag_id=dag.dag_id, root=root, num_runs=num_runs_arg, base_date=base_date_arg, execution_date=execution_date_arg) }}">
<span class="material-icons" aria-hidden="true">vertical_distribute</span>
Gantt</a></li>
<li><a href="{{ url_for('Airflow.dag_details', dag_id=dag.dag_id) }}">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, let's leave this and just change the URL. I think it will be best to switch all of these buttons over at once.

@Adaverse Adaverse Jun 3, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming here also you are referring to change the URL to {{ url_for('Airflow.grid', dag_id=dag.dag_id, num_runs=num_runs) }} will create redundant buttons and will look like below

image

I think it's best removed. We can keep it in dags.html anyways. Let me know if u meant something else by any chance.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we can do this in a later PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@Adaverse

Adaverse commented Jun 4, 2023

Copy link
Copy Markdown
Contributor Author

A rebase is needed

Rebased

@Adaverse

Adaverse commented Jun 4, 2023

Copy link
Copy Markdown
Contributor Author

Looks like we're not parsing objects correctly:

Screenshot 2023-06-02 at 2 16 00 PM

Since we were combining the dags/{dag_id} and dag/{dag_id}/details to fetch the full data. Previously the combination logic was not consistent.

So have transferred the combining logic to useQuery itself giving the illusion that it's coming from one API removing the source of the bug.

@Adaverse

Adaverse commented Jun 4, 2023

Copy link
Copy Markdown
Contributor Author

Final big piece of feedback, (which can be a secondary PR). It's a very long list of data, I think we should play with other ways to show this data. At least two columns on wide screens. Or maybe a dashboard style with various cards?

Indeed totally agree. Let's take it up after this. The idea is to view all data in one screen (without any scroll).

@Adaverse
Adaverse requested a review from bbovenzi June 5, 2023 13:25
Comment thread airflow/www/static/js/components/ViewScheduleInterval.tsx Outdated
Comment thread airflow/www/static/js/dag/details/Dag.tsx Outdated
@Adaverse
Adaverse requested a review from bbovenzi June 6, 2023 15:59
@bbovenzi bbovenzi added this to the Airflow 2.7.0 milestone Jun 6, 2023
@bbovenzi
bbovenzi merged commit 02d94c5 into apache:main Jun 6, 2023
@ephraimbuddy ephraimbuddy added the type:improvement Changelog: Improvements label Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues type:improvement Changelog: Improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants