ashb commented on code in PR #23804:
URL: https://github.com/apache/airflow/pull/23804#discussion_r880321127


##########
airflow/www/static/js/dags.js:
##########
@@ -124,10 +124,13 @@ $('.typeahead').typeahead({
   },
   autoSelect: false,
   afterSelect(value) {
-    const dagId = value.trim();
-    if (dagId) {
-      const query = new URLSearchParams(window.location.search);
-      window.location = `${gridUrl.replace('__DAG_ID__', dagId)}?${query}`;
+    const query = new URLSearchParams(window.location.search);
+    query.set('search', value.name);
+    if ('owner' == value.type) {
+      window.location = `${DAGS_INDEX}?${query}`;
+    }
+    if ('dag' == value.type) {

Review Comment:
   I'm afraid computer says no:
   
   ```
   /opt/airflow/airflow/www/static/js/dags.js
     129:9   error  Expected literal to be on the right side of ==  yoda
     129:17  error  Expected '===' and instead saw '=='             eqeqeq
     132:9   error  Expected literal to be on the right side of ==  yoda
     132:15  error  Expected '===' and instead saw '=='             eqeqeq
   ```
   
   ```suggestion
       if (value.type === 'owner') {
         window.location = `${DAGS_INDEX}?${query}`;
       }
       if (value.type === 'dag') {
   ```



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

Reply via email to