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/10/20 17:19:59 UTC

[GitHub] [airflow] bbovenzi commented on a diff in pull request #27141: Fix some bug in web ui dags list page (auto-refresh & jump search null state)

bbovenzi commented on code in PR #27141:
URL: https://github.com/apache/airflow/pull/27141#discussion_r1000914202


##########
airflow/www/static/js/dags.js:
##########
@@ -204,33 +204,41 @@ function drawDagStatsForDag(dagId, states) {
     });
 
   g.append('svg:a')
-    .attr('href', (d) => `${dagRunUrl}?_flt_3_dag_id=${dagId}&_flt_3_state=${d.state}`)
+    .attr('href', (d) => {
+      const params = new URLSearchParams();
+      params.append('_flt_3_dag_id', dagId);
+      /* eslint no-unused-expressions: ["error", { "allowTernary": true }] */
+      d.state ? params.append('_flt_3_state', d.state) : params.append('_flt_8_state', '');

Review Comment:
   ```suggestion
         params.append('_flt_3_state', d.state || '');
   ```
   I think this would be simpler, no? and then we don't need the eslint exception?



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