### Apache Airflow version

2.1.2

### What happened

Task duration view for triggered dags shows all dag runs instead of n last. Changing the number of runs in the `Runs` drop-down menu doesn't change the view. Additionally the chart loads slowly, it show all dag runs.

![screenshot_2022-03-05_170203](https://user-images.githubusercontent.com/7863204/156891332-5e461661-970d-49bf-82a8-5dd1da57bb02.png)
 

### What you expected to happen

The number of shown dag runs is 25 (like for scheduled dags), and the last runs are shown. The number of runs button should allow to increase / decrease the number of shown dag runs (respectively the task times of the dag runs).

### How to reproduce

Trigger a dag multiple (> 25) times. Look at the "Task Duration" chart.

### Operating System

Linux

### Versions of Apache Airflow Providers

_No response_

### Deployment

Official Apache Airflow Helm Chart

### Deployment details

_No response_

### Anything else

_No response_

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

with create_session() as session:
            session.add(DagModel(dag_id="dag_default_view_old", default_view=None))
            session.commit()
            orm_dag = session.query(DagModel).filter(DagModel.dag_id == "dag_default_view_old").one()
        assert orm_dag.default_view is None
        assert orm_dag.get_default_view() == conf.get("webserver", "dag_default_view").lower()
    def test_dag_is_deactivated_upon_dagfile_deletion(self):
        dag_id = "old_existing_dag"
        dag_fileloc = "/usr/local/airflow/dags/non_existing_path.py"
        dag = DAG(
            dag_id,
            is_paused_upon_creation=True,
        )
        dag.fileloc = dag_fileloc
        session = settings.Session()
        with mock.patch("airflow.models.dag.DagCode.bulk_sync_to_db"):
            dag.sync_to_db(session=session)
        orm_dag = session.query(DagModel).filter(DagModel.dag_id == dag_id).one()
        assert orm_dag.is_active
        assert orm_dag.fileloc == dag_fileloc
        DagModel.deactivate_deleted_dags(list_py_file_paths(settings.DAGS_FOLDER))
        orm_dag = session.query(DagModel).filter(DagModel.dag_id == dag_id).one()
        assert not orm_dag.is_active
        session.execute(DagModel.__table__.delete().where(DagModel.dag_id == dag_id))
        session.close()
    def test_dag_naive_default_args_start_date_with_timezone(self):