[ARVADOS-WORKBENCH2] updated: 1.2.0-228-g59ee572
Git user
git at public.curoverse.com
Mon Sep 3 07:46:52 EDT 2018
Summary of changes:
src/models/collection.ts | 4 +--
src/models/group.ts | 4 +--
src/models/resource.ts | 2 +-
.../ancestors-service/ancestors-service.ts | 4 +--
.../api/filter-builder.test.ts | 0
src/{common => services}/api/filter-builder.ts | 0
src/{common => services}/api/order-builder.test.ts | 0
src/{common => services}/api/order-builder.ts | 2 +-
src/{common => services}/api/url-builder.ts | 0
.../collection-files-service.ts | 2 +-
.../collection-service/collection-service.ts | 23 ++--------------
.../common-resource-service.test.ts | 2 +-
.../common-service}/common-resource-service.ts | 2 +-
.../common-service/trashable-resource-service.ts | 32 ++++++++++++++++++++++
.../container-request-service.ts | 2 +-
.../container-service/container-service.ts | 2 +-
.../favorite-service/favorite-service.test.ts | 4 +--
src/services/favorite-service/favorite-service.ts | 4 +--
src/services/groups-service/groups-service.ts | 25 +++--------------
src/services/keep-service/keep-service.ts | 2 +-
src/services/link-service/link-service.ts | 2 +-
.../project-service/project-service.test.ts | 2 +-
src/services/project-service/project-service.ts | 4 +--
src/services/tag-service/tag-service.ts | 4 +--
src/services/user-service/user-service.ts | 4 +--
.../collection-panel-files-actions.ts | 2 +-
src/store/collections/collection-copy-actions.ts | 4 +--
src/store/collections/collection-create-actions.ts | 2 +-
src/store/collections/collection-move-actions.ts | 2 +-
.../collections/collection-partial-copy-actions.ts | 4 +--
src/store/collections/collection-update-actions.ts | 4 +--
.../data-explorer-middleware-service.ts | 2 +-
.../favorite-panel-middleware-service.ts | 4 +--
src/store/processes/processes-actions.ts | 2 +-
.../project-panel-middleware-service.ts | 6 ++--
src/store/projects/project-create-actions.ts | 2 +-
src/store/projects/project-move-actions.ts | 2 +-
src/store/projects/project-update-actions.ts | 4 +--
.../side-panel-tree/side-panel-tree-actions.ts | 2 +-
.../trash-panel/trash-panel-middleware-service.ts | 8 +++---
src/views-components/data-explorer/renderers.tsx | 6 ++--
.../project-tree-picker/project-tree-picker.tsx | 2 +-
src/views/trash-panel/trash-panel.tsx | 4 +--
43 files changed, 95 insertions(+), 99 deletions(-)
rename src/{common => services}/api/filter-builder.test.ts (100%)
rename src/{common => services}/api/filter-builder.ts (100%)
rename src/{common => services}/api/order-builder.test.ts (100%)
rename src/{common => services}/api/order-builder.ts (94%)
rename src/{common => services}/api/url-builder.ts (100%)
rename src/{common/api => services/common-service}/common-resource-service.test.ts (98%)
rename src/{common/api => services/common-service}/common-resource-service.ts (98%)
create mode 100644 src/services/common-service/trashable-resource-service.ts
via 59ee572e791985a36bdd2015c9b494145109e8ed (commit)
from 7792c5200c3144fcc75e102f2aeaf4862252ec8e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 59ee572e791985a36bdd2015c9b494145109e8ed
Author: Daniel Kos <daniel.kos at contractors.roche.com>
Date: Mon Sep 3 13:46:46 2018 +0200
CR fixes III
Feature #13828
Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos at contractors.roche.com>
diff --git a/src/models/collection.ts b/src/models/collection.ts
index 5215998..f8e38f9 100644
--- a/src/models/collection.ts
+++ b/src/models/collection.ts
@@ -2,9 +2,9 @@
//
// SPDX-License-Identifier: AGPL-3.0
-import { ResourceKind, TrashResource } from "./resource";
+import { ResourceKind, TrashableResource } from "./resource";
-export interface CollectionResource extends TrashResource {
+export interface CollectionResource extends TrashableResource {
kind: ResourceKind.COLLECTION;
name: string;
description: string;
diff --git a/src/models/group.ts b/src/models/group.ts
index 5319250..e2d0367 100644
--- a/src/models/group.ts
+++ b/src/models/group.ts
@@ -2,9 +2,9 @@
//
// SPDX-License-Identifier: AGPL-3.0
-import { ResourceKind, TrashResource } from "./resource";
+import { ResourceKind, TrashableResource } from "./resource";
-export interface GroupResource extends TrashResource {
+export interface GroupResource extends TrashableResource {
kind: ResourceKind.GROUP;
name: string;
groupClass: GroupClass | null;
diff --git a/src/models/resource.ts b/src/models/resource.ts
index aff1b24..3d40b50 100644
--- a/src/models/resource.ts
+++ b/src/models/resource.ts
@@ -14,7 +14,7 @@ export interface Resource {
etag: string;
}
-export interface TrashResource extends Resource {
+export interface TrashableResource extends Resource {
trashAt: string;
deleteAt: string;
isTrashed: boolean;
diff --git a/src/services/ancestors-service/ancestors-service.ts b/src/services/ancestors-service/ancestors-service.ts
index daab58b..f90b4a3 100644
--- a/src/services/ancestors-service/ancestors-service.ts
+++ b/src/services/ancestors-service/ancestors-service.ts
@@ -6,7 +6,7 @@ import { GroupsService } from "~/services/groups-service/groups-service";
import { UserService } from '../user-service/user-service';
import { GroupResource } from '~/models/group';
import { UserResource } from '~/models/user';
-import { extractUuidObjectType, ResourceObjectType, TrashResource } from "~/models/resource";
+import { extractUuidObjectType, ResourceObjectType, TrashableResource } from "~/models/resource";
export class AncestorService {
constructor(
@@ -14,7 +14,7 @@ export class AncestorService {
private userService: UserService
) { }
- async ancestors(uuid: string, rootUuid: string): Promise<Array<UserResource | GroupResource | TrashResource>> {
+ async ancestors(uuid: string, rootUuid: string): Promise<Array<UserResource | GroupResource | TrashableResource>> {
const service = this.getService(extractUuidObjectType(uuid));
if (service) {
const resource = await service.get(uuid);
diff --git a/src/common/api/filter-builder.test.ts b/src/services/api/filter-builder.test.ts
similarity index 100%
rename from src/common/api/filter-builder.test.ts
rename to src/services/api/filter-builder.test.ts
diff --git a/src/common/api/filter-builder.ts b/src/services/api/filter-builder.ts
similarity index 100%
rename from src/common/api/filter-builder.ts
rename to src/services/api/filter-builder.ts
diff --git a/src/common/api/order-builder.test.ts b/src/services/api/order-builder.test.ts
similarity index 100%
rename from src/common/api/order-builder.test.ts
rename to src/services/api/order-builder.test.ts
diff --git a/src/common/api/order-builder.ts b/src/services/api/order-builder.ts
similarity index 94%
rename from src/common/api/order-builder.ts
rename to src/services/api/order-builder.ts
index 196b069..03f2696 100644
--- a/src/common/api/order-builder.ts
+++ b/src/services/api/order-builder.ts
@@ -3,7 +3,7 @@
// SPDX-License-Identifier: AGPL-3.0
import * as _ from "lodash";
-import { Resource } from "~/models/resource";
+import { Resource } from "src/models/resource";
export enum OrderDirection { ASC, DESC }
diff --git a/src/common/api/url-builder.ts b/src/services/api/url-builder.ts
similarity index 100%
rename from src/common/api/url-builder.ts
rename to src/services/api/url-builder.ts
diff --git a/src/services/collection-files-service/collection-files-service.ts b/src/services/collection-files-service/collection-files-service.ts
index 1d9a537..6f88a72 100644
--- a/src/services/collection-files-service/collection-files-service.ts
+++ b/src/services/collection-files-service/collection-files-service.ts
@@ -5,7 +5,7 @@
import { CollectionService } from "../collection-service/collection-service";
import { parseKeepManifestText, stringifyKeepManifest } from "./collection-manifest-parser";
import { mapManifestToCollectionFilesTree } from "./collection-manifest-mapper";
-import { CommonResourceService } from "~/common/api/common-resource-service";
+import { CommonResourceService } from "~/services/common-service/common-resource-service";
import * as _ from "lodash";
export class CollectionFilesService {
diff --git a/src/services/collection-service/collection-service.ts b/src/services/collection-service/collection-service.ts
index 581747b..6e6f2a9 100644
--- a/src/services/collection-service/collection-service.ts
+++ b/src/services/collection-service/collection-service.ts
@@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0
-import { CommonResourceService } from "~/common/api/common-resource-service";
import { CollectionResource } from "~/models/collection";
import { AxiosInstance } from "axios";
import { CollectionFile, CollectionDirectory } from "~/models/collection-file";
@@ -11,11 +10,11 @@ import { AuthService } from "../auth-service/auth-service";
import { mapTreeValues } from "~/models/tree";
import { parseFilesResponse } from "./collection-service-files-response";
import { fileToArrayBuffer } from "~/common/file";
-import * as _ from 'lodash';
+import { TrashableResourceService } from "~/services/common-service/trashable-resource-service";
export type UploadProgress = (fileId: number, loaded: number, total: number, currentTime: number) => void;
-export class CollectionService extends CommonResourceService<CollectionResource> {
+export class CollectionService extends TrashableResourceService<CollectionResource> {
constructor(serverApi: AxiosInstance, private webdavClient: WebDAV, private authService: AuthService) {
super(serverApi, "collections");
}
@@ -68,22 +67,4 @@ export class CollectionService extends CommonResourceService<CollectionResource>
return this.webdavClient.put(fileURL, fileContent, requestConfig);
}
-
- trash(uuid: string): Promise<CollectionResource> {
- return this.serverApi
- .post(this.resourceType + `${uuid}/trash`)
- .then(CommonResourceService.mapResponseKeys);
- }
-
- untrash(uuid: string): Promise<CollectionResource> {
- const params = {
- ensure_unique_name: true
- };
- return this.serverApi
- .post(this.resourceType + `${uuid}/untrash`, {
- params: CommonResourceService.mapKeys(_.snakeCase)(params)
- })
- .then(CommonResourceService.mapResponseKeys);
- }
-
}
diff --git a/src/common/api/common-resource-service.test.ts b/src/services/common-service/common-resource-service.test.ts
similarity index 98%
rename from src/common/api/common-resource-service.test.ts
rename to src/services/common-service/common-resource-service.test.ts
index a1d5e08..d67d5db 100644
--- a/src/common/api/common-resource-service.test.ts
+++ b/src/services/common-service/common-resource-service.test.ts
@@ -5,7 +5,7 @@
import { CommonResourceService } from "./common-resource-service";
import axios, { AxiosInstance } from "axios";
import MockAdapter from "axios-mock-adapter";
-import { Resource } from "~/models/resource";
+import { Resource } from "src/models/resource";
export const mockResourceService = <R extends Resource, C extends CommonResourceService<R>>(Service: new (client: AxiosInstance) => C) => {
const axiosInstance = axios.create();
diff --git a/src/common/api/common-resource-service.ts b/src/services/common-service/common-resource-service.ts
similarity index 98%
rename from src/common/api/common-resource-service.ts
rename to src/services/common-service/common-resource-service.ts
index 2c9bfb5..3fb4004 100644
--- a/src/common/api/common-resource-service.ts
+++ b/src/services/common-service/common-resource-service.ts
@@ -4,7 +4,7 @@
import * as _ from "lodash";
import { AxiosInstance, AxiosPromise } from "axios";
-import { Resource } from "~/models/resource";
+import { Resource } from "src/models/resource";
export interface ListArguments {
limit?: number;
diff --git a/src/services/common-service/trashable-resource-service.ts b/src/services/common-service/trashable-resource-service.ts
new file mode 100644
index 0000000..23e7366
--- /dev/null
+++ b/src/services/common-service/trashable-resource-service.ts
@@ -0,0 +1,32 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import * as _ from "lodash";
+import { AxiosInstance } from "axios";
+import { TrashableResource } from "src/models/resource";
+import { CommonResourceService } from "~/services/common-service/common-resource-service";
+
+export class TrashableResourceService<T extends TrashableResource> extends CommonResourceService<T> {
+
+ constructor(serverApi: AxiosInstance, resourceType: string) {
+ super(serverApi, resourceType);
+ }
+
+ trash(uuid: string): Promise<T> {
+ return this.serverApi
+ .post(this.resourceType + `${uuid}/trash`)
+ .then(CommonResourceService.mapResponseKeys);
+ }
+
+ untrash(uuid: string): Promise<T> {
+ const params = {
+ ensure_unique_name: true
+ };
+ return this.serverApi
+ .post(this.resourceType + `${uuid}/untrash`, {
+ params: CommonResourceService.mapKeys(_.snakeCase)(params)
+ })
+ .then(CommonResourceService.mapResponseKeys);
+ }
+}
diff --git a/src/services/container-request-service/container-request-service.ts b/src/services/container-request-service/container-request-service.ts
index 8cf8e74..01805ff 100644
--- a/src/services/container-request-service/container-request-service.ts
+++ b/src/services/container-request-service/container-request-service.ts
@@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0
-import { CommonResourceService } from "~/common/api/common-resource-service";
+import { CommonResourceService } from "~/services/common-service/common-resource-service";
import { AxiosInstance } from "axios";
import { ContainerRequestResource } from '../../models/container-request';
diff --git a/src/services/container-service/container-service.ts b/src/services/container-service/container-service.ts
index 698c7f5..0ace1f6 100644
--- a/src/services/container-service/container-service.ts
+++ b/src/services/container-service/container-service.ts
@@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0
-import { CommonResourceService } from "~/common/api/common-resource-service";
+import { CommonResourceService } from "~/services/common-service/common-resource-service";
import { AxiosInstance } from "axios";
import { ContainerResource } from '../../models/container';
diff --git a/src/services/favorite-service/favorite-service.test.ts b/src/services/favorite-service/favorite-service.test.ts
index d4bf9ac..beaf869 100644
--- a/src/services/favorite-service/favorite-service.test.ts
+++ b/src/services/favorite-service/favorite-service.test.ts
@@ -6,8 +6,8 @@ import { LinkService } from "../link-service/link-service";
import { GroupsService } from "../groups-service/groups-service";
import { FavoriteService } from "./favorite-service";
import { LinkClass } from "~/models/link";
-import { mockResourceService } from "~/common/api/common-resource-service.test";
-import { FilterBuilder } from "~/common/api/filter-builder";
+import { mockResourceService } from "~/services/common-service/common-resource-service.test";
+import { FilterBuilder } from "~/services/api/filter-builder";
describe("FavoriteService", () => {
diff --git a/src/services/favorite-service/favorite-service.ts b/src/services/favorite-service/favorite-service.ts
index 7a49c8c..4601054 100644
--- a/src/services/favorite-service/favorite-service.ts
+++ b/src/services/favorite-service/favorite-service.ts
@@ -5,8 +5,8 @@
import { LinkService } from "../link-service/link-service";
import { GroupsService, GroupContentsResource } from "../groups-service/groups-service";
import { LinkClass } from "~/models/link";
-import { FilterBuilder, joinFilters } from "~/common/api/filter-builder";
-import { ListResults } from "~/common/api/common-resource-service";
+import { FilterBuilder, joinFilters } from "~/services/api/filter-builder";
+import { ListResults } from "~/services/common-service/common-resource-service";
export interface FavoriteListArguments {
limit?: number;
diff --git a/src/services/groups-service/groups-service.ts b/src/services/groups-service/groups-service.ts
index 4756aa3..b285e92 100644
--- a/src/services/groups-service/groups-service.ts
+++ b/src/services/groups-service/groups-service.ts
@@ -3,12 +3,13 @@
// SPDX-License-Identifier: AGPL-3.0
import * as _ from "lodash";
-import { CommonResourceService, ListResults } from "~/common/api/common-resource-service";
+import { CommonResourceService, ListResults } from "~/services/common-service/common-resource-service";
import { AxiosInstance } from "axios";
import { CollectionResource } from "~/models/collection";
import { ProjectResource } from "~/models/project";
import { ProcessResource } from "~/models/process";
-import { TrashResource } from "~/models/resource";
+import { TrashableResource } from "~/models/resource";
+import { TrashableResourceService } from "~/services/common-service/trashable-resource-service";
export interface ContentsArguments {
limit?: number;
@@ -24,7 +25,7 @@ export type GroupContentsResource =
ProjectResource |
ProcessResource;
-export class GroupsService<T extends TrashResource = TrashResource> extends CommonResourceService<T> {
+export class GroupsService<T extends TrashableResource = TrashableResource> extends TrashableResourceService<T> {
constructor(serverApi: AxiosInstance) {
super(serverApi, "groups");
@@ -43,24 +44,6 @@ export class GroupsService<T extends TrashResource = TrashResource> extends Comm
})
.then(CommonResourceService.mapResponseKeys);
}
-
- trash(uuid: string): Promise<T> {
- return this.serverApi
- .post(this.resourceType + `${uuid}/trash`)
- .then(CommonResourceService.mapResponseKeys);
- }
-
- untrash(uuid: string): Promise<T> {
- const params = {
- ensure_unique_name: true
- };
- return this.serverApi
- .post(this.resourceType + `${uuid}/untrash`, {
- params: CommonResourceService.mapKeys(_.snakeCase)(params)
- })
- .then(CommonResourceService.mapResponseKeys);
- }
-
}
export enum GroupContentsResourcePrefix {
diff --git a/src/services/keep-service/keep-service.ts b/src/services/keep-service/keep-service.ts
index fd49823..77d06d9 100644
--- a/src/services/keep-service/keep-service.ts
+++ b/src/services/keep-service/keep-service.ts
@@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0
-import { CommonResourceService } from "~/common/api/common-resource-service";
+import { CommonResourceService } from "~/services/common-service/common-resource-service";
import { AxiosInstance } from "axios";
import { KeepResource } from "~/models/keep";
diff --git a/src/services/link-service/link-service.ts b/src/services/link-service/link-service.ts
index 8724904..c77def5 100644
--- a/src/services/link-service/link-service.ts
+++ b/src/services/link-service/link-service.ts
@@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0
-import { CommonResourceService } from "~/common/api/common-resource-service";
+import { CommonResourceService } from "~/services/common-service/common-resource-service";
import { LinkResource } from "~/models/link";
import { AxiosInstance } from "axios";
diff --git a/src/services/project-service/project-service.test.ts b/src/services/project-service/project-service.test.ts
index a717736..11c2f61 100644
--- a/src/services/project-service/project-service.test.ts
+++ b/src/services/project-service/project-service.test.ts
@@ -4,7 +4,7 @@
import axios from "axios";
import { ProjectService } from "./project-service";
-import { FilterBuilder } from "~/common/api/filter-builder";
+import { FilterBuilder } from "~/services/api/filter-builder";
describe("CommonResourceService", () => {
const axiosInstance = axios.create();
diff --git a/src/services/project-service/project-service.ts b/src/services/project-service/project-service.ts
index e916f3c..2dc3eeb 100644
--- a/src/services/project-service/project-service.ts
+++ b/src/services/project-service/project-service.ts
@@ -5,8 +5,8 @@
import { GroupsService } from "../groups-service/groups-service";
import { ProjectResource } from "~/models/project";
import { GroupClass } from "~/models/group";
-import { ListArguments } from "~/common/api/common-resource-service";
-import { FilterBuilder, joinFilters } from "~/common/api/filter-builder";
+import { ListArguments } from "~/services/common-service/common-resource-service";
+import { FilterBuilder, joinFilters } from "~/services/api/filter-builder";
export class ProjectService extends GroupsService<ProjectResource> {
diff --git a/src/services/tag-service/tag-service.ts b/src/services/tag-service/tag-service.ts
index 52e481a..9f5b34f 100644
--- a/src/services/tag-service/tag-service.ts
+++ b/src/services/tag-service/tag-service.ts
@@ -4,9 +4,9 @@
import { LinkService } from "../link-service/link-service";
import { LinkClass } from "~/models/link";
-import { FilterBuilder } from "~/common/api/filter-builder";
+import { FilterBuilder } from "~/services/api/filter-builder";
import { TagTailType, TagResource } from "~/models/tag";
-import { OrderBuilder } from "~/common/api/order-builder";
+import { OrderBuilder } from "~/services/api/order-builder";
export class TagService {
diff --git a/src/services/user-service/user-service.ts b/src/services/user-service/user-service.ts
index 3c09a87..31cc4bb 100644
--- a/src/services/user-service/user-service.ts
+++ b/src/services/user-service/user-service.ts
@@ -3,11 +3,11 @@
// SPDX-License-Identifier: AGPL-3.0
import { AxiosInstance } from "axios";
-import { CommonResourceService } from "~/common/api/common-resource-service";
+import { CommonResourceService } from "~/services/common-service/common-resource-service";
import { UserResource } from "~/models/user";
export class UserService extends CommonResourceService<UserResource> {
constructor(serverApi: AxiosInstance) {
super(serverApi, "users");
}
-}
\ No newline at end of file
+}
diff --git a/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts b/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts
index 413fedf..f214fd2 100644
--- a/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts
+++ b/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts
@@ -12,7 +12,7 @@ import { dialogActions } from '../../dialog/dialog-actions';
import { getNodeValue } from "~/models/tree";
import { filterCollectionFilesBySelection } from './collection-panel-files-state';
import { startSubmit, initialize, stopSubmit, reset } from 'redux-form';
-import { getCommonResourceServiceError, CommonResourceServiceError } from "~/common/api/common-resource-service";
+import { getCommonResourceServiceError, CommonResourceServiceError } from "~/services/common-service/common-resource-service";
import { getDialog } from "~/store/dialog/dialog-reducer";
import { resetPickerProjectTree } from '~/store/project-tree-picker/project-tree-picker-actions';
diff --git a/src/store/collections/collection-copy-actions.ts b/src/store/collections/collection-copy-actions.ts
index 15ea855..87ba042 100644
--- a/src/store/collections/collection-copy-actions.ts
+++ b/src/store/collections/collection-copy-actions.ts
@@ -8,7 +8,7 @@ import { initialize, startSubmit, stopSubmit } from 'redux-form';
import { resetPickerProjectTree } from '~/store/project-tree-picker/project-tree-picker-actions';
import { RootState } from '~/store/store';
import { ServiceRepository } from '~/services/services';
-import { getCommonResourceServiceError, CommonResourceServiceError } from '~/common/api/common-resource-service';
+import { getCommonResourceServiceError, CommonResourceServiceError } from '~/services/common-service/common-resource-service';
export const COLLECTION_COPY_FORM_NAME = 'collectionCopyFormName';
@@ -46,4 +46,4 @@ export const copyCollection = (resource: CollectionCopyFormDialogData) =>
}
return ;
}
- };
\ No newline at end of file
+ };
diff --git a/src/store/collections/collection-create-actions.ts b/src/store/collections/collection-create-actions.ts
index 5a1246a..254d6a8 100644
--- a/src/store/collections/collection-create-actions.ts
+++ b/src/store/collections/collection-create-actions.ts
@@ -7,7 +7,7 @@ import { reset, startSubmit, stopSubmit, initialize } from 'redux-form';
import { RootState } from '~/store/store';
import { dialogActions } from "~/store/dialog/dialog-actions";
import { ServiceRepository } from '~/services/services';
-import { getCommonResourceServiceError, CommonResourceServiceError } from "~/common/api/common-resource-service";
+import { getCommonResourceServiceError, CommonResourceServiceError } from "~/services/common-service/common-resource-service";
import { uploadCollectionFiles } from './collection-upload-actions';
import { fileUploaderActions } from '~/store/file-uploader/file-uploader-actions';
diff --git a/src/store/collections/collection-move-actions.ts b/src/store/collections/collection-move-actions.ts
index dcd7b1a..420bcd0 100644
--- a/src/store/collections/collection-move-actions.ts
+++ b/src/store/collections/collection-move-actions.ts
@@ -7,7 +7,7 @@ import { dialogActions } from "~/store/dialog/dialog-actions";
import { startSubmit, stopSubmit, initialize } from 'redux-form';
import { ServiceRepository } from '~/services/services';
import { RootState } from '~/store/store';
-import { getCommonResourceServiceError, CommonResourceServiceError } from "~/common/api/common-resource-service";
+import { getCommonResourceServiceError, CommonResourceServiceError } from "~/services/common-service/common-resource-service";
import { snackbarActions } from '~/store/snackbar/snackbar-actions';
import { projectPanelActions } from '~/store/project-panel/project-panel-action';
import { MoveToFormDialogData } from '~/store/move-to-dialog/move-to-dialog';
diff --git a/src/store/collections/collection-partial-copy-actions.ts b/src/store/collections/collection-partial-copy-actions.ts
index a063aba..dedf75e 100644
--- a/src/store/collections/collection-partial-copy-actions.ts
+++ b/src/store/collections/collection-partial-copy-actions.ts
@@ -10,7 +10,7 @@ import { dialogActions } from '~/store/dialog/dialog-actions';
import { ServiceRepository } from '~/services/services';
import { filterCollectionFilesBySelection } from '../collection-panel/collection-panel-files/collection-panel-files-state';
import { snackbarActions } from '~/store/snackbar/snackbar-actions';
-import { getCommonResourceServiceError, CommonResourceServiceError } from '~/common/api/common-resource-service';
+import { getCommonResourceServiceError, CommonResourceServiceError } from '~/services/common-service/common-resource-service';
export const COLLECTION_PARTIAL_COPY_FORM_NAME = 'COLLECTION_PARTIAL_COPY_DIALOG';
@@ -68,4 +68,4 @@ export const copyCollectionPartial = ({ name, description, projectUuid }: Collec
}
}
}
- };
\ No newline at end of file
+ };
diff --git a/src/store/collections/collection-update-actions.ts b/src/store/collections/collection-update-actions.ts
index 75e03d5..03bb72a 100644
--- a/src/store/collections/collection-update-actions.ts
+++ b/src/store/collections/collection-update-actions.ts
@@ -12,7 +12,7 @@ import { dataExplorerActions } from "~/store/data-explorer/data-explorer-action"
import { snackbarActions } from "~/store/snackbar/snackbar-actions";
import { ContextMenuResource } from '~/store/context-menu/context-menu-reducer';
import { PROJECT_PANEL_ID } from "~/views/project-panel/project-panel";
-import { getCommonResourceServiceError, CommonResourceServiceError } from "~/common/api/common-resource-service";
+import { getCommonResourceServiceError, CommonResourceServiceError } from "~/services/common-service/common-resource-service";
import { ServiceRepository } from "~/services/services";
import { CollectionResource } from '~/models/collection';
@@ -46,4 +46,4 @@ export const updateCollection = (collection: Partial<CollectionResource>) =>
}
return;
}
- };
\ No newline at end of file
+ };
diff --git a/src/store/data-explorer/data-explorer-middleware-service.ts b/src/store/data-explorer/data-explorer-middleware-service.ts
index 7ad74f2..934af7b 100644
--- a/src/store/data-explorer/data-explorer-middleware-service.ts
+++ b/src/store/data-explorer/data-explorer-middleware-service.ts
@@ -7,7 +7,7 @@ import { RootState } from "../store";
import { DataColumns } from "~/components/data-table/data-table";
import { DataTableFilterItem } from "~/components/data-table-filters/data-table-filters";
import { DataExplorer } from './data-explorer-reducer';
-import { ListResults } from '~/common/api/common-resource-service';
+import { ListResults } from '~/services/common-service/common-resource-service';
export abstract class DataExplorerMiddlewareService {
protected readonly id: string;
diff --git a/src/store/favorite-panel/favorite-panel-middleware-service.ts b/src/store/favorite-panel/favorite-panel-middleware-service.ts
index e5857dd..f808b97 100644
--- a/src/store/favorite-panel/favorite-panel-middleware-service.ts
+++ b/src/store/favorite-panel/favorite-panel-middleware-service.ts
@@ -8,11 +8,11 @@ import { RootState } from "../store";
import { DataColumns } from "~/components/data-table/data-table";
import { ServiceRepository } from "~/services/services";
import { SortDirection } from "~/components/data-table/data-column";
-import { FilterBuilder } from "~/common/api/filter-builder";
+import { FilterBuilder } from "~/services/api/filter-builder";
import { updateFavorites } from "../favorites/favorites-actions";
import { favoritePanelActions } from "./favorite-panel-action";
import { Dispatch, MiddlewareAPI } from "redux";
-import { OrderBuilder, OrderDirection } from "~/common/api/order-builder";
+import { OrderBuilder, OrderDirection } from "~/services/api/order-builder";
import { LinkResource } from "~/models/link";
import { GroupContentsResource, GroupContentsResourcePrefix } from "~/services/groups-service/groups-service";
import { resourcesActions } from "~/store/resources/resources-actions";
diff --git a/src/store/processes/processes-actions.ts b/src/store/processes/processes-actions.ts
index d667517..f026d37 100644
--- a/src/store/processes/processes-actions.ts
+++ b/src/store/processes/processes-actions.ts
@@ -6,7 +6,7 @@ import { Dispatch } from "redux";
import { RootState } from '~/store/store';
import { ServiceRepository } from '~/services/services';
import { updateResources } from '~/store/resources/resources-actions';
-import { FilterBuilder } from '~/common/api/filter-builder';
+import { FilterBuilder } from '~/services/api/filter-builder';
import { ContainerRequestResource } from '../../models/container-request';
export const loadProcess = (uuid: string) =>
diff --git a/src/store/project-panel/project-panel-middleware-service.ts b/src/store/project-panel/project-panel-middleware-service.ts
index da7f5b3..aade417 100644
--- a/src/store/project-panel/project-panel-middleware-service.ts
+++ b/src/store/project-panel/project-panel-middleware-service.ts
@@ -8,8 +8,8 @@ import { RootState } from "../store";
import { DataColumns } from "~/components/data-table/data-table";
import { ServiceRepository } from "~/services/services";
import { SortDirection } from "~/components/data-table/data-column";
-import { OrderBuilder, OrderDirection } from "~/common/api/order-builder";
-import { FilterBuilder } from "~/common/api/filter-builder";
+import { OrderBuilder, OrderDirection } from "~/services/api/order-builder";
+import { FilterBuilder } from "~/services/api/filter-builder";
import { GroupContentsResourcePrefix, GroupContentsResource } from "~/services/groups-service/groups-service";
import { updateFavorites } from "../favorites/favorites-actions";
import { projectPanelActions, PROJECT_PANEL_CURRENT_UUID } from './project-panel-action';
@@ -19,7 +19,7 @@ import { updateResources } from "~/store/resources/resources-actions";
import { getProperty } from "~/store/properties/properties";
import { snackbarActions } from '../snackbar/snackbar-actions';
import { DataExplorer, getDataExplorer } from '../data-explorer/data-explorer-reducer';
-import { ListResults } from '~/common/api/common-resource-service';
+import { ListResults } from '~/services/common-service/common-resource-service';
export class ProjectPanelMiddlewareService extends DataExplorerMiddlewareService {
constructor(private services: ServiceRepository, id: string) {
diff --git a/src/store/projects/project-create-actions.ts b/src/store/projects/project-create-actions.ts
index 76f2059..6d704c2 100644
--- a/src/store/projects/project-create-actions.ts
+++ b/src/store/projects/project-create-actions.ts
@@ -6,7 +6,7 @@ import { Dispatch } from "redux";
import { reset, startSubmit, stopSubmit, initialize } from 'redux-form';
import { RootState } from '~/store/store';
import { dialogActions } from "~/store/dialog/dialog-actions";
-import { getCommonResourceServiceError, CommonResourceServiceError } from '~/common/api/common-resource-service';
+import { getCommonResourceServiceError, CommonResourceServiceError } from '~/services/common-service/common-resource-service';
import { ProjectResource } from '~/models/project';
import { ServiceRepository } from '~/services/services';
diff --git a/src/store/projects/project-move-actions.ts b/src/store/projects/project-move-actions.ts
index 6e24314..c251bdf 100644
--- a/src/store/projects/project-move-actions.ts
+++ b/src/store/projects/project-move-actions.ts
@@ -7,7 +7,7 @@ import { dialogActions } from "~/store/dialog/dialog-actions";
import { startSubmit, stopSubmit, initialize } from 'redux-form';
import { ServiceRepository } from '~/services/services';
import { RootState } from '~/store/store';
-import { getCommonResourceServiceError, CommonResourceServiceError } from "~/common/api/common-resource-service";
+import { getCommonResourceServiceError, CommonResourceServiceError } from "~/services/common-service/common-resource-service";
import { MoveToFormDialogData } from '~/store/move-to-dialog/move-to-dialog';
import { resetPickerProjectTree } from '~/store/project-tree-picker/project-tree-picker-actions';
diff --git a/src/store/projects/project-update-actions.ts b/src/store/projects/project-update-actions.ts
index 39b97b2..8e327eb 100644
--- a/src/store/projects/project-update-actions.ts
+++ b/src/store/projects/project-update-actions.ts
@@ -7,7 +7,7 @@ import { initialize, startSubmit, stopSubmit } from 'redux-form';
import { RootState } from "~/store/store";
import { dialogActions } from "~/store/dialog/dialog-actions";
import { ContextMenuResource } from '~/store/context-menu/context-menu-reducer';
-import { getCommonResourceServiceError, CommonResourceServiceError } from "~/common/api/common-resource-service";
+import { getCommonResourceServiceError, CommonResourceServiceError } from "~/services/common-service/common-resource-service";
import { ServiceRepository } from "~/services/services";
import { ProjectResource } from '~/models/project';
@@ -40,4 +40,4 @@ export const updateProject = (project: Partial<ProjectResource>) =>
}
return ;
}
- };
\ No newline at end of file
+ };
diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts
index 8fbc375..c102ab3 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -7,7 +7,7 @@ import { treePickerActions } from "~/store/tree-picker/tree-picker-actions";
import { createTreePickerNode, TreePickerNode } from '~/store/tree-picker/tree-picker';
import { RootState } from '../store';
import { ServiceRepository } from '~/services/services';
-import { FilterBuilder } from '~/common/api/filter-builder';
+import { FilterBuilder } from '~/services/api/filter-builder';
import { resourcesActions } from '../resources/resources-actions';
import { getTreePicker, TreePicker } from '../tree-picker/tree-picker';
import { TreeItemStatus } from "~/components/tree/tree";
diff --git a/src/store/trash-panel/trash-panel-middleware-service.ts b/src/store/trash-panel/trash-panel-middleware-service.ts
index 90a8b19..19ed3be 100644
--- a/src/store/trash-panel/trash-panel-middleware-service.ts
+++ b/src/store/trash-panel/trash-panel-middleware-service.ts
@@ -10,16 +10,16 @@ import { RootState } from "../store";
import { DataColumns } from "~/components/data-table/data-table";
import { ServiceRepository } from "~/services/services";
import { SortDirection } from "~/components/data-table/data-column";
-import { FilterBuilder } from "~/common/api/filter-builder";
+import { FilterBuilder } from "~/services/api/filter-builder";
import { trashPanelActions } from "./trash-panel-action";
import { Dispatch, MiddlewareAPI } from "redux";
-import { OrderBuilder, OrderDirection } from "~/common/api/order-builder";
+import { OrderBuilder, OrderDirection } from "~/services/api/order-builder";
import { GroupContentsResourcePrefix } from "~/services/groups-service/groups-service";
import { TrashPanelColumnNames, TrashPanelFilter } from "~/views/trash-panel/trash-panel";
import { ProjectResource } from "~/models/project";
import { ProjectPanelColumnNames } from "~/views/project-panel/project-panel";
import { updateFavorites } from "~/store/favorites/favorites-actions";
-import { TrashResource } from "~/models/resource";
+import { TrashableResource } from "~/models/resource";
import { snackbarActions } from "~/store/snackbar/snackbar-actions";
import { updateResources } from "~/store/resources/resources-actions";
@@ -63,7 +63,7 @@ export class TrashPanelMiddlewareService extends DataExplorerMiddlewareService {
});
const items = listResults.items
- .filter(it => (it as TrashResource).isTrashed)
+ .filter(it => (it as TrashableResource).isTrashed)
.map(it => it.uuid);
api.dispatch(trashPanelActions.SET_ITEMS({
diff --git a/src/views-components/data-explorer/renderers.tsx b/src/views-components/data-explorer/renderers.tsx
index 9bcbcf6..c96813d 100644
--- a/src/views-components/data-explorer/renderers.tsx
+++ b/src/views-components/data-explorer/renderers.tsx
@@ -5,7 +5,7 @@
import * as React from 'react';
import { Grid, Typography } from '@material-ui/core';
import { FavoriteStar } from '../favorite-star/favorite-star';
-import { ResourceKind, TrashResource } from '~/models/resource';
+import { ResourceKind, TrashableResource } from '~/models/resource';
import { ProjectIcon, CollectionIcon, ProcessIcon, DefaultIcon } from '~/components/icon/icon';
import { formatDate, formatFileSize } from '~/common/formatters';
import { resourceLabel } from '~/common/labels';
@@ -64,13 +64,13 @@ export const ResourceLastModifiedDate = connect(
export const ResourceTrashDate = connect(
(state: RootState, props: { uuid: string }) => {
- const resource = getResource<TrashResource>(props.uuid)(state.resources);
+ const resource = getResource<TrashableResource>(props.uuid)(state.resources);
return { date: resource ? resource.trashAt : '' };
})((props: { date: string }) => renderDate(props.date));
export const ResourceDeleteDate = connect(
(state: RootState, props: { uuid: string }) => {
- const resource = getResource<TrashResource>(props.uuid)(state.resources);
+ const resource = getResource<TrashableResource>(props.uuid)(state.resources);
return { date: resource ? resource.deleteAt : '' };
})((props: { date: string }) => renderDate(props.date));
diff --git a/src/views-components/project-tree-picker/project-tree-picker.tsx b/src/views-components/project-tree-picker/project-tree-picker.tsx
index 3859180..9139ee7 100644
--- a/src/views-components/project-tree-picker/project-tree-picker.tsx
+++ b/src/views-components/project-tree-picker/project-tree-picker.tsx
@@ -15,7 +15,7 @@ import { ProjectIcon, FavoriteIcon, ProjectsIcon, ShareMeIcon } from "~/componen
import { createTreePickerNode } from "~/store/tree-picker/tree-picker";
import { RootState } from "~/store/store";
import { ServiceRepository } from "~/services/services";
-import { FilterBuilder } from "~/common/api/filter-builder";
+import { FilterBuilder } from "~/services/api/filter-builder";
import { WrappedFieldProps } from 'redux-form';
type ProjectTreePickerProps = Pick<TreePickerProps, 'onContextMenu' | 'toggleItemActive' | 'toggleItemOpen'>;
diff --git a/src/views/trash-panel/trash-panel.tsx b/src/views/trash-panel/trash-panel.tsx
index 0d3a4dd..4922656 100644
--- a/src/views/trash-panel/trash-panel.tsx
+++ b/src/views/trash-panel/trash-panel.tsx
@@ -10,7 +10,7 @@ import { DataColumns } from '~/components/data-table/data-table';
import { RootState } from '~/store/store';
import { DataTableFilterItem } from '~/components/data-table-filters/data-table-filters';
import { SortDirection } from '~/components/data-table/data-column';
-import { ResourceKind, TrashResource } from '~/models/resource';
+import { ResourceKind, TrashableResource } from '~/models/resource';
import { resourceLabel } from '~/common/labels';
import { ArvadosTheme } from '~/common/custom-theme';
import { TrashIcon } from '~/components/icon/icon';
@@ -143,7 +143,7 @@ export const TrashPanel = withStyles(styles)(
handleContextMenu = (event: React.MouseEvent<HTMLElement>, resourceUuid: string) => {
const kind = resourceKindToContextMenuKind(resourceUuid);
- const resource = getResource(resourceUuid)(this.props.resources) as TrashResource;
+ const resource = getResource(resourceUuid)(this.props.resources) as TrashableResource;
if (kind && resource) {
this.props.dispatch<any>(openContextMenu(event, {
name: '',
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list