bbovenzi commented on a change in pull request #18405:
URL: https://github.com/apache/airflow/pull/18405#discussion_r713348938
##########
File path: airflow/www/static/js/dags.js
##########
@@ -37,6 +37,20 @@ const lastDagRunsUrl = getMetaValue('last_dag_runs_url');
const dagStatsUrl = getMetaValue('dag_stats_url');
const taskStatsUrl = getMetaValue('task_stats_url');
+const FILTER_TAGS = 'filter_tags';
+
+const filterTags = localStorage.getItem(FILTER_TAGS);
+const initialQuery = new URLSearchParams(window.location.search);
+
+// Update the url if there is no tags query but localstorage has tags saved
+if (!initialQuery.has('tags') && filterTags) {
+ const tags = JSON.parse(filterTags);
+ tags.forEach((tag) => {
+ initialQuery.append('tags', tag);
+ });
+ window.location = `${DAGS_INDEX}?${initialQuery.toString()}`;
Review comment:
Unfortunately, this one needed to stay. but reseting to no tags no
longer requires 2 redirects (one in js and one in views.py)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]