diff --git a/client/src/api/schema/schema.ts b/client/src/api/schema/schema.ts index a5ec94d89576..44f5457df6bf 100644 --- a/client/src/api/schema/schema.ts +++ b/client/src/api/schema/schema.ts @@ -9752,7 +9752,7 @@ export interface components { * Name * @description The name of the creator. */ - name: string; + name?: string | null; /** Telephone */ telephone?: string | null; /** URL */ @@ -11005,10 +11005,9 @@ export interface components { }; /** * Latest workflow UUID - * Format: uuid4 * @description TODO */ - latest_workflow_uuid: string; + latest_workflow_uuid?: string | null; /** * License * @description SPDX Identifier of the license associated with this workflow. @@ -12108,18 +12107,17 @@ export interface components { * Label * @description Label of the input. */ - label: string; + label: string | null; /** * UUID - * Format: uuid4 * @description Universal unique identifier of the input. */ - uuid: string; + uuid: string | null; /** * Value * @description TODO */ - value: string; + value: Record | null; }; /** WorkflowInvocationCollectionView */ WorkflowInvocationCollectionView: { @@ -12475,7 +12473,7 @@ export interface components { * Name * @description The name of the creator. */ - name: string; + name?: string | null; /** Telephone */ telephone?: string | null; /** URL */ diff --git a/client/src/components/Grid/configs/historiesShared.ts b/client/src/components/Grid/configs/historiesShared.ts index e3be64ff3f07..65a65e8a54ac 100644 --- a/client/src/components/Grid/configs/historiesShared.ts +++ b/client/src/components/Grid/configs/historiesShared.ts @@ -112,7 +112,7 @@ const gridConfig: GridConfig = { filtering: new Filtering(validFilters, undefined, false, false), getData: getData, plural: "Histories", - sortBy: "name", + sortBy: "update_time", sortDesc: true, sortKeys: ["create_time", "name", "update_time", "username"], title: "Shared Histories", diff --git a/client/src/components/History/Content/ContentItem.test.js b/client/src/components/History/Content/ContentItem.test.js index fba74e873824..269df341756c 100644 --- a/client/src/components/History/Content/ContentItem.test.js +++ b/client/src/components/History/Content/ContentItem.test.js @@ -5,6 +5,8 @@ import { PiniaVuePlugin } from "pinia"; import { getLocalVue } from "tests/jest/helpers"; import VueRouter from "vue-router"; +import { mockFetcher } from "@/api/schema/__mocks__"; + import ContentItem from "./ContentItem"; jest.mock("components/History/model/queries"); @@ -14,23 +16,31 @@ localVue.use(VueRouter); localVue.use(PiniaVuePlugin); const router = new VueRouter(); +jest.mock("vue-router/composables", () => ({ + useRoute: jest.fn(() => ({})), + useRouter: jest.fn(() => ({})), +})); + // mock queries updateContentFields.mockImplementation(async () => {}); +const item = { + id: "item_id", + some_data: "some_data", + tags: ["tag1", "tag2", "tag3"], + deleted: false, + visible: true, +}; + describe("ContentItem", () => { let wrapper; beforeEach(() => { + mockFetcher.path("/api/datasets/{dataset_id}").method("get").mock({ data: item }); wrapper = mount(ContentItem, { propsData: { expandDataset: true, - item: { - id: "item_id", - some_data: "some_data", - tags: ["tag1", "tag2", "tag3"], - deleted: false, - visible: true, - }, + item, id: 1, isDataset: true, isHistoryItem: true, diff --git a/client/src/components/History/Content/ContentItem.vue b/client/src/components/History/Content/ContentItem.vue index 1e56b0a0d451..0e5497d645cf 100644 --- a/client/src/components/History/Content/ContentItem.vue +++ b/client/src/components/History/Content/ContentItem.vue @@ -1,3 +1,300 @@ + + - - diff --git a/client/src/components/Panels/Buttons/FavoritesButton.vue b/client/src/components/Panels/Buttons/FavoritesButton.vue index 6c375eb30100..c7d285bb4253 100644 --- a/client/src/components/Panels/Buttons/FavoritesButton.vue +++ b/client/src/components/Panels/Buttons/FavoritesButton.vue @@ -1,5 +1,61 @@ + + - - diff --git a/client/src/components/Panels/Common/ToolSearch.vue b/client/src/components/Panels/Common/ToolSearch.vue index 4f4e326c12ec..2b94c93a53ae 100644 --- a/client/src/components/Panels/Common/ToolSearch.vue +++ b/client/src/components/Panels/Common/ToolSearch.vue @@ -1,9 +1,10 @@ diff --git a/client/src/components/Workflow/WorkflowInvocationsCount.vue b/client/src/components/Workflow/WorkflowInvocationsCount.vue index 9c3eecab16c6..321e2568a4c8 100644 --- a/client/src/components/Workflow/WorkflowInvocationsCount.vue +++ b/client/src/components/Workflow/WorkflowInvocationsCount.vue @@ -1,13 +1,13 @@