You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "shubhamraj-git (via GitHub)" <gi...@apache.org> on 2024/11/10 17:19:45 UTC

Re: [PR] ISSUE-43043 | AIP-38 | Add more sort options to Dags List [airflow]

shubhamraj-git commented on code in PR #43231:
URL: https://github.com/apache/airflow/pull/43231#discussion_r1835744253


##########
airflow/ui/src/pages/DagsList/DagsList.tsx:
##########
@@ -200,21 +200,31 @@ export const DagsList = () => {
           <Heading py={3} size="md">
             {pluralize("DAG", data?.total_entries)}
           </Heading>
-          {display === "card" ? (
-            <Select
-              data-testid="sort-by-select"
-              onChange={handleSortChange}
-              placeholder="Sort by…"
-              value={orderBy}
-              variant="flushed"
-              width="200px"
-            >
-              <option value="dag_id">Sort by DAG ID (A-Z)</option>
-              <option value="-dag_id">Sort by DAG ID (Z-A)</option>
-            </Select>
-          ) : (
-            false
-          )}
+          <Select
+            data-testid="sort-by-select"
+            onChange={handleSortChange}
+            placeholder="Sort by…"
+            value={orderBy}
+            variant="flushed"
+            width="200px"
+          >
+            <option value="dag_display_name">Sort by Display Name (A-Z)</option>
+            <option value="-dag_display_name">
+              Sort by Display Name (A-Z)
+            </option>
+            <option value="next_dagrun">Sort by Next DAG Run (A-Z)</option>
+            <option value="-next_dagrun">Sort by Next DAG Run (Z-A)</option>
+            <option value="last_run_state">Sort by Last Run State (A-Z)</option>
+            <option value="-last_run_state">
+              Sort by Last Run State (Z-A)
+            </option>
+            <option value="last_run_start_date">
+              Sort by Last Run Start Date (A-Z)
+            </option>
+            <option value="-last_run_start_date">
+              Sort by Last Run Start Date (Z-A)

Review Comment:
   The problem with 2 option is that it would not be user friendly in case of multi selection.



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