Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ const columns: Array<ColumnDef<ConnectionResponse>> = [
];

export const Connections = () => {
const { setTableURLState, tableURLState } = useTableURLState({
sorting: [{ desc: false, id: "connection_id" }],
});
const { setTableURLState, tableURLState } = useTableURLState();
const [searchParams, setSearchParams] = useSearchParams();
const { NAME_PATTERN: NAME_PATTERN_PARAM }: SearchParamsKeysType = SearchParamsKeys;
const [connectionIdPattern, setConnectionIdPattern] = useState(
Expand All @@ -97,7 +95,7 @@ export const Connections = () => {
useConnectionTypeMeta(); // Pre-fetch connection type metadata
const { pagination, sorting } = tableURLState;
const [sort] = sorting;
const orderBy = sort ? `${sort.desc ? "-" : ""}${sort.id}` : "-connection_id";
const orderBy = sort ? `${sort.desc ? "-" : ""}${sort.id}` : "connection_id";
const { data, error, isFetching, isLoading } = useConnectionServiceGetConnections({
connectionIdPattern: connectionIdPattern ?? undefined,
limit: pagination.pageSize,
Expand Down
4 changes: 2 additions & 2 deletions airflow-core/src/airflow/ui/src/pages/DagsList/DagsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const columns: Array<ColumnDef<DAGWithLatestDagRunsResponse>> = [
},
},
{
accessorKey: "dag_id",
accessorKey: "dag_display_name",
cell: ({ row: { original } }) => (
<Link asChild color="fg.info" fontWeight="bold">
<RouterLink to={`/dags/${original.dag_id}`}>{original.dag_display_name}</RouterLink>
Expand Down Expand Up @@ -180,7 +180,7 @@ export const DagsList = () => {
);

const [sort] = sorting;
const orderBy = sort ? `${sort.desc ? "-" : ""}${sort.id}` : "-last_run_start_date";
const orderBy = sort ? `${sort.desc ? "-" : ""}${sort.id}` : "dag_display_name";

const handleSearchChange = (value: string) => {
if (value) {
Expand Down