projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add typescript paths to top level folders
[arvados-workbench2.git]
/
src
/
store
/
details-panel
/
details-panel-action.ts
diff --git
a/src/store/details-panel/details-panel-action.ts
b/src/store/details-panel/details-panel-action.ts
index cb5a709e3ffe861c36656b84f726b25cc367cf0e..cadf517ac2376f50f9b643ac0cc5f0519371caa4 100644
(file)
--- a/
src/store/details-panel/details-panel-action.ts
+++ b/
src/store/details-panel/details-panel-action.ts
@@
-3,11
+3,10
@@
// SPDX-License-Identifier: AGPL-3.0
import { unionize, ofType, UnionOf } from "unionize";
// SPDX-License-Identifier: AGPL-3.0
import { unionize, ofType, UnionOf } from "unionize";
-import { CommonResourceService } from "../../common/api/common-resource-service";
import { Dispatch } from "redux";
import { Dispatch } from "redux";
-import { Resource, ResourceKind } from "
../..
/models/resource";
+import { Resource, ResourceKind } from "
~
/models/resource";
import { RootState } from "../store";
import { RootState } from "../store";
-import { ServiceRepository } from "
../..
/services/services";
+import { ServiceRepository } from "
~
/services/services";
export const detailsPanelActions = unionize({
TOGGLE_DETAILS_PANEL: ofType<{}>(),
export const detailsPanelActions = unionize({
TOGGLE_DETAILS_PANEL: ofType<{}>(),
@@
-18,13
+17,10
@@
export const detailsPanelActions = unionize({
export type DetailsPanelAction = UnionOf<typeof detailsPanelActions>;
export const loadDetails = (uuid: string, kind: ResourceKind) =>
export type DetailsPanelAction = UnionOf<typeof detailsPanelActions>;
export const loadDetails = (uuid: string, kind: ResourceKind) =>
- (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
+
async
(dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
dispatch(detailsPanelActions.LOAD_DETAILS({ uuid, kind }));
dispatch(detailsPanelActions.LOAD_DETAILS({ uuid, kind }));
- getService(services, kind)
- .get(uuid)
- .then(project => {
- dispatch(detailsPanelActions.LOAD_DETAILS_SUCCESS({ item: project }));
- });
+ const item = await getService(services, kind).get(uuid);
+ dispatch(detailsPanelActions.LOAD_DETAILS_SUCCESS({ item }));
};
const getService = (services: ServiceRepository, kind: ResourceKind) => {
};
const getService = (services: ServiceRepository, kind: ResourceKind) => {