21386: favorites loading view good Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa...
authorLisa Knox <lisaknox83@gmail.com>
Wed, 21 Feb 2024 15:18:20 +0000 (10:18 -0500)
committerLisa Knox <lisaknox83@gmail.com>
Wed, 21 Feb 2024 15:18:20 +0000 (10:18 -0500)
services/workbench2/src/store/favorite-panel/favorite-panel-middleware-service.ts

index 0229834c3bc148ee6c48e64fdca945e11716b80c..a15690b3f4569fb6ac4e50389606e16c800e1d51 100644 (file)
@@ -77,7 +77,6 @@ export class FavoritePanelMiddlewareService extends DataExplorerMiddlewareServic
                     response.items.push(it);
                 });
 
-                api.dispatch(progressIndicatorActions.PERSIST_STOP_WORKING(this.getId()));
                 api.dispatch(resourcesActions.SET_RESOURCES(response.items));
                 await api.dispatch<any>(loadMissingProcessesInformation(response.items));
                 api.dispatch(favoritePanelActions.SET_ITEMS({
@@ -87,8 +86,8 @@ export class FavoritePanelMiddlewareService extends DataExplorerMiddlewareServic
                     rowsPerPage: response.limit
                 }));
                 api.dispatch<any>(updateFavorites(response.items.map((item: any) => item.uuid)));
-            } catch (e) {
                 api.dispatch(progressIndicatorActions.PERSIST_STOP_WORKING(this.getId()));
+            } catch (e) {
                 api.dispatch(favoritePanelActions.SET_ITEMS({
                     items: [],
                     itemsAvailable: 0,
@@ -96,6 +95,7 @@ export class FavoritePanelMiddlewareService extends DataExplorerMiddlewareServic
                     rowsPerPage: dataExplorer.rowsPerPage
                 }));
                 api.dispatch(couldNotFetchFavoritesContents());
+                api.dispatch(progressIndicatorActions.PERSIST_STOP_WORKING(this.getId()));
             }
         }
     }