19142: Unselect mounts when loading all process and project view
authorStephen Smith <stephen@curii.com>
Wed, 3 Aug 2022 19:45:13 +0000 (15:45 -0400)
committerStephen Smith <stephen@curii.com>
Wed, 3 Aug 2022 19:45:13 +0000 (15:45 -0400)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

src/store/all-processes-panel/all-processes-panel-middleware-service.ts
src/store/processes/processes-actions.ts
src/store/project-panel/project-panel-middleware-service.ts

index 88b64e6243955f7a9e15d90e51176efc29932bad..8881d72e5d7faf29ffb26e333a82e11d023cd359 100644 (file)
@@ -37,7 +37,11 @@ export class AllProcessesPanelMiddlewareService extends DataExplorerMiddlewareSe
             try {
                 api.dispatch(progressIndicatorActions.START_WORKING(this.getId()));
                 const processItems = await this.services.containerRequestService.list(
-                    { ...getParams(dataExplorer) });
+                    {
+                        ...getParams(dataExplorer),
+                        // Omit mounts when viewing all process panel
+                        select: containerRequestFieldsNoMounts,
+                    });
 
                 api.dispatch(progressIndicatorActions.PERSIST_STOP_WORKING(this.getId()));
                 api.dispatch(resourcesActions.SET_RESOURCES(processItems.items));
@@ -62,6 +66,43 @@ export class AllProcessesPanelMiddlewareService extends DataExplorerMiddlewareSe
     }
 }
 
+export const containerRequestFieldsNoMounts = [
+    "command",
+    "container_count_max",
+    "container_count",
+    "container_image",
+    "container_uuid",
+    "created_at",
+    "cwd",
+    "description",
+    "environment",
+    "etag",
+    "expires_at",
+    "filters",
+    "href",
+    "kind",
+    "log_uuid",
+    "modified_at",
+    "modified_by_client_uuid",
+    "modified_by_user_uuid",
+    "name",
+    "output_name",
+    "output_path",
+    "output_properties",
+    "output_storage_classes",
+    "output_ttl",
+    "output_uuid",
+    "owner_uuid",
+    "priority",
+    "properties",
+    "requesting_container_uuid",
+    "runtime_constraints",
+    "scheduling_parameters",
+    "state",
+    "use_existing",
+    "uuid",
+];
+
 const getParams = ( dataExplorer: DataExplorer ) => ({
     ...dataExplorerToListParams(dataExplorer),
     order: getOrder(dataExplorer),
index 213e292bfe6f047e306d20dda6ad477e7652b525..9758ab65cf7e526cad5c0446d01abea49607591d 100644 (file)
@@ -34,13 +34,54 @@ export const loadProcess = (containerRequestUuid: string) =>
         return { containerRequest };
     };
 
-export const loadContainers = (filters: string) =>
+export const loadContainers = (filters: string, loadMounts: boolean = true) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
-        const { items } = await services.containerService.list({ filters });
+        let args: any = { filters };
+        if (!loadMounts) {
+            args.select = containerFieldsNoMounts;
+        }
+        const { items } = await services.containerService.list(args);
         dispatch<any>(updateResources(items));
         return items;
     };
 
+const containerFieldsNoMounts = [
+    "auth_uuid",
+    "command",
+    "container_image",
+    "created_at",
+    "cwd",
+    "environment",
+    "etag",
+    "exit_code",
+    "finished_at",
+    "gateway_address",
+    "href",
+    "interactive_session_started",
+    "kind",
+    "lock_count",
+    "locked_by_uuid",
+    "log",
+    "modified_at",
+    "modified_by_client_uuid",
+    "modified_by_user_uuid",
+    "output_path",
+    "output_properties",
+    "output_storage_classes",
+    "output",
+    "owner_uuid",
+    "priority",
+    "progress",
+    "runtime_auth_scopes",
+    "runtime_constraints",
+    "runtime_status",
+    "runtime_user_uuid",
+    "scheduling_parameters",
+    "started_at",
+    "state",
+    "uuid",
+]
+
 export const cancelRunningWorkflow = (uuid: string) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         try {
index ccfa4fff9fcc4d0a34cef6a2af20f7388344a425..d8a5d82dc22b5444cbd4196abb18e8402b2b929c 100644 (file)
@@ -89,7 +89,8 @@ export const loadMissingProcessesInformation = (resources: GroupContentsResource
         }, []);
         if (containerUuids.length > 0) {
             await dispatch<any>(loadContainers(
-                new FilterBuilder().addIn('uuid', containerUuids).getFilters()
+                new FilterBuilder().addIn('uuid', containerUuids).getFilters(),
+                false
             ));
         }
     };