From cab0049c6cdec06aaaad0979191c3100d8763bff Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Thu, 23 Jun 2022 13:33:48 +0200 Subject: [PATCH 01/18] Minimal fix for folder imports --- lib/galaxy/webapps/galaxy/api/history_contents.py | 3 ++- lib/galaxy/webapps/galaxy/services/history_contents.py | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/galaxy/webapps/galaxy/api/history_contents.py b/lib/galaxy/webapps/galaxy/api/history_contents.py index 6b3f871cac2..a60f62e86ca 100644 --- a/lib/galaxy/webapps/galaxy/api/history_contents.py +++ b/lib/galaxy/webapps/galaxy/api/history_contents.py @@ -9,6 +9,7 @@ from typing import ( List, Optional, Set, + Union, ) import dateutil.parser @@ -494,7 +495,7 @@ class FastAPIHistoryContents: ), serialization_params: SerializationParams = Depends(query_serialization_params), payload: CreateHistoryContentPayload = Body(...), - ) -> AnyHistoryContentItem: + ) -> Union[AnyHistoryContentItem, List[AnyHistoryContentItem]]: """Create a new `HDA` or `HDCA` in the given History.""" payload.type = type or payload.type return self.service.create(trans, history_id, payload, serialization_params) diff --git a/lib/galaxy/webapps/galaxy/services/history_contents.py b/lib/galaxy/webapps/galaxy/services/history_contents.py index a1a51b7364d..c9539f48c9d 100644 --- a/lib/galaxy/webapps/galaxy/services/history_contents.py +++ b/lib/galaxy/webapps/galaxy/services/history_contents.py @@ -343,7 +343,7 @@ class HistoriesContentsService(ServiceBase): history_id: EncodedDatabaseIdField, payload: CreateHistoryContentPayload, serialization_params: SerializationParams, - ) -> AnyHistoryContentItem: + ) -> Union[AnyHistoryContentItem, List[AnyHistoryContentItem]]: """ Create a new HDA or HDCA. @@ -354,6 +354,7 @@ class HistoriesContentsService(ServiceBase): self.decode_id(history_id), trans.user, current_history=trans.history ) + serialization_params.default_view = "detailed" history_content_type = payload.type if history_content_type == HistoryContentType.dataset: source = payload.source @@ -1053,7 +1054,7 @@ class HistoriesContentsService(ServiceBase): for ld in traverse(folder): hda = ld.library_dataset_dataset_association.to_history_dataset_association(history, add_to_history=True) hda_dict = self.hda_serializer.serialize_to_view( - hda, user=trans.user, trans=trans, default_view='detailed', **serialization_params.dict() + hda, user=trans.user, trans=trans, **serialization_params.dict() ) rval.append(hda_dict) else: @@ -1087,7 +1088,6 @@ class HistoriesContentsService(ServiceBase): return None trans.sa_session.flush() - serialization_params.default_view = 'detailed' return self.hda_serializer.serialize_to_view( hda, user=trans.user, trans=trans, **serialization_params.dict() ) @@ -1187,7 +1187,6 @@ class HistoriesContentsService(ServiceBase): # if the consumer specified keys or view, use the secondary serializer if serialization_params.view or serialization_params.keys: - serialization_params.default_view = 'detailed' return self.hdca_serializer.serialize_to_view( dataset_collection_instance, user=trans.user, trans=trans, **serialization_params.dict() ) From 1e6207223bac6702826d07c1ee6d4c4712523354 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Thu, 23 Jun 2022 18:39:14 +0200 Subject: [PATCH 02/18] Fix pagination in History selector modal And simplify the logic a bit --- .../CurrentHistory/HistoryNavigation.vue | 2 +- .../History/Modals/SelectorModal.vue | 50 +++++++------------ 2 files changed, 19 insertions(+), 33 deletions(-) diff --git a/client/src/components/History/CurrentHistory/HistoryNavigation.vue b/client/src/components/History/CurrentHistory/HistoryNavigation.vue index 503e077671e..5fd1bcc7af4 100644 --- a/client/src/components/History/CurrentHistory/HistoryNavigation.vue +++ b/client/src/components/History/CurrentHistory/HistoryNavigation.vue @@ -135,7 +135,7 @@ diff --git a/client/src/components/History/Modals/SelectorModal.vue b/client/src/components/History/Modals/SelectorModal.vue index 5ab70afcc06..0f30eb298dc 100644 --- a/client/src/components/History/Modals/SelectorModal.vue +++ b/client/src/components/History/Modals/SelectorModal.vue @@ -5,21 +5,20 @@ + @row-selected="switchToHistory" + @filtered="onFiltered"> @@ -29,7 +28,7 @@ @@ -37,7 +36,6 @@ From e7a8adca33bb3d1549c7470316bdc82e7ccd7f16 Mon Sep 17 00:00:00 2001 From: Alireza Heidari Date: Wed, 22 Jun 2022 00:40:26 +0430 Subject: [PATCH 14/18] Improve current list offset calculation --- client/src/components/History/CurrentHistory/HistoryPanel.vue | 4 ++-- client/src/components/History/Index.vue | 4 ++-- client/src/components/History/Layout/Listing.vue | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/src/components/History/CurrentHistory/HistoryPanel.vue b/client/src/components/History/CurrentHistory/HistoryPanel.vue index 6dc788b0f07..f90a3965007 100644 --- a/client/src/components/History/CurrentHistory/HistoryPanel.vue +++ b/client/src/components/History/CurrentHistory/HistoryPanel.vue @@ -97,7 +97,7 @@ :items="itemsLoaded" :query-key="queryKey" @scroll="onScroll"> -