Skip to content

Commit

Permalink
fix(machines): default to ascending sort
Browse files Browse the repository at this point in the history
  • Loading branch information
petermakowski committed Nov 7, 2023
1 parent 7554a90 commit 23a9c85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/app/kvm/components/LXDVMsTable/LXDVMsTable.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe("LXDVMsTable", () => {
group_key: null,
page_number: 1,
page_size: 10,
sort_direction: FetchSortDirection.Descending,
sort_direction: FetchSortDirection.Ascending,
sort_key: FetchGroupKey.Hostname,
};
const expectedAction = machineActions.fetch(generateCallId(options), {
Expand All @@ -51,7 +51,7 @@ describe("LXDVMsTable", () => {
group_key: null,
page_number: 1,
page_size: 10,
sort_direction: FetchSortDirection.Descending,
sort_direction: FetchSortDirection.Ascending,
sort_key: FetchGroupKey.Hostname,
});
expect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { SortDirection } from "app/base/types";
import { FetchGroupKey } from "app/store/machine/types";
export const DEFAULTS = {
pageSize: 50,
sortDirection: SortDirection.DESCENDING,
sortDirection: SortDirection.ASCENDING,
// TODO: change this to fqdn when the API supports it:
// https://github.com/canonical/app-tribe/issues/1268
sortKey: FetchGroupKey.Hostname,
Expand Down
2 changes: 1 addition & 1 deletion src/app/tags/views/TagMachines/TagMachines.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ it("dispatches actions to fetch necessary data", () => {
group_key: null,
page_number: 1,
page_size: 50,
sort_direction: FetchSortDirection.Descending,
sort_direction: FetchSortDirection.Ascending,
sort_key: FetchGroupKey.Hostname,
}),
tagActions.fetch(),
Expand Down

0 comments on commit 23a9c85

Please sign in to comment.