### 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)

filelocs.append(dag.fileloc)
            if dag.is_subdag:
                orm_dag.is_subdag = True
                orm_dag.fileloc = dag.parent_dag.fileloc  
                orm_dag.root_dag_id = dag.parent_dag.dag_id  
                orm_dag.owners = dag.parent_dag.owner  
            else:
                orm_dag.is_subdag = False
                orm_dag.fileloc = dag.fileloc
                orm_dag.owners = dag.owner
            orm_dag.is_active = True
            orm_dag.has_import_errors = False
            orm_dag.last_parsed_time = timezone.utcnow()
            orm_dag.default_view = dag.default_view
            orm_dag.description = dag.description
            orm_dag.max_active_tasks = dag.max_active_tasks
            orm_dag.max_active_runs = dag.max_active_runs
            orm_dag.has_task_concurrency_limits = any(t.max_active_tis_per_dag is not None for t in dag.tasks)
            orm_dag.schedule_interval = dag.schedule_interval
            orm_dag.timetable_description = dag.timetable.description
            orm_dag.processor_subdir = processor_subdir
            run: DagRun | None = most_recent_runs.get(dag.dag_id)
            if run is None:
                data_interval = None
            else:
                data_interval = dag.get_run_data_interval(run)
            if num_active_runs.get(dag.dag_id, 0) >= orm_dag.max_active_runs:
                orm_dag.next_dagrun_create_after = None
            else:
                orm_dag.calculate_dagrun_date_fields(dag, data_interval)